Class AdditionalProperties

  • All Implemented Interfaces:
    Serializable

    public class AdditionalProperties
    extends AssetPropertyBase
    The AdditionalProperties class provides support for arbitrary properties to be added to a properties object. It wraps a java.util.Map map object built around HashMap.
    See Also:
    Serialized Form
    • Field Detail

      • additionalProperties

        protected Map<String,​String> additionalProperties
    • Constructor Detail

      • AdditionalProperties

        public AdditionalProperties​(Map<String,​String> additionalProperties)
        Constructor for a new set of additional properties that are not connected either directly or indirectly to an asset.
        Parameters:
        additionalProperties - map of properties for the metadata element.
      • AdditionalProperties

        public AdditionalProperties​(AssetDescriptor parentAsset,
                                    Map<String,​String> additionalProperties)
        Constructor for a new set of additional properties that are connected either directly or indirectly to an asset.
        Parameters:
        parentAsset - description of the asset that these additional properties are attached to.
        additionalProperties - map of properties for the metadata element.
      • AdditionalProperties

        public AdditionalProperties​(AssetDescriptor parentAsset,
                                    AdditionalProperties templateProperties)
        Copy/clone Constructor for additional properties that are connected to an asset.
        Parameters:
        parentAsset - description of the asset that these additional properties are attached to.
        templateProperties - template object to copy.
    • Method Detail

      • getPropertyNames

        public Iterator<String> getPropertyNames()
        Returns a list of the additional stored properties for the element. If no stored properties are present then null is returned.
        Returns:
        list of additional properties
      • getProperty

        public String getProperty​(String name)
        Returns the requested additional stored property for the element. If no stored property with that name is present then null is returned.
        Parameters:
        name - String name of the property to return.
        Returns:
        requested property value.
      • toString

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