Class AssetSchemaType
- java.lang.Object
-
- org.odpi.openmetadata.frameworks.connectors.properties.AssetPropertyElementBase
-
- org.odpi.openmetadata.frameworks.connectors.properties.AssetPropertyBase
-
- org.odpi.openmetadata.frameworks.connectors.properties.AssetElementHeader
-
- org.odpi.openmetadata.frameworks.connectors.properties.AssetReferenceable
-
- org.odpi.openmetadata.frameworks.connectors.properties.AssetSchemaElement
-
- org.odpi.openmetadata.frameworks.connectors.properties.AssetSchemaType
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
AssetComplexSchemaType,AssetExternalSchemaType,AssetLiteralSchemaType,AssetMapSchemaType,AssetSchemaTypeChoice,AssetSimpleSchemaType
public abstract class AssetSchemaType extends AssetSchemaElement
The AssetSchemaType 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 linked schema elements.
AssetSchemaType is an abstract class - its subclasses enable the most accurate and precise mapping of the elements in a schema to the asset.- AssetPrimitiveSchemaType is for a leaf element in a schema.
- AssetStructSchemaType is a complex structure of nested schema elements.
- AssetMapSchemaType is for an attribute of type Map
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.odpi.openmetadata.frameworks.connectors.properties.AssetSchemaElement
schemaElementBean
-
Fields inherited from class org.odpi.openmetadata.frameworks.connectors.properties.AssetReferenceable
referenceableBean
-
Fields inherited from class org.odpi.openmetadata.frameworks.connectors.properties.AssetPropertyBase
parentAsset
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAssetSchemaType(AssetDescriptor parentAsset)Constructor used by the subclassesAssetSchemaType(AssetDescriptor parentAsset, AssetSchemaType templateSchema)Copy/clone Constructor - the parentAsset is passed separately to the template because it is also likely to be being cloned in the same operation and we want the definitions clone to point to the asset clone and not the original asset.AssetSchemaType(AssetDescriptor parentAsset, SchemaType schemaTypeBean)Bean constructor with parent assetAssetSchemaType(SchemaType schemaTypeBean)Bean constructor
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract AssetSchemaTypecloneAssetSchemaType(AssetDescriptor parentAsset)Return a clone of this schema type.static AssetSchemaTypecreateAssetSchemaType(AssetDescriptor parentAsset, SchemaType bean)booleanequals(Object objectToCompare)Compare the values of the supplied object with those stored in the current object.StringgetAuthor()Return the name of the author of the schema element.StringgetEncodingStandard()Return the format (encoding standard) used for this schema.StringgetFormula()Return the formula used to combine the values of the queries.List<DerivedSchemaTypeQueryTarget>getQueries()Return the list of queries that are used to create the derived schema element.protected SchemaTypegetSchemaTypeBean()Return this schema type bean.StringgetUsage()Return the usage guidance for this schema element.StringgetVersionNumber()Return the version number of the schema element - null means no version number.inthashCode()Hash of propertiesprotected voidsetBean(SchemaType bean)Set up the bean that contains the properties of the schema.StringtoString()Standard toString method.-
Methods inherited from class org.odpi.openmetadata.frameworks.connectors.properties.AssetSchemaElement
getDescription, getDisplayName, getSchemaElementBean, isDeprecated, setBean
-
Methods inherited from class org.odpi.openmetadata.frameworks.connectors.properties.AssetReferenceable
getAdditionalProperties, getMeanings, getQualifiedName, getReferenceableBean, getSecurityTags, setBean
-
Methods inherited from class org.odpi.openmetadata.frameworks.connectors.properties.AssetElementHeader
getAssetClassifications, getElementHeaderBean, getExtendedProperties, getGUID, getType, getURL, setBean
-
Methods inherited from class org.odpi.openmetadata.frameworks.connectors.properties.AssetPropertyBase
getParentAsset, getParentAssetName, getParentAssetTypeName
-
-
-
-
Constructor Detail
-
AssetSchemaType
protected AssetSchemaType(AssetDescriptor parentAsset)
Constructor used by the subclasses- Parameters:
parentAsset- descriptor of asset that this property relates to.
-
AssetSchemaType
public AssetSchemaType(SchemaType schemaTypeBean)
Bean constructor- Parameters:
schemaTypeBean- bean containing the schema element properties
-
AssetSchemaType
public AssetSchemaType(AssetDescriptor parentAsset, SchemaType schemaTypeBean)
Bean constructor with parent asset- Parameters:
parentAsset- descriptor for parent assetschemaTypeBean- bean containing the schema element properties
-
AssetSchemaType
public AssetSchemaType(AssetDescriptor parentAsset, AssetSchemaType templateSchema)
Copy/clone Constructor - the parentAsset is passed separately to the template because it is also likely to be being cloned in the same operation and we want the definitions clone to point to the asset clone and not the original asset.- Parameters:
parentAsset- description of the asset that this schema element is attached to.templateSchema- template object to copy.
-
-
Method Detail
-
createAssetSchemaType
public static AssetSchemaType createAssetSchemaType(AssetDescriptor parentAsset, SchemaType bean)
-
cloneAssetSchemaType
protected abstract AssetSchemaType cloneAssetSchemaType(AssetDescriptor parentAsset)
Return a clone of this schema type. This method should be implemented by the subclasses.- Parameters:
parentAsset- description of the asset that this schema element is attached to.- Returns:
- An instance of the this object's subclass
-
setBean
protected void setBean(SchemaType bean)
Set up the bean that contains the properties of the schema.- Parameters:
bean- bean containing the schema properties
-
getSchemaTypeBean
protected SchemaType getSchemaTypeBean()
Return this schema type bean.- Returns:
- An instance of the appropriate subclass of SchemaElement bean
-
getVersionNumber
public String getVersionNumber()
Return the version number of the schema element - null means no version number.- Returns:
- String version number
-
getAuthor
public String getAuthor()
Return the name of the author of the schema element. Null means the author is unknown.- Returns:
- String author name
-
getUsage
public String getUsage()
Return the usage guidance for this schema element. Null means no guidance available.- Returns:
- String usage guidance
-
getEncodingStandard
public String getEncodingStandard()
Return the format (encoding standard) used for this schema. It may be XML, JSON, SQL DDL or something else. Null means the encoding standard is unknown or there are many choices.- Returns:
- String encoding standard
-
getFormula
public String getFormula()
Return the formula used to combine the values of the queries. Each query is numbers 0, 1, ... and the formula has placeholders in it to show how the query results are combined.- Returns:
- String formula
-
getQueries
public List<DerivedSchemaTypeQueryTarget> getQueries()
Return the list of queries that are used to create the derived schema element.- Returns:
- list of queries
-
toString
public String toString()
Standard toString method.- Overrides:
toStringin classAssetSchemaElement- 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 classAssetSchemaElement- Parameters:
objectToCompare- supplied object- Returns:
- boolean result of comparison
-
hashCode
public int hashCode()
Hash of properties- Overrides:
hashCodein classAssetSchemaElement- Returns:
- int
-
-