Class FileSystemOcflStorageBuilder


  • public class FileSystemOcflStorageBuilder
    extends Object
    Builder for constructing FileSystemOcflStorage objects. It is configured with sensible defaults and can minimally be used as FileSystemOcflStorage.builder().repositoryRoot(repoRoot).build()
    • Constructor Detail

      • FileSystemOcflStorageBuilder

        public FileSystemOcflStorageBuilder()
    • Method Detail

      • repositoryRoot

        public FileSystemOcflStorageBuilder repositoryRoot​(Path repositoryRoot)
        Sets the path to the OCFL repository root directory. Required.
        Parameters:
        repositoryRoot - the path to the OCFL storage root
        Returns:
        builder
      • objectMapper

        public FileSystemOcflStorageBuilder objectMapper​(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
        Overrides the default ObjectMapper that's used to serialize ocfl_layout.json
        Parameters:
        objectMapper - object mapper
        Returns:
        builder
      • checkNewVersionFixity

        public FileSystemOcflStorageBuilder checkNewVersionFixity​(boolean checkNewVersionFixity)
        Overrides whether the fixity of new version content should be checked on version creation after moving the version into the OCFL object root. Unless the work directory is on a different volume, it is unlikely that this check is needed. Default: false
        Parameters:
        checkNewVersionFixity - whether to check fixity on version creation. Default: false
        Returns:
        builder
      • build

        public FileSystemOcflStorage build()
        Builds a new FileSystemOcflStorage object
        Returns:
        file system storage