D
- The type of domain objects to assemble the SIP frompublic interface ContentAssembler<D>
Modifier and Type | Method and Description |
---|---|
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 zip,
Counters metrics)
Start the assembly process.
|
static <D> ContentAssembler<D> |
ignoreContent()
Ignore all digital objects, the SIP will contain structured data only.
|
static <D> ContentAssembler<D> |
noDedup(DigitalObjectsExtraction<D> contentsExtraction)
Do not deduplicate the digital objects and do not perform any hash calculations.
|
static <D> ContentAssembler<D> |
noDedup(DigitalObjectsExtraction<D> contentsExtraction,
HashAssembler contentHashAssembler)
Do not deduplicate the digital objects but perform the specified hash calculations.
|
static <D> ContentAssembler<D> |
withDedupOnHash(DigitalObjectsExtraction<D> contentsExtraction,
HashAssembler contentHashAssembler)
Deduplicate digital objects based on their hash value.
|
static <D> ContentAssembler<D> |
withDedupOnHash(DigitalObjectsExtraction<D> contentsExtraction,
HashAssembler contentHashAssembler,
int estimatedMaxDigitalObjects)
Deduplicate digital objects based on their hash value.
|
static <D> ContentAssembler<D> |
withDedupOnRi(DigitalObjectsExtraction<D> contentsExtraction)
Deduplicate digital objects based on the reference information but do not perform any hash calculation.
|
static <D> ContentAssembler<D> |
withDedupOnRi(DigitalObjectsExtraction<D> contentsExtraction,
HashAssembler contentHashAssembler)
Deduplicate digital objects based on the reference information and perform the specified hash calculations.
|
static <D> ContentAssembler<D> |
withDedupOnRi(DigitalObjectsExtraction<D> contentsExtraction,
HashAssembler contentHashAssembler,
int estimatedMaxDigitalObjects)
Deduplicate digital objects based on the reference information and perform the specified hash calculations.
|
static <D> ContentAssembler<D> |
withDedupOnRiAndValidation(DigitalObjectsExtraction<D> contentsExtraction,
HashAssembler contentHashAssembler,
boolean errorWhenEqualRiAndNotEqualHash,
boolean errorWhenEqualHashAndNotEqualRI)
Deduplicate digital objects based on the reference information and perform the specified hash calculations and
optionally validate that the same reference information is always used to refer to the same content.
|
static <D> ContentAssembler<D> |
withDedupOnRiAndValidation(DigitalObjectsExtraction<D> contentsExtraction,
HashAssembler contentHashAssembler,
boolean errorWhenEqualRiAndNotEqualHash,
boolean errorWhenEqualHashAndNotEqualRI,
int estimatedMaxDigitalObjects)
Deduplicate digital objects based on the reference information and perform the specified hash calculations and
optionally validate that the same reference information is always used to refer to the same content.
|
void begin(ZipAssembler zip, Counters metrics)
zip
- Container to add the digital objects to.metrics
- Metrics for keeping track of total number of digital objects and their size.java.util.Map<java.lang.String,ContentInfo> addContentsOf(D domainObject) throws java.io.IOException
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 contentstatic <D> ContentAssembler<D> noDedup(DigitalObjectsExtraction<D> contentsExtraction, HashAssembler contentHashAssembler)
D
- The type of domain objects to assemble the SIP fromcontentsExtraction
- Extraction of content from domain objects added to the SIPcontentHashAssembler
- Assembler that builds up an encoded hash for the extracted contentstatic <D> ContentAssembler<D> noDedup(DigitalObjectsExtraction<D> contentsExtraction)
D
- The type of domain objects to assemble the SIP fromcontentsExtraction
- Extraction of content from domain objects added to the SIPstatic <D> ContentAssembler<D> ignoreContent()
D
- The type of domain objects to assemble the SIP fromstatic <D> ContentAssembler<D> withDedupOnRi(DigitalObjectsExtraction<D> contentsExtraction)
D
- The type of domain objects to assemble the SIP fromcontentsExtraction
- Extraction of content from domain objects added to the SIPstatic <D> ContentAssembler<D> withDedupOnRi(DigitalObjectsExtraction<D> contentsExtraction, HashAssembler contentHashAssembler)
D
- The type of domain objects to assemble the SIP fromcontentsExtraction
- Extraction of content from domain objects added to the SIPcontentHashAssembler
- Assembler that builds up an encoded hash for the extracted contentstatic <D> ContentAssembler<D> withDedupOnRi(DigitalObjectsExtraction<D> contentsExtraction, HashAssembler contentHashAssembler, int estimatedMaxDigitalObjects)
D
- The type of domain objects to assemble the SIP fromcontentsExtraction
- Extraction of content from domain objects added to the SIPcontentHashAssembler
- Assembler that builds up an encoded hash for the extracted contentestimatedMaxDigitalObjects
- a hint which will initialize the internal buffers to handle the specified number
of digital objects without reallocationstatic <D> ContentAssembler<D> withDedupOnRiAndValidation(DigitalObjectsExtraction<D> contentsExtraction, HashAssembler contentHashAssembler, boolean errorWhenEqualRiAndNotEqualHash, boolean errorWhenEqualHashAndNotEqualRI)
Note that setting errorWhenEqualRiAndNotEqualHash to true will force a read of the content when the same reference information is used twice.
Note that setting either validations to true requires at least one hash.
D
- The type of domain objects to assemble the SIP fromcontentsExtraction
- Extraction of content from domain objects added to the SIPcontentHashAssembler
- Assembler that builds up an encoded hash for the extracted contenterrorWhenEqualRiAndNotEqualHash
- Throw an exception when the same reference information is used but the
actual content is different.errorWhenEqualHashAndNotEqualRI
- Throw an exception when the same content is included twice but using
different reference informations.static <D> ContentAssembler<D> withDedupOnRiAndValidation(DigitalObjectsExtraction<D> contentsExtraction, HashAssembler contentHashAssembler, boolean errorWhenEqualRiAndNotEqualHash, boolean errorWhenEqualHashAndNotEqualRI, int estimatedMaxDigitalObjects)
Note that setting errorWhenEqualRiAndNotEqualHash to true will force a read of the content when the same reference information is used twice.
Note that setting either validations to true requires at least one hash.
information is used twice.D
- The type of domain objects to assemble the SIP fromcontentsExtraction
- Extraction of content from domain objects added to the SIPcontentHashAssembler
- Assembler that builds up an encoded hash for the extracted contenterrorWhenEqualRiAndNotEqualHash
- Throw an exception when the same reference information is used but the
actual content is different.errorWhenEqualHashAndNotEqualRI
- Throw an exception when the same content is included twice but using
different reference informations.estimatedMaxDigitalObjects
- a hint which will initialize the internal buffers to handle the specified number
of digital objects without reallocationstatic <D> ContentAssembler<D> withDedupOnHash(DigitalObjectsExtraction<D> contentsExtraction, HashAssembler contentHashAssembler)
D
- The type of domain objects to assemble the SIP fromcontentsExtraction
- Extraction of content from domain objects added to the SIPcontentHashAssembler
- Assembler that builds up an encoded hash for the extracted contentstatic <D> ContentAssembler<D> withDedupOnHash(DigitalObjectsExtraction<D> contentsExtraction, HashAssembler contentHashAssembler, int estimatedMaxDigitalObjects)
D
- The type of domain objects to assemble the SIP fromcontentsExtraction
- Extraction of content from domain objects added to the SIPcontentHashAssembler
- Assembler that builds up an encoded hash for the extracted contentestimatedMaxDigitalObjects
- a hint which will initialize the internal buffers to handle the specified number
of digital objects without reallocation