Class AAsset

    • Field Detail

      • metadataString

        protected final String metadataString
      • id

        protected final String id
    • Method Detail

      • getAssetID

        public String getAssetID()
        Description copied from interface: Asset
        Gets the ID for this Asset.

        The format of the asset ID is determined by the implementation.

        Specified by:
        getAssetID in interface Asset
        Returns:
        the assetID
      • getMetadata

        public Map<String,​Object> getMetadata()
        Description copied from interface: Asset
        Gets a copy of the JSON metadata for this asset, as a map of strings to values.

        Asset metadata will differ as per type of asset: (e.g. dataset, operation, bundle)

        Specified by:
        getMetadata in interface Asset
        Returns:
        New clone of the parsed JSON metadata for this asset
      • getDID

        public DID getDID()
        Description copied from interface: Asset
        Gets the DID for this asset. The DID may include a DID path to specify the precise asset if the DID refers to an agent managing the asset. Throws an exception if a DID is not available or cannot be constructed.
        Specified by:
        getDID in interface Asset
        Returns:
        The global DID for this asset.
        See Also:
        W3C DID spec
      • getParamValue

        public Map<String,​Object> getParamValue()
        Description copied from interface: Asset
        Gets the representation of this asset as required to pass to a remote invokable service.
        Specified by:
        getParamValue in interface Asset
        Returns:
        A map representing this asset
      • getMetadataString

        public String getMetadataString()
        Description copied from interface: Asset
        Returns the metadata for this asset as a String. Assets should store their metadata by deafult as a valid JSON string.

        Warning: Some implementations may not validate the JSON on asset creation and it is possible for the metadata String to contain invalid JSON.

        Specified by:
        getMetadataString in interface Asset
        Returns:
        The metadata of this asset as a String