- java.lang.Object
-
- com.pervasive.datarush.schema.SchemaBuilder.SchemaField
-
- Enclosing class:
- SchemaBuilder
public static final class SchemaBuilder.SchemaField extends Object
An internal class used to transform schemas to/from JSON.
-
-
Constructor Summary
Constructors Constructor Description SchemaField()
Default constructor, for jsonSchemaField(String name, SchemaBuilder.SchemaFieldType type)
Create a schema field, specifying name and typeSchemaField(String name, SchemaBuilder.SchemaFieldType type, String format)
Create a schema field, specifying name, type, and formatSchemaField(String name, SchemaBuilder.SchemaFieldType type, Map<String,String> options)
Create a schema field, specifying name, type, and options
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FieldDomain
getDomain()
String
getFormat()
Returns the format of the fieldString
getName()
Returns the name of the fieldMap<String,String>
getOptions()
Returns the options for the fieldTextDataType
getTextType()
Returns the text type for this field based on the configured optionsString
getType()
Returns the type of the fieldvoid
setDomain(FieldDomain domain)
void
setFormat(String format)
Sets the format of the fieldvoid
setName(String name)
Sets the name of the fieldvoid
setOptions(Map<String,String> options)
Sets the options for the fieldvoid
setType(String type)
Sets the type of the field
-
-
-
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 fieldtype
- 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 fieldtype
- the type of the fieldformat
- 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 fieldtype
- the type of the fieldoptions
- 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
-
getDomain
public FieldDomain getDomain()
-
setDomain
public void setDomain(FieldDomain domain)
-
-