Class HashedNTupleLayoutConfig
- java.lang.Object
-
- edu.wisc.library.ocfl.core.extension.storage.layout.config.HashedNTupleLayoutConfig
-
- All Implemented Interfaces:
OcflExtensionConfig
public class HashedNTupleLayoutConfig extends Object implements OcflExtensionConfig
Configuration for the Hashed Truncated N-tuple Trees for OCFL Storage Hierarchies extension. TODO Add link to spec when finalized
-
-
Constructor Summary
Constructors Constructor Description HashedNTupleLayoutConfig()Creates a new config object with all of the default values set.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)DigestAlgorithmgetDigestAlgorithm()StringgetExtensionName()Returns the name of the extension the config is for.intgetNumberOfTuples()intgetTupleSize()inthashCode()booleanhasParameters()Indicates if the extension defines parameters.booleanisShortObjectRoot()HashedNTupleLayoutConfigsetDigestAlgorithm(DigestAlgorithm digestAlgorithm)The digest algorithm to apply on the OCFL object identifier; MUST be an algorithm that is allowed in the OCFL fixity blockvoidsetExtensionName(String extensionName)HashedNTupleLayoutConfigsetNumberOfTuples(int numberOfTuples)Indicates how many segments are used for path generationHashedNTupleLayoutConfigsetShortObjectRoot(boolean shortObjectRoot)When true, indicates that the OCFL object root directory name should contain the remainder of the digest not used in the n-tuples segmentsHashedNTupleLayoutConfigsetTupleSize(int tupleSize)Indicates the size of the segments (in characters) that the digest is split intoStringtoString()
-
-
-
Method Detail
-
getExtensionName
public String getExtensionName()
Description copied from interface:OcflExtensionConfigReturns the name of the extension the config is for.- Specified by:
getExtensionNamein interfaceOcflExtensionConfig- Returns:
- extension name
-
setExtensionName
public void setExtensionName(String extensionName)
-
hasParameters
public boolean hasParameters()
Description copied from interface:OcflExtensionConfigIndicates if the extension defines parameters.- Specified by:
hasParametersin interfaceOcflExtensionConfig- Returns:
- true if the extension defines parameters; false otherwise
-
getDigestAlgorithm
public DigestAlgorithm getDigestAlgorithm()
- Returns:
- the digest algorithm to use
-
setDigestAlgorithm
public HashedNTupleLayoutConfig setDigestAlgorithm(DigestAlgorithm digestAlgorithm)
The digest algorithm to apply on the OCFL object identifier; MUST be an algorithm that is allowed in the OCFL fixity block- Parameters:
digestAlgorithm- the digest algorithm to use- Returns:
- this
-
getTupleSize
public int getTupleSize()
- Returns:
- size of tuples in characters
-
setTupleSize
public HashedNTupleLayoutConfig setTupleSize(int tupleSize)
Indicates the size of the segments (in characters) that the digest is split into- Parameters:
tupleSize- size of tuples in characters- Returns:
- this
-
getNumberOfTuples
public int getNumberOfTuples()
- Returns:
- number of tuples
-
setNumberOfTuples
public HashedNTupleLayoutConfig setNumberOfTuples(int numberOfTuples)
Indicates how many segments are used for path generation- Parameters:
numberOfTuples- number of tuples- Returns:
- this
-
isShortObjectRoot
public boolean isShortObjectRoot()
- Returns:
- true if a short object root should be used
-
setShortObjectRoot
public HashedNTupleLayoutConfig setShortObjectRoot(boolean shortObjectRoot)
When true, indicates that the OCFL object root directory name should contain the remainder of the digest not used in the n-tuples segments- Parameters:
shortObjectRoot- whether or not to use a short object root- Returns:
- this
-
-