Class BaSyxRegistry
- java.lang.Object
-
- de.iip_ecosphere.platform.support.aas.basyx.BaSyxRegistry
-
- All Implemented Interfaces:
de.iip_ecosphere.platform.support.aas.Registry
public class BaSyxRegistry extends java.lang.Object implements de.iip_ecosphere.platform.support.aas.RegistryImplements a registry recipe for BaSyx.- Author:
- Holger Eichelberger, SSE
-
-
Constructor Summary
Constructors Constructor Description BaSyxRegistry(de.iip_ecosphere.platform.support.Endpoint endpoint, org.eclipse.basyx.vab.protocol.api.IConnectorFactory connectorFactory)Creates a registry recipe.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreateAas(de.iip_ecosphere.platform.support.aas.Aas aas, java.lang.String endpointURL)voidcreateSubmodel(de.iip_ecosphere.platform.support.aas.Aas aas, de.iip_ecosphere.platform.support.aas.Submodel submodel)java.util.List<java.lang.String>getAasIdentifiers()java.util.List<java.lang.String>getAasIdShorts()java.lang.StringgetEndpoint(de.iip_ecosphere.platform.support.aas.Aas aas)java.lang.StringgetEndpoint(de.iip_ecosphere.platform.support.aas.Aas aas, de.iip_ecosphere.platform.support.aas.Submodel submodel)java.lang.StringgetEndpoint(java.lang.String aasIdShort)(package private) org.eclipse.basyx.aas.registration.api.IAASRegistrygetRegistry()Returns the internal registry instance.private java.util.List<java.lang.String>getStrings(java.util.function.Function<org.eclipse.basyx.aas.metamodel.map.descriptor.AASDescriptor,java.lang.String> func)Retrieves strings from registered AAS descriptors.private BaSyxConnectedAasobtainAas(org.eclipse.basyx.submodel.metamodel.api.identifier.IIdentifier aasId)Obtains an AAS for a given identifier.voidregister(de.iip_ecosphere.platform.support.aas.Aas aas, de.iip_ecosphere.platform.support.aas.Submodel submodel, java.lang.String endpointUrl)de.iip_ecosphere.platform.support.aas.AasretrieveAas(java.lang.String identifier)de.iip_ecosphere.platform.support.aas.SubmodelretrieveSubmodel(java.lang.String aasIdentifier, java.lang.String submodelIdentifier)
-
-
-
Constructor Detail
-
BaSyxRegistry
BaSyxRegistry(de.iip_ecosphere.platform.support.Endpoint endpoint, org.eclipse.basyx.vab.protocol.api.IConnectorFactory connectorFactory) throws java.io.IOExceptionCreates a registry recipe.- Parameters:
endpoint- the registry endpointconnectorFactory- connector factory, e.g., HTTP, HTTPS- Throws:
java.io.IOException- if connecting the registry fails
-
-
Method Detail
-
retrieveAas
public de.iip_ecosphere.platform.support.aas.Aas retrieveAas(java.lang.String identifier) throws java.io.IOException- Specified by:
retrieveAasin interfacede.iip_ecosphere.platform.support.aas.Registry- Throws:
java.io.IOException
-
getAasIdShorts
public java.util.List<java.lang.String> getAasIdShorts()
- Specified by:
getAasIdShortsin interfacede.iip_ecosphere.platform.support.aas.Registry
-
getAasIdentifiers
public java.util.List<java.lang.String> getAasIdentifiers()
- Specified by:
getAasIdentifiersin interfacede.iip_ecosphere.platform.support.aas.Registry
-
getStrings
private java.util.List<java.lang.String> getStrings(java.util.function.Function<org.eclipse.basyx.aas.metamodel.map.descriptor.AASDescriptor,java.lang.String> func)
Retrieves strings from registered AAS descriptors.- Parameters:
func- returns the output for a given descriptor, skip descriptor if result is null- Returns:
- the strings
-
obtainAas
private BaSyxConnectedAas obtainAas(org.eclipse.basyx.submodel.metamodel.api.identifier.IIdentifier aasId) throws java.io.IOException
Obtains an AAS for a given identifier.- Parameters:
aasId- the AAS identifier- Returns:
- the AAS (may be null in case that the AAS cannot be obtained)
- Throws:
java.io.IOException- in case that the access fails
-
retrieveSubmodel
public de.iip_ecosphere.platform.support.aas.Submodel retrieveSubmodel(java.lang.String aasIdentifier, java.lang.String submodelIdentifier) throws java.io.IOException- Specified by:
retrieveSubmodelin interfacede.iip_ecosphere.platform.support.aas.Registry- Throws:
java.io.IOException
-
createAas
public void createAas(de.iip_ecosphere.platform.support.aas.Aas aas, java.lang.String endpointURL)- Specified by:
createAasin interfacede.iip_ecosphere.platform.support.aas.Registry
-
createSubmodel
public void createSubmodel(de.iip_ecosphere.platform.support.aas.Aas aas, de.iip_ecosphere.platform.support.aas.Submodel submodel)- Specified by:
createSubmodelin interfacede.iip_ecosphere.platform.support.aas.Registry
-
register
public void register(de.iip_ecosphere.platform.support.aas.Aas aas, de.iip_ecosphere.platform.support.aas.Submodel submodel, java.lang.String endpointUrl)- Specified by:
registerin interfacede.iip_ecosphere.platform.support.aas.Registry
-
getEndpoint
public java.lang.String getEndpoint(java.lang.String aasIdShort)
- Specified by:
getEndpointin interfacede.iip_ecosphere.platform.support.aas.Registry
-
getEndpoint
public java.lang.String getEndpoint(de.iip_ecosphere.platform.support.aas.Aas aas)
- Specified by:
getEndpointin interfacede.iip_ecosphere.platform.support.aas.Registry
-
getEndpoint
public java.lang.String getEndpoint(de.iip_ecosphere.platform.support.aas.Aas aas, de.iip_ecosphere.platform.support.aas.Submodel submodel)- Specified by:
getEndpointin interfacede.iip_ecosphere.platform.support.aas.Registry
-
getRegistry
org.eclipse.basyx.aas.registration.api.IAASRegistry getRegistry()
Returns the internal registry instance.- Returns:
- the internal registry instance
-
-