gov.loc.repository.bagit
Enum Bag.Format

java.lang.Object
  extended by java.lang.Enum<Bag.Format>
      extended by gov.loc.repository.bagit.Bag.Format
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Bag.Format>
Enclosing interface:
Bag

public static enum Bag.Format
extends java.lang.Enum<Bag.Format>

The format of a bag. Bags may be serialized (such as "zip" or "tar.gz") or they may simply be directories on the filesystem (such as "file").

FormatSchemeExtensionSerialized?
FILESYSTEMfile<none>false
ZIPzip.ziptrue
TARtar.tartrue
TAR_GZtgz.tar.gztrue
TAR_BZ2tbz2.tar.bz2true


Enum Constant Summary
FILESYSTEM
           
TAR
           
TAR_BZ2
           
TAR_GZ
           
ZIP
           
 
Field Summary
 java.lang.String extension
          The file extension typicaly appended to a bag name in the given format when it is written to disk.
 boolean isSerialized
          Whether or not the format is a serialized bag format.
 java.lang.String scheme
          The URI scheme for the format.
 
Method Summary
static Bag.Format valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Bag.Format[] 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

ZIP

public static final Bag.Format ZIP

TAR

public static final Bag.Format TAR

TAR_GZ

public static final Bag.Format TAR_GZ

TAR_BZ2

public static final Bag.Format TAR_BZ2

FILESYSTEM

public static final Bag.Format FILESYSTEM
Field Detail

scheme

public java.lang.String scheme
The URI scheme for the format.


isSerialized

public boolean isSerialized
Whether or not the format is a serialized bag format.


extension

public java.lang.String extension
The file extension typicaly appended to a bag name in the given format when it is written to disk.

Method Detail

values

public static Bag.Format[] 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 (Bag.Format c : Bag.Format.values())
    System.out.println(c);

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

valueOf

public static Bag.Format 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