Class DataContractSchemaProperty

java.lang.Object
org.odpi.openmetadata.frameworks.integration.bitol.odcs.DataContractSchemaElement
org.odpi.openmetadata.frameworks.integration.bitol.odcs.DataContractSchemaProperty

public class DataContractSchemaProperty extends DataContractSchemaElement
This class represents a property (typically a column or field) of a schema object in an Open Data Contract Standard (ODCS) data contract. Properties may be nested: a property with logicalType object has its own list of properties, and a property with logicalType array describes its element type in the items property. This class is used for both schema properties and array item properties since the standard gives them the same shape.
  • Constructor Details

    • DataContractSchemaProperty

      public DataContractSchemaProperty()
      Default constructor
  • Method Details

    • getLogicalType

      public String getLogicalType()
      Return the logical (platform independent) type of the property. Standard values are defined in DataContractLogicalType.
      Returns:
      string type name
    • setLogicalType

      public void setLogicalType(String logicalType)
      Set up the logical (platform independent) type of the property. Standard values are defined in DataContractLogicalType.
      Parameters:
      logicalType - string type name
    • getLogicalTypeOptions

      public DataContractLogicalTypeOptions getLogicalTypeOptions()
      Return the options that refine the logical type.
      Returns:
      logical type options
    • setLogicalTypeOptions

      public void setLogicalTypeOptions(DataContractLogicalTypeOptions logicalTypeOptions)
      Set up the options that refine the logical type.
      Parameters:
      logicalTypeOptions - logical type options
    • getPrimaryKey

      public Boolean getPrimaryKey()
      Return whether the property is part of the primary key.
      Returns:
      boolean flag or null if not specified
    • setPrimaryKey

      public void setPrimaryKey(Boolean primaryKey)
      Set up whether the property is part of the primary key.
      Parameters:
      primaryKey - boolean flag or null if not specified
    • getPrimaryKeyPosition

      public Integer getPrimaryKeyPosition()
      Return the position of the property in the primary key (starting from 1; -1 if not part of the key).
      Returns:
      integer value or null if not specified
    • setPrimaryKeyPosition

      public void setPrimaryKeyPosition(Integer primaryKeyPosition)
      Set up the position of the property in the primary key (starting from 1; -1 if not part of the key).
      Parameters:
      primaryKeyPosition - integer value or null if not specified
    • getRequired

      public Boolean getRequired()
      Return whether a value is required for the property (not nullable).
      Returns:
      boolean flag or null if not specified
    • setRequired

      public void setRequired(Boolean required)
      Set up whether a value is required for the property (not nullable).
      Parameters:
      required - boolean flag or null if not specified
    • getUnique

      public Boolean getUnique()
      Return whether the values of the property are unique.
      Returns:
      boolean flag or null if not specified
    • setUnique

      public void setUnique(Boolean unique)
      Set up whether the values of the property are unique.
      Parameters:
      unique - boolean flag or null if not specified
    • getPartitioned

      public Boolean getPartitioned()
      Return whether the property is a partition key.
      Returns:
      boolean flag or null if not specified
    • setPartitioned

      public void setPartitioned(Boolean partitioned)
      Set up whether the property is a partition key.
      Parameters:
      partitioned - boolean flag or null if not specified
    • getPartitionKeyPosition

      public Integer getPartitionKeyPosition()
      Return the position of the property in the partition key (starting from 1; -1 if not a partition key).
      Returns:
      integer value or null if not specified
    • setPartitionKeyPosition

      public void setPartitionKeyPosition(Integer partitionKeyPosition)
      Set up the position of the property in the partition key (starting from 1; -1 if not a partition key).
      Parameters:
      partitionKeyPosition - integer value or null if not specified
    • getClassification

      public String getClassification()
      Return the data classification of the property, for example public, restricted or confidential.
      Returns:
      string classification
    • setClassification

      public void setClassification(String classification)
      Set up the data classification of the property, for example public, restricted or confidential.
      Parameters:
      classification - string classification
    • getEncryptedName

      public String getEncryptedName()
      Return the name of the property that holds the encrypted version of this property's values.
      Returns:
      string name
    • setEncryptedName

      public void setEncryptedName(String encryptedName)
      Set up the name of the property that holds the encrypted version of this property's values.
      Parameters:
      encryptedName - string name
    • getTransformSourceObjects

      public List<String> getTransformSourceObjects()
      Return the list of source objects used in the transformation that produces the property.
      Returns:
      list of object names
    • setTransformSourceObjects

      public void setTransformSourceObjects(List<String> transformSourceObjects)
      Set up the list of source objects used in the transformation that produces the property.
      Parameters:
      transformSourceObjects - list of object names
    • getTransformLogic

      public String getTransformLogic()
      Return the logic (for example SQL) of the transformation that produces the property.
      Returns:
      string logic
    • setTransformLogic

      public void setTransformLogic(String transformLogic)
      Set up the logic (for example SQL) of the transformation that produces the property.
      Parameters:
      transformLogic - string logic
    • getTransformDescription

      public String getTransformDescription()
      Return the description in business terms of the transformation that produces the property.
      Returns:
      string description
    • setTransformDescription

      public void setTransformDescription(String transformDescription)
      Set up the description in business terms of the transformation that produces the property.
      Parameters:
      transformDescription - string description
    • getExamples

      public List<Object> getExamples()
      Return the list of example values.
      Returns:
      list of values
    • setExamples

      public void setExamples(List<Object> examples)
      Set up the list of example values.
      Parameters:
      examples - list of values
    • getCriticalDataElement

      public Boolean getCriticalDataElement()
      Return whether the property is a critical data element.
      Returns:
      boolean flag or null if not specified
    • setCriticalDataElement

      public void setCriticalDataElement(Boolean criticalDataElement)
      Set up whether the property is a critical data element.
      Parameters:
      criticalDataElement - boolean flag or null if not specified
    • getRelationships

      public List<DataContractRelationship> getRelationships()
      Return the list of relationships from this property to other properties.
      Returns:
      list of relationships
    • setRelationships

      public void setRelationships(List<DataContractRelationship> relationships)
      Set up the list of relationships from this property to other properties.
      Parameters:
      relationships - list of relationships
    • getQuality

      public List<DataContractQualityRule> getQuality()
      Return the list of data quality checks for this property.
      Returns:
      list of quality rules
    • setQuality

      public void setQuality(List<DataContractQualityRule> quality)
      Set up the list of data quality checks for this property.
      Parameters:
      quality - list of quality rules
    • getProperties

      public List<DataContractSchemaProperty> getProperties()
      Return the nested properties (when the logical type is object).
      Returns:
      list of nested properties
    • setProperties

      public void setProperties(List<DataContractSchemaProperty> properties)
      Set up the nested properties (when the logical type is object).
      Parameters:
      properties - list of nested properties
    • getItems

      public DataContractSchemaProperty getItems()
      Return the description of the items (when the logical type is array).
      Returns:
      item property description
    • setItems

      public void setItems(DataContractSchemaProperty items)
      Set up the description of the items (when the logical type is array).
      Parameters:
      items - item property description
    • getEnumValues

      public List<DataContractEnumValue> getEnumValues()
      Return the enumeration of allowed values for this property (the enum array in the document).
      Returns:
      List
    • setEnumValues

      public void setEnumValues(List<DataContractEnumValue> enumValues)
      Set up the enumeration of allowed values for this property (the enum array in the document).
      Parameters:
      enumValues - List
    • getMap

      public DataContractSchemaMap getMap()
      Return the key and value definitions when the logical type is map.
      Returns:
      DataContractSchemaMap
    • setMap

      public void setMap(DataContractSchemaMap map)
      Set up the key and value definitions when the logical type is map.
      Parameters:
      map - DataContractSchemaMap
    • getSemanticType

      public String getSemanticType()
      Return the semantic role of the property: column (the default), measure or dimension.
      Returns:
      String
    • setSemanticType

      public void setSemanticType(String semanticType)
      Set up the semantic role of the property: column (the default), measure or dimension.
      Parameters:
      semanticType - String
    • toString

      public String toString()
      Standard toString method.
      Overrides:
      toString in class DataContractSchemaElement
      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:
      equals in class DataContractSchemaElement
      Parameters:
      objectToCompare - supplied object
      Returns:
      boolean result of comparison
    • hashCode

      public int hashCode()
      Return hash code based on properties.
      Overrides:
      hashCode in class DataContractSchemaElement
      Returns:
      int