org.apache.stanbol.enhancer.servicesapi.helper
Class WebContentItem

java.lang.Object
  extended by org.apache.stanbol.enhancer.servicesapi.helper.ContentItemImpl
      extended by org.apache.stanbol.enhancer.servicesapi.helper.WebContentItem
All Implemented Interfaces:
ContentItem

public class WebContentItem
extends ContentItemImpl

A ContentItem retrieving its content and MediaType by dereferencing a given URI. After the content is loaded from the remote server it is cached in-memory. After construction the metadata graph is empty.


Field Summary
 
Fields inherited from class org.apache.stanbol.enhancer.servicesapi.helper.ContentItemImpl
MAIN_BLOB_SUFFIX, readLock, writeLock
 
Constructor Summary
WebContentItem(java.net.URL url)
          Creates an instance for a given URL and uses a SimpleMGraph to store metadata in memory.
WebContentItem(java.net.URL url, org.apache.clerezza.rdf.core.MGraph metadata)
          Creates an instance for a given URL and an existing MGraph to store the metadata.
 
Method Summary
 
Methods inherited from class org.apache.stanbol.enhancer.servicesapi.helper.ContentItemImpl
addPart, equals, getBlob, getLock, getMetadata, getMimeType, getPart, getPart, getPartUri, getStream, getUri, hashCode, removePart, removePart, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WebContentItem

public WebContentItem(java.net.URL url)
Creates an instance for a given URL and uses a SimpleMGraph to store metadata in memory.

Parameters:
url - the dereferenceable URI

WebContentItem

public WebContentItem(java.net.URL url,
                      org.apache.clerezza.rdf.core.MGraph metadata)
Creates an instance for a given URL and an existing MGraph to store the metadata.

Parameters:
url - the dereferenceable URI
metadata - the MGraph to store the metadata


Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.