Direct Known Subclasses:
SchemaAttribute, SchemaType

public abstract class SchemaElement extends GovernedReferenceable

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 Details

    • isDeprecated

      protected boolean isDeprecated
    • displayName

      protected String displayName
    • description

      protected String description
    • isCalculatedValue

      protected boolean isCalculatedValue
    • expression

      protected String expression
    • expressionType

      protected String expressionType
  • Constructor Details

    • SchemaElement

      public SchemaElement()
      Default constructor
    • SchemaElement

      public SchemaElement(SchemaElement template)
      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

      public String getDisplayName()
      Return the simple name of the schema element.
      Returns:
      string name
    • setDisplayName

      public void setDisplayName(String name)
      Set up the simple name of the schema element.
      Parameters:
      name - String display name
    • getDescription

      public String getDescription()
      Returns the stored description property for the schema element.
      Returns:
      string description
    • setDescription

      public void setDescription(String description)
      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

      public String getExpression()
      Return the expression used to calculate the value for the schema attribute.
      Returns:
      string expression (any language)
    • setExpression

      public void setExpression(String expression)
      Set up the expression used to calculate the value for the schema attribute.
      Parameters:
      expression - string expression (any language)
    • getExpressionType

      public String getExpressionType()
      Return the specification language for the expression.
      Returns:
      string description
    • setExpressionType

      public void setExpressionType(String expressionType)
      Set up the specification language for the expression.
      Parameters:
      expressionType - string description
    • cloneSchemaElement

      public abstract SchemaElement cloneSchemaElement()
      Return a clone of this schema element. This method is needed because schema element is abstract.
      Returns:
      Clone of subclass.
    • toString

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

      public int hashCode()
      Return a number that represents the contents of this object.
      Overrides:
      hashCode in class GovernedReferenceable
      Returns:
      int