Package org.incenp.obofoundry.sssom.util
Enum Class SerialisationFormat
- All Implemented Interfaces:
Serializable
,Comparable<SerialisationFormat>
,Constable
Represents a format able to serialise SSSOM data.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionSSSOM/CSV, variant used comma-separated columns.SSSOM/JSON, the other format described in the SSSOM specification.RDF/Turtle, a RDF representation of SSSOM objects in the Turtle syntax.SSSOM/TSV, the main format specifically designed to serialise SSSOM mappings. -
Method Summary
Modifier and TypeMethodDescriptionstatic SerialisationFormat
fromExtension
(String extension) Gets a serialisation format by its associated filename extension.static SerialisationFormat
Gets a serialisation format by its name (long or short).Gets the typical filename extension associated with the format.getName()
Gets the user-facing name of the serialisation format.Gets a list of all available format short names.Gets the short name of the serialisation format.static SerialisationFormat
Returns the enum constant of this class with the specified name.static SerialisationFormat[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
TSV
SSSOM/TSV, the main format specifically designed to serialise SSSOM mappings. -
CSV
SSSOM/CSV, variant used comma-separated columns. -
JSON
SSSOM/JSON, the other format described in the SSSOM specification. -
RDF_TURTLE
RDF/Turtle, a RDF representation of SSSOM objects in the Turtle syntax.
-
-
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
-
getName
Gets the user-facing name of the serialisation format.That name is suitable, e.g. for display in graphical interfaces.
- Returns:
- The format name.
-
getSortName
Gets the short name of the serialisation format.That name is suitable, e.g. for selecting the format in a command-line option.
- Returns:
- The format short name.
-
getExtension
Gets the typical filename extension associated with the format.- Returns:
- The format filename extension.
-
getShortNames
Gets a list of all available format short names.- Returns:
- The available formats, as a list of short names.
-
fromName
Gets a serialisation format by its name (long or short).- Parameters:
name
- The name of the format. It can be either the user-facing name (as returned bygetName()
) or the short name (as returned bygetShortNames()
).- Returns:
- The serialisation format, or
null
if the given name does not match any known format.
-
fromExtension
Gets a serialisation format by its associated filename extension.- Parameters:
extension
- The filename extension (not including the initial dot).- Returns:
- The serialisation format, or
null
if the given extension does not match any extension associated with a known format.
-