Class SchemaBuilder.SchemaField

  • Enclosing class:
    SchemaBuilder

    public static final class SchemaBuilder.SchemaField
    extends Object
    An internal class used to transform schemas to/from JSON.
    • Constructor Detail

      • SchemaField

        public SchemaField()
        Default constructor, for json
      • SchemaField

        public SchemaField​(String name,
                           SchemaBuilder.SchemaFieldType type)
        Create a schema field, specifying name and type
        Parameters:
        name - the name of the field
        type - the type of the field
      • SchemaField

        public SchemaField​(String name,
                           SchemaBuilder.SchemaFieldType type,
                           String format)
        Create a schema field, specifying name, type, and format
        Parameters:
        name - the name of the field
        type - the type of the field
        format - the format of the field
      • SchemaField

        public SchemaField​(String name,
                           SchemaBuilder.SchemaFieldType type,
                           Map<String,​String> options)
        Create a schema field, specifying name, type, and options
        Parameters:
        name - the name of the field
        type - the type of the field
        options - map of arbitrary options
    • Method Detail

      • getName

        public String getName()
        Returns the name of the field
        Returns:
        the name of the field
      • setName

        public void setName​(String name)
        Sets the name of the field
        Parameters:
        name - the name of the field
      • getType

        public String getType()
        Returns the type of the field
        Returns:
        the type of the field
      • setType

        public void setType​(String type)
        Sets the type of the field
        Parameters:
        type - the type of the field
      • getFormat

        public String getFormat()
        Returns the format of the field
        Returns:
        the format of the field
      • setFormat

        public void setFormat​(String format)
        Sets the format of the field
        Parameters:
        format - the format of the field
      • getOptions

        public Map<String,​String> getOptions()
        Returns the options for the field
        Returns:
        the options for the field
      • setOptions

        public void setOptions​(Map<String,​String> options)
        Sets the options for the field
        Parameters:
        options - the options for the field
      • getTextType

        public TextDataType getTextType()
        Returns the text type for this field based on the configured options
        Returns:
        the text type
      • setDomain

        public void setDomain​(FieldDomain domain)