|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdk.netarkivet.archive.arcrepository.bitpreservation.FilePreservationStatus
public class FilePreservationStatus
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 | |
---|---|
FilePreservationStatus(java.lang.String filename,
ArcRepositoryEntry admindata)
Create new instance of the preservation status for a file. |
Method Summary | |
---|---|
protected boolean |
fileIsMissing(Location bitarchive)
Check if the file is missing from a bitarchive |
java.lang.String |
getAdminBitarchiveState(Location bitarchive)
Get the status of the file in a bitarchive, according to the admin data. |
BitArchiveStoreState |
getAdminBitarchiveStoreState(Location 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(Location bitarchive)
Get the checksum of this file in a specific bitarchive. |
protected java.util.Map<Location,java.util.List<java.lang.String>> |
getChecksumMap()
Generate a map of checksums for this file in the bitarchive. |
protected java.util.List<java.lang.String> |
getChecksums(Location ba)
Get the checksum of a single file in a bitarchive. |
Location |
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. |
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 |
---|
FilePreservationStatus(java.lang.String filename, ArcRepositoryEntry admindata)
filename
- The filename to get status foradmindata
- The admin data for the file
ArgumentNotValid
- if filename is null or empty string, or if admindata is null.Method Detail |
---|
protected java.util.Map<Location,java.util.List<java.lang.String>> getChecksumMap()
protected java.util.List<java.lang.String> getChecksums(Location ba)
ba
- The bitarchive to ask for checksum
ChecksumJob.parseLine(String)
public java.util.List<java.lang.String> getBitarchiveChecksum(Location bitarchive)
bitarchive
- The bitarchive to get the checksum from.
public java.lang.String getAdminChecksum()
public java.lang.String getAdminBitarchiveState(Location bitarchive)
bitarchive
- The bitarchive to get status for
public BitArchiveStoreState getAdminBitarchiveStoreState(Location bitarchive)
bitarchive
- The bitarchive to get status for
public boolean isAdminDataOk()
protected boolean fileIsMissing(Location bitarchive)
bitarchive
- the bitarchive to check
public Location getReferenceBitarchive()
public java.lang.String getReferenceCheckSum()
public boolean isAdminCheckSumOk()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |