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
FieldsModifier and TypeFieldDescriptionprivate static final org.slf4j.Loggerprivate static final ResourceBundleprivate static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancanQuickVerify(Bag bag) Determine if we can quickly verify by comparing the number of files and the total number of bytes expectedprivate static StringgetPayloadOxum(Bag bag) static voidquicklyVerify(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- theBagobject 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)
-