Class ObjectValidator


  • public class ObjectValidator
    extends Object
    Validates that OCFL objects are correctly formatted to be used by Fedora 6
    Author:
    pwinckles
    • Constructor Detail

      • ObjectValidator

        public ObjectValidator​(edu.wisc.library.ocfl.api.MutableOcflRepository ocflRepo,
                               com.fasterxml.jackson.databind.ObjectReader headerReader)
        Creates a new object validator
        Parameters:
        ocflRepo - the ocfl repository
        headerReader - the resourece header deserializer
    • Method Detail

      • validate

        public void validate​(String ocflObjectId,
                             boolean checkFixity)
        Validates that the specified OCFL object is a valid Fedora 6 object
        Parameters:
        ocflObjectId - the ID of the OCFL object to validate
        checkFixity - true if file fixity should be validated in addition to the metadata validation
        Throws:
        ValidationException - when the object fails validation