-
- All Known Subinterfaces:
FixedSizeTextType
- All Known Implementing Classes:
DynamicEnumerationType,PaddedTextType
public interface TextDataTypeA mapping between a scalar token type and text representations of values of that type. AnTextDataTypeis used inTextSchemaobjects 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:
TextSchema
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TokenParsercreateParser(TextConversionContext ctx)Creates a new parser for converting text into token valuesTokenFormattergetFormatter(TextConversionContext ctx)Creates a new formatter for converting token values into textStringgetNullIndicator(TextConversionDefaults defaults)Gets the string used to indicate null values for the type.ScalarTokenTypegetTokenType()Gets the token type used internally for the external type.StringtoPattern()Gets a string representing the format.
-
-
-
Method Detail
-
getTokenType
ScalarTokenType getTokenType()
Gets the token type used internally for the external type.- Returns:
- the internal data type
-
createParser
TokenParser createParser(TextConversionContext ctx)
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
TokenFormatter getFormatter(TextConversionContext ctx)
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
String getNullIndicator(TextConversionDefaults defaults)
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
-
-