Class AasPartRegistry

java.lang.Object
de.iip_ecosphere.platform.support.iip_aas.AasPartRegistry

public class AasPartRegistry
extends Object
A registry for AasContributor instances to be loaded via the Java Service loader.
Author:
Holger Eichelberger, SSE
  • Field Details

  • Constructor Details

  • Method Details

    • setAasEndpoint

      public static void setAasEndpoint​(de.iip_ecosphere.platform.support.Endpoint endpoint)
      Defines the AAS endpoint.
      Parameters:
      endpoint - the registry endpoint
    • getContributorLoader

      private static ServiceLoader<AasContributor> getContributorLoader()
      Returns the contributor loader.
      Returns:
      the loader instance
    • contributors

      public static Iterator<AasContributor> contributors()
      Returns the contributors.
      Returns:
      the contributors
    • contributorClasses

      public static Set<Class<? extends AasContributor>> contributorClasses()
      Returns the contributor classes.
      Returns:
      the contributor classes
    • build

      public static List<de.iip_ecosphere.platform.support.aas.Aas> build()
      Build up all AAS of the currently running platform part. [public for testing]
      Returns:
      the list of AAS
    • retrieveIipAas

      public static de.iip_ecosphere.platform.support.aas.Aas retrieveIipAas() throws IOException
      Obtains the IIP-Ecosphere platform AAS. Be careful with the returned instance, as if the AAS is modified in the mean time, you may hold an outdated instance.
      Returns:
      the platform AAS (may be null for none)
      Throws:
      IOException - if the AAS cannot be read due to connection errors
    • deploy

      public static de.iip_ecosphere.platform.support.Server deploy​(List<de.iip_ecosphere.platform.support.aas.Aas> aas)
      Deploy the given AAS to a local server. [preliminary]
      Parameters:
      aas - the list of aas, e.g., from build()
      Returns:
      the server instance
    • getAas

      public static de.iip_ecosphere.platform.support.aas.Aas getAas​(List<de.iip_ecosphere.platform.support.aas.Aas> list, String idShort)
      Returns the first AAS in list matching the given name. [utility]
      Parameters:
      list - the list to consider
      idShort - the short name to filter for
      Returns:
      the first AAS or null for none