Class OpenMetadataTypeDefAttribute

java.lang.Object
org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataTypeDefElementHeader
org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataTypeDefAttribute

public class OpenMetadataTypeDefAttribute extends OpenMetadataTypeDefElementHeader
OpenMetadataTypeDefAttribute stores the properties used to describe a attribute within a Classification, Entity or Relationship. The attribute may itself be of types Enum, Collection or Primitive Types.
  • Field Details

    • attributeName

      protected String attributeName
    • attributeType

      protected OpenMetadataAttributeTypeDef attributeType
    • attributeStatus

      protected OpenMetadataTypeDefAttributeStatus attributeStatus
    • replacedByAttribute

      protected String replacedByAttribute
    • attributeDescription

      protected String attributeDescription
    • attributeDescriptionGUID

      protected String attributeDescriptionGUID
    • cardinality

      protected OpenMetadataAttributeCardinality cardinality
    • valuesMinCount

      protected int valuesMinCount
    • valuesMaxCount

      protected int valuesMaxCount
    • isIndexable

      protected boolean isIndexable
    • isUnique

      protected boolean isUnique
    • defaultValue

      protected String defaultValue
    • externalStandardTypeMappings

      protected List<ExternalStandardTypeMapping> externalStandardTypeMappings
  • Constructor Details

    • OpenMetadataTypeDefAttribute

      public OpenMetadataTypeDefAttribute()
      Default constructor creates an empty OpenMetadataTypeDefAttribute.
    • OpenMetadataTypeDefAttribute

      public OpenMetadataTypeDefAttribute(OpenMetadataTypeDefAttribute template)
      Copy/clone constructor initialized with the values from the supplied template.
      Parameters:
      template - OpenMetadataTypeDefAttribute to copy
  • Method Details

    • getAttributeName

      public String getAttributeName()
      Return the name of this attribute.
      Returns:
      String name
    • setAttributeName

      public void setAttributeName(String attributeName)
      Set up the name of this attribute.
      Parameters:
      attributeName - String name
    • getAttributeType

      public OpenMetadataAttributeTypeDef getAttributeType()
      Return the name of the type for the value in this attribute.
      Returns:
      OpenMetadataAttributeTypeDef definition of attribute type
    • setAttributeType

      public void setAttributeType(OpenMetadataAttributeTypeDef attributeType)
      Set up the name of the type for the value in this attribute.
      Parameters:
      attributeType - OpenMetadataAttributeTypeDef
    • getAttributeStatus

      public OpenMetadataTypeDefAttributeStatus getAttributeStatus()
      Return the status of this attribute.
      Returns:
      status (null means ACTIVE)
    • setAttributeStatus

      public void setAttributeStatus(OpenMetadataTypeDefAttributeStatus attributeStatus)
      Set up the status of this attribute.
      Parameters:
      attributeStatus - status (null means ACTIVE)
    • getReplacedByAttribute

      public String getReplacedByAttribute()
      If the attribute has been renamed, this contains the name of the new attribute.
      Returns:
      new attribute name
    • setReplacedByAttribute

      public void setReplacedByAttribute(String replacedByAttribute)
      If the attribute has been renamed, this contains the name of the new attribute.
      Parameters:
      replacedByAttribute - new attribute name
    • getAttributeDescription

      public String getAttributeDescription()
      Return the short description of the attribute.
      Returns:
      String description
    • setAttributeDescription

      public void setAttributeDescription(String attributeDescription)
      Set up the short description of the attribute.
      Parameters:
      attributeDescription - String description
    • getAttributeDescriptionGUID

      public String getAttributeDescriptionGUID()
      Return the unique id of the glossary term that describes this attribute (or null if no attribute defined).
      Returns:
      String guid
    • setAttributeDescriptionGUID

      public void setAttributeDescriptionGUID(String attributeDescriptionGUID)
      Set up the unique id of the glossary term that describes this attribute (or null if no attribute defined).
      Parameters:
      attributeDescriptionGUID - String guid
    • getAttributeCardinality

      public OpenMetadataAttributeCardinality getAttributeCardinality()
      Return the cardinality of this attribute.
      Returns:
      OpenMetadataAttributeCardinality Enum.
    • setAttributeCardinality

      public void setAttributeCardinality(OpenMetadataAttributeCardinality attributeCardinality)
      Set up the cardinality for this attribute.
      Parameters:
      attributeCardinality - enum value
    • getValuesMinCount

      public int getValuesMinCount()
      Return the minimum number of values for this attribute (relevant for Arrays, Sets and Maps).
      Returns:
      int minimum count
    • setValuesMinCount

      public void setValuesMinCount(int valuesMinCount)
      Set up the minimum number of values for this attribute (relevant for Arrays, Sets and Maps).
      Parameters:
      valuesMinCount - int minimum count
    • getValuesMaxCount

      public int getValuesMaxCount()
      Return the maximum number of values for this attribute (relevant for Arrays, Sets and Maps).
      Returns:
      int maximum count
    • setValuesMaxCount

      public void setValuesMaxCount(int valuesMaxCount)
      Set up the maximum number of values for this attribute (relevant for Arrays, Sets and Maps).
      Parameters:
      valuesMaxCount - int maximum count
    • isUnique

      public boolean isUnique()
      Return whether the value for this attribute is unique across the specific instances of Struct, Classification, Entity or Relationship types that this attribute included in.
      Returns:
      boolean isUnique flag
    • setUnique

      public void setUnique(boolean unique)
      Set up the isUnique flag. This indicates whether the value for this attribute is unique across the specific instances of Struct, Classification, Entity or Relationship types that this attribute included in.
      Parameters:
      unique - boolean isUnique flag
    • isIndexable

      public boolean isIndexable()
      Return whether this attribute should be included in the metadata collection's search index.
      Returns:
      boolean isIndexable flag
    • setIndexable

      public void setIndexable(boolean indexable)
      Set up the isIndexable flag. This indicates whether this attribute should be included in the metadata collection's search index.
      Parameters:
      indexable - boolean isIndexable flag
    • getDefaultValue

      public String getDefaultValue()
      Return the default value for this attribute.
      Returns:
      String default value
    • setDefaultValue

      public void setDefaultValue(String defaultValue)
      Set up the default value for this attribute.
      Parameters:
      defaultValue - String
    • getExternalStandardMappings

      public List<ExternalStandardTypeMapping> getExternalStandardMappings()
      Return the list of mappings to external standards.
      Returns:
      ExternalStandardMappings list
    • setExternalStandardMappings

      public void setExternalStandardMappings(List<ExternalStandardTypeMapping> externalStandardTypeMappings)
      Set up the list of mappings to external standards.
      Parameters:
      externalStandardTypeMappings - ExternalStandardMappings list
    • toString

      public String toString()
      Standard toString method.
      Overrides:
      toString in class Object
      Returns:
      JSON style description of variables.
    • equals

      public boolean equals(Object objectToCompare)
      Verify that supplied object has the same properties.
      Overrides:
      equals in class Object
      Parameters:
      objectToCompare - object to test
      Returns:
      result
    • hashCode

      public int hashCode()
      Int for hash map
      Overrides:
      hashCode in class Object
      Returns:
      hash code