public final class BagCreator
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static Bag |
bagInPlace(java.nio.file.Path root,
java.util.Collection<SupportedAlgorithm> algorithms,
boolean includeHidden)
Creates a bag in place for version 0.97.
|
static Bag |
bagInPlace(java.nio.file.Path root,
java.util.Collection<SupportedAlgorithm> algorithms,
boolean includeHidden,
Metadata metadata)
Creates a bag in place for version 0.97.
|
static Bag |
createDotBagit(java.nio.file.Path root,
java.util.Collection<SupportedAlgorithm> algorithms,
boolean includeHidden)
Creates a basic(only required elements) .bagit bag in place.
|
static Bag |
createDotBagit(java.nio.file.Path root,
java.util.Collection<SupportedAlgorithm> algorithms,
boolean includeHidden,
Metadata metadata)
Creates a basic(only required elements) .bagit bag in place.
|
public static Bag bagInPlace(java.nio.file.Path root, java.util.Collection<SupportedAlgorithm> algorithms, boolean includeHidden) throws java.security.NoSuchAlgorithmException, java.io.IOException
root - the directory that will become the base of the bag and where to start searching for contentalgorithms - an collection of SupportedAlgorithm implementationsincludeHidden - to include hidden files when generating the bagit files, like the manifestsBag object representing the newly created bagit bagjava.security.NoSuchAlgorithmException - if MessageDigest can't find the algorithmjava.io.IOException - if there is a problem writing or moving file(s)public static Bag bagInPlace(java.nio.file.Path root, java.util.Collection<SupportedAlgorithm> algorithms, boolean includeHidden, Metadata metadata) throws java.security.NoSuchAlgorithmException, java.io.IOException
root - the directory that will become the base of the bag and where to start searching for contentalgorithms - an collection of SupportedAlgorithm implementationsincludeHidden - to include hidden files when generating the bagit files, like the manifestsmetadata - the metadata to include when creating the bag. Payload-Oxum and Bagging-Date will be overwrittenBag object representing the newly created bagit bagjava.security.NoSuchAlgorithmException - if MessageDigest can't find the algorithmjava.io.IOException - if there is a problem writing or moving file(s)@Incubating public static Bag createDotBagit(java.nio.file.Path root, java.util.Collection<SupportedAlgorithm> algorithms, boolean includeHidden) throws java.security.NoSuchAlgorithmException, java.io.IOException
root - the directory that will become the base of the bag and where to start searching for contentalgorithms - an collection of SupportedAlgorithm implementationsincludeHidden - to include hidden files when generating the bagit files, like the manifestsBag object representing the newly created bagit bagjava.security.NoSuchAlgorithmException - if MessageDigest can't find the algorithmjava.io.IOException - if there is a problem writing files or .bagit directory@Incubating public static Bag createDotBagit(java.nio.file.Path root, java.util.Collection<SupportedAlgorithm> algorithms, boolean includeHidden, Metadata metadata) throws java.security.NoSuchAlgorithmException, java.io.IOException
root - the directory that will become the base of the bag and where to start searching for contentalgorithms - an collection of SupportedAlgorithm implementationsincludeHidden - to include hidden files when generating the bagit files, like the manifestsmetadata - the metadata to include when creating the bag. Payload-Oxum and Bagging-Date will be overwrittenBag object representing the newly created bagit bagjava.security.NoSuchAlgorithmException - if MessageDigest can't find the algorithmjava.io.IOException - if there is a problem writing files or .bagit directory