Class AssetLiteralSchemaType

  • All Implemented Interfaces:
    Serializable

    public class AssetLiteralSchemaType
    extends AssetSchemaType
    AssetLiteralSchemaType describes a schema element that has a primitive type and a fixed value. This class stores which type of primitive type it is and the fixed value.
    See Also:
    Serialized Form
    • Constructor Detail

      • AssetLiteralSchemaType

        protected AssetLiteralSchemaType​(AssetDescriptor parentAsset)
        Constructor used by the subclasses
        Parameters:
        parentAsset - descriptor of asset that this property relates to.
      • AssetLiteralSchemaType

        public AssetLiteralSchemaType​(LiteralSchemaType literalSchemaTypeBean)
        Bean constructor
        Parameters:
        literalSchemaTypeBean - bean containing the schema element properties
      • AssetLiteralSchemaType

        public AssetLiteralSchemaType​(AssetDescriptor parentAsset,
                                      LiteralSchemaType literalSchemaTypeBean)
        Bean constructor with parent asset
        Parameters:
        parentAsset - descriptor for parent asset
        literalSchemaTypeBean - bean containing the schema element properties
      • AssetLiteralSchemaType

        public AssetLiteralSchemaType​(AssetDescriptor parentAsset,
                                      AssetLiteralSchemaType templateSchemaElement)
        Copy/clone Constructor the parentAsset is passed separately to the template because it is also likely to be being cloned in the same operation and we want the definitions clone to point to the asset clone and not the original asset.
        Parameters:
        parentAsset - description of the asset that this schema element is attached to.
        templateSchemaElement - template object to copy.
    • Method Detail

      • getLiteralSchemaTypeBean

        protected LiteralSchemaType getLiteralSchemaTypeBean()
        Return the bean with all of the properties.
        Returns:
        primitive element bean
      • getDataType

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

        public String getFixedValue()
        Return the fixed value for the element. Null means this literal represents null.
        Returns:
        String containing fixed value
      • cloneAssetSchemaType

        protected AssetSchemaType cloneAssetSchemaType​(AssetDescriptor parentAsset)
        Return a clone of this schema element. This method is needed because AssetSchemaType is abstract.
        Specified by:
        cloneAssetSchemaType in class AssetSchemaType
        Parameters:
        parentAsset - description of the asset that this schema element is attached to.
        Returns:
        An instance of the this object's subclass
      • getSchemaTypeBean

        protected SchemaType getSchemaTypeBean()
        Return this schema element bean. This method is needed because SchemaElement is abstract.
        Overrides:
        getSchemaTypeBean in class AssetSchemaType
        Returns:
        An instance of the appropriate subclass of SchemaElement bean
      • setBean

        protected void setBean​(LiteralSchemaType bean)
        Set up the bean that contains the properties of the schema.
        Parameters:
        bean - bean containing the schema properties
      • toString

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