Class 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 Detail

      • HashedNTupleLayoutConfig

        public HashedNTupleLayoutConfig()
        Creates a new config object with all of the default values set.
    • Method Detail

      • setExtensionName

        public void setExtensionName​(String extensionName)
      • hasParameters

        public boolean hasParameters()
        Description copied from interface: OcflExtensionConfig
        Indicates if the extension defines parameters.
        Specified by:
        hasParameters in interface OcflExtensionConfig
        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
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object