org.duracloud.retrieval.source
Class DuraStoreRetrievalSource

java.lang.Object
  extended by org.duracloud.retrieval.source.DuraStoreRetrievalSource
All Implemented Interfaces:
RetrievalSource
Direct Known Subclasses:
DuraStoreStitchingRetrievalSource

public class DuraStoreRetrievalSource
extends java.lang.Object
implements RetrievalSource


Constructor Summary
DuraStoreRetrievalSource(ContentStore store, java.util.List<java.lang.String> spaces, boolean allSpaces)
           
 
Method Summary
protected  Content doGetContent(ContentItem contentItem)
           
 ContentItem getNextContentItem()
          Provides the next content item to be processed, cycles through all spaces as necessary.
 java.lang.String getSourceChecksum(ContentItem contentItem)
          Provides the checksum of the specified source file based on the file's properties.
 ContentStream getSourceContent(ContentItem contentItem)
          Gets the actual content, including the stream and the checksum.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DuraStoreRetrievalSource

public DuraStoreRetrievalSource(ContentStore store,
                                java.util.List<java.lang.String> spaces,
                                boolean allSpaces)
Method Detail

getNextContentItem

public ContentItem getNextContentItem()
Description copied from interface: RetrievalSource
Provides the next content item to be processed, cycles through all spaces as necessary. Returns null when there are no further content ids to process.

Specified by:
getNextContentItem in interface RetrievalSource
Returns:
the next content item to be processed

getSourceChecksum

public java.lang.String getSourceChecksum(ContentItem contentItem)
Description copied from interface: RetrievalSource
Provides the checksum of the specified source file based on the file's properties.

Specified by:
getSourceChecksum in interface RetrievalSource
Parameters:
contentItem - the file to consider
Returns:
MD5 checksum of the given file

getSourceContent

public ContentStream getSourceContent(ContentItem contentItem)
Description copied from interface: RetrievalSource
Gets the actual content, including the stream and the checksum.

Specified by:
getSourceContent in interface RetrievalSource
Parameters:
contentItem - the file to retrieve
Returns:
content stream of the specified file

doGetContent

protected Content doGetContent(ContentItem contentItem)


Copyright © 2009-2011 DuraSpace. All Rights Reserved.