Class AssetDescriptor

  • All Implemented Interfaces:
    java.io.Serializable

    public abstract class AssetDescriptor
    extends AssetPropertyElementBase
    This is the base class for a connected asset. It is passed to all the embedded property objects so the name and type can be used for error messages and other diagnostics. It also carries the URL of the asset in the metadata repository where this is known to enable properties to be retrieved on request.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected Asset assetBean  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected AssetDescriptor()
      Default constructor only for subclasses
        AssetDescriptor​(AssetDescriptor templateAssetDescriptor)
      Copy/clone Constructor - used to copy the asset descriptor for a new consumer.
        AssetDescriptor​(Asset assetBean)
      Bean constructor - the asset descriptor is effectively empty - and the protected set methods need to be called to add useful content to it.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object objectToCompare)
      Compare the values of the supplied object with those stored in the current object.
      protected Asset getAssetBean()
      Return the asset bean for this element.
      java.lang.String getAssetName()
      Return the name of the asset - for use in messages and other diagnostics.
      java.util.List<java.lang.String> getAssetSuperTypeNames()
      Return the list of type names for this type's supertypes.
      java.lang.String getAssetTypeName()
      Return the name of the asset's type - for use in messages and other diagnostics.
      int hashCode()
      Hash of properties
      protected void setAssetBean​(Asset assetBean)
      Set up private attributes based on the supplied asset bean.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • assetBean

        protected Asset assetBean
    • Constructor Detail

      • AssetDescriptor

        protected AssetDescriptor()
        Default constructor only for subclasses
      • AssetDescriptor

        public AssetDescriptor​(Asset assetBean)
        Bean constructor - the asset descriptor is effectively empty - and the protected set methods need to be called to add useful content to it.
        Parameters:
        assetBean - bean containing all the properties
      • AssetDescriptor

        public AssetDescriptor​(AssetDescriptor templateAssetDescriptor)
        Copy/clone Constructor - used to copy the asset descriptor for a new consumer.
        Parameters:
        templateAssetDescriptor - template asset descriptor to copy.
    • Method Detail

      • setAssetBean

        protected void setAssetBean​(Asset assetBean)
        Set up private attributes based on the supplied asset bean.
        Parameters:
        assetBean - bean containing all the properties
      • getAssetBean

        protected Asset getAssetBean()
        Return the asset bean for this element.
        Returns:
        Asset bean
      • getAssetName

        public java.lang.String getAssetName()
        Return the name of the asset - for use in messages and other diagnostics.
        Returns:
        String asset name
      • getAssetTypeName

        public java.lang.String getAssetTypeName()
        Return the name of the asset's type - for use in messages and other diagnostics.
        Returns:
        String asset type name
      • getAssetSuperTypeNames

        public java.util.List<java.lang.String> getAssetSuperTypeNames()
        Return the list of type names for this type's supertypes.
        Returns:
        list of type names
      • equals

        public boolean equals​(java.lang.Object objectToCompare)
        Compare the values of the supplied object with those stored in the current object.
        Overrides:
        equals in class AssetPropertyElementBase
        Parameters:
        objectToCompare - supplied object
        Returns:
        boolean result of comparison