- java.lang.Object
-
- com.pervasive.datarush.schema.TextConversionContext
-
public final class TextConversionContext extends Object
Contextual information needed byTokenParser
's andTokenFormatter
's.
-
-
Constructor Summary
Constructors Constructor Description TextConversionContext()
Creates the default TextConversionContextTextConversionContext(TextConversionDefaults defaults, FieldDomain domain)
Creates a new text conversion context
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
applyDefaultNullMarker(String value)
Merges the given null indicator with the default.TextTypes.StringConversion
applyDefaultStringHandling(TextTypes.StringConversion value)
Merges the given string conversion behavior with the default.TextConversionDefaults
getDefaults()
Returns the default conversion behavior to use, if the type does not specify one.FieldDomain
getDomain()
Returns the domain that contains the allowed values for the field.
-
-
-
Constructor Detail
-
TextConversionContext
public TextConversionContext()
Creates the default TextConversionContext
-
TextConversionContext
public TextConversionContext(TextConversionDefaults defaults, FieldDomain domain)
Creates a new text conversion context- Parameters:
defaults
- the default conversion behavior to use, if the type does not specify one.domain
- the domain of the field
-
-
Method Detail
-
getDefaults
public TextConversionDefaults getDefaults()
Returns the default conversion behavior to use, if the type does not specify one.- Returns:
- the default conversion behavior
-
getDomain
public FieldDomain getDomain()
Returns the domain that contains the allowed values for the field.- Returns:
- the domain of the field.
-
applyDefaultNullMarker
public String applyDefaultNullMarker(String value)
Merges the given null indicator with the default.- Parameters:
value
- the input null indicator- Returns:
value
ifvalue != null
, otherwise the null indicator value in the defaults
-
applyDefaultStringHandling
public TextTypes.StringConversion applyDefaultStringHandling(TextTypes.StringConversion value)
Merges the given string conversion behavior with the default.- Parameters:
value
- the input string conversion behavior- Returns:
value
ifvalue != null
, otherwise the string conversion behavior in the defaults
-
-