Class AbstractAas<A extends org.eclipse.basyx.aas.metamodel.api.IAssetAdministrationShell>
- java.lang.Object
-
- de.iip_ecosphere.platform.support.aas.basyx.AbstractAas<A>
-
- Type Parameters:
A- the BaSyx AAS type to wrap
- All Implemented Interfaces:
de.iip_ecosphere.platform.support.aas.Aas,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,BaSyxConnectedAas
public abstract class AbstractAas<A extends org.eclipse.basyx.aas.metamodel.api.IAssetAdministrationShell> extends java.lang.Object implements de.iip_ecosphere.platform.support.aas.AasAbstract implementation of theAasinterface.- Author:
- Holger Eichelberger, SSE
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAbstractAas.BaSyxAbstractAasBuilderAn abstract builder for two concrete AAS types in BaSyx.static interfaceAbstractAas.BaSyxSubmodelParentRepresents the parent instance of a sub-model.
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractAas(A aas)Creates an instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(de.iip_ecosphere.platform.support.aas.AasVisitor visitor)voidbuildDeferred()CallsBuilder.build()on all deferred builders.de.iip_ecosphere.platform.support.aas.ReferencecreateReference()(package private) voiddefer(java.lang.String shortId, de.iip_ecosphere.platform.support.Builder<?> builder)Registers a sub-build as deferred.voiddelete(de.iip_ecosphere.platform.support.aas.Submodel submodel)(package private) AgetAas()Returns the AAS instance.static java.lang.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.AssetgetAsset()(package private) <B extends de.iip_ecosphere.platform.support.Builder<?>>
BgetDeferred(java.lang.String shortId, java.lang.Class<B> cls)Returns a deferred builder.java.lang.StringgetIdentification()Returns the identification of the AAS.java.lang.StringgetIdShort()de.iip_ecosphere.platform.support.aas.SubmodelgetSubmodel(java.lang.String idShort)intgetSubmodelCount()de.iip_ecosphere.platform.support.aas.types.technicaldata.TechnicalDataSubmodelgetTechnicalDataSubmodel()(package private) <S extends de.iip_ecosphere.platform.support.aas.Submodel>
Sregister(S submodel)Registers a sub-model.protected voidsetAsset(BaSyxAsset asset)Defines the asset.java.lang.Iterable<de.iip_ecosphere.platform.support.aas.Submodel>submodels()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Field Detail
-
aas
private A extends org.eclipse.basyx.aas.metamodel.api.IAssetAdministrationShell aas
-
submodels
private java.util.Map<java.lang.String,de.iip_ecosphere.platform.support.aas.Submodel> submodels
-
asset
private BaSyxAsset asset
-
deferred
private java.util.Map<java.lang.String,de.iip_ecosphere.platform.support.Builder<?>> deferred
-
-
Constructor Detail
-
AbstractAas
protected AbstractAas(A aas)
Creates an instance. Prevents external creation.- Parameters:
aas- the BaSyx AAS instance
-
-
Method Detail
-
getAas
A getAas()
Returns the AAS instance.- Returns:
- the AAS instance
-
getIdShort
public java.lang.String getIdShort()
- Specified by:
getIdShortin interfacede.iip_ecosphere.platform.support.aas.Element
-
submodels
public java.lang.Iterable<de.iip_ecosphere.platform.support.aas.Submodel> 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
public de.iip_ecosphere.platform.support.aas.Submodel getSubmodel(java.lang.String idShort)
- 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.Asset getAsset()
- Specified by:
getAssetin interfacede.iip_ecosphere.platform.support.aas.Aas
-
setAsset
protected void setAsset(BaSyxAsset asset)
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 java.lang.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
void defer(java.lang.String shortId, de.iip_ecosphere.platform.support.Builder<?> builder)Registers a sub-build as deferred.- Parameters:
shortId- the shortId of the elementbuilder- the sub-builder to be registered- See Also:
buildDeferred()
-
buildDeferred
public void buildDeferred()
CallsBuilder.build()on all deferred builders.- Specified by:
buildDeferredin interfacede.iip_ecosphere.platform.support.aas.DeferredParent- See Also:
defer(String, Builder)
-
getDeferred
<B extends de.iip_ecosphere.platform.support.Builder<?>> B getDeferred(java.lang.String shortId, java.lang.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
-
getTechnicalDataSubmodel
public de.iip_ecosphere.platform.support.aas.types.technicaldata.TechnicalDataSubmodel getTechnicalDataSubmodel()
- Specified by:
getTechnicalDataSubmodelin interfacede.iip_ecosphere.platform.support.aas.Aas
-
getIdentification
public java.lang.String 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.
-
-