Package nl.knaw.dans.bagit.verify
Class QuickVerifier
java.lang.Object
nl.knaw.dans.bagit.verify.QuickVerifier
responsible for all things related to quick verification. Quick verification does not
mean that a Bag is valid, only that a cursory check has been made. For a full verification
see
BagVerifier
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final org.slf4j.Logger
private static final ResourceBundle
private static final String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
canQuickVerify
(Bag bag) Determine if we can quickly verify by comparing the number of files and the total number of bytes expectedprivate static String
getPayloadOxum
(Bag bag) static void
quicklyVerify
(Bag bag) Quickly verify by comparing the number of files and the total number of bytes expected
-
Field Details
-
logger
private static final org.slf4j.Logger logger -
messages
-
PAYLOAD_OXUM_REGEX
- See Also:
-
-
Constructor Details
-
QuickVerifier
private QuickVerifier()
-
-
Method Details
-
canQuickVerify
Determine if we can quickly verify by comparing the number of files and the total number of bytes expected- Parameters:
bag
- theBag
object you wish to check- Returns:
- true if the bag can be quickly verified
-
getPayloadOxum
-
quicklyVerify
Quickly verify by comparing the number of files and the total number of bytes expected- Parameters:
bag
- the bag to verify by payload-oxum- Throws:
IOException
- if there is an error reading a fileInvalidPayloadOxumException
- if either the total bytes or the number of files calculated for the payload directory of the bag is different than the supplied valuesPayloadOxumDoesNotExistException
- if the bag does not contain a payload-oxum. To check, runBagVerifier.canQuickVerify(nl.knaw.dans.bagit.domain.Bag)
-