Class AbstractAas<A extends org.eclipse.digitaltwin.aas4j.v3.model.AssetAdministrationShell>

java.lang.Object
de.iip_ecosphere.platform.support.aas.basyx2.AbstractAas<A>
Type Parameters:
A - the BaSyx AAS type to wrap
All Implemented Interfaces:
de.iip_ecosphere.platform.support.aas.Aas, BaSyxSubmodelParent, de.iip_ecosphere.platform.support.aas.DeferredParent, de.iip_ecosphere.platform.support.aas.Element, de.iip_ecosphere.platform.support.aas.HasDataSpecification, de.iip_ecosphere.platform.support.aas.Identifiable, de.iip_ecosphere.platform.support.aas.Referable
Direct Known Subclasses:
BaSyxAas

public abstract class AbstractAas<A extends org.eclipse.digitaltwin.aas4j.v3.model.AssetAdministrationShell> extends Object implements de.iip_ecosphere.platform.support.aas.Aas, BaSyxSubmodelParent
Abstract implementation of the Aas interface.
Author:
Holger Eichelberger, SSE
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    An abstract builder for two concrete AAS types in BaSyx.

    Nested classes/interfaces inherited from interface de.iip_ecosphere.platform.support.aas.Aas

    de.iip_ecosphere.platform.support.aas.Aas.AasBuilder
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private A
     
     
    private Map<String,de.iip_ecosphere.platform.support.Builder<?>>
     
    private Map<String,de.iip_ecosphere.platform.support.aas.Submodel>
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Creates an instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    accept(de.iip_ecosphere.platform.support.aas.AasVisitor visitor)
     
    void
    Calls Builder.build() on all deferred builders.
    de.iip_ecosphere.platform.support.aas.Reference
     
    (package private) void
    defer(String shortId, de.iip_ecosphere.platform.support.Builder<?> builder)
    Registers a sub-build as deferred.
    void
    delete(de.iip_ecosphere.platform.support.aas.Submodel submodel)
     
    Returns the AAS instance.
    static String
    getAasEndpoint(de.iip_ecosphere.platform.support.ServerAddress server, de.iip_ecosphere.platform.support.aas.Aas aas)
    Returns an AAS endpoint URI according to the BaSyx naming schema.
    de.iip_ecosphere.platform.support.aas.AssetInformation
     
    (package private) <B extends de.iip_ecosphere.platform.support.Builder<?>>
    B
    getDeferred(String shortId, Class<B> cls)
    Returns a deferred builder.
    Returns the identification of the AAS.
     
    de.iip_ecosphere.platform.support.aas.Submodel
     
    int
     
    (package private) <S extends de.iip_ecosphere.platform.support.aas.Submodel>
    S
    register(S submodel)
    Registers a sub-model.
    protected void
    Defines the asset.
    Iterable<de.iip_ecosphere.platform.support.aas.Submodel>
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface de.iip_ecosphere.platform.support.aas.Aas

    createAasBuilder, createSubmodelBuilder, createSubmodelBuilder, refreshOnUse

    Methods inherited from interface de.iip_ecosphere.platform.support.aas.basyx2.BaSyxSubmodelParent

    createAasBuilder

    Methods inherited from interface de.iip_ecosphere.platform.support.aas.Element

    update
  • Field Details

    • aas

      private A extends org.eclipse.digitaltwin.aas4j.v3.model.AssetAdministrationShell aas
    • submodels

      private Map<String,de.iip_ecosphere.platform.support.aas.Submodel> submodels
    • asset

      private BaSyxAssetInformation asset
    • deferred

      private Map<String,de.iip_ecosphere.platform.support.Builder<?>> deferred
  • Constructor Details

    • AbstractAas

      protected AbstractAas(A aas)
      Creates an instance. Prevents external creation.
      Parameters:
      aas - the BaSyx AAS instance
  • Method Details

    • getAas

      public A getAas()
      Returns the AAS instance.
      Returns:
      the AAS instance
    • getIdShort

      public String getIdShort()
      Specified by:
      getIdShort in interface de.iip_ecosphere.platform.support.aas.Element
    • submodels

      public Iterable<de.iip_ecosphere.platform.support.aas.Submodel> submodels()
      Specified by:
      submodels in interface de.iip_ecosphere.platform.support.aas.Aas
    • getSubmodelCount

      public int getSubmodelCount()
      Specified by:
      getSubmodelCount in interface de.iip_ecosphere.platform.support.aas.Aas
    • getSubmodel

      public de.iip_ecosphere.platform.support.aas.Submodel getSubmodel(String idShort)
      Specified by:
      getSubmodel in interface de.iip_ecosphere.platform.support.aas.Aas
    • register

      <S extends de.iip_ecosphere.platform.support.aas.Submodel> S register(S submodel)
      Registers a sub-model.
      Type Parameters:
      S - the actual sub-model type
      Parameters:
      submodel - the sub-model to register
      Returns:
      subModel
    • accept

      public void accept(de.iip_ecosphere.platform.support.aas.AasVisitor visitor)
      Specified by:
      accept in interface de.iip_ecosphere.platform.support.aas.Element
    • createReference

      public de.iip_ecosphere.platform.support.aas.Reference createReference()
      Specified by:
      createReference in interface de.iip_ecosphere.platform.support.aas.Aas
    • getAsset

      public de.iip_ecosphere.platform.support.aas.AssetInformation getAsset()
      Specified by:
      getAsset in interface de.iip_ecosphere.platform.support.aas.Aas
    • setAsset

      protected void setAsset(BaSyxAssetInformation asset)
      Defines the asset.
      Parameters:
      asset - the asset
    • delete

      public void delete(de.iip_ecosphere.platform.support.aas.Submodel submodel)
      Specified by:
      delete in interface de.iip_ecosphere.platform.support.aas.Aas
    • getAasEndpoint

      public static String getAasEndpoint(de.iip_ecosphere.platform.support.ServerAddress server, de.iip_ecosphere.platform.support.aas.Aas aas)
      Returns an AAS endpoint URI according to the BaSyx naming schema. [public for testing, debugging]
      Parameters:
      server - the server address
      aas - the AAS
      Returns:
      the endpoint URI
    • defer

      void defer(String shortId, de.iip_ecosphere.platform.support.Builder<?> builder)
      Registers a sub-build as deferred.
      Parameters:
      shortId - the shortId of the element
      builder - the sub-builder to be registered
      See Also:
    • buildDeferred

      public void buildDeferred()
      Calls Builder.build() on all deferred builders.
      Specified by:
      buildDeferred in interface de.iip_ecosphere.platform.support.aas.DeferredParent
      See Also:
    • getDeferred

      <B extends de.iip_ecosphere.platform.support.Builder<?>> B getDeferred(String shortId, Class<B> cls)
      Returns a deferred builder.
      Type Parameters:
      B - the builder type
      Parameters:
      shortId - the short id
      cls - the builder type
      Returns:
      the builder or null if no builder for shortId with the respective type is registered
    • getIdentification

      public String getIdentification()
      Returns the identification of the AAS.
      Specified by:
      getIdentification in interface de.iip_ecosphere.platform.support.aas.Identifiable
      Returns:
      the identification (prefixed according to IdentifierType, custom if none matches). Can e.g. be used with Registry if not null.