Class FileSystemOcflStorageBuilder
- java.lang.Object
-
- edu.wisc.library.ocfl.core.storage.filesystem.FileSystemOcflStorageBuilder
-
public class FileSystemOcflStorageBuilder extends Object
Builder for constructing FileSystemOcflStorage objects. It is configured with sensible defaults and can minimally be used asFileSystemOcflStorage.builder().repositoryRoot(repoRoot).build()
-
-
Constructor Summary
Constructors Constructor Description FileSystemOcflStorageBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FileSystemOcflStoragebuild()Builds a new FileSystemOcflStorage objectFileSystemOcflStorageBuildercheckNewVersionFixity(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.FileSystemOcflStorageBuilderinitializer(FileSystemOcflStorageInitializer initializer)Overrides the defaultFileSystemOcflStorageInitializer.FileSystemOcflStorageBuilderobjectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper)Overrides the default ObjectMapper that's used to serialize ocfl_layout.jsonFileSystemOcflStorageBuilderrepositoryRoot(Path repositoryRoot)Sets the path to the OCFL repository root directory.
-
-
-
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
-
initializer
public FileSystemOcflStorageBuilder initializer(FileSystemOcflStorageInitializer initializer)
Overrides the defaultFileSystemOcflStorageInitializer. Normally, this does not need to be set.- Parameters:
initializer- the initializer- Returns:
- builder
-
build
public FileSystemOcflStorage build()
Builds a new FileSystemOcflStorage object- Returns:
- file system storage
-
-