Class ObjectValidator

java.lang.Object
org.fcrepo.storage.ocfl.validation.ObjectValidator

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

    Constructors
    Constructor
    Description
    ObjectValidator(io.ocfl.api.MutableOcflRepository ocflRepo, com.fasterxml.jackson.databind.ObjectReader headerReader)
    Creates a new object validator
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    validate(String ocflObjectId, boolean checkFixity)
    Validates that the specified OCFL object is a valid Fedora 6 object

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ObjectValidator

      public ObjectValidator(io.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 Details

    • 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