Interface RecordTextSchema<T extends TextDataType>

    • Method Detail

      • getTokenType

        RecordTokenType getTokenType()
        Gets the type of the token representation of the text record. The fields of the resulting type are in the same order and have the same name as the fields in the schema.
        Returns:
        the token type representing the schema
      • getFieldCount

        int getFieldCount()
        Gets the number of fields defined in the record.
        Returns:
        the number of defined fields
      • getFieldNames

        List<String> getFieldNames()
        Gets the names of the fields defined in the record. The names are returned in the order they were defined.
        Returns:
        a list of defined field names
      • isFieldDefined

        boolean isFieldDefined​(String name)
        Indicates whether a field with the given name is already defined.
        Parameters:
        name - the field to check
        Returns:
        true if a field with the name is defined in the schema, false otherwise.
      • getFieldType

        T getFieldType​(String name)
        Gets the type of the specified fields in the record. The names are returned in the order they were defined.
        Parameters:
        name - the field for which to fetch the type
        Returns:
        the text type of the named field
      • getFieldDomain

        FieldDomain getFieldDomain​(String name)
        Gets the domain of the specified field in the record.
        Parameters:
        name - the field for which to fetch the domain
        Returns:
        the domain of the named field
      • createFieldParser

        TokenParser createFieldParser​(String fieldName)
        Creates a new parser for values of the specified field.
        Parameters:
        fieldName - the field for which to obtain a parser
        Returns:
        a parser for converting text values to token values for the field
      • createFieldFormatter

        TokenFormatter createFieldFormatter​(String fieldName)
        Creates a new formatter for values of the specified field.
        Parameters:
        fieldName - the field for which to obtain a formatter
        Returns:
        a formatter for converting token values to text values for the field
      • getDefaults

        TextConversionDefaults getDefaults()
        Gets the default conversion behaviors for fields in the schema which do not explicitly define any. These include settings such as the null indicator for values and whether string values are trimmed or preserved as is.
        Returns:
        the default behavior for the schema