public class ContentItemResource
extends org.apache.stanbol.commons.web.base.resource.BaseStanbolResource
| Modifier and Type | Class and Description |
|---|---|
static class |
ContentItemResource.EntityExtractionSummary |
static class |
ContentItemResource.EntitySuggestion |
static class |
ContentItemResource.Mention
Mentions of
EntityExtractionSummaries. |
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.stanbol.enhancer.servicesapi.ContentItem |
contentItem |
Map<org.apache.clerezza.rdf.core.UriRef,String> |
defaultThumbnails |
static org.apache.clerezza.rdf.core.UriRef |
DEPICTION |
protected URI |
downloadHref |
protected Map<org.apache.clerezza.rdf.core.UriRef,Map<ContentItemResource.EntityExtractionSummary,ContentItemResource.EntityExtractionSummary>> |
extractionsByTypeMap
Map holding the extraction mapped by
Properties.DC_TYPE and the
Properties.ENHANCER_SELECTED_TEXT. |
protected DateFormat |
format
Used to format dates on the UI
|
protected URI |
imageSrc |
protected String |
localId |
protected URI |
metadataHref |
protected String |
serializationFormat |
protected org.apache.clerezza.rdf.core.serializedform.Serializer |
serializer |
static org.apache.clerezza.rdf.core.UriRef |
SUMMARY |
protected String |
textContent |
static org.apache.clerezza.rdf.core.UriRef |
THUMBNAIL |
| Constructor and Description |
|---|
ContentItemResource(String localId,
org.apache.stanbol.enhancer.servicesapi.ContentItem ci,
javax.ws.rs.core.UriInfo uriInfo,
String storePath,
org.apache.clerezza.rdf.core.serializedform.Serializer serializer,
javax.servlet.ServletContext servletContext,
org.apache.stanbol.enhancer.servicesapi.EnhancementException enhancementException) |
| Modifier and Type | Method and Description |
|---|---|
String |
extractLabel(org.apache.clerezza.rdf.core.UriRef uri) |
javax.ws.rs.core.Response |
get(javax.ws.rs.core.HttpHeaders headers) |
org.apache.stanbol.enhancer.servicesapi.helper.execution.ChainExecution |
getChainExecution() |
Collection<ContentItemResource.EntityExtractionSummary> |
getConceptOccurrences() |
org.apache.stanbol.enhancer.servicesapi.ContentItem |
getContentItem() |
URI |
getDownloadHref() |
Collection<org.apache.stanbol.enhancer.servicesapi.helper.execution.Execution> |
getEngineExecutions() |
String |
getExecutionCompletionTime(org.apache.stanbol.enhancer.servicesapi.helper.execution.Execution ex) |
String |
getExecutionDurationText(org.apache.stanbol.enhancer.servicesapi.helper.execution.Execution ex) |
String |
getExecutionOffsetText(org.apache.stanbol.enhancer.servicesapi.helper.execution.Execution ex) |
String |
getExecutionStartTime(org.apache.stanbol.enhancer.servicesapi.helper.execution.Execution ex) |
String |
getExecutionStatusText(org.apache.stanbol.enhancer.servicesapi.helper.execution.Execution ex) |
URI |
getImageSrc() |
String |
getLocalId() |
URI |
getMetadataHref() |
Collection<ContentItemResource.EntityExtractionSummary> |
getOccurrences(org.apache.clerezza.rdf.core.UriRef type) |
Collection<ContentItemResource.EntityExtractionSummary> |
getOrganizationOccurrences() |
Collection<ContentItemResource.EntityExtractionSummary> |
getOtherOccurrences() |
Collection<org.apache.clerezza.rdf.core.UriRef> |
getOtherOccurrencyTypes()
Used to print occurrences with other types than the natively supported
|
Collection<ContentItemResource.EntityExtractionSummary> |
getPersonOccurrences() |
Collection<ContentItemResource.EntityExtractionSummary> |
getPlaceOccurrences() |
String |
getPlacesAsJSON() |
String |
getRdfMetadata() |
String |
getRdfMetadata(String mediatype) |
String |
getTextContent() |
boolean |
hasOccurrences()
Checks if there are Occurrences
|
void |
setRdfSerializationFormat(String format) |
public static final org.apache.clerezza.rdf.core.UriRef SUMMARY
public static final org.apache.clerezza.rdf.core.UriRef THUMBNAIL
public static final org.apache.clerezza.rdf.core.UriRef DEPICTION
protected org.apache.stanbol.enhancer.servicesapi.ContentItem contentItem
protected String localId
protected String textContent
protected URI imageSrc
protected URI downloadHref
protected URI metadataHref
protected final org.apache.clerezza.rdf.core.serializedform.Serializer serializer
protected String serializationFormat
protected DateFormat format
protected Map<org.apache.clerezza.rdf.core.UriRef,Map<ContentItemResource.EntityExtractionSummary,ContentItemResource.EntityExtractionSummary>> extractionsByTypeMap
Properties.DC_TYPE and the
Properties.ENHANCER_SELECTED_TEXT. This map is initialised by initOccurrences().public ContentItemResource(String localId, org.apache.stanbol.enhancer.servicesapi.ContentItem ci, javax.ws.rs.core.UriInfo uriInfo, String storePath, org.apache.clerezza.rdf.core.serializedform.Serializer serializer, javax.servlet.ServletContext servletContext, org.apache.stanbol.enhancer.servicesapi.EnhancementException enhancementException) throws IOException
IOExceptionpublic String getRdfMetadata(String mediatype) throws UnsupportedEncodingException
UnsupportedEncodingExceptionpublic String getRdfMetadata() throws UnsupportedEncodingException
UnsupportedEncodingExceptionpublic org.apache.stanbol.enhancer.servicesapi.ContentItem getContentItem()
public String getLocalId()
public String getTextContent()
public URI getImageSrc()
public URI getDownloadHref()
public URI getMetadataHref()
public boolean hasOccurrences()
public Collection<org.apache.clerezza.rdf.core.UriRef> getOtherOccurrencyTypes()
public String extractLabel(org.apache.clerezza.rdf.core.UriRef uri)
public Collection<ContentItemResource.EntityExtractionSummary> getOccurrences(org.apache.clerezza.rdf.core.UriRef type)
public Collection<ContentItemResource.EntityExtractionSummary> getPersonOccurrences() throws org.apache.clerezza.rdf.core.sparql.ParseException
org.apache.clerezza.rdf.core.sparql.ParseExceptionpublic Collection<ContentItemResource.EntityExtractionSummary> getOtherOccurrences() throws org.apache.clerezza.rdf.core.sparql.ParseException
org.apache.clerezza.rdf.core.sparql.ParseExceptionpublic Collection<ContentItemResource.EntityExtractionSummary> getOrganizationOccurrences() throws org.apache.clerezza.rdf.core.sparql.ParseException
org.apache.clerezza.rdf.core.sparql.ParseExceptionpublic Collection<ContentItemResource.EntityExtractionSummary> getPlaceOccurrences() throws org.apache.clerezza.rdf.core.sparql.ParseException
org.apache.clerezza.rdf.core.sparql.ParseExceptionpublic Collection<ContentItemResource.EntityExtractionSummary> getConceptOccurrences() throws org.apache.clerezza.rdf.core.sparql.ParseException
org.apache.clerezza.rdf.core.sparql.ParseExceptionpublic org.apache.stanbol.enhancer.servicesapi.helper.execution.ChainExecution getChainExecution()
public Collection<org.apache.stanbol.enhancer.servicesapi.helper.execution.Execution> getEngineExecutions()
public String getExecutionOffsetText(org.apache.stanbol.enhancer.servicesapi.helper.execution.Execution ex)
public String getExecutionDurationText(org.apache.stanbol.enhancer.servicesapi.helper.execution.Execution ex)
public String getExecutionStartTime(org.apache.stanbol.enhancer.servicesapi.helper.execution.Execution ex)
public String getExecutionCompletionTime(org.apache.stanbol.enhancer.servicesapi.helper.execution.Execution ex)
public String getExecutionStatusText(org.apache.stanbol.enhancer.servicesapi.helper.execution.Execution ex)
public void setRdfSerializationFormat(String format)
public String getPlacesAsJSON() throws org.apache.clerezza.rdf.core.sparql.ParseException, UnsupportedEncodingException
org.apache.clerezza.rdf.core.sparql.ParseExceptionUnsupportedEncodingExceptionpublic javax.ws.rs.core.Response get(@Context
javax.ws.rs.core.HttpHeaders headers)
Copyright © 2011-2014 The Apache Software Foundation. All Rights Reserved.