Package edu.wisc.library.ocfl.api.model
Enum OcflVersion
- java.lang.Object
-
- java.lang.Enum<OcflVersion>
-
- edu.wisc.library.ocfl.api.model.OcflVersion
-
- All Implemented Interfaces:
Serializable,Comparable<OcflVersion>
public enum OcflVersion extends Enum<OcflVersion>
Represents a version of the OCFL spec.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description OCFL_1_0
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static OcflVersionfromOcflVersionString(String ocflVersionString)Returns an OCFL version based on the OCFL version string specified in the Namaste file in the OCFL storage root.InventoryTypegetInventoryType()StringgetOcflObjectVersion()StringgetOcflVersion()StringtoString()static OcflVersionvalueOf(String name)Returns the enum constant of this type with the specified name.static OcflVersion[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
OCFL_1_0
public static final OcflVersion OCFL_1_0
-
-
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 nameNullPointerException- if the argument is null
-
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
-
toString
public String toString()
- Overrides:
toStringin classEnum<OcflVersion>
-
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
-
-