Class SchemaElement
- java.lang.Object
-
- org.odpi.openmetadata.frameworks.connectors.properties.beans.PropertyBase
-
- org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader
-
- org.odpi.openmetadata.frameworks.connectors.properties.beans.Referenceable
-
- org.odpi.openmetadata.frameworks.connectors.properties.beans.SchemaElement
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
SchemaAttribute,SchemaType
public abstract class SchemaElement extends Referenceable
The SchemaElement object provides a base class for the pieces that make up a schema for an asset. A schema provides information about how the data is structured in the asset. Schemas are typically described as nested structures of schema elements. There are two basic types:
- SchemaType describes the structure of data.
- SchemaAttribute describes the use of another schema as part of the structure within a bigger schema.
Assets are linked to a SchemaType.
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected StringanchorGUIDprotected Stringdescriptionprotected StringdisplayNameprotected Stringexpressionprotected booleanisCalculatedValueprotected booleanisDeprecated-
Fields inherited from class org.odpi.openmetadata.frameworks.connectors.properties.beans.Referenceable
additionalProperties, confidenceGovernanceClassification, confidentialityGovernanceClassification, criticalityGovernanceClassification, latestChange, latestChangeDetails, meanings, qualifiedName, retentionGovernanceClassification, searchKeywords, securityTags
-
Fields inherited from class org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader
classifications, extendedProperties, guid, type, url
-
Fields inherited from class org.odpi.openmetadata.frameworks.connectors.properties.beans.PropertyBase
CURRENT_AUDIT_HEADER_VERSION
-
-
Constructor Summary
Constructors Constructor Description SchemaElement()Default constructorSchemaElement(SchemaElement template)Copy/clone Constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract SchemaElementcloneSchemaElement()Return a clone of this schema element.booleanequals(Object objectToCompare)Compare the values of the supplied object with those stored in the current object.StringgetAnchorGUID()Return the unique identifier of the asset that this schema is ultimately connected to.StringgetDescription()Returns the stored description property for the schema element.StringgetDisplayName()Return the simple name of the schema element.StringgetExpression()Return the expression used to calculate the value for the schema attribute.booleangetIsDeprecated()Is the schema element deprecated?inthashCode()Return a number that represents the contents of this object.booleanisCalculatedValue()Return a boolean to indicate if the value for this attribute is stored or calculated.voidsetAnchorGUID(String anchorGUID)Set up the unique identifier of the asset that this schema is ultimately connected to.voidsetCalculatedValue(boolean calculatedValue)Set up a boolean to indicate if the value for this attribute is stored or calculated.voidsetDescription(String description)Set up the stored description property for the schema element.voidsetDisplayName(String name)Set up the simple name of the schema element.voidsetExpression(String expression)Set up the expression used to calculate the value for the schema attribute.voidsetIsDeprecated(boolean deprecated)Set whether the schema element deprecated or not.StringtoString()Standard toString method.-
Methods inherited from class org.odpi.openmetadata.frameworks.connectors.properties.beans.Referenceable
getAdditionalProperties, getConfidenceGovernanceClassification, getConfidentialityGovernanceClassification, getCriticalityGovernanceClassification, getLatestChange, getLatestChangeDetails, getMeanings, getQualifiedName, getRetentionGovernanceClassification, getSearchKeywords, getSecurityTags, setAdditionalProperties, setConfidenceGovernanceClassification, setConfidentialityGovernanceClassification, setCriticalityGovernanceClassification, setLatestChange, setLatestChangeDetails, setMeanings, setQualifiedName, setRetentionGovernanceClassification, setSearchKeywords, setSecurityTags
-
Methods inherited from class org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader
getClassifications, getExtendedProperties, getGUID, getType, getURL, setClassifications, setExtendedProperties, setGUID, setType, setURL
-
Methods inherited from class org.odpi.openmetadata.frameworks.connectors.properties.beans.PropertyBase
getHeaderVersion, setHeaderVersion
-
-
-
-
Constructor Detail
-
SchemaElement
public SchemaElement()
Default constructor
-
SchemaElement
public SchemaElement(SchemaElement template)
Copy/clone Constructor.- Parameters:
template- template object to copy.
-
-
Method Detail
-
getIsDeprecated
public boolean getIsDeprecated()
Is the schema element deprecated?- Returns:
- boolean flag
-
setIsDeprecated
public void setIsDeprecated(boolean deprecated)
Set whether the schema element deprecated or not. Default is false.- Parameters:
deprecated- boolean flag
-
getDisplayName
public String getDisplayName()
Return the simple name of the schema element.- Returns:
- string name
-
setDisplayName
public void setDisplayName(String name)
Set up the simple name of the schema element.- Parameters:
name- String display name
-
getDescription
public String getDescription()
Returns the stored description property for the schema element.- Returns:
- string description
-
setDescription
public void setDescription(String description)
Set up the stored description property for the schema element.- Parameters:
description- string description
-
getAnchorGUID
public String getAnchorGUID()
Return the unique identifier of the asset that this schema is ultimately connected to.- Returns:
- string guid
-
setAnchorGUID
public void setAnchorGUID(String anchorGUID)
Set up the unique identifier of the asset that this schema is ultimately connected to.- Parameters:
anchorGUID- string guid
-
isCalculatedValue
public boolean isCalculatedValue()
Return a boolean to indicate if the value for this attribute is stored or calculated. The expression for calculating the value is set if this value is true.- Returns:
- boolean true for calculated value; false for stored value
-
setCalculatedValue
public void setCalculatedValue(boolean calculatedValue)
Set up a boolean to indicate if the value for this attribute is stored or calculated. The expression for calculating the value is set if this value is true.- Parameters:
calculatedValue- boolean true for calculated value; false for stored value
-
getExpression
public String getExpression()
Return the expression used to calculate the value for the schema attribute.- Returns:
- string expression (any language)
-
setExpression
public void setExpression(String expression)
Set up the expression used to calculate the value for the schema attribute.- Parameters:
expression- string expression (any language)
-
cloneSchemaElement
public abstract SchemaElement cloneSchemaElement()
Return a clone of this schema element. This method is needed because schema element is abstract.- Returns:
- Clone of subclass.
-
toString
public String toString()
Standard toString method.- Overrides:
toStringin classReferenceable- Returns:
- print out of variables in a JSON-style
-
equals
public boolean equals(Object objectToCompare)
Compare the values of the supplied object with those stored in the current object.- Overrides:
equalsin classReferenceable- Parameters:
objectToCompare- supplied object- Returns:
- boolean result of comparison
-
hashCode
public int hashCode()
Return a number that represents the contents of this object.- Overrides:
hashCodein classReferenceable- Returns:
- int
-
-