gov.loc.repository.bagit
Interface Bag.BagConstants

Enclosing interface:
Bag

public static interface Bag.BagConstants

Contains names for constants associated with a bag. BagIt defines and reserves several names, and some of those names change between versions of the specification. This interface abstracts away those constants so they can be examined on a per-version basis.

For example, the bag-info.txt file was called package-info.txt in earlier versions of the spec. The correct name can be determined by using the getBagInfoTxt() method.

You should never reference BagIt constants by name directly in your code, as they may change from version to version. Instead, obtain an instance of this interface and its values as the constants. Constants for the current bag's version may be obtained by calling the Bag.getBagConstants() method. Constants for a particular BagIt version may be obtained by calling the BagFactory.getBagConstants(Version) method.

See Also:
Bag.getBagConstants(), BagFactory.getBagConstants(), BagFactory.getBagConstants(Version)

Method Summary
 java.lang.String getBagEncoding()
          Get the text encoding required for the bagit.txt file, "UTF-8" in the latest version.
 java.lang.String getBagInfoTxt()
          Get the name of the standard bag metdata file, "bag-info.txt" in the latest version.
 java.lang.String getBagItTxt()
          Get the name of the bag declaration file, "bagit.txt" in the latest version.
 java.lang.String getDataDirectory()
          Get the name of the payload directory, "data" in the latest version.
 java.lang.String getFetchTxt()
          Get the name of the fetch file, "fetch.txt" in the latest version.
 java.lang.String getPayloadManifestPrefix()
          Get the prefix for a payload manifest, "manifest-" in the latest version.
 java.lang.String getPayloadManifestSuffix()
          Get the prefix for a payload manifest, ".txt" in the latest version.
 java.lang.String getTagManifestPrefix()
          Get the prefix for a payload manifest, "tagmanifest-" in the latest version.
 java.lang.String getTagManifestSuffix()
          Get the prefix for a payload manifest, ".txt" in the latest version.
 BagFactory.Version getVersion()
          Get the version of the spec these constants are for.
 

Method Detail

getPayloadManifestPrefix

java.lang.String getPayloadManifestPrefix()
Get the prefix for a payload manifest, "manifest-" in the latest version.

Returns:
The constant.

getTagManifestPrefix

java.lang.String getTagManifestPrefix()
Get the prefix for a payload manifest, "tagmanifest-" in the latest version.

Returns:
The constant.

getPayloadManifestSuffix

java.lang.String getPayloadManifestSuffix()
Get the prefix for a payload manifest, ".txt" in the latest version.

Returns:
The constant.

getTagManifestSuffix

java.lang.String getTagManifestSuffix()
Get the prefix for a payload manifest, ".txt" in the latest version.

Returns:
The constant.

getBagEncoding

java.lang.String getBagEncoding()
Get the text encoding required for the bagit.txt file, "UTF-8" in the latest version.

Returns:
The constant.

getBagItTxt

java.lang.String getBagItTxt()
Get the name of the bag declaration file, "bagit.txt" in the latest version.

Returns:
The constant.

getDataDirectory

java.lang.String getDataDirectory()
Get the name of the payload directory, "data" in the latest version.

Returns:
The constant.

getBagInfoTxt

java.lang.String getBagInfoTxt()
Get the name of the standard bag metdata file, "bag-info.txt" in the latest version.

Returns:
The constant.

getFetchTxt

java.lang.String getFetchTxt()
Get the name of the fetch file, "fetch.txt" in the latest version.

Returns:
The constant.

getVersion

BagFactory.Version getVersion()
Get the version of the spec these constants are for.

Returns:
The version.