All Implemented Interfaces:
Serializable

public class LiteralSchemaType extends SchemaType
LiteralSchemaType describes a schema element that has a fixed value type. This class stores the value it represents.
See Also:
  • Field Details

    • dataType

      protected String dataType
    • fixedValue

      protected String fixedValue
  • Constructor Details

    • LiteralSchemaType

      public LiteralSchemaType()
      Default constructor used by subclasses
    • LiteralSchemaType

      public LiteralSchemaType(LiteralSchemaType template)
      Copy/clone Constructor.
      Parameters:
      template - template object to copy.
  • Method Details

    • getDataType

      public String getDataType()
      Return the data type for this element. Null means unknown data type.
      Returns:
      String data type name
    • setDataType

      public void setDataType(String dataType)
      Set up the data type for this element. Null means unknown data type.
      Parameters:
      dataType - data type name
    • getFixedValue

      public String getFixedValue()
      Return the fixed value for the element. Null means fixed value is null.
      Returns:
      String containing fixed value
    • setFixedValue

      public void setFixedValue(String fixedValue)
      Set up the fixed value for the element. Null means fixed value is null.
      Parameters:
      fixedValue - String containing fixed value
    • cloneSchemaElement

      public SchemaElement cloneSchemaElement()
      Returns a clone of this object as the abstract SchemaElement class.
      Overrides:
      cloneSchemaElement in class SchemaType
      Returns:
      SchemaElement
    • cloneSchemaType

      public SchemaType cloneSchemaType()
      Returns a clone of this object as the abstract SchemaType class.
      Overrides:
      cloneSchemaType in class SchemaType
      Returns:
      LiteralSchemaType object
    • toString

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

      public int hashCode()
      Hash of properties
      Overrides:
      hashCode in class SchemaType
      Returns:
      int