- All Known Subinterfaces:
FixedSizeTextType
- All Known Implementing Classes:
DynamicEnumerationType,PaddedTextType
public interface TextDataType
A mapping between a scalar token type and text representations
of values of that type. An
TextDataType is used
in TextSchema objects to provide the necessary information
for structured text file readers and writers to convert values
between internal (token) and external (text) representations.
A number of standard types are predefined in TextTypes.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionCreates a new parser for converting text into token valuesCreates a new formatter for converting token values into textgetNullIndicator(TextConversionDefaults defaults) Gets the string used to indicate null values for the type.Gets the token type used internally for the external type.Gets a string representing the format.
-
Method Details
-
getTokenType
ScalarTokenType getTokenType()Gets the token type used internally for the external type.- Returns:
- the internal data type
-
createParser
Creates a new parser for converting text into token values- Parameters:
ctx- context containing additional information needed by parser- Returns:
- a new parser object for the type
-
getFormatter
Creates a new formatter for converting token values into text- Parameters:
ctx- context containing additional information needed by parser- Returns:
- a new formatter object for the type
-
toPattern
String toPattern()Gets a string representing the format.- Returns:
- the format string for the type,
nullif the format cannot be expressed this way
-
getNullIndicator
Gets the string used to indicate null values for the type.- Parameters:
defaults- the schema defaults for the containing schema- Returns:
- the null indicator for the type
-