Package io.ocfl.api.model
Enum Class OcflVersion
- All Implemented Interfaces:
Serializable
,Comparable<OcflVersion>
,java.lang.constant.Constable
Represents a version of the OCFL spec.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic OcflVersion
fromOcflObjectVersionFilename
(String ocflObjectVersionFilename) Returns an OCFL version based on the name of an OCFL object Namaste filestatic OcflVersion
fromOcflObjectVersionString
(String ocflObjectVersionString) Returns an OCFL version based on the OCFL version string specified in the Namaste file in an OCFL object.static OcflVersion
fromOcflVersionFilename
(String ocflVersionFilename) Returns an OCFL version based on the name of an OCFL storage root Namaste filestatic OcflVersion
fromOcflVersionString
(String ocflVersionString) Returns an OCFL version based on the OCFL version string specified in the Namaste file in the OCFL storage root.toString()
static OcflVersion
Returns the enum constant of this class with the specified name.static OcflVersion[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
OCFL_1_0
-
OCFL_1_1
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-
getRawVersion
- Returns:
- the raw OCFL version number, eg 1.0
-
getOcflVersion
- Returns:
- the OCFL version string as found in the Namaste file in the OCFL storage root
-
getOcflObjectVersion
- Returns:
- the OCFL object version string as found in the Namaste file in the OCFL object root
-
getInventoryType
- Returns:
- the InventoryType as specified in an object's inventory file
-
toString
- Overrides:
toString
in classEnum<OcflVersion>
-
fromOcflVersionString
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
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
Returns an OCFL version based on the name of an OCFL storage root Namaste file- Parameters:
ocflVersionFilename
- Namaste file name- Returns:
- OCFL version
-
fromOcflObjectVersionFilename
Returns an OCFL version based on the name of an OCFL object Namaste file- Parameters:
ocflObjectVersionFilename
- Namaste file name- Returns:
- OCFL version
-