Class Validator

java.lang.Object
io.ocfl.core.validation.Validator

public class Validator extends Object
Validates an object directory against the OCFL 1.0 and 1.1 spec
  • Constructor Details

    • Validator

      public Validator(Storage fileSystem)
  • Method Details

    • validateObject

      public static ValidationResults validateObject(Path objectRoot, boolean checkContentFixity)
      Validates that object at the specified location on disk
      Parameters:
      objectRoot - the path to the object root on disk
      checkContentFixity - true if the content file digests should be validated
      Returns:
      the validation results
    • validateInventory

      public static ValidationResults validateInventory(Path inventoryPath)
      Validates that the specified inventory file is internally valid
      Parameters:
      inventoryPath - the path to the inventory file
      Returns:
      the validation results
    • validateObject

      public ValidationResults validateObject(String objectRootPath, boolean contentFixityCheck)
      Validates the specified directory against the OCFL 1.0 and 1.1 spec.
      Parameters:
      objectRootPath - the path to the object to validate
      contentFixityCheck - true if the content file digests should be validated
      Returns:
      the validation results
    • validateInventory

      public ValidationResults validateInventory(String inventoryPath)
      Validates that an inventory is internally valid.
      Parameters:
      inventoryPath - the path to the inventory to validate
      Returns:
      the validation results