Class IdShortPathBuilder
java.lang.Object
de.iip_ecosphere.platform.support.aas.basyx2.basyx.IdShortPathBuilder
Builder class for building IdShortPath from a list of
SubmodelElement.
Some examples of valid list of SubmodelElement
[SMC, SML, SMC, Property] [SMC] [File] [SML, SML, MultiLanguageProperty] [SMC, SMC, SML]
- Author:
- danish
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate List<org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElement> -
Constructor Summary
ConstructorsConstructorDescriptionIdShortPathBuilder(List<org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElement> idShortPathElements) Creates a builder instance. -
Method Summary
Modifier and TypeMethodDescriptionprivate voidappendNonSMLIdShortPath(boolean isFirstElement, StringBuilder idShortPathBuilder, org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElement parentSME) Appends a non-SML id short path.private voidappendSMLIdShortPath(boolean isFirstElement, boolean previousOccurrenceSubmodelElementList, StringBuilder idShortPathBuilder, org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElement parentSME, org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElement childSME) Appends a non-SML id short path.build()Builds the IdShortPath.private voidvalidateIdShortPathElements(List<org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElement> idShortPathElements) Validates the given elements.
-
Field Details
-
idShortPathElements
-
-
Constructor Details
-
IdShortPathBuilder
public IdShortPathBuilder(List<org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElement> idShortPathElements) Creates a builder instance.- Parameters:
idShortPathElements- the ids of the submodel elements to use
-
-
Method Details
-
build
Builds the IdShortPath.- Returns:
- the idShortPath
-
appendNonSMLIdShortPath
private void appendNonSMLIdShortPath(boolean isFirstElement, StringBuilder idShortPathBuilder, org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElement parentSME) Appends a non-SML id short path.- Parameters:
isFirstElement- is this the first elementidShortPathBuilder- the string builder for the pathparentSME- the parent SME
-
appendSMLIdShortPath
private void appendSMLIdShortPath(boolean isFirstElement, boolean previousOccurrenceSubmodelElementList, StringBuilder idShortPathBuilder, org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElement parentSME, org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElement childSME) Appends a non-SML id short path.- Parameters:
isFirstElement- is this the first elementpreviousOccurrenceSubmodelElementList- whether the previous occurence is a SMLidShortPathBuilder- the string builder for the pathparentSME- the parent SMEchildSME- the child SME to process
-
validateIdShortPathElements
private void validateIdShortPathElements(List<org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElement> idShortPathElements) Validates the given elements.- Parameters:
idShortPathElements- the id short of the given elements
-