Class BaSyxEntity
java.lang.Object
de.iip_ecosphere.platform.support.aas.basyx2.BaSyxSubmodelElement
de.iip_ecosphere.platform.support.aas.basyx2.BaSyxEntity
- All Implemented Interfaces:
BaSyxElementTranslator.SubmodelElementsRegistrar,de.iip_ecosphere.platform.support.aas.Element,de.iip_ecosphere.platform.support.aas.ElementsAccess,de.iip_ecosphere.platform.support.aas.Entity,de.iip_ecosphere.platform.support.aas.HasDataSpecification,de.iip_ecosphere.platform.support.aas.HasKind,de.iip_ecosphere.platform.support.aas.HasSemantics,de.iip_ecosphere.platform.support.aas.Qualifiable,de.iip_ecosphere.platform.support.aas.Referable,de.iip_ecosphere.platform.support.aas.SubmodelElement,de.iip_ecosphere.platform.support.aas.SubmodelElementCollection
public class BaSyxEntity
extends BaSyxSubmodelElement
implements de.iip_ecosphere.platform.support.aas.Entity, BaSyxElementTranslator.SubmodelElementsRegistrar
Implements the entity wrapper.
- Author:
- Holger Eichelberger, SSE
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classImplements the entity builder.Nested classes/interfaces inherited from class de.iip_ecosphere.platform.support.aas.basyx2.BaSyxSubmodelElement
BaSyxSubmodelElement.PathFunctionNested classes/interfaces inherited from interface de.iip_ecosphere.platform.support.aas.Entity
de.iip_ecosphere.platform.support.aas.Entity.EntityBuilder, de.iip_ecosphere.platform.support.aas.Entity.EntityTypeNested classes/interfaces inherited from interface de.iip_ecosphere.platform.support.aas.SubmodelElementCollection
de.iip_ecosphere.platform.support.aas.SubmodelElementCollection.SubmodelElementCollectionBuilder -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateCreates an instance.(package private)BaSyxEntity(org.eclipse.digitaltwin.aas4j.v3.model.Entity entity) Creates an instance and directly sets the entity. -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(de.iip_ecosphere.platform.support.aas.AasVisitor visitor) private <T extends de.iip_ecosphere.platform.support.aas.SubmodelElement>
Tadd(T elt) Adds an element.private voidCreates the actual data structure to use.de.iip_ecosphere.platform.support.aas.ReferencevoiddeleteElement(String idShort) Iterable<de.iip_ecosphere.platform.support.aas.SubmodelElement> elements()private Stream<de.iip_ecosphere.platform.support.aas.SubmodelElement> Returns the elements/statements as stream.de.iip_ecosphere.platform.support.aas.DataElementgetDataElement(String idShort) de.iip_ecosphere.platform.support.aas.SubmodelElementgetElement(String idShort) private <T extends de.iip_ecosphere.platform.support.aas.SubmodelElement>
TgetElement(String idShort, Class<T> type) getElement(String)combined with a type filter.int(package private) org.eclipse.digitaltwin.aas4j.v3.model.EntityReturns the BaSyx entity.de.iip_ecosphere.platform.support.aas.Entityde.iip_ecosphere.platform.support.aas.OperationgetOperation(String idShort) de.iip_ecosphere.platform.support.aas.PropertygetProperty(String idShort) de.iip_ecosphere.platform.support.aas.ReferenceElementgetReferenceElement(String idShort) de.iip_ecosphere.platform.support.aas.RelationshipElementgetRelationshipElement(String idShort) (package private) org.eclipse.digitaltwin.aas4j.v3.model.EntityReturns the implementing sub-model element.de.iip_ecosphere.platform.support.aas.SubmodelElementgetSubmodelElement(String idShort) de.iip_ecosphere.platform.support.aas.SubmodelElementCollectiongetSubmodelElementCollection(String idShort) de.iip_ecosphere.platform.support.aas.SubmodelElementListgetSubmodelElementList(String idShort) de.iip_ecosphere.platform.support.aas.Entity.EntityTypegetType()private voidDynamically initializes the elements structure.Registers a BLOB data element.<D extends org.eclipse.digitaltwin.aas4j.v3.model.DataElement>
BaSyxDataElement<D> register(BaSyxDataElement<D> dataElement) Registers a data element.register(BaSyxEntity entity) Registers an entity.Registers a file data element.register(BaSyxMultiLanguageProperty property) Registers a multi-language property.register(BaSyxOperation operation) Registers an operation.register(BaSyxProperty property) Registers a property.register(BaSyxReferenceElement reference) Registers a reference element.register(BaSyxRelationshipElement relationship) Registers a relationship element.register(BaSyxSubmodelElementCollection collection) Registers a sub-model element collection.Registers a sub-model element list.<T extends de.iip_ecosphere.platform.support.aas.SubmodelElement>
TregisterElement(T elt) Registers an element.Iterable<de.iip_ecosphere.platform.support.aas.SubmodelElement> Methods inherited from class de.iip_ecosphere.platform.support.aas.basyx2.BaSyxSubmodelElement
composePath, composePath, createConnectedSubmodelElement, createSubmodelElement, deleteConnectedSubmodelElement, getIdShort, getParent, getRepo, getSemanticId, processOnPath, setParent, setSemanticId, update, updateConnectedSubmodelElement, updateInBuildMethods 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.basyx2.BaSyxElementTranslator.SubmodelElementsRegistrar
registerMethods inherited from interface de.iip_ecosphere.platform.support.aas.Element
getIdShort, updateMethods inherited from interface de.iip_ecosphere.platform.support.aas.ElementsAccess
deleteElement, getIdShortMethods inherited from interface de.iip_ecosphere.platform.support.aas.HasSemantics
getSemanticId, getSemanticId, setSemanticId
-
Field Details
-
entity
private org.eclipse.digitaltwin.aas4j.v3.model.Entity entity -
deferred
-
statementsList
-
-
Constructor Details
-
BaSyxEntity
private BaSyxEntity()Creates an instance. Prevents external access. -
BaSyxEntity
BaSyxEntity(org.eclipse.digitaltwin.aas4j.v3.model.Entity entity) Creates an instance and directly sets the entity.- Parameters:
entity- the entity
-
-
Method Details
-
createElementsStructure
private void createElementsStructure()Creates the actual data structure to use.statementsListshall be set before. -
initialize
private void initialize()Dynamically initializes the elements structure. -
getEntity
org.eclipse.digitaltwin.aas4j.v3.model.Entity getEntity()Returns the BaSyx entity.- Returns:
- the BaSyx entity
-
getSubmodelElement
org.eclipse.digitaltwin.aas4j.v3.model.Entity getSubmodelElement()Description copied from class:BaSyxSubmodelElementReturns the implementing sub-model element.- Specified by:
getSubmodelElementin classBaSyxSubmodelElement- Returns:
- the submodel element
-
accept
public void accept(de.iip_ecosphere.platform.support.aas.AasVisitor visitor) - Specified by:
acceptin interfacede.iip_ecosphere.platform.support.aas.Element- Specified by:
acceptin interfacede.iip_ecosphere.platform.support.aas.ElementsAccess
-
submodelElements
- Specified by:
submodelElementsin interfacede.iip_ecosphere.platform.support.aas.ElementsAccess
-
elements
- Specified by:
elementsin interfacede.iip_ecosphere.platform.support.aas.SubmodelElementCollection
-
getElementsCount
public int getElementsCount()- Specified by:
getElementsCountin interfacede.iip_ecosphere.platform.support.aas.SubmodelElementCollection
-
elementsStream
Returns the elements/statements as stream.- Returns:
- the stream
-
getSubmodelElement
- Specified by:
getSubmodelElementin interfacede.iip_ecosphere.platform.support.aas.ElementsAccess
-
getElement
- Specified by:
getElementin interfacede.iip_ecosphere.platform.support.aas.SubmodelElementCollection
-
createReference
public de.iip_ecosphere.platform.support.aas.Reference createReference()- Specified by:
createReferencein interfacede.iip_ecosphere.platform.support.aas.SubmodelElementCollection
-
getElement
private <T extends de.iip_ecosphere.platform.support.aas.SubmodelElement> T getElement(String idShort, Class<T> type) getElement(String)combined with a type filter.- Type Parameters:
T- the type- Parameters:
idShort- the short id to search fortype- the class representing the type- Returns:
- the element with given type or null for none
-
getSubmodelElementCollection
public de.iip_ecosphere.platform.support.aas.SubmodelElementCollection getSubmodelElementCollection(String idShort) - Specified by:
getSubmodelElementCollectionin interfacede.iip_ecosphere.platform.support.aas.ElementsAccess
-
getSubmodelElementList
public de.iip_ecosphere.platform.support.aas.SubmodelElementList getSubmodelElementList(String idShort) - Specified by:
getSubmodelElementListin interfacede.iip_ecosphere.platform.support.aas.ElementsAccess
-
getEntity
- Specified by:
getEntityin interfacede.iip_ecosphere.platform.support.aas.ElementsAccess
-
getDataElement
- Specified by:
getDataElementin interfacede.iip_ecosphere.platform.support.aas.ElementsAccess
-
getProperty
- Specified by:
getPropertyin interfacede.iip_ecosphere.platform.support.aas.ElementsAccess
-
getOperation
- Specified by:
getOperationin interfacede.iip_ecosphere.platform.support.aas.ElementsAccess
-
getReferenceElement
- Specified by:
getReferenceElementin interfacede.iip_ecosphere.platform.support.aas.ElementsAccess
-
getRelationshipElement
public de.iip_ecosphere.platform.support.aas.RelationshipElement getRelationshipElement(String idShort) - Specified by:
getRelationshipElementin interfacede.iip_ecosphere.platform.support.aas.ElementsAccess
-
deleteElement
- Specified by:
deleteElementin interfacede.iip_ecosphere.platform.support.aas.ElementsAccess
-
getType
public de.iip_ecosphere.platform.support.aas.Entity.EntityType getType()- Specified by:
getTypein interfacede.iip_ecosphere.platform.support.aas.Entity
-
add
private <T extends de.iip_ecosphere.platform.support.aas.SubmodelElement> T add(T elt) Adds an element.- Type Parameters:
T- the actual type of the element- Parameters:
elt- the element- Returns:
elt
-
registerElement
public <T extends de.iip_ecosphere.platform.support.aas.SubmodelElement> T registerElement(T elt) Description copied from interface:BaSyxElementTranslator.SubmodelElementsRegistrarRegisters an element. Default for all remaining registration functions in this interface.- Specified by:
registerElementin interfaceBaSyxElementTranslator.SubmodelElementsRegistrar- Type Parameters:
T- the actual type of the element- Parameters:
elt- the element- Returns:
elt
-
register
Description copied from interface:BaSyxElementTranslator.SubmodelElementsRegistrarRegisters a property.- Specified by:
registerin interfaceBaSyxElementTranslator.SubmodelElementsRegistrar- Parameters:
property- the property- Returns:
property
-
register
Description copied from interface:BaSyxElementTranslator.SubmodelElementsRegistrarRegisters a BLOB data element.- Specified by:
registerin interfaceBaSyxElementTranslator.SubmodelElementsRegistrar- Parameters:
blob- the BLOB data element- Returns:
blob
-
register
Description copied from interface:BaSyxElementTranslator.SubmodelElementsRegistrarRegisters a file data element.- Specified by:
registerin interfaceBaSyxElementTranslator.SubmodelElementsRegistrar- Parameters:
file- the file data element- Returns:
file
-
register
Description copied from interface:BaSyxElementTranslator.SubmodelElementsRegistrarRegisters a multi-language property.- Specified by:
registerin interfaceBaSyxElementTranslator.SubmodelElementsRegistrar- Parameters:
property- the property- Returns:
property
-
register
Description copied from interface:BaSyxElementTranslator.SubmodelElementsRegistrarRegisters a relationship element.- Specified by:
registerin interfaceBaSyxElementTranslator.SubmodelElementsRegistrar- Parameters:
relationship- the relationship element- Returns:
relationship
-
register
Description copied from interface:BaSyxElementTranslator.SubmodelElementsRegistrarRegisters an entity.- Specified by:
registerin interfaceBaSyxElementTranslator.SubmodelElementsRegistrar- Parameters:
entity- the entity- Returns:
entity
-
register
Description copied from interface:BaSyxElementTranslator.SubmodelElementsRegistrarRegisters an operation.- Specified by:
registerin interfaceBaSyxElementTranslator.SubmodelElementsRegistrar- Parameters:
operation- the operation- Returns:
operation
-
register
Description copied from interface:BaSyxElementTranslator.SubmodelElementsRegistrarRegisters a reference element.- Specified by:
registerin interfaceBaSyxElementTranslator.SubmodelElementsRegistrar- Parameters:
reference- the reference- Returns:
reference
-
register
Description copied from interface:BaSyxElementTranslator.SubmodelElementsRegistrarRegisters a sub-model element collection.- Specified by:
registerin interfaceBaSyxElementTranslator.SubmodelElementsRegistrar- Parameters:
collection- the collection- Returns:
collection
-
register
Description copied from interface:BaSyxElementTranslator.SubmodelElementsRegistrarRegisters a sub-model element list.- Specified by:
registerin interfaceBaSyxElementTranslator.SubmodelElementsRegistrar- Parameters:
list- the list- Returns:
collection
-
register
public <D extends org.eclipse.digitaltwin.aas4j.v3.model.DataElement> BaSyxDataElement<D> register(BaSyxDataElement<D> dataElement) Description copied from interface:BaSyxElementTranslator.SubmodelElementsRegistrarRegisters a data element.- Specified by:
registerin interfaceBaSyxElementTranslator.SubmodelElementsRegistrar- Type Parameters:
D- the element type- Parameters:
dataElement- the element to register- Returns:
dataElement
-