public class SchemaAttribute extends Referenceable
SchemaAttribute describes a single attribute within a schema. The attribute has a name, order in the schema and cardinality. Its type is another SchemaElement (either Schema or PrimitiveSchemaElement).
If it is a PrimitiveSchemaElement it may have an override for the default value within.
| Modifier and Type | Field and Description |
|---|---|
protected String |
attributeName |
protected SchemaElement |
attributeType |
protected String |
cardinality |
protected String |
defaultValueOverride |
protected int |
elementPosition |
additionalProperties, qualifiedNameclassifications, guid, type, url| Constructor and Description |
|---|
SchemaAttribute()
Default constructor
|
SchemaAttribute(SchemaAttribute template)
Copy/clone constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object objectToCompare)
Compare the values of the supplied object with those stored in the current object.
|
String |
getAttributeName()
Return the name of this schema attribute.
|
SchemaElement |
getAttributeType()
Return the SchemaElement that relates to the type of this attribute.
|
String |
getCardinality()
Return the cardinality defined for this schema attribute.
|
String |
getDefaultValueOverride()
Return any default value for this attribute that would override the default defined in the
schema element for this attribute's type (note only used is type is primitive).
|
int |
getElementPosition()
Return the position of this schema attribute in its parent schema.
|
void |
setAttributeName(String attributeName)
Set up the name of this schema attribute.
|
void |
setAttributeType(SchemaElement attributeType)
Set up the SchemaElement that relates to the type of this attribute.
|
void |
setCardinality(String cardinality)
Set up the cardinality defined for this schema attribute.
|
void |
setDefaultValueOverride(String defaultValueOverride)
Set up any default value for this attribute that would override the default defined in the
schema element for this attribute's type (note only used is type is primitive).
|
void |
setElementPosition(int elementPosition)
Set up the position of this schema attribute in its parent schema.
|
String |
toString()
Standard toString method.
|
getAdditionalProperties, getQualifiedName, setAdditionalProperties, setQualifiedNamegetClassifications, getGUID, getType, getURL, hashCode, setClassifications, setGUID, setType, setURLprotected String attributeName
protected int elementPosition
protected String cardinality
protected String defaultValueOverride
protected SchemaElement attributeType
public SchemaAttribute()
public SchemaAttribute(SchemaAttribute template)
template - template schema attribute to copy.public String getAttributeName()
public void setAttributeName(String attributeName)
attributeName - String attribute namepublic int getElementPosition()
public void setElementPosition(int elementPosition)
elementPosition - int position in schema 0 means firstpublic String getCardinality()
public void setCardinality(String cardinality)
cardinality - String cardinality defined for this schema attribute.public String getDefaultValueOverride()
public void setDefaultValueOverride(String defaultValueOverride)
defaultValueOverride - String default value overridepublic SchemaElement getAttributeType()
public void setAttributeType(SchemaElement attributeType)
attributeType - SchemaElementpublic String toString()
toString in class Referenceablepublic boolean equals(Object objectToCompare)
equals in class ReferenceableobjectToCompare - supplied objectCopyright © 2018 ODPi. All rights reserved.