|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Object java.lang.Enum<WorkFiles> dk.netarkivet.archive.arcrepository.bitpreservation.WorkFiles
public enum WorkFiles
This class encapsulates access to the files used in bitpreservation. The following files are encapsulated: "unsorted.txt": Unsorted list of files in a bitarchive "sorted.txt": Sorted list of files in a bitarchive "missingba.txt": Files that are missing in a bitarchive "missingadmindata.txt"; Files that are missing from admin data "wrongfiles.txt": Files with wrong checksum??? "referenceba.txt"; File list from reference ba? "wrongstates.txt"; Files that are in wrong state "insertinadmin.txt"; Files to insert into admin data "deletefromadmin.txt"; Files to delete from admin data "uploadtoba.txt"; Files to upload to the bitarchive "deletefromba.txt"; Files to delete from the bitarchive
Enum Constant Summary | |
---|---|
CHECKSUMS_ON_BA
CHECKSUMS_ON_BA. |
|
DELETE_FROM_ADMIN
DELETE_FROM_ADMIN. |
|
DELETE_FROM_BA
DELETE_FROM_BA. |
|
FILES_ON_BA
FILES_ON_BA. |
|
FILES_ON_REFERENCE_BA
FILES_ON_REFERENCE_BA. |
|
INSERT_IN_ADMIN
INSERT_IN_ADMIN. |
|
MISSING_FILES_ADMINDATA
The MISSING_FILES_ADMINDATA is the workfile for the list of missing files for the admin data. |
|
MISSING_FILES_BA
The MISSING_FILES_BA is the workfile for the list of missing files for a bitarchive. |
|
UPLOAD_TO_BA
UPLOAD_TO_BA. |
|
WRONG_FILES
WRONG_FILES. |
|
WRONG_STATES
WRONG_STATES. |
Method Summary | |
---|---|
static java.io.File |
getFile(Replica rep,
WorkFiles fileType)
Method for retrieving a working file. |
static java.util.Date |
getLastUpdate(Replica rep,
WorkFiles fileType)
Method for retrieving the last modified date of a working file for a specific replica. |
static java.util.List<java.lang.String> |
getLines(Replica replica,
WorkFiles fileType)
Method for retrieving the lines of a working file for a specific replica. |
protected static java.io.File |
getPreservationDir(Replica replica)
Get the base dir for all files related to bitpreservation for a given bitarchive. |
protected static java.io.File |
getSortedFile(java.io.File unsortedFile)
Get a sorted file from an unsorted one, updating if necessary. |
static WorkFiles |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static WorkFiles[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
static void |
write(Replica replica,
WorkFiles fileType,
java.util.Set<java.lang.String> files)
Method for writing the list of files to a work file. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final WorkFiles MISSING_FILES_BA
public static final WorkFiles MISSING_FILES_ADMINDATA
public static final WorkFiles WRONG_FILES
public static final WorkFiles FILES_ON_REFERENCE_BA
public static final WorkFiles INSERT_IN_ADMIN
public static final WorkFiles DELETE_FROM_ADMIN
public static final WorkFiles UPLOAD_TO_BA
public static final WorkFiles DELETE_FROM_BA
public static final WorkFiles WRONG_STATES
public static final WorkFiles FILES_ON_BA
public static final WorkFiles CHECKSUMS_ON_BA
Method Detail |
---|
public static WorkFiles[] values()
for (WorkFiles c : WorkFiles.values()) System.out.println(c);
public static WorkFiles valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.
java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified name
java.lang.NullPointerException
- if the argument is nullprotected static java.io.File getPreservationDir(Replica replica)
replica
- The name of a bitarchive.
protected static java.io.File getSortedFile(java.io.File unsortedFile) throws IOFailure
unsortedFile
- An unsorted file
IOFailure
- If the file does not exist.public static void write(Replica replica, WorkFiles fileType, java.util.Set<java.lang.String> files)
replica
- The replica for the working file.fileType
- The type of working file.files
- The list of filenames (?) to write to the working file.public static java.io.File getFile(Replica rep, WorkFiles fileType)
rep
- The replica to whom the file corresponds.fileType
- The type of working file.
public static java.util.Date getLastUpdate(Replica rep, WorkFiles fileType)
rep
- The replica for the working file.fileType
- The type of working file.
public static java.util.List<java.lang.String> getLines(Replica replica, WorkFiles fileType)
replica
- The replica of the working file.fileType
- The type of workfile.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |