|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdk.netarkivet.archive.arcrepository.bitpreservation.FilePreservationState
public class FilePreservationState
This class collects the available bit preservation information for a file.
This information is the following:
1) admin information for the file for each bitarchive and
2) the actual upload status
Constructor Summary | |
---|---|
FilePreservationState(java.lang.String filename,
ArcRepositoryEntry admindata,
java.util.Map<Replica,java.util.List<java.lang.String>> checksumMap)
Create new instance of the preservation status for a file. |
Method Summary | |
---|---|
protected boolean |
fileIsMissing(Replica bitarchive)
Check if the file is missing from a bitarchive. |
java.lang.String |
getAdminBitarchiveState(Replica bitarchive)
Get the status of the file in a bitarchive, according to the admin data. |
java.lang.String |
getAdminChecksum()
Get the MD5 checksum stored in the admin data. |
java.util.List<java.lang.String> |
getBitarchiveChecksum(Replica bitarchive)
Get the checksum of this file in a specific bitarchive. |
java.lang.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. |
java.lang.String |
getReferenceCheckSum()
Retrieve checksum that the majority of checksum references (bitarchives+admin) agree upon. |
java.lang.String |
getUniqueChecksum(Replica r)
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. |
java.lang.String |
toString()
Returns a human-readable representation of this object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
FilePreservationState(java.lang.String filename, ArcRepositoryEntry admindata, java.util.Map<Replica,java.util.List<java.lang.String>> checksumMap) throws ArgumentNotValid
filename
- The filename to get status foradmindata
- The admin data for the filechecksumMap
- The map with the checksums for this file in
all bitarchives
ArgumentNotValid
- if filename is null or empty string,
or if admindata is null.Method Detail |
---|
public java.util.List<java.lang.String> getBitarchiveChecksum(Replica bitarchive)
bitarchive
- The bitarchive to get the checksum from.
public java.lang.String getAdminChecksum()
public java.lang.String getAdminBitarchiveState(Replica bitarchive)
bitarchive
- The bitarchive to get status for
public boolean isAdminDataOk()
protected boolean fileIsMissing(Replica bitarchive)
bitarchive
- the bitarchive to check
public Replica getReferenceBitarchive()
public java.lang.String getUniqueChecksum(Replica r)
r
- A replica to get checksum for this file from
public java.lang.String getReferenceCheckSum()
public boolean isAdminCheckSumOk()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getFilename()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |