Class RemoteDataAsset

  • All Implemented Interfaces:
    Asset, DataAsset

    public class RemoteDataAsset
    extends ARemoteAsset
    implements DataAsset
    Class representing a data asset managed via a remote agent. *
    Version:
    0.5
    Author:
    Mike
    • Constructor Detail

      • RemoteDataAsset

        protected RemoteDataAsset​(String meta,
                                  RemoteAgent remoteAgent)
    • Method Detail

      • create

        public static RemoteDataAsset create​(RemoteAgent agent,
                                             String meta)
        Creates a RemoteAsset with the given metadata on the specified remote agent
        Parameters:
        agent - RemoteAgent on which to create the RemoteAsset
        meta - Asset metadata which must be a valid JSON string
        Returns:
        RemoteAsset
      • isDataAsset

        public boolean isDataAsset()
        Description copied from interface: Asset
        Returns true if this asset is a data asset, i.e. the asset represents an immutable data object.
        Specified by:
        isDataAsset in interface Asset
        Specified by:
        isDataAsset in interface DataAsset
        Returns:
        true if the asset is a data asset, false otherwise
      • getContentSize

        public long getContentSize()
        Description copied from interface: DataAsset
        Gets the size of this data asset's content
        Specified by:
        getContentSize in interface DataAsset
        Returns:
        The size of the asset in bytes
      • 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
        Overrides:
        getParamValue in class AAsset
        Returns:
        A map representing 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
        Overrides:
        getDID in class AAsset
        Returns:
        The global DID for this asset.
        See Also:
        W3C DID spec