Class TraceToAasService.Converter
- java.lang.Object
-
- de.iip_ecosphere.platform.services.environment.services.TransportToAasConverter<de.iip_ecosphere.platform.transport.status.TraceRecord>
-
- de.iip_ecosphere.platform.services.environment.services.TraceToAasService.Converter
-
- Enclosing class:
- TraceToAasService
protected class TraceToAasService.Converter extends TransportToAasConverter<de.iip_ecosphere.platform.transport.status.TraceRecord>
A configured transport to AAS converter forTraceRecord.- Author:
- Holger Eichelberger, SSE
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class de.iip_ecosphere.platform.services.environment.services.TransportToAasConverter
TransportToAasConverter.CleanupPredicate, TransportToAasConverter.TypeConverter, TransportToAasConverter.ValueConverter
-
-
Field Summary
-
Fields inherited from class de.iip_ecosphere.platform.services.environment.services.TransportToAasConverter
ENUM_NAME_CONVERTER, IDENTITY_CONVERTER, JSON_CONVERTER, SHORT2INT_CONVERTER, STRING_CONVERTER
-
-
Constructor Summary
Constructors Constructor Description Converter()Creates a configured converter instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanbuildUpAas(de.iip_ecosphere.platform.support.aas.Aas.AasBuilder aasBuilder)Builds up the AAS.protected booleancleanUpAas(de.iip_ecosphere.platform.support.aas.Aas aas)Cleans up the AAS.java.lang.StringgetAasId()Returns the AAS idShort of the AAS represented by this service/application.java.lang.StringgetAasUrn()Returns the AAS URN of the AAS represented by this service/application.TransportToAasConverter.CleanupPredicategetCleanupPredicate()Returns the cleanup predicate.protected java.util.function.Function<de.iip_ecosphere.platform.transport.status.TraceRecord,java.lang.String>getSubmodelElementIdFunction()Returns a function turning a data instance into an id of the submodel representing the data instance.protected java.lang.StringmapPayloadType(java.lang.Class<?> cls)Allows for application specific payload type names.protected voidpopulateSubmodelElementCollection(de.iip_ecosphere.platform.support.aas.SubmodelElementCollection.SubmodelElementCollectionBuilder smcBuilder, de.iip_ecosphere.platform.transport.status.TraceRecord data)Creates the submodel element representing a single received data value.-
Methods inherited from class de.iip_ecosphere.platform.services.environment.services.TransportToAasConverter
addConverter, cleanup, createPayloadEntries, getTimeout, handleNew, setTimeout, start, stop
-
-
-
-
Method Detail
-
getAasId
public java.lang.String getAasId()
Description copied from class:TransportToAasConverterReturns the AAS idShort of the AAS represented by this service/application.- Specified by:
getAasIdin classTransportToAasConverter<de.iip_ecosphere.platform.transport.status.TraceRecord>- Returns:
- the idShort
-
getAasUrn
public java.lang.String getAasUrn()
Description copied from class:TransportToAasConverterReturns the AAS URN of the AAS represented by this service/application.- Specified by:
getAasUrnin classTransportToAasConverter<de.iip_ecosphere.platform.transport.status.TraceRecord>- Returns:
- the URN
-
getSubmodelElementIdFunction
protected java.util.function.Function<de.iip_ecosphere.platform.transport.status.TraceRecord,java.lang.String> getSubmodelElementIdFunction()
Description copied from class:TransportToAasConverterReturns a function turning a data instance into an id of the submodel representing the data instance.- Specified by:
getSubmodelElementIdFunctionin classTransportToAasConverter<de.iip_ecosphere.platform.transport.status.TraceRecord>- Returns:
- the function
-
getCleanupPredicate
public TransportToAasConverter.CleanupPredicate getCleanupPredicate()
Description copied from class:TransportToAasConverterReturns the cleanup predicate.- Specified by:
getCleanupPredicatein classTransportToAasConverter<de.iip_ecosphere.platform.transport.status.TraceRecord>- Returns:
- the predicate
-
buildUpAas
protected boolean buildUpAas(de.iip_ecosphere.platform.support.aas.Aas.AasBuilder aasBuilder)
Description copied from class:TransportToAasConverterBuilds up the AAS.- Overrides:
buildUpAasin classTransportToAasConverter<de.iip_ecosphere.platform.transport.status.TraceRecord>- Parameters:
aasBuilder- the aas builder to use- Returns:
truefor success,falseelse
-
cleanUpAas
protected boolean cleanUpAas(de.iip_ecosphere.platform.support.aas.Aas aas)
Description copied from class:TransportToAasConverterCleans up the AAS. Last action, may delete the AAS itself.- Overrides:
cleanUpAasin classTransportToAasConverter<de.iip_ecosphere.platform.transport.status.TraceRecord>- Parameters:
aas- the AAS to clean up- Returns:
truefor success,falseelse
-
populateSubmodelElementCollection
protected void populateSubmodelElementCollection(de.iip_ecosphere.platform.support.aas.SubmodelElementCollection.SubmodelElementCollectionBuilder smcBuilder, de.iip_ecosphere.platform.transport.status.TraceRecord data)Description copied from class:TransportToAasConverterCreates the submodel element representing a single received data value.- Specified by:
populateSubmodelElementCollectionin classTransportToAasConverter<de.iip_ecosphere.platform.transport.status.TraceRecord>- Parameters:
smcBuilder- the builder for the submodel element collection representing the data valuedata- the data that may be used to create the element
-
mapPayloadType
protected java.lang.String mapPayloadType(java.lang.Class<?> cls)
Description copied from class:TransportToAasConverterAllows for application specific payload type names.- Overrides:
mapPayloadTypein classTransportToAasConverter<de.iip_ecosphere.platform.transport.status.TraceRecord>- Parameters:
cls- the type- Returns:
- the mapped name
-
-