Package org.symphonyoss.s2.canon.model
Class Field
- java.lang.Object
-
- org.symphonyoss.s2.canon.model.ModelElement
-
- org.symphonyoss.s2.canon.model.AbstractSchema
-
- org.symphonyoss.s2.canon.model.Field
-
public class Field extends AbstractSchema
-
-
Constructor Summary
Constructors Constructor Description Field(ModelElement parent, ParserContext context, AbstractSchema type, boolean required, String name)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AbstractSchemacreate(ModelElement parent, ParserContext context, boolean required)SchemagetBaseSchema()Get the basic schema which this type refers to.booleangetCanFailValidation()ModelElementgetComponent()ModelElementgetElementComponent()SchemagetElementSchema()For an array type this is the schema of a single element of the array.EnumSchemagetEnum()booleangetHasByteString()booleangetHasList()booleangetHasSet()booleangetIsArraySchema()booleangetIsComponent()booleangetIsObjectSchema()booleangetIsObjectType()booleangetIsTypeDef()AbstractSchemagetType()booleanisRequired()StringtoString()voidvalidate()-
Methods inherited from class org.symphonyoss.s2.canon.model.AbstractSchema
createSchema, generateChildren, getIsAnonymousInnerClass, toString, toString, toString
-
Methods inherited from class org.symphonyoss.s2.canon.model.ModelElement
add, add, capitalize, generate, getAttributes, getByPath, getCamelCapitalizedName, getCamelName, getChildren, getContext, getDescription, getElementType, getFields, getFormat, getHasCollections, getIsGenerateBuilderFacade, getIsGenerateFacade, getModel, getName, getParent, getReference, getReferencedTypes, getReferencedTypes, getSchemas, getSchemas, getSnakeCapitalizedName, getSnakeName, getSourceModel, getSummary, resolve
-
-
-
-
Constructor Detail
-
Field
public Field(ModelElement parent, ParserContext context, AbstractSchema type, boolean required, String name)
-
-
Method Detail
-
getBaseSchema
public Schema getBaseSchema()
Description copied from class:AbstractSchemaGet the basic schema which this type refers to. For a field it will be the field type, for a reference the referenced type. For a field whose type is a reference then it will be the ultimate referenced type. The baseSchema could be an ArraySchema- Specified by:
getBaseSchemain classAbstractSchema- Returns:
- The base schema which this type refers to.
-
getComponent
public ModelElement getComponent()
- Overrides:
getComponentin classModelElement
-
getElementSchema
public Schema getElementSchema()
Description copied from class:AbstractSchemaFor an array type this is the schema of a single element of the array.- Specified by:
getElementSchemain classAbstractSchema- Returns:
- The schema of a single element of an array
-
getElementComponent
public ModelElement getElementComponent()
- Overrides:
getElementComponentin classModelElement
-
getIsArraySchema
public boolean getIsArraySchema()
- Specified by:
getIsArraySchemain classAbstractSchema
-
getIsObjectSchema
public boolean getIsObjectSchema()
- Specified by:
getIsObjectSchemain classAbstractSchema
-
isRequired
public boolean isRequired()
- Overrides:
isRequiredin classAbstractSchema
-
getType
public AbstractSchema getType()
-
getEnum
public EnumSchema getEnum()
- Overrides:
getEnumin classModelElement
-
getHasSet
public boolean getHasSet()
- Overrides:
getHasSetin classModelElement
-
getHasList
public boolean getHasList()
- Overrides:
getHasListin classModelElement
-
getHasByteString
public boolean getHasByteString()
- Overrides:
getHasByteStringin classModelElement
-
getIsTypeDef
public boolean getIsTypeDef()
- Overrides:
getIsTypeDefin classModelElement
-
getIsComponent
public boolean getIsComponent()
- Overrides:
getIsComponentin classModelElement
-
getIsObjectType
public boolean getIsObjectType()
- Overrides:
getIsObjectTypein classModelElement
-
getCanFailValidation
public boolean getCanFailValidation()
- Overrides:
getCanFailValidationin classModelElement
-
validate
public void validate()
- Overrides:
validatein classModelElement
-
create
public static AbstractSchema create(ModelElement parent, ParserContext context, boolean required)
-
toString
public String toString()
- Overrides:
toStringin classAbstractSchema
-
-