org.apache.stanbol.contenthub.web.resources
Class ContentItemResource
java.lang.Object
org.apache.stanbol.commons.web.base.resource.BaseStanbolResource
org.apache.stanbol.contenthub.web.resources.ContentItemResource
public class ContentItemResource
- extends org.apache.stanbol.commons.web.base.resource.BaseStanbolResource
| Nested classes/interfaces inherited from class org.apache.stanbol.commons.web.base.resource.BaseStanbolResource |
org.apache.stanbol.commons.web.base.resource.BaseStanbolResource.MenuItem |
| Fields inherited from class org.apache.stanbol.commons.web.base.resource.BaseStanbolResource |
LINK_RESOURCES, NAVIGATION_LINKS, ROOT_URL, SCRIPT_RESOURCES, servletContext, STATIC_RESOURCES_ROOT_URL, SYSTEM_CONSOLE, uriInfo |
|
Constructor Summary |
ContentItemResource(String localId,
org.apache.stanbol.enhancer.servicesapi.ContentItem ci,
javax.ws.rs.core.UriInfo uriInfo,
String storePath,
org.apache.clerezza.rdf.core.access.TcManager tcManager,
org.apache.clerezza.rdf.core.serializedform.Serializer serializer,
javax.servlet.ServletContext servletContext)
|
| Methods inherited from class org.apache.stanbol.commons.web.base.resource.BaseStanbolResource |
getConsoleBaseUri, getMainMenuItems, getNavigationLinks, getPublicBaseUri, getRegisteredLinkResources, getRegisteredScriptResources, getRequestUri, getRootUrl, getStaticRootUrl |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SUMMARY
public static final org.apache.clerezza.rdf.core.UriRef SUMMARY
THUMBNAIL
public static final org.apache.clerezza.rdf.core.UriRef THUMBNAIL
DEPICTION
public static final org.apache.clerezza.rdf.core.UriRef DEPICTION
defaultThumbnails
public final Map<org.apache.clerezza.rdf.core.UriRef,String> defaultThumbnails
contentItem
protected org.apache.stanbol.enhancer.servicesapi.ContentItem contentItem
localId
protected String localId
textContent
protected String textContent
imageSrc
protected URI imageSrc
downloadHref
protected URI downloadHref
metadataHref
protected URI metadataHref
tcManager
protected final org.apache.clerezza.rdf.core.access.TcManager tcManager
serializer
protected final org.apache.clerezza.rdf.core.serializedform.Serializer serializer
serializationFormat
protected String serializationFormat
extractionsByTypeMap
protected Map<org.apache.clerezza.rdf.core.UriRef,Map<String,ContentItemResource.EntityExtractionSummary>> extractionsByTypeMap
- Map holding the extraction mapped by
Properties.DC_TYPE and the
Properties.ENHANCER_SELECTED_TEXT. This map is initialised by initOccurrences().
ContentItemResource
public ContentItemResource(String localId,
org.apache.stanbol.enhancer.servicesapi.ContentItem ci,
javax.ws.rs.core.UriInfo uriInfo,
String storePath,
org.apache.clerezza.rdf.core.access.TcManager tcManager,
org.apache.clerezza.rdf.core.serializedform.Serializer serializer,
javax.servlet.ServletContext servletContext)
throws IOException
- Throws:
IOException
getRdfMetadata
public String getRdfMetadata(String mediatype)
throws UnsupportedEncodingException
- Throws:
UnsupportedEncodingException
getRdfMetadata
public String getRdfMetadata()
throws UnsupportedEncodingException
- Throws:
UnsupportedEncodingException
getContentItem
public org.apache.stanbol.enhancer.servicesapi.ContentItem getContentItem()
getLocalId
public String getLocalId()
getTextContent
public String getTextContent()
getImageSrc
public URI getImageSrc()
getDownloadHref
public URI getDownloadHref()
getMetadataHref
public URI getMetadataHref()
hasOccurrences
public boolean hasOccurrences()
- Checks if there are Occurrences
getOtherOccurrencyTypes
public Collection<org.apache.clerezza.rdf.core.UriRef> getOtherOccurrencyTypes()
- Used to print occurrences with other types than the natively supported
getOccurrences
public Collection<ContentItemResource.EntityExtractionSummary> getOccurrences(org.apache.clerezza.rdf.core.UriRef type)
getPersonOccurrences
public Collection<ContentItemResource.EntityExtractionSummary> getPersonOccurrences()
throws org.apache.clerezza.rdf.core.sparql.ParseException
- Throws:
org.apache.clerezza.rdf.core.sparql.ParseException
getOtherOccurrences
public Collection<ContentItemResource.EntityExtractionSummary> getOtherOccurrences()
throws org.apache.clerezza.rdf.core.sparql.ParseException
- Throws:
org.apache.clerezza.rdf.core.sparql.ParseException
getOrganizationOccurrences
public Collection<ContentItemResource.EntityExtractionSummary> getOrganizationOccurrences()
throws org.apache.clerezza.rdf.core.sparql.ParseException
- Throws:
org.apache.clerezza.rdf.core.sparql.ParseException
getPlaceOccurrences
public Collection<ContentItemResource.EntityExtractionSummary> getPlaceOccurrences()
throws org.apache.clerezza.rdf.core.sparql.ParseException
- Throws:
org.apache.clerezza.rdf.core.sparql.ParseException
getConceptOccurrences
public Collection<ContentItemResource.EntityExtractionSummary> getConceptOccurrences()
throws org.apache.clerezza.rdf.core.sparql.ParseException
- Throws:
org.apache.clerezza.rdf.core.sparql.ParseException
setRdfSerializationFormat
public void setRdfSerializationFormat(String format)
getPlacesAsJSON
public String getPlacesAsJSON()
throws org.apache.clerezza.rdf.core.sparql.ParseException,
UnsupportedEncodingException
- Returns:
- an RDF/JSON descriptions of places for the word map widget
- Throws:
org.apache.clerezza.rdf.core.sparql.ParseException
UnsupportedEncodingException
get
public javax.ws.rs.core.Response get(@Context
javax.ws.rs.core.HttpHeaders headers)
Copyright © 2011-2013 The Apache Software Foundation. All Rights Reserved.