Class AssetSchemaAttribute
- 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.AssetSchemaAttribute
-
- All Implemented Interfaces:
Serializable
public class AssetSchemaAttribute extends AssetReferenceable
SchemaAttribute describes a single attribute within a schema. The attribute has a name, order in the schema and cardinality. Its type is another SchemaElement of type SchemaType. SchemaType has many
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected SchemaAttributeschemaAttributeBean-
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 AssetSchemaAttribute(AssetDescriptor parentAsset, AssetSchemaAttribute template)Copy/clone constructor.AssetSchemaAttribute(AssetDescriptor parentAsset, SchemaAttribute schemaAttributeBean)Bean constructor with parent assetprotectedAssetSchemaAttribute(SchemaAttribute schemaAttributeBean)Bean constructor used by subclasses
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanallowsDuplicateValues()Return whether the same value can be used by more than one instance of this attribute.booleanequals(Object objectToCompare)Compare the values of the supplied object with those stored in the current object.StringgetAttributeName()Return the name of this schema attribute.List<AssetSchemaAttributeRelationship>getAttributeRelationships()Return any relationships to other schema attributes.AssetSchemaTypegetAttributeType()Return the SchemaType that relates to the type of this attribute.StringgetCardinality()Return the cardinality defined for this schema attribute.SchemaAttributeCategorygetCategory()Return the category of the schema attribute.StringgetDefaultValueOverride()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).intgetElementPosition()Return the position of this schema attribute in its parent schema.AssetSchemaTypegetLocalSchemaType()Deprecated.intgetMaxCardinality()Return the maximum number of instances allowed for this attribute.intgetMinCardinality()Return this minimum number of instances allowed for this attribute.protected SchemaAttributegetSchemaAttributeBean()Return the bean with all of the properties.DataItemSortOrdergetSortOrder()Return the order that the attribute instances are arranged in - if any.inthashCode()Hash of propertiesbooleanhasOrderedValues()Return whether the attribute instances are arranged in an order.StringtoString()Standard toString method.-
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
-
-
-
-
Field Detail
-
schemaAttributeBean
protected SchemaAttribute schemaAttributeBean
-
-
Constructor Detail
-
AssetSchemaAttribute
protected AssetSchemaAttribute(SchemaAttribute schemaAttributeBean)
Bean constructor used by subclasses- Parameters:
schemaAttributeBean- bean containing all of the properties
-
AssetSchemaAttribute
public AssetSchemaAttribute(AssetDescriptor parentAsset, SchemaAttribute schemaAttributeBean)
Bean constructor with parent asset- Parameters:
parentAsset- description of the asset that this schema attribute is attached to.schemaAttributeBean- bean containing all of the properties
-
AssetSchemaAttribute
public AssetSchemaAttribute(AssetDescriptor parentAsset, AssetSchemaAttribute template)
Copy/clone constructor.- Parameters:
parentAsset- description of the asset that this schema attribute is attached to.template- template schema attribute to copy.
-
-
Method Detail
-
getSchemaAttributeBean
protected SchemaAttribute getSchemaAttributeBean()
Return the bean with all of the properties.- Returns:
- schema attribute bean
-
getAttributeName
public String getAttributeName()
Return the name of this schema attribute.- Returns:
- String attribute name
-
getElementPosition
public int getElementPosition()
Return the position of this schema attribute in its parent schema.- Returns:
- int position in schema 0 means first
-
getCategory
public SchemaAttributeCategory getCategory()
Return the category of the schema attribute.- Returns:
- enum SchemaAttributeCategory
-
getCardinality
public String getCardinality()
Return the cardinality defined for this schema attribute.- Returns:
- String cardinality defined for this schema attribute.
-
getMinCardinality
public int getMinCardinality()
Return this minimum number of instances allowed for this attribute.- Returns:
- int
-
getMaxCardinality
public int getMaxCardinality()
Return the maximum number of instances allowed for this attribute.- Returns:
- int (-1 means infinite)
-
allowsDuplicateValues
public boolean allowsDuplicateValues()
Return whether the same value can be used by more than one instance of this attribute.- Returns:
- boolean flag
-
hasOrderedValues
public boolean hasOrderedValues()
Return whether the attribute instances are arranged in an order.- Returns:
- boolean flag
-
getSortOrder
public DataItemSortOrder getSortOrder()
Return the order that the attribute instances are arranged in - if any.- Returns:
- DataItemSortOrder enum
-
getDefaultValueOverride
public 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).- Returns:
- String default value override
-
getLocalSchemaType
@Deprecated public AssetSchemaType getLocalSchemaType()
Deprecated.Return the SchemaType that relates to the type of this attribute. It is possible to query its type and cast it to specific types of schema type to retrieve all of the values.- Returns:
- SchemaType object
-
getAttributeType
public AssetSchemaType getAttributeType()
Return the SchemaType that relates to the type of this attribute. It is possible to query its type and cast it to specific types of schema type to retrieve all of the values.- Returns:
- SchemaType object
-
getAttributeRelationships
public List<AssetSchemaAttributeRelationship> getAttributeRelationships()
Return any relationships to other schema attributes. This could be relationships in a Graph or foreign key relationships in a relational schema- Returns:
- list of attribute relationships
-
toString
public String toString()
Standard toString method.- Overrides:
toStringin classAssetReferenceable- 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 classAssetReferenceable- Parameters:
objectToCompare- supplied object- Returns:
- boolean result of comparison
-
hashCode
public int hashCode()
Hash of properties- Overrides:
hashCodein classAssetReferenceable- Returns:
- int
-
-