Class TextConversionContext

java.lang.Object
com.pervasive.datarush.schema.TextConversionContext

public final class TextConversionContext extends Object
Contextual information needed by TokenParser's and TokenFormatter's.
  • Constructor Details

    • 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 Details

    • 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 if value != 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 if value != null, otherwise the string conversion behavior in the defaults