Class BaSyxSubmodelElementList
java.lang.Object
de.iip_ecosphere.platform.support.aas.basyx2.BaSyxSubmodelElement
de.iip_ecosphere.platform.support.aas.basyx2.BaSyxSubmodelElementList
- All Implemented Interfaces:
BaSyxElementTranslator.SubmodelElementsRegistrar,BaSyxSubmodelElementParent,de.iip_ecosphere.platform.support.aas.Element,de.iip_ecosphere.platform.support.aas.ElementsAccess,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.SubmodelElementList
public class BaSyxSubmodelElementList
extends BaSyxSubmodelElement
implements de.iip_ecosphere.platform.support.aas.SubmodelElementList, BaSyxElementTranslator.SubmodelElementsRegistrar, BaSyxSubmodelElementParent
Wrapper for the BaSyx sub-model element collection.
- Author:
- Holger Eichelberger, SSE
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThe sub-model element collection 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.SubmodelElementList
de.iip_ecosphere.platform.support.aas.SubmodelElementList.SubmodelElementListBuilder -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreates an instance.protectedBaSyxSubmodelElementList(org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElementList list) Creates an instance and sets the BaSyx instance directly. -
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.(package private) static voidaddSubmodelElement(org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElementList list, org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElement element) Adds a submodel element.private voidCreates the actual data structure to use.de.iip_ecosphere.platform.support.aas.ReferencevoiddeleteElement(int index) voiddeleteElement(String idShort) (package private) voiddeleteSubmodelElement(String idShort, de.iip_ecosphere.platform.support.aas.SubmodelElement element) Removes a submodel element through its idShort.Iterable<de.iip_ecosphere.platform.support.aas.SubmodelElement> elements()private Collection<de.iip_ecosphere.platform.support.aas.SubmodelElement> Returns the elements as collection.private Stream<de.iip_ecosphere.platform.support.aas.SubmodelElement> Returns the elements as stream.de.iip_ecosphere.platform.support.aas.DataElementgetDataElement(String idShort) de.iip_ecosphere.platform.support.aas.SubmodelElementgetElement(int index) 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.protected Iterable<de.iip_ecosphere.platform.support.aas.SubmodelElement> getElements(Predicate<de.iip_ecosphere.platform.support.aas.SubmodelElement> filter) Returns an iterable of submodel elements complying to a given predicate.protected <E extends de.iip_ecosphere.platform.support.aas.SubmodelElement>
Iterable<E> getElements(Predicate<de.iip_ecosphere.platform.support.aas.SubmodelElement> filter, Class<E> castType) Returns an iterable of submodel elements complying to a given predicate and a given target cast type.intde.iip_ecosphere.platform.support.aas.Entityde.iip_ecosphere.platform.support.aas.OperationgetOperation(String idShort) org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElementReturns the path element to be used inBaSyxSubmodelElementParent.processOnPath(List, boolean, PathFunction).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) org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElementListReturns the implementing sub-model element.de.iip_ecosphere.platform.support.aas.SubmodelElementgetSubmodelElement(String idShort) de.iip_ecosphere.platform.support.aas.SubmodelElementCollectiongetSubmodelElementCollection(String idShort) protected Iterable<de.iip_ecosphere.platform.support.aas.SubmodelElementCollection> getSubmodelElementCollections(Predicate<de.iip_ecosphere.platform.support.aas.SubmodelElementCollection> filter) Returns an iterable of submodel element collections complying to a given predicate.de.iip_ecosphere.platform.support.aas.SubmodelElementListgetSubmodelElementList(String idShort) 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 reference) 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(BaSyxRange range) Registers a range element.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> voidupdate()Methods inherited from class de.iip_ecosphere.platform.support.aas.basyx2.BaSyxSubmodelElement
composePath, composePath, createConnectedSubmodelElement, createSubmodelElement, deleteConnectedSubmodelElement, getIdShort, getParent, getRepo, getSemanticId, processOnPath, setParent, setSemanticId, 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.BaSyxSubmodelElementParent
getIdShort, getParent, processOnPathMethods inherited from interface de.iip_ecosphere.platform.support.aas.Element
getIdShortMethods 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
-
list
private org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElementList list -
elementsList
-
deferred
-
-
Constructor Details
-
BaSyxSubmodelElementList
protected BaSyxSubmodelElementList()Creates an instance. Prevents external creation. -
BaSyxSubmodelElementList
protected BaSyxSubmodelElementList(org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElementList list) Creates an instance and sets the BaSyx instance directly.- Parameters:
list- the list instance
-
-
Method Details
-
addSubmodelElement
static void addSubmodelElement(org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElementList list, org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElement element) Adds a submodel element.- Parameters:
list- the list to add the element toelement- the element to add
-
createElementsStructure
private void createElementsStructure()Creates the actual data structure to use.elementsListshall be set before. -
initialize
private void initialize()Dynamically initializes the elements structure. -
getElementsCount
public int getElementsCount()- Specified by:
getElementsCountin interfacede.iip_ecosphere.platform.support.aas.SubmodelElementList
-
submodelElements
- Specified by:
submodelElementsin interfacede.iip_ecosphere.platform.support.aas.ElementsAccess
-
elements
- Specified by:
elementsin interfacede.iip_ecosphere.platform.support.aas.SubmodelElementList
-
elementsCollection
Returns the elements as collection.- Returns:
- the collection
-
elementsStream
Returns the elements as stream.- Returns:
- the stream
- See Also:
-
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
-
getElements
protected Iterable<de.iip_ecosphere.platform.support.aas.SubmodelElement> getElements(Predicate<de.iip_ecosphere.platform.support.aas.SubmodelElement> filter) Returns an iterable of submodel elements complying to a given predicate.- Parameters:
filter- the filter- Returns:
- the iterable
-
getElements
protected <E extends de.iip_ecosphere.platform.support.aas.SubmodelElement> Iterable<E> getElements(Predicate<de.iip_ecosphere.platform.support.aas.SubmodelElement> filter, Class<E> castType) Returns an iterable of submodel elements complying to a given predicate and a given target cast type.- Type Parameters:
E- the type of submodel element- Parameters:
filter- the filtercastType- the type to filter for and cast to- Returns:
- the iterable
-
getSubmodelElementCollections
protected Iterable<de.iip_ecosphere.platform.support.aas.SubmodelElementCollection> getSubmodelElementCollections(Predicate<de.iip_ecosphere.platform.support.aas.SubmodelElementCollection> filter) Returns an iterable of submodel element collections complying to a given predicate.- Parameters:
filter- the filter- Returns:
- the iterable
-
getSubmodelElement
public org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElementList getSubmodelElement()Description copied from class:BaSyxSubmodelElementReturns the implementing sub-model element.- Specified by:
getSubmodelElementin classBaSyxSubmodelElement- Returns:
- the submodel element
-
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
-
getSubmodelElement
- Specified by:
getSubmodelElementin interfacede.iip_ecosphere.platform.support.aas.ElementsAccess
-
getElement
- Specified by:
getElementin interfacede.iip_ecosphere.platform.support.aas.SubmodelElementList
-
getElement
public de.iip_ecosphere.platform.support.aas.SubmodelElement getElement(int index) - Specified by:
getElementin interfacede.iip_ecosphere.platform.support.aas.SubmodelElementList
-
deleteElement
public void deleteElement(int index) - Specified by:
deleteElementin interfacede.iip_ecosphere.platform.support.aas.SubmodelElementList
-
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
-
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 multi-language 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 range element.- Specified by:
registerin interfaceBaSyxElementTranslator.SubmodelElementsRegistrar- Parameters:
range- the range element- Returns:
range
-
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 relationship element.- Specified by:
registerin interfaceBaSyxElementTranslator.SubmodelElementsRegistrar- Parameters:
relationship- the relationship element- Returns:
relationship
-
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 an entity.- Specified by:
registerin interfaceBaSyxElementTranslator.SubmodelElementsRegistrar- Parameters:
reference- the entity- Returns:
entity
-
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
-
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
-
createReference
public de.iip_ecosphere.platform.support.aas.Reference createReference()- Specified by:
createReferencein interfacede.iip_ecosphere.platform.support.aas.SubmodelElementList
-
deleteSubmodelElement
void deleteSubmodelElement(String idShort, de.iip_ecosphere.platform.support.aas.SubmodelElement element) Removes a submodel element through its idShort.- Parameters:
idShort- the idshort to removeelement- the element
-
deleteElement
- Specified by:
deleteElementin interfacede.iip_ecosphere.platform.support.aas.ElementsAccess
-
update
public void update()- Specified by:
updatein interfacede.iip_ecosphere.platform.support.aas.Element- Overrides:
updatein classBaSyxSubmodelElement
-
getPathElement
public org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElement getPathElement()Description copied from interface:BaSyxSubmodelElementParentReturns the path element to be used inBaSyxSubmodelElementParent.processOnPath(List, boolean, PathFunction).- Specified by:
getPathElementin interfaceBaSyxSubmodelElementParent- Returns:
- the path element
-