Package dev.roanh.gmark.output
Enum Class ConcreteSyntax
- All Implemented Interfaces:
Serializable
,Comparable<ConcreteSyntax>
,Constable
Enum defining concrete output syntaxes for generated queries.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionConverts the given query to this syntax.static ConcreteSyntax
Resolves a concrete syntax by its identifier name.Gets the file extension for output files created for this concrete syntax.getID()
The ID of this syntax as used for command line arguments and file output.getName()
Gets the display name of this syntax.static ConcreteSyntax
Returns the enum constant of this class with the specified name.static ConcreteSyntax[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SQL
SQL query output. -
FORMAL
Formal syntax output. -
XML
Internal XML format output.
-
-
Field Details
-
id
The ID of this concrete syntax as used for command line arguments and output folder creation. -
extension
The file extension of files created for this syntax. -
convert
Function to convert a query to this concrete syntax.
-
-
Constructor Details
-
ConcreteSyntax
Constructs a new concrete syntax with the given ID, file extension and query conversion function.- Parameters:
id
- The ID of this concrete syntax.extension
- The file extension for this syntax.convert
- The function to convert queries to this 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 display name of this syntax.- Returns:
- The display name of this syntax.
-
getID
The ID of this syntax as used for command line arguments and file output.- Returns:
- The ID of this syntax.
-
getExtension
Gets the file extension for output files created for this concrete syntax.- Returns:
- The file extension.
-
convert
Converts the given query to this syntax.- Parameters:
query
- The query to convert.- Returns:
- The query represented in this concrete syntax.
-
fromName
Resolves a concrete syntax by its identifier name.- Parameters:
id
- The ID of the syntax to resolve.- Returns:
- The resolved syntax or
null
if no syntax with the given ID was found.
-