Enum Class TextFormat
- All Implemented Interfaces:
Serializable,Comparable<TextFormat>,Constable,org.elasticsearch.xcontent.MediaType
Templating class for displaying ESQL responses in text formats.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.MediaType
org.elasticsearch.xcontent.MediaType.HeaderValue -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionComma Separated Values implementation.Default text writer. -
Field Summary
FieldsFields inherited from interface org.elasticsearch.xcontent.MediaType
COMPATIBLE_WITH_PARAMETER_NAME, VERSION_PATTERN -
Method Summary
Modifier and TypeMethodDescriptioncontentType(RestRequest request) Content type depending on the request.protected abstract CharacterDelimiter between fieldsprotected Characterdelimiter(RestRequest request) protected abstract Stringeol()String indicating end-of-line or row.Iterator<org.elasticsearch.core.CheckedConsumer<Writer, IOException>> format(RestRequest request, EsqlQueryResponse esqlResponse) static TextFormatReturns the enum constant of this class with the specified name.static TextFormat[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfMethods inherited from interface org.elasticsearch.xcontent.MediaType
headerValues, queryParameter
-
Enum Constant Details
-
PLAIN_TEXT
Default text writer. -
CSV
Comma Separated Values implementation. Based on: https://tools.ietf.org/html/rfc4180 https://www.iana.org/assignments/media-types/text/csv https://www.w3.org/TR/sparql11-results-csv-tsv/ -
TSV
-
-
Field Details
-
URL_PARAM_FORMAT
- See Also:
-
URL_PARAM_DELIMITER
- See Also:
-
DROP_NULL_COLUMNS_OPTION
- See Also:
-
-
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
-
format
public Iterator<org.elasticsearch.core.CheckedConsumer<Writer,IOException>> format(RestRequest request, EsqlQueryResponse esqlResponse) -
contentType
Content type depending on the request. Might be used by some formatters (like CSV) to specify certain metadata like whether the header is returned or not. -
delimiter
Delimiter between fields -
delimiter
-
eol
String indicating end-of-line or row.
-