gov.loc.repository.bagit
Enum BagFactory.LoadOption

java.lang.Object
  extended by java.lang.Enum<BagFactory.LoadOption>
      extended by gov.loc.repository.bagit.BagFactory.LoadOption
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<BagFactory.LoadOption>
Enclosing class:
BagFactory

public static enum BagFactory.LoadOption
extends java.lang.Enum<BagFactory.LoadOption>

Specifies the mechanism used to load a bag from disk. The mechanism used to load the bag will depend on the type of operations being performed. For example, when creating a new bag based on an existing data directory, the BY_PAYLOAD_FILES option would be used; but when loading a bag for simple verification of completeness and content, one would use the BY_PAYLOAD_MANIFESTS option.


Enum Constant Summary
BY_PAYLOAD_FILES
          Loads the bag by reading from the files on disk.
BY_PAYLOAD_MANIFESTS
          Loads the bag by reading from the payload manifests.
NO_LOAD
          Does not load the bag.
 
Method Summary
static BagFactory.LoadOption valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static BagFactory.LoadOption[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
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

NO_LOAD

public static final BagFactory.LoadOption NO_LOAD
Does not load the bag.


BY_PAYLOAD_MANIFESTS

public static final BagFactory.LoadOption BY_PAYLOAD_MANIFESTS
Loads the bag by reading from the payload manifests.


BY_PAYLOAD_FILES

public static final BagFactory.LoadOption BY_PAYLOAD_FILES
Loads the bag by reading from the files on disk.

Method Detail

values

public static BagFactory.LoadOption[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (BagFactory.LoadOption c : BagFactory.LoadOption.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static BagFactory.LoadOption valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null