Class PlatformAas

java.lang.Object
de.iip_ecosphere.platform.support.iip_aas.PlatformAas
All Implemented Interfaces:
AasContributor

public class PlatformAas extends Object implements AasContributor
The platform name/typeplate.
Author:
Holger Eichelberger, SSE
  • Field Details

  • Constructor Details

    • PlatformAas

      public PlatformAas()
  • Method Details

    • setImageResolver

      public static void setImageResolver(de.iip_ecosphere.platform.support.resources.ResourceResolver resolver)
      Changes the image resolver. [public for testing]
      Parameters:
      resolver - the resolver
    • getImageResolver

      public static de.iip_ecosphere.platform.support.resources.ResourceResolver getImageResolver()
      Returns the image resolver. [public for testing]
      Returns:
      the image resolver
    • contributeTo

      public de.iip_ecosphere.platform.support.aas.Aas contributeTo(de.iip_ecosphere.platform.support.aas.Aas.AasBuilder aasBuilder, de.iip_ecosphere.platform.support.aas.InvocablesCreator iCreator)
      Description copied from interface: AasContributor
      Contribute to the given aasBuilder.
      Specified by:
      contributeTo in interface AasContributor
      Parameters:
      aasBuilder - the AAS to contribute to
      iCreator - the invocables creator for binding (remote) property and operation implementations. Property and function names shall be qualified by the AAS short id.
      Returns:
      the contributor may ignore aasBuilder and create an own AAS and return that. If this contributor just contributes to the aasBuilder the result shall be null
    • addSoftwareInfo

      public static void addSoftwareInfo(de.iip_ecosphere.platform.support.aas.Submodel.SubmodelBuilder smB, ApplicationSetup appSetup)
      Add software-related information to the given submodel.
      Parameters:
      smB - the submodel builder
      appSetup - the application setup
    • createNameplate

      public static de.iip_ecosphere.platform.support.aas.Submodel.SubmodelBuilder createNameplate(de.iip_ecosphere.platform.support.aas.Aas.AasBuilder aasBuilder, ApplicationSetup appSetup, String identifier)
      Creates the "nameplate". Currently a mix of TechnicalDataBuilder and (for legacy reasons) the ZVEI Digital Nameplate for industrial equipment V1.0. Applies RbacReceiver.rbacPlatform(AuthenticationDescriptor).
      Parameters:
      aasBuilder - the AAS builder, do not call Builder.build() in here!
      appSetup - application setup
      identifier - the submodel identifier, may be null then the submodel is identified via it's idShort only
      Returns:
      submodel builder if something needs to be added
    • createSoftwareNameplate

      private void createSoftwareNameplate(de.iip_ecosphere.platform.support.aas.Aas.AasBuilder aasBuilder, ApplicationSetup appSetup, IipVersion versionInfo, String identification)
      Creates the software nameplate. Applies RbacReceiver.rbacPlatform(AuthenticationDescriptor).
      Parameters:
      aasBuilder - the parent AAS builder
      appSetup - the application setup
      versionInfo - the version information
      identification - the identification of the submodel, may be null for idShort
    • createAddress

      public static void createAddress(de.iip_ecosphere.platform.support.aas.SubmodelElementContainerBuilder smBuilder, ApplicationSetup.Address address)
      Creates (part) of a nameplate address. A bit of ZVEI Digital Nameplate for industrial equipment V1.0.
      Parameters:
      smBuilder - the builder, do not call Builder.build() in here!
      address - the address to use
    • contributeTo

      public void contributeTo(de.iip_ecosphere.platform.support.aas.ProtocolServerBuilder sBuilder)
      Description copied from interface: AasContributor
      Contributes the real implementation functions to the sBuilder. Names used for the iCreator in AasContributor.contributeTo(AasBuilder, InvocablesCreator) must be the same as used here. Property and function names shall be qualified by the AAS short id.
      Specified by:
      contributeTo in interface AasContributor
      Parameters:
      sBuilder - the server builder
    • snapshotAas

      static String snapshotAas(String id) throws ExecutionException
      Snapshots an AAS, i.e., the AasPartRegistry.getIipAasInstance().
      Parameters:
      id - an optional id to be placed into the file name, may be null or empty
      Returns:
      the name of the file written, may be empty for none
      Throws:
      ExecutionException - if there is no IIP AAS instance or writing the instance fails for some reason
    • getKind

      public AasContributor.Kind getKind()
      Description copied from interface: AasContributor
      Returns the kind of AAS being created. This is helpful for filtering.
      Specified by:
      getKind in interface AasContributor
      Returns:
      the kind of AAS
    • isValid

      public boolean isValid()
      Description copied from interface: AasContributor
      Allow the AAS contributor to declare itself as invalid.
      Specified by:
      isValid in interface AasContributor
      Returns:
      true as prerequisite to execute AasContributor.contributeTo(ProtocolServerBuilder) and AasContributor.contributeTo(AasBuilder, InvocablesCreator), false else