public final class MandatoryVerifier
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static void |
checkBagitFileExists(java.nio.file.Path rootDir,
Version version)
make sure the bagit.txt file exists
|
static void |
checkFetchItemsExist(java.util.List<FetchItem> items,
java.nio.file.Path bagDir)
make sure all the fetch items exist in the data directory
|
static void |
checkIfAtLeastOnePayloadManifestsExist(java.nio.file.Path rootDir,
Version version)
Check to make sure the bag has at least one payload manifest
(manifest-[ALGORITHM].txt)
|
static void |
checkPayloadDirectoryExists(Bag bag)
Make sure the payload directory exists
|
public static void checkFetchItemsExist(java.util.List<FetchItem> items, java.nio.file.Path bagDir) throws FileNotInPayloadDirectoryException
items - the items that needed to be fetched for the bag to be completebagDir - the root directory of the bagFileNotInPayloadDirectoryException - if one or more of the fetch items don't existpublic static void checkBagitFileExists(java.nio.file.Path rootDir,
Version version)
throws MissingBagitFileException
rootDir - the root directory of the bagversion - the version of the bagMissingBagitFileException - if the bag does not contain the bagit.txt file as required by the bagit specificationpublic static void checkPayloadDirectoryExists(Bag bag) throws MissingPayloadDirectoryException
bag - the bag to checkMissingPayloadDirectoryException - if the bag does not contain the payload directorypublic static void checkIfAtLeastOnePayloadManifestsExist(java.nio.file.Path rootDir,
Version version)
throws MissingPayloadManifestException,
java.io.IOException
rootDir - the root directory of the bagversion - the version of the bagMissingPayloadManifestException - if there are no payload manifests in the bagjava.io.IOException - if there was an error reading a file