public final class BagProfileChecker
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static void |
bagConformsToProfile(java.io.InputStream jsonProfile,
Bag bag)
Check a bag against a bagit-profile as described by
https://github.com/ruebot/bagit-profiles
Note: This implementation does not check the Serialization part of the profile! |
public static void bagConformsToProfile(java.io.InputStream jsonProfile,
Bag bag)
throws com.fasterxml.jackson.core.JsonParseException,
com.fasterxml.jackson.databind.JsonMappingException,
java.io.IOException,
FetchFileNotAllowedException,
RequiredMetadataFieldNotPresentException,
MetatdataValueIsNotAcceptableException,
RequiredManifestNotPresentException,
BagitVersionIsNotAcceptableException,
RequiredTagFileNotPresentException,
MetatdataValueIsNotRepeatableException
jsonProfile - the input stream to the json string describing the profilebag - the bag to check against the profilejava.io.IOException - if there is a problem reading the profilecom.fasterxml.jackson.databind.JsonMappingException - if there is a problem mapping the profile to the BagitProfilecom.fasterxml.jackson.core.JsonParseException - if there is a problem parsing the json while mapping to java objectFetchFileNotAllowedException - if there is a fetch file when the profile prohibits itMetatdataValueIsNotAcceptableException - if a metadata value is not in the list of acceptable valuesMetatdataValueIsNotRepeatableException - if a metadata value shows up more than once when not repeatableRequiredMetadataFieldNotPresentException - if a metadata field is not present but it should beRequiredManifestNotPresentException - if a payload or tag manifest type is not present but should beBagitVersionIsNotAcceptableException - if the version of the bag is not in the list of acceptable versionsRequiredTagFileNotPresentException - if a tag file is not present but should be