Skip to content
This repository was archived by the owner on Feb 15, 2024. It is now read-only.

Commit 625745b

Browse files
authored
Merge pull request #15 from changqin26/feature/validation
Feature/validation
2 parents fc13ba9 + 1ad3ac7 commit 625745b

7 files changed

Lines changed: 659 additions & 2 deletions

File tree

validator/src/main/resources/constraint_shapes.ttl

Lines changed: 208 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ aas:AASd-021Shape a sh:NodeShape ;
237237
sh:targetClass aas:Qualifiable ;
238238
sh:property [
239239
a sh:PropertyShape ;
240-
#sh:path <https://admin-shell.io/aas/3/0/RC01/Qualifiable/valueType> ;
240+
sh:path <https://admin-shell.io/aas/3/0/RC01/Qualifiable/valueType> ;
241241
sh:sparql [
242242
a sh:SPARQLConstraint ;
243243
sh:message "(AASd-021Shape) - Every Qualifiable can only have one Qualifier with the same Qualifier/type." ;
@@ -254,6 +254,60 @@ aas:AASd-021Shape a sh:NodeShape ;
254254
];
255255
.
256256

257+
# AASd-023
258+
#aas:AASd-023Shape a sh:NodeShape ;
259+
#sh:targetClass aas:AssetInformation;
260+
#sh:sparql [
261+
#a sh:SPARQLConstraint ;
262+
#sh:message "AssetInformation/globalAssetId either is a reference to an Asset object or a global reference." ;
263+
#sh:select """
264+
#SELECT ?keyType
265+
#WHERE {
266+
#?assetInformation a <https://admin-shell.io/aas/3/0/RC01/AssetInformation> .
267+
#?assetInformation <https://admin-shell.io/aas/3/0/RC01/AssetInformation/globalAssetId> ?globalAssetId .
268+
#?globalAssetId <https://admin-shell.io/aas/3/0/RC01/Reference/key> ?key .
269+
#?key <https://admin-shell.io/aas/3/0/RC01/Key/type> ?keyType .
270+
#FILTER (?keyType != <https://admin-shell.io/aas/3/0/RC01/IdentifiableElements/Asset> && ?keyType != <https://admin-shell.io/aas/3/0/RC01/KeyElements/GlobalReference>)
271+
272+
#}
273+
#""" ;
274+
#] .
275+
276+
# AASd-026
277+
# aas:AASd-026Shape a sh:NodeShape ;
278+
#sh:targetClass aas:SubmodelElementCollection ;
279+
#sh:prefixes xsd: ;
280+
#sh:sparql [
281+
#a sh:SPARQLConstraint ;
282+
#sh:message "If allowDuplicates==false then it is not allowed that the collection contains several elements with the same semantics (i.e. the same semanticId)." ;
283+
#sh:select """
284+
#SELECT ?keyType
285+
#WHERE {
286+
#?SubmodelElementCollection a <https://admin-shell.io/aas/3/0/RC01/SubmodelElementCollection> .
287+
#?SubmodelElementCollection <https://admin-shell.io/aas/3/0/RC01/Referable/idShort> ?SubmodelElementCollectionIdShort .
288+
#?SubmodelElementCollection <https://admin-shell.io/aas/3/0/RC01/SubmodelElementCollection/allowDuplicates> "False"^^xsd:boolean.
289+
290+
#?SubmodelElementCollection <https://admin-shell.io/aas/3/0/RC01/SubmodelElementCollection/value> ?Value1 .
291+
#?Value1 <https://admin-shell.io/aas/3/0/RC01/HasSemantics/semanticId> ?Value1SemanticId .
292+
#?Value1SemanticId <https://admin-shell.io/aas/3/0/RC01/Reference/key> ?Value1Key .
293+
#?Value1Key <https://admin-shell.io/aas/3/0/RC01/Key/type> ?Value1KeyType .
294+
#?Value1Key <https://admin-shell.io/aas/3/0/RC01/Key/value> ?Value1KeyValue .
295+
#?Value1Key <https://admin-shell.io/aas/3/0/RC01/Key/idType> ?Value1KeyIdType .
296+
297+
#?SubmodelElementCollection <https://admin-shell.io/aas/3/0/RC01/SubmodelElementCollection/value> ?Value2 .
298+
#?Value2 <https://admin-shell.io/aas/3/0/RC01/HasSemantics/semanticId> ?Value2SemanticId .
299+
#?Value2SemanticId <https://admin-shell.io/aas/3/0/RC01/Reference/key> ?Value2Key .
300+
#?Value2Key <https://admin-shell.io/aas/3/0/RC01/Key/type> ?Value2KeyType .
301+
#?Value2Key <https://admin-shell.io/aas/3/0/RC01/Key/value> ?Value2KeyValue .
302+
#?Value2Key <https://admin-shell.io/aas/3/0/RC01/Key/idType> ?Value2KeyIdType .
303+
304+
305+
#FILTER (?Value1SemanticId = ?Value2SemanticId )
306+
307+
#}
308+
# """ ;
309+
#] .
310+
257311
# AASd-051
258312
aas:ConceptDescriptionAllowedCategories a sh:NodeShape ;
259313
sh:targetClass aas:ConceptDescription ;
@@ -583,6 +637,145 @@ aas:ConceptDescriptionReferencedFromViewAllowedCategories a sh:NodeShape ;
583637
""" ;
584638
] .
585639

640+
# AASd-065-Property
641+
#aas:AASd-065a-PropertyShape a sh:NodeShape ;
642+
#sh:targetClass aas:Property;
643+
#sh:sparql [
644+
#a sh:SPARQLConstraint ;
645+
#sh:message "If the semanticId of a Property references a ConceptDescription with the category VALUE then the value of the property is identical to DataSpecificationIEC61360/value and the valueId of the property is identical to DataSpecificationIEC61360/valueId." ;
646+
647+
#sh:select """
648+
#SELECT ?propertyValue
649+
#WHERE {
650+
#?property a <https://admin-shell.io/aas/3/0/RC01/Property> .
651+
#?property <https://admin-shell.io/aas/3/0/RC01/Property/value> ?propertyValue .
652+
#?property <https://admin-shell.io/aas/3/0/RC01/Property/valueId> ?propertyValueId .
653+
654+
#?propertyValueId <https://admin-shell.io/aas/3/0/RC01/Reference/key> ?propertyReferenceKey .
655+
656+
#?propertyReferenceKey <https://admin-shell.io/aas/3/0/RC01/Key/value> ?propertyReferenceKeyValue .
657+
#?propertyReferenceKey <https://admin-shell.io/aas/3/0/RC01/Key/idType> ?propertyReferenceKeyIdType .
658+
#?propertyReferenceKey <https://admin-shell.io/aas/3/0/RC01/Key/type> ?propertyReferenceKeyType .
659+
660+
#?property <https://admin-shell.io/aas/3/0/RC01/HasSemantics/semanticId> ?semanticId .
661+
#?semanticId <https://admin-shell.io/aas/3/0/RC01/Reference/key> ?semanticIdReferenceKey .
662+
#?semanticIdReferenceKey <https://admin-shell.io/aas/3/0/RC01/Key/type> <https://admin-shell.io/aas/3/0/RC01/IdentifiableElements/ConceptDescription> .
663+
664+
#?conceptDescription <https://admin-shell.io/aas/3/0/RC01/Referable/category> "VALUE" .
665+
#?conceptDescription <https://admin-shell.io/aas/3/0/RC01/HasDataSpecification/embeddedDataSpecification> ?embeddedDataSpecification .
666+
#?embeddedDataSpecification <https://admin-shell.io/aas/3/0/RC01/EmbeddedDataSpecification/dataSpecificationContent> ?dataSpecificationContent .
667+
#?dataSpecificationContent <https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3/0/RC01/DataSpecificationIEC61360/value> ?dataSpecificationIEC61360Value .
668+
669+
#?dataSpecificationContent <https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3/0/RC01/DataSpecificationIEC61360/valueId> ?dataSpecificationIEC61360ValueId .
670+
671+
#?dataSpecificationIEC61360ValueId <https://admin-shell.io/aas/3/0/RC01/Reference/key> ?dataSpecificationIEC61360ValueIdKey .
672+
673+
#?dataSpecificationIEC61360ValueIdKey <https://admin-shell.io/aas/3/0/RC01/Key/value> ?dataSpecificationIEC61360ValueIdKeyValue .
674+
#?dataSpecificationIEC61360ValueIdKey <https://admin-shell.io/aas/3/0/RC01/Key/idType> ?dataSpecificationIEC61360ValueIdKeyIdType .
675+
#?dataSpecificationIEC61360ValueIdKey <https://admin-shell.io/aas/3/0/RC01/Key/type> ?dataSpecificationIEC61360ValueIdKeyType .
676+
#FILTER(?propertyValue != ?dataSpecificationIEC61360Value && ?propertyValueId != ?dataSpecificationIEC61360ValueId)
677+
#}
678+
# """ ;
679+
#] .
680+
681+
# AASd-065-MultilanguageProperty
682+
#aas:AASd-065b-MultiLanguagePropertyShape a sh:NodeShape ;
683+
#sh:targetClass aas:MultiLanguageProperty;
684+
#sh:sparql [
685+
#a sh:SPARQLConstraint ;
686+
#sh:message "If the semanticId of a MultiLanguageProperty references a ConceptDescription with the category VALUE then the value of the MultiLanguageProperty is identical to DataSpecificationIEC61360/value and the valueId of the MultiLanguageProperty is identical to DataSpecificationIEC61360/valueId." ;
687+
688+
#sh:select """
689+
#SELECT ?MultiLanguagePropertyValue
690+
#WHERE {
691+
#?MultiLanguageProperty a <https://admin-shell.io/aas/3/0/RC01/MultiLanguageProperty> .
692+
#?MultiLanguageProperty <https://admin-shell.io/aas/3/0/RC01/MultiLanguageProperty/value> ?MultiLanguagePropertyValue .
693+
#?MultiLanguageProperty <https://admin-shell.io/aas/3/0/RC01/MultiLanguageProperty/valueId> ?MultiLanguagePropertyValueId .
694+
#?MultiLanguagePropertyValueId <https://admin-shell.io/aas/3/0/RC01/Reference/key> ?MultiLanguagePropertyReferenceKey .
695+
#?MultiLanguagePropertyReferenceKey <https://admin-shell.io/aas/3/0/RC01/Key/value> ?MultiLanguagePropertyReferenceKeyValue .
696+
#?MultiLanguageProperty <https://admin-shell.io/aas/3/0/RC01/HasSemantics/semanticId> ?semanticId .
697+
#?semanticId <https://admin-shell.io/aas/3/0/RC01/Reference/key> ?semanticIdReferenceKey .
698+
#?semanticIdReferenceKey <https://admin-shell.io/aas/3/0/RC01/Key/type> <https://admin-shell.io/aas/3/0/RC01/ConceptDescription> .
699+
#?conceptDescription <https://admin-shell.io/aas/3/0/RC01/Referable/category> "Value" .
700+
#?conceptDescription <https://admin-shell.io/aas/3/0/RC01/HasDataSpecification/embeddedDataSpecification> ?embeddedDataSpecification .
701+
#?embeddedDataSpecification <https://admin-shell.io/aas/3/0/RC01/EmbeddedDataSpecification/dataSpecificationContent> ?dataSpecificationContent .
702+
#?dataSpecificationContent <https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3/0/RC01/DataSpecificationIEC61360/value> ?dataSpecificationIEC61360Value .
703+
#?dataSpecificationContent <https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3/0/RC01/DataSpecificationIEC61360/valueId> ?dataSpecificationIEC61360ValueId .
704+
#?dataSpecificationIEC61360ValueId <https://admin-shell.io/aas/3/0/RC01/Reference/key> ?dataSpecificationIEC61360ValueIdKey .
705+
#?dataSpecificationIEC61360ValueIdKey <https://admin-shell.io/aas/3/0/RC01/Key/value> ?dataSpecificationIEC61360ValueIdKeyValue .
706+
707+
#FILTER(?MultiLanguagePropertyValue != ?dataSpecificationIEC61360Value && ?MultiLanguagePropertyValueId != ?dataSpecificationIEC61360ValueIdKeyValue)
708+
#}
709+
#""" ;
710+
#] .
711+
712+
# AASd-066-Property
713+
#aas:AASd-066PropertyShape a sh:NodeShape ;
714+
#sh:targetClass aas:Property;
715+
#sh:sparql [
716+
#a sh:SPARQLConstraint ;
717+
#sh:message "If the semanticId of a Property or MultiLanguageProperty references a ConceptDescription with the category PROPERTY and DataSpecificationIEC61360/valueList is defined the value and valueId of the property is identical to one of the value reference pair types references in the value list, i.e. ValueReferencePairType/value or ValueReferencePairType/valueId, resp." ;
718+
719+
#sh:select """
720+
#SELECT ?propertyValue
721+
#WHERE {
722+
#?property a <https://admin-shell.io/aas/3/0/RC01/Property> .
723+
#?property <https://admin-shell.io/aas/3/0/RC01/Property/value> ?propertyValue .
724+
#?property <https://admin-shell.io/aas/3/0/RC01/Property/valueId> ?propertyValueId .
725+
#?propertyValueId <https://admin-shell.io/aas/3/0/RC01/Reference/key> ?propertyReferenceKey .
726+
#?propertyReferenceKey <https://admin-shell.io/aas/3/0/RC01/Key/value> ?propertyReferenceKeyValue .
727+
#?property <https://admin-shell.io/aas/3/0/RC01/HasSemantics/semanticId> ?semanticId .
728+
#?semanticId <https://admin-shell.io/aas/3/0/RC01/Reference/key> ?semanticIdReferenceKey .
729+
#?semanticIdReferenceKey <https://admin-shell.io/aas/3/0/RC01/Key/type> <https://admin-shell.io/aas/3/0/RC01/ConceptDescription> .
730+
#?conceptDescription <https://admin-shell.io/aas/3/0/RC01/Referable/category> "Property" .
731+
#?conceptDescription <https://admin-shell.io/aas/3/0/RC01/HasDataSpecification/embeddedDataSpecification> ?embeddedDataSpecification .
732+
#?embeddedDataSpecification <https://admin-shell.io/aas/3/0/RC01/EmbeddedDataSpecification/dataSpecificationContent> ?dataSpecificationContent .
733+
#?dataSpecificationContent <https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3/0/RC01/DataSpecificationIEC61360/valueList> ?dataSpecificationIEC61360ValueList .
734+
#?dataSpecificationIEC61360ValueList <https://admin-shell.io/aas/3/0/RC01/ValueList/valueReferencePairTypes> ?valueReferencePairTypes .
735+
#?valueReferencePairTypes <https://admin-shell.io/aas/3/0/RC01/ValueReferencePair/value> ?valueReferencePairValue .
736+
#?valueReferencePairTypes <https://admin-shell.io/aas/3/0/RC01/ValueReferencePair/valueId> ?valueReferencePairValueId .
737+
#?valueReferencePairValueId <https://admin-shell.io/aas/3/0/RC01/Reference/key> ?valueReferencePairValueIdKey .
738+
#?valueReferencePairValueIdKey <https://admin-shell.io/aas/3/0/RC01/Key/value> ?valueReferencePairValueIdKeyValue .
739+
740+
#FILTER(?propertyValue != ?valueReferencePairValue && ?propertyValueId != ?valueReferencePairValueIdKeyValue)
741+
#}
742+
#""" ;
743+
#] .
744+
745+
# AASd-066-MultilanguageProperty
746+
#aas:AASd-066MultiLanguagePropertyShape a sh:NodeShape ;
747+
#sh:targetClass aas:MultiLanguageProperty;
748+
#sh:sparql [
749+
#a sh:SPARQLConstraint ;
750+
#sh:message "If the semanticId of a MultiLanguageProperty or MultiLanguageMultiLanguageProperty references a ConceptDescription with the category MultiLanguageProperty and DataSpecificationIEC61360/valueList is defined the value and valueId of the MultiLanguageProperty is identical to one of the value reference pair types references in the value list, i.e. ValueReferencePairType/value or ValueReferencePairType/valueId, resp." ;
751+
752+
#sh:select """
753+
#SELECT ?MultiLanguagePropertyValue
754+
#WHERE {
755+
#?MultiLanguageProperty a <https://admin-shell.io/aas/3/0/RC01/MultiLanguageProperty> .
756+
#?MultiLanguageProperty <https://admin-shell.io/aas/3/0/RC01/MultiLanguageProperty/value> ?MultiLanguagePropertyValue .
757+
#?MultiLanguageProperty <https://admin-shell.io/aas/3/0/RC01/MultiLanguageProperty/valueId> ?MultiLanguagePropertyValueId .
758+
#?MultiLanguagePropertyValueId <https://admin-shell.io/aas/3/0/RC01/Reference/key> ?MultiLanguagePropertyReferenceKey .
759+
#?MultiLanguagePropertyReferenceKey <https://admin-shell.io/aas/3/0/RC01/Key/value> ?MultiLanguagePropertyReferenceKeyValue .
760+
#?MultiLanguageProperty <https://admin-shell.io/aas/3/0/RC01/HasSemantics/semanticId> ?semanticId .
761+
#?semanticId <https://admin-shell.io/aas/3/0/RC01/Reference/key> ?semanticIdReferenceKey .
762+
#?semanticIdReferenceKey <https://admin-shell.io/aas/3/0/RC01/Key/type> <https://admin-shell.io/aas/3/0/RC01/IdentifableElements/ConceptDescription> .
763+
764+
#?conceptDescription <https://admin-shell.io/aas/3/0/RC01/Referable/category> "Property" .
765+
#?conceptDescription <https://admin-shell.io/aas/3/0/RC01/HasDataSpecification/embeddedDataSpecification> ?embeddedDataSpecification .
766+
#?embeddedDataSpecification <https://admin-shell.io/aas/3/0/RC01/EmbeddedDataSpecification/dataSpecificationContent> ?dataSpecificationContent .
767+
#?dataSpecificationContent <https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3/0/RC01/DataSpecificationIEC61360/valueList> ?dataSpecificationIEC61360ValueList .
768+
#?dataSpecificationIEC61360ValueList <https://admin-shell.io/aas/3/0/RC01/ValueList/valueReferencePairTypes> ?valueReferencePairTypes .
769+
#?valueReferencePairTypes <https://admin-shell.io/aas/3/0/RC01/ValueReferencePair/value> ?valueReferencePairValue .
770+
#?valueReferencePairTypes <https://admin-shell.io/aas/3/0/RC01/ValueReferencePair/valueId> ?valueReferencePairValueId .
771+
#?valueReferencePairValueId <https://admin-shell.io/aas/3/0/RC01/Reference/key> ?valueReferencePairValueIdKey .
772+
#?valueReferencePairValueIdKey <https://admin-shell.io/aas/3/0/RC01/Key/value> ?valueReferencePairValueIdKeyValue .
773+
774+
#FILTER(?MultiLanguagePropertyValue != ?valueReferencePairValue && ?MultiLanguagePropertyValueId != ?valueReferencePairValueId)
775+
#}
776+
#""" ;
777+
#] .
778+
586779
# AASd-067
587780
aas:AASd-067Shape a sh:NodeShape ;
588781
sh:targetClass aas:MultiLanguageProperty;
@@ -924,3 +1117,17 @@ aas:ConceptDescriptionReferencedFromSubmodelElementCollectionAllowedDuplicates
9241117
}
9251118
""" ;
9261119
] .
1120+
1121+
# AASd-100
1122+
aas:ReferableShape a sh:NodeShape ;
1123+
sh:targetClass aas:Referable ;
1124+
sh:property [
1125+
a sh:PropertyShape ;
1126+
sh:path <https://admin-shell.io/aas/3/0/RC01/Referable/category> ;
1127+
sh:datatype xsd:string ;
1128+
sh:maxCount 1 ;
1129+
sh:minCount 0 ;
1130+
sh:pattern "^(?!\\s*$).+" ;
1131+
sh:message "(Referable.category):An attribute with data type \"string\" is not allowed to be empty."^^xsd:string ;
1132+
] ;
1133+
.

validator/src/main/resources/shapes.ttl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1600,7 +1600,7 @@ aas:ValueReferencePairShape a sh:NodeShape ;
16001600
sh:property [
16011601
a sh:PropertyShape ;
16021602
sh:path <https://admin-shell.io/aas/3/0/RC01/ValueReferencePair/valueId> ;
1603-
sh:datatype aas:Reference ;
1603+
sh:class aas:Reference ;
16041604
sh:minCount 1 ;
16051605
sh:maxCount 1 ;
16061606
sh:message "(ValueReferencePair.valueId):Only one <i>Reference</i> is allowed for <i>valueId</i>."^^xsd:string ;
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
package io.adminshell.aas.v3.model.validator;
2+
3+
4+
import io.adminshell.aas.v3.model.*;
5+
import io.adminshell.aas.v3.model.impl.DefaultAssetInformation;
6+
import io.adminshell.aas.v3.model.impl.DefaultKey;
7+
import io.adminshell.aas.v3.model.impl.DefaultReference;
8+
import org.junit.Test;
9+
10+
import java.io.IOException;
11+
12+
import static org.junit.Assert.*;
13+
14+
/**
15+
* Tests the following constraint:
16+
* <p>
17+
* <i> AssetInformation/globalAssetId either is a reference to an Asset object or a global reference. </i>
18+
* </p>
19+
*
20+
* @author bader, chang
21+
*
22+
*/
23+
24+
public class TestAASd_023_Ignore {
25+
@Test
26+
public void correctReferenceToAsset() throws ValidationException, IOException {
27+
AssetInformation assetInformation = createAssetInformation(KeyElements.ASSET);
28+
assertEquals(assetInformation.getGlobalAssetId().getKeys().get(0).getType(), KeyElements.ASSET);
29+
ShaclValidator.getInstance().validate(assetInformation);
30+
31+
}
32+
33+
@Test
34+
public void correctReferenceToGobalRe() throws ValidationException {
35+
AssetInformation assetInformation = createAssetInformation(KeyElements.GLOBAL_REFERENCE);
36+
assertEquals(assetInformation.getGlobalAssetId().getKeys().get(0).getType(), KeyElements.GLOBAL_REFERENCE);
37+
ShaclValidator.getInstance().validate(assetInformation);
38+
39+
}
40+
41+
@Test
42+
public void wrongReferenceToCD() throws ValidationException {
43+
AssetInformation assetInformation = createAssetInformation(KeyElements.CONCEPT_DESCRIPTION);
44+
assertEquals(assetInformation.getGlobalAssetId().getKeys().get(0).getType(), KeyElements.CONCEPT_DESCRIPTION);
45+
try {
46+
ShaclValidator.getInstance().validate(assetInformation);
47+
fail();
48+
} catch (ValidationException e) {
49+
assertTrue(e.getMessage().endsWith("AssetInformation/globalAssetId either is a reference to an Asset object or a global reference."));
50+
}
51+
}
52+
53+
54+
private AssetInformation createAssetInformation(KeyElements keyElements) {
55+
return new DefaultAssetInformation.Builder()
56+
.assetKind(AssetKind.INSTANCE)
57+
.globalAssetId(new DefaultReference.Builder()
58+
.key(new DefaultKey.Builder()
59+
.idType(KeyType.CUSTOM)
60+
.value("1234")
61+
.type(keyElements)
62+
.build())
63+
64+
.build())
65+
.build();
66+
}
67+
68+
}
69+
70+
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
package io.adminshell.aas.v3.model.validator;
2+
3+
import io.adminshell.aas.v3.model.*;
4+
import io.adminshell.aas.v3.model.impl.DefaultKey;
5+
import io.adminshell.aas.v3.model.impl.DefaultReference;
6+
import io.adminshell.aas.v3.model.impl.DefaultSubmodel;
7+
import io.adminshell.aas.v3.model.impl.DefaultSubmodelElementCollection;
8+
import org.junit.Test;
9+
10+
import java.util.*;
11+
12+
/**
13+
* Tests the following constraint:
14+
* <p>
15+
* <i> If allowDuplicates==false then it is not allowed that the collection contains several elements with the same semantics (i.e. the same semanticId). </i>
16+
* </p>
17+
*
18+
* @author bader, chang
19+
*
20+
*/
21+
22+
public class TestAASd_026_Ignore {
23+
24+
25+
private SubmodelElementCollection createSubmodelElementCollection(Collection<SubmodelElement> values) {
26+
return new DefaultSubmodelElementCollection.Builder()
27+
.idShort("idShort")
28+
.value((SubmodelElement) values)
29+
.semanticId(new DefaultReference.Builder()
30+
.key(new DefaultKey.Builder()
31+
.idType(KeyType.CUSTOM)
32+
.value("the value of the semantic id")
33+
.type(KeyElements.CONCEPT_DESCRIPTION)
34+
.build())
35+
.build())
36+
.build();
37+
}
38+
}

0 commit comments

Comments
 (0)