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

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

public class InMemoryContentItem
extends ContentItemImpl

ContentItem implementation that holds a complete copy of the data in memory. Internally it uses InMemoryBlob to store the content and an SimpleMGraph for the metadata.

This implementation can be used independently of any store implementation and is suitable for stateless processing.


Field Summary
 
Fields inherited from class org.apache.stanbol.enhancer.servicesapi.helper.ContentItemImpl
MAIN_BLOB_SUFFIX, readLock, writeLock
 
Constructor Summary
  InMemoryContentItem(byte[] content, java.lang.String mimeType)
           
protected InMemoryContentItem(java.lang.String uriString, Blob blob, org.apache.clerezza.rdf.core.MGraph metadata)
           
  InMemoryContentItem(java.lang.String id, byte[] content, java.lang.String mimetype)
           
  InMemoryContentItem(java.lang.String uriString, byte[] content, java.lang.String mimeType, org.apache.clerezza.rdf.core.MGraph metadata)
           
  InMemoryContentItem(java.lang.String id, java.lang.String content, java.lang.String mimeType)
           
protected InMemoryContentItem(org.apache.clerezza.rdf.core.UriRef uri, Blob blob, org.apache.clerezza.rdf.core.MGraph metadata)
           
  InMemoryContentItem(org.apache.clerezza.rdf.core.UriRef uri, byte[] content, java.lang.String mimeType, org.apache.clerezza.rdf.core.MGraph metadata)
           
  InMemoryContentItem(org.apache.clerezza.rdf.core.UriRef uriRef, java.lang.String content, java.lang.String mimeType)
           
 
Method Summary
protected static InMemoryContentItem fromString(java.lang.String content)
           
 
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

InMemoryContentItem

public InMemoryContentItem(byte[] content,
                           java.lang.String mimeType)

InMemoryContentItem

public InMemoryContentItem(java.lang.String id,
                           java.lang.String content,
                           java.lang.String mimeType)

InMemoryContentItem

public InMemoryContentItem(java.lang.String id,
                           byte[] content,
                           java.lang.String mimetype)

InMemoryContentItem

public InMemoryContentItem(java.lang.String uriString,
                           byte[] content,
                           java.lang.String mimeType,
                           org.apache.clerezza.rdf.core.MGraph metadata)

InMemoryContentItem

public InMemoryContentItem(org.apache.clerezza.rdf.core.UriRef uriRef,
                           java.lang.String content,
                           java.lang.String mimeType)

InMemoryContentItem

public InMemoryContentItem(org.apache.clerezza.rdf.core.UriRef uri,
                           byte[] content,
                           java.lang.String mimeType,
                           org.apache.clerezza.rdf.core.MGraph metadata)

InMemoryContentItem

protected InMemoryContentItem(java.lang.String uriString,
                              Blob blob,
                              org.apache.clerezza.rdf.core.MGraph metadata)

InMemoryContentItem

protected InMemoryContentItem(org.apache.clerezza.rdf.core.UriRef uri,
                              Blob blob,
                              org.apache.clerezza.rdf.core.MGraph metadata)
Method Detail

fromString

protected static final InMemoryContentItem fromString(java.lang.String content)


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