D
- The type of domain object to assemble SIPs frompublic class ContentAssemblerDefault<D> extends java.lang.Object implements ContentAssembler<D>
Constructor and Description |
---|
ContentAssemblerDefault(DigitalObjectsExtraction<D> contentsExtraction,
HashAssembler contentHashAssembler) |
Modifier and Type | Method and Description |
---|---|
protected ContentInfo |
addContent(java.lang.String ri,
DigitalObject digitalObject) |
java.util.Map<java.lang.String,ContentInfo> |
addContentsOf(D domainObject)
Extracts content from a domain object and adds it to the SIP.
|
void |
begin(ZipAssembler aZip,
Counters aMetrics)
Start the assembly process.
|
protected java.util.Collection<EncodedHash> |
contentHashFor(java.io.InputStream stream) |
HashAssembler |
getContentHashAssembler() |
DigitalObjectsExtraction<D> |
getContentsExtraction() |
Counters |
getMetrics() |
ZipAssembler |
getZip() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
ignoreContent, noDedup, noDedup, withDedupOnHash, withDedupOnHash, withDedupOnRi, withDedupOnRi, withDedupOnRi, withDedupOnRiAndValidation, withDedupOnRiAndValidation
public ContentAssemblerDefault(DigitalObjectsExtraction<D> contentsExtraction, HashAssembler contentHashAssembler)
public void begin(ZipAssembler aZip, Counters aMetrics)
ContentAssembler
begin
in interface ContentAssembler<D>
aZip
- Container to add the digital objects to.aMetrics
- Metrics for keeping track of total number of digital objects and their size.public ZipAssembler getZip()
public DigitalObjectsExtraction<D> getContentsExtraction()
public HashAssembler getContentHashAssembler()
public Counters getMetrics()
public java.util.Map<java.lang.String,ContentInfo> addContentsOf(D domainObject) throws java.io.IOException
ContentAssembler
addContentsOf
in interface ContentAssembler<D>
domainObject
- The domain object for which to extract content and add it to the SIP.java.io.IOException
- If an exception occurs during the addition of the contentprotected ContentInfo addContent(java.lang.String ri, DigitalObject digitalObject) throws java.io.IOException
java.io.IOException
protected java.util.Collection<EncodedHash> contentHashFor(java.io.InputStream stream) throws java.io.IOException
java.io.IOException