public interface PreservationState
Modifier and Type | Method and Description |
---|---|
boolean |
fileIsMissing(Replica bitarchive)
Check if the file is missing from a bitarchive.
|
String |
getAdminChecksum()
Get the MD5 checksum stored in the admin data.
|
String |
getAdminReplicaState(Replica replica)
Get the status of the file in a bitarchive, according to the admin data.
|
String |
getFilename()
Get the filename, this FilePreservationState is about.
|
Replica |
getReferenceBitarchive()
Returns a reference to a bitarchive that contains a version of the file with the correct checksum.
|
String |
getReferenceCheckSum()
Retrieve checksum that the majority of checksum references (bitarchives+admin) agree upon.
|
List<String> |
getReplicaChecksum(Replica replica)
Get the checksum of this file in a specific replica.
|
String |
getUniqueChecksum(Replica replica)
Get a checksum that the whole bitarchive agrees upon, or else "".
|
boolean |
isAdminCheckSumOk()
Returns true if the checksum reported by admin data is equal to the majority checksum.
|
boolean |
isAdminDataOk()
Check if the admin data reflect the actual status of the archive.
|
String |
toString()
Returns a human-readable representation of this object.
|
List<String> getReplicaChecksum(Replica replica)
replica
- The replica to get the checksum from.String getAdminChecksum()
String getAdminReplicaState(Replica replica)
replica
- The replica to get status forboolean isAdminDataOk()
Admin State checking: For each bitarchive the admin state is compared to the checksum received from the bitarchive.
If no checksum is received from the bitarchive the valid admin states are UPLOAD_STARTED and UPLOAD_FAILED. If a checksum is received from the bitarchive the valid admin state is UPLOAD_COMPLETED Admin checksum checking: The admin checksum must match the majority of reported checksums.
Notice that a valid Admin data record does NOT imply that everything is ok. Specifically a file may be missing from a bitarchive, or the checksum of a file in a bitarchive may be wrong.
Replica getReferenceBitarchive()
The correct checksum is defined as the checksum that the majority of the bitarchives and admin data agree upon.
If no bitarchive exists with a correct version of the file null is returned.
String getUniqueChecksum(Replica replica)
replica
- A replica to get checksum for this file fromboolean fileIsMissing(Replica bitarchive)
bitarchive
- the bitarchive to checkString getReferenceCheckSum()
boolean isAdminCheckSumOk()
String toString()
String getFilename()
Copyright © 2005–2015 The Royal Danish Library, the Danish State and University Library, the National Library of France and the Austrian National Library.. All rights reserved.