Class SubmodelElementsCollectionClient

java.lang.Object
de.iip_ecosphere.platform.support.iip_aas.SubmodelClient
de.iip_ecosphere.platform.support.iip_aas.SubmodelElementsCollectionClient

public class SubmodelElementsCollectionClient extends SubmodelClient
A SubmodelClient which obtains properties and operations defined in a submodel elements collection.
Author:
Holger Eichelberger, SSE
  • Field Details

    • collectionId

      private String collectionId
  • Constructor Details

    • SubmodelElementsCollectionClient

      public SubmodelElementsCollectionClient(String submodel, String collectionId) throws IOException
      Creates a client instance based on a deployed IIP-AAS from AasPartRegistry based on a specified submodel and a collection id.
      Parameters:
      submodel - the submode to refer to
      collectionId - the id used as key in submodel to denote the collection to operate on
      Throws:
      IOException - if retrieving the IIP-AAS or the respective submodel fails
    • SubmodelElementsCollectionClient

      public SubmodelElementsCollectionClient(String submodel, String collectionId, de.iip_ecosphere.platform.support.aas.Submodel fallback)
      Creates a client instance based on a deployed IIP-AAS from AasPartRegistry based on a specified submodel and a collection id.
      Parameters:
      submodel - the submode to refer to
      collectionId - the id used as key in submodel to denote the collection to operate on
      fallback - submodel to be used if retrieving sumbodel fails
    • SubmodelElementsCollectionClient

      public SubmodelElementsCollectionClient(de.iip_ecosphere.platform.support.aas.Submodel submodel, String collectionId)
      Creates a client instance based on the given submodel. Operation and properties will be taken from the submodel elements collection collectionId within submodel,
      Parameters:
      submodel - the submodel to use
      collectionId - the id used as key in submodel to denote the resource to operate on
  • Method Details

    • getSubmodel

      private static de.iip_ecosphere.platform.support.aas.Submodel getSubmodel(String submodel, de.iip_ecosphere.platform.support.aas.Submodel fallback)
      Returns the submodel with name submodel or of retrieving it fails fallback.
      Parameters:
      submodel - the submodel name
      fallback - the fallback submodel, may be null
      Returns:
      the submodel or fallback
    • getSubmodelElementCollection

      protected de.iip_ecosphere.platform.support.aas.SubmodelElementCollection getSubmodelElementCollection()
      Returns the actual submodel elements collection to use.
      Returns:
      the collection
    • getOperation

      protected de.iip_ecosphere.platform.support.aas.Operation getOperation(String idShort) throws ExecutionException
      Description copied from class: SubmodelClient
      Returns the operation for the given idShort defined on SubmodelClient.submodel.
      Overrides:
      getOperation in class SubmodelClient
      Parameters:
      idShort - the short id
      Returns:
      the operation
      Throws:
      ExecutionException - if the operation was not found
      See Also:
    • getProperty

      protected de.iip_ecosphere.platform.support.aas.Property getProperty(String idShort) throws ExecutionException
      Description copied from class: SubmodelClient
      Returns the property for the given idShort defined on SubmodelClient.submodel.
      Overrides:
      getProperty in class SubmodelClient
      Parameters:
      idShort - the short id
      Returns:
      the property
      Throws:
      ExecutionException - if the property was not found
      See Also:
    • getLogger

      protected de.iip_ecosphere.platform.support.logging.Logger getLogger()
      Returns the logger instance.
      Returns:
      the logger