public class ERSDataGroup extends ERSCachingData
Such data groups represent a set of one or more data objects (e.g. electronic documents) for which an Evidence Record should be generated. Data groups will be encapsulated in a single PartialHashtree so that the presence of the group can be checked for, as well as the individual items that make it up.
Modifier and Type | Field and Description |
---|---|
protected java.util.List<ERSData> |
dataObjects |
Constructor and Description |
---|
ERSDataGroup(ERSData... dataObjects)
Base constructor for an "array" of data objects.
|
ERSDataGroup(ERSData dataObject)
Constructor for a group with a single object.
|
ERSDataGroup(java.util.List<ERSData> dataObjects)
Base constructor using a list of data objects.
|
Modifier and Type | Method and Description |
---|---|
protected byte[] |
calculateHash(DigestCalculator digestCalculator)
Generates a hash for the whole DataGroup.
|
java.util.List<byte[]> |
getHashes(DigestCalculator digestCalculator)
Generates hashes for all the data objects included in the data group.
|
int |
size()
Return the number of data objects present in the group.
|
getHash
protected java.util.List<ERSData> dataObjects
public ERSDataGroup(ERSData... dataObjects)
dataObjects
- an array of data objects.public ERSDataGroup(java.util.List<ERSData> dataObjects)
dataObjects
- a list of data objects.public ERSDataGroup(ERSData dataObject)
dataObject
- the data object to go in the group.public java.util.List<byte[]> getHashes(DigestCalculator digestCalculator)
digestCalculator
- the DigestCalculator
to use for computing the hashesprotected byte[] calculateHash(DigestCalculator digestCalculator)
calculateHash
in class ERSCachingData
digestCalculator
- the DigestCalculator
to use for computing the hashpublic int size()