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 ClassesModifier and TypeClassDescriptionstatic classAn 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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(de.iip_ecosphere.platform.support.aas.AasVisitor visitor) voidCallsBuilder.build()on all deferred builders.de.iip_ecosphere.platform.support.aas.Reference(package private) voidRegisters a sub-build as deferred.voiddelete(de.iip_ecosphere.platform.support.aas.Submodel submodel) getAas()Returns the AAS instance.static StringgetAasEndpoint(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.AssetInformationgetAsset()(package private) <B extends de.iip_ecosphere.platform.support.Builder<?>>
BgetDeferred(String shortId, Class<B> cls) Returns a deferred builder.Returns the identification of the AAS.de.iip_ecosphere.platform.support.aas.SubmodelgetSubmodel(String idShort) int(package private) <S extends de.iip_ecosphere.platform.support.aas.Submodel>
Sregister(S submodel) Registers a sub-model.protected voidsetAsset(BaSyxAssetInformation asset) 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, waitMethods inherited from interface de.iip_ecosphere.platform.support.aas.Aas
createAasBuilder, createSubmodelBuilder, createSubmodelBuilder, refreshOnUseMethods inherited from interface de.iip_ecosphere.platform.support.aas.basyx2.BaSyxSubmodelParent
createAasBuilderMethods inherited from interface de.iip_ecosphere.platform.support.aas.Element
update
-
Field Details
-
aas
-
submodels
-
asset
-
deferred
-
-
Constructor Details
-
AbstractAas
Creates an instance. Prevents external creation.- Parameters:
aas- the BaSyx AAS instance
-
-
Method Details
-
getAas
Returns the AAS instance.- Returns:
- the AAS instance
-
getIdShort
- Specified by:
getIdShortin interfacede.iip_ecosphere.platform.support.aas.Element
-
submodels
- Specified by:
submodelsin interfacede.iip_ecosphere.platform.support.aas.Aas
-
getSubmodelCount
public int getSubmodelCount()- Specified by:
getSubmodelCountin interfacede.iip_ecosphere.platform.support.aas.Aas
-
getSubmodel
- Specified by:
getSubmodelin interfacede.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:
acceptin interfacede.iip_ecosphere.platform.support.aas.Element
-
createReference
public de.iip_ecosphere.platform.support.aas.Reference createReference()- Specified by:
createReferencein interfacede.iip_ecosphere.platform.support.aas.Aas
-
getAsset
public de.iip_ecosphere.platform.support.aas.AssetInformation getAsset()- Specified by:
getAssetin interfacede.iip_ecosphere.platform.support.aas.Aas
-
setAsset
Defines the asset.- Parameters:
asset- the asset
-
delete
public void delete(de.iip_ecosphere.platform.support.aas.Submodel submodel) - Specified by:
deletein interfacede.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 addressaas- the AAS- Returns:
- the endpoint URI
-
defer
Registers a sub-build as deferred.- Parameters:
shortId- the shortId of the elementbuilder- the sub-builder to be registered- See Also:
-
buildDeferred
public void buildDeferred()CallsBuilder.build()on all deferred builders.- Specified by:
buildDeferredin interfacede.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 idcls- the builder type- Returns:
- the builder or null if no builder for
shortIdwith the respective type is registered
-
getIdentification
Returns the identification of the AAS.- Specified by:
getIdentificationin interfacede.iip_ecosphere.platform.support.aas.Identifiable- Returns:
- the identification (prefixed according to
IdentifierType, custom if none matches). Can e.g. be used withRegistryif not null.
-