Package org.incenp.linkml.ext
Enum DataFormat
- java.lang.Object
-
- java.lang.Enum<DataFormat>
-
- org.incenp.linkml.ext.DataFormat
-
- All Implemented Interfaces:
Serializable,Comparable<DataFormat>
public enum DataFormat extends Enum<DataFormat>
The serialisation formats supported by the YAMLLoader class.LinkML-Java currently only supports JSON and YAML, so this enumeration is a bit “overkill” for now. But more formats will almost certainly be added in the future (at the very least RDF formats).
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DataFormatvalueOf(String name)Returns the enum constant of this type with the specified name.static DataFormat[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
JSON
public static final DataFormat JSON
The JSON serialisation format.- See Also:
- RFC 8259
-
YAML
public static final DataFormat YAML
The YAML serialisation format.- See Also:
- YAML official website
-
-
Method Detail
-
values
public static DataFormat[] 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 (DataFormat c : DataFormat.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DataFormat 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
-
-