Enum OcflVersion

    • Method Detail

      • values

        public static OcflVersion[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (OcflVersion c : OcflVersion.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static OcflVersion valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • getRawVersion

        public String getRawVersion()
        Returns:
        the raw OCFL version number, eg 1.0
      • getOcflVersion

        public String getOcflVersion()
        Returns:
        the OCFL version string as found in the Namaste file in the OCFL storage root
      • getOcflObjectVersion

        public String getOcflObjectVersion()
        Returns:
        the OCFL object version string as found in the Namaste file in the OCFL object root
      • getInventoryType

        public InventoryType getInventoryType()
        Returns:
        the InventoryType as specified in an object's inventory file
      • fromOcflVersionString

        public static OcflVersion fromOcflVersionString​(String ocflVersionString)
        Returns an OCFL version based on the OCFL version string specified in the Namaste file in the OCFL storage root.
        Parameters:
        ocflVersionString - the version string from the Namaste file
        Returns:
        OCFL version
      • fromOcflObjectVersionString

        public static OcflVersion fromOcflObjectVersionString​(String ocflObjectVersionString)
        Returns an OCFL version based on the OCFL version string specified in the Namaste file in an OCFL object.
        Parameters:
        ocflObjectVersionString - the version string from the object Namaste file
        Returns:
        OCFL version
      • fromOcflVersionFilename

        public static OcflVersion fromOcflVersionFilename​(String ocflVersionFilename)
        Returns an OCFL version based on the name of an OCFL storage root Namaste file
        Parameters:
        ocflVersionFilename - Namaste file name
        Returns:
        OCFL version
      • fromOcflObjectVersionFilename

        public static OcflVersion fromOcflObjectVersionFilename​(String ocflObjectVersionFilename)
        Returns an OCFL version based on the name of an OCFL object Namaste file
        Parameters:
        ocflObjectVersionFilename - Namaste file name
        Returns:
        OCFL version