Class SchemaElement
java.lang.Object
org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementControlHeader
org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader
org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementBase
org.odpi.openmetadata.frameworks.connectors.properties.beans.Referenceable
org.odpi.openmetadata.frameworks.connectors.properties.beans.GovernedReferenceable
org.odpi.openmetadata.frameworks.connectors.properties.beans.SchemaElement
- Direct Known Subclasses:
SchemaAttribute,SchemaType
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.
-
Field Summary
Fields inherited from class org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementControlHeader
CURRENT_AUDIT_HEADER_VERSION -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructorSchemaElement(SchemaElement template) Copy/clone Constructor. -
Method Summary
Modifier and TypeMethodDescriptionabstract SchemaElementReturn a clone of this schema element.booleanCompare the values of the supplied object with those stored in the current object.Returns the stored description property for the schema element.Return the simple name of the schema element.Return the expression used to calculate the value for the schema attribute.Return the specification language for the expression.booleanReturn a boolean to indicate if the value for this attribute is stored or calculated.booleanIs the schema element deprecated?inthashCode()Return a number that represents the contents of this object.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.voidsetExpressionType(String expressionType) Set up the specification language for the expression.voidsetIsCalculatedValue(boolean calculatedValue) Set up a boolean to indicate if the value for this attribute is stored or calculated.voidsetIsDeprecated(boolean deprecated) Set whether the schema element deprecated or not.toString()Standard toString method.Methods inherited from class org.odpi.openmetadata.frameworks.connectors.properties.beans.GovernedReferenceable
getMeanings, getSearchKeywords, setMeanings, setSearchKeywordsMethods inherited from class org.odpi.openmetadata.frameworks.connectors.properties.beans.Referenceable
getAdditionalProperties, getQualifiedName, setAdditionalProperties, setQualifiedNameMethods inherited from class org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementBase
getExtendedProperties, setExtendedPropertiesMethods inherited from class org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader
getClassifications, getGUID, setClassifications, setGUIDMethods inherited from class org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementControlHeader
getHeaderVersion, getOrigin, getStatus, getType, getVersions, setHeaderVersion, setOrigin, setStatus, setType, setVersions
-
Constructor Details
-
SchemaElement
public SchemaElement()Default constructor -
SchemaElement
Copy/clone Constructor.- Parameters:
template- template object to copy.
-
-
Method Details
-
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
Return the simple name of the schema element.- Returns:
- string name
-
setDisplayName
Set up the simple name of the schema element.- Parameters:
name- String display name
-
getDescription
Returns the stored description property for the schema element.- Returns:
- string description
-
setDescription
Set up the stored description property for the schema element.- Parameters:
description- string description
-
getIsCalculatedValue
public boolean getIsCalculatedValue()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
-
setIsCalculatedValue
public void setIsCalculatedValue(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
Return the expression used to calculate the value for the schema attribute.- Returns:
- string expression (any language)
-
setExpression
Set up the expression used to calculate the value for the schema attribute.- Parameters:
expression- string expression (any language)
-
getExpressionType
Return the specification language for the expression.- Returns:
- string description
-
setExpressionType
Set up the specification language for the expression.- Parameters:
expressionType- string description
-
cloneSchemaElement
Return a clone of this schema element. This method is needed because schema element is abstract.- Returns:
- Clone of subclass.
-
toString
Standard toString method.- Overrides:
toStringin classGovernedReferenceable- Returns:
- print out of variables in a JSON-style
-
equals
Compare the values of the supplied object with those stored in the current object.- Overrides:
equalsin classGovernedReferenceable- 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 classGovernedReferenceable- Returns:
- int
-