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

Commit 0426fbc

Browse files
Merge pull request #40 from admin-shell-io/feature/example-validation
Feature/example validation
2 parents 292be59 + 85b1de1 commit 0426fbc

51 files changed

Lines changed: 3996 additions & 576 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

dataformat-core/src/test/java/io/adminshell/aas/v3/dataformat/core/AASFull.java

Lines changed: 25 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
import io.adminshell.aas.v3.model.impl.DefaultView;
6464

6565
public class AASFull {
66-
66+
6767
public static final AssetAdministrationShell AAS_1 = new DefaultAssetAdministrationShell.Builder()
6868
.idShort("TestAssetAdministrationShell")
6969
.description(new LangString("An Example Asset Administration Shell for the test application", "en-us"))
@@ -124,7 +124,7 @@ public class AASFull {
124124
.build();
125125

126126
public static final AssetAdministrationShell AAS_2 = new DefaultAssetAdministrationShell.Builder()
127-
.idShort("")
127+
.idShort("Test_AssetAdministrationShell_Mandatory")
128128
.identification(new DefaultIdentifier.Builder()
129129
.idType(IdentifierType.IRI)
130130
.identifier("https://acplt.org/Test_AssetAdministrationShell_Mandatory")
@@ -156,7 +156,7 @@ public class AASFull {
156156
.build();
157157

158158
public static final AssetAdministrationShell AAS_3 = new DefaultAssetAdministrationShell.Builder()
159-
.idShort("")
159+
.idShort("Test_AssetAdministrationShell2_Mandatory")
160160
.identification(new DefaultIdentifier.Builder()
161161
.idType(IdentifierType.IRI)
162162
.identifier("https://acplt.org/Test_AssetAdministrationShell2_Mandatory")
@@ -250,34 +250,22 @@ public class AASFull {
250250
.build())
251251
.qualifier(new DefaultQualifier.Builder()
252252
.value("100")
253-
.valueId(new DefaultReference.Builder()
254-
.key(new DefaultKey.Builder()
255-
.type(KeyElements.GLOBAL_REFERENCE)
256-
.idType(KeyType.IRI)
257-
.value("http://acplt.org/ValueId/ExampleValueId")
258-
.build())
259-
.build())
253+
260254
.valueType("int")
261255
.type("http://acplt.org/Qualifier/ExampleQualifier")
262256
.build())
263257
.qualifier(new DefaultQualifier.Builder()
264258
.value("50")
265-
.valueId(new DefaultReference.Builder()
266-
.key(new DefaultKey.Builder()
267-
.type(KeyElements.GLOBAL_REFERENCE)
268-
.idType(KeyType.IRI)
269-
.value("http://acplt.org/ValueId/ExampleValueId")
270-
.build())
271-
.build())
272-
.valueType("int")
259+
260+
.valueType("http://www.w3.org/2001/XMLSchema#int")
273261
.type("http://acplt.org/Qualifier/ExampleQualifier2")
274262
.build())
275-
.value("ACPLT")
263+
.value("http://acplt.org/ValueId/ACPLT")
276264
.valueId(new DefaultReference.Builder()
277265
.key(new DefaultKey.Builder()
278266
.type(KeyElements.GLOBAL_REFERENCE)
279267
.idType(KeyType.IRI)
280-
.value("http://acplt.org/ValueId/ExampleValueId")
268+
.value("http://acplt.org/ValueId/ACPLT")
281269
.build())
282270
.build())
283271
.valueType("string")
@@ -298,7 +286,7 @@ public class AASFull {
298286
.key(new DefaultKey.Builder()
299287
.type(KeyElements.GLOBAL_REFERENCE)
300288
.idType(KeyType.IRI)
301-
.value("http://acplt.org/ValueId/ExampleValueId")
289+
.value("978-8234-234-342")
302290
.build())
303291
.build())
304292
.valueType("string")
@@ -347,12 +335,12 @@ public class AASFull {
347335
.idType(KeyType.IRI)
348336
.build())
349337
.build())
350-
.value("exampleValue2")
338+
.value("http://acplt.org/ValueId/ExampleValue2")
351339
.valueId(new DefaultReference.Builder()
352340
.key(new DefaultKey.Builder()
353341
.type(KeyElements.GLOBAL_REFERENCE)
354342
.idType(KeyType.IRI)
355-
.value("http://acplt.org/ValueId/ExampleValueId")
343+
.value("http://acplt.org/ValueId/ExampleValue2")
356344
.build())
357345
.build())
358346
.valueType("string")
@@ -369,7 +357,7 @@ public class AASFull {
369357
.idType(KeyType.IRI)
370358
.build())
371359
.build())
372-
.value("exampleValue")
360+
.value("http://acplt.org/ValueId/ExampleValueId")
373361
.valueId(new DefaultReference.Builder()
374362
.key(new DefaultKey.Builder()
375363
.type(KeyElements.GLOBAL_REFERENCE)
@@ -526,6 +514,7 @@ public class AASFull {
526514
.build())
527515
.submodelElement(new DefaultOperation.Builder()
528516
.idShort("ExampleOperation")
517+
.kind(ModelingKind.TEMPLATE)
529518
.category("Parameter")
530519
.description(new LangString("Example Operation object", "en-us"))
531520
.description(new LangString("Beispiel Operation Element", "de"))
@@ -549,7 +538,7 @@ public class AASFull {
549538
.idType(KeyType.IRI)
550539
.build())
551540
.build())
552-
.value("exampleValue")
541+
.value("http://acplt.org/ValueId/ExampleValueId")
553542
.valueId(new DefaultReference.Builder()
554543
.key(new DefaultKey.Builder()
555544
.type(KeyElements.GLOBAL_REFERENCE)
@@ -573,7 +562,7 @@ public class AASFull {
573562
.idType(KeyType.IRI)
574563
.build())
575564
.build())
576-
.value("exampleValue")
565+
.value("http://acplt.org/ValueId/ExampleValueId")
577566
.valueId(new DefaultReference.Builder()
578567
.key(new DefaultKey.Builder()
579568
.type(KeyElements.GLOBAL_REFERENCE)
@@ -597,7 +586,7 @@ public class AASFull {
597586
.idType(KeyType.IRI)
598587
.build())
599588
.build())
600-
.value("exampleValue")
589+
.value("http://acplt.org/ValueId/ExampleValueId")
601590
.valueId(new DefaultReference.Builder()
602591
.key(new DefaultKey.Builder()
603592
.type(KeyElements.GLOBAL_REFERENCE)
@@ -676,7 +665,7 @@ public class AASFull {
676665
.idType(KeyType.IRI)
677666
.build())
678667
.build())
679-
.value("exampleValue")
668+
.value("http://acplt.org/ValueId/ExampleValueId")
680669
.valueId(new DefaultReference.Builder()
681670
.key(new DefaultKey.Builder()
682671
.type(KeyElements.GLOBAL_REFERENCE)
@@ -802,7 +791,7 @@ public class AASFull {
802791
.build();
803792

804793
public static final Submodel SUBMODEL_4 = new DefaultSubmodel.Builder()
805-
.idShort("")
794+
.idShort("Test_Submodel_Mandatory")
806795
.identification(new DefaultIdentifier.Builder()
807796
.idType(IdentifierType.IRI)
808797
.identifier("https://acplt.org/Test_Submodel_Mandatory")
@@ -884,6 +873,7 @@ public class AASFull {
884873
.build())
885874
.submodelElement(new DefaultOperation.Builder()
886875
.idShort("ExampleOperation")
876+
.kind(ModelingKind.TEMPLATE)
887877
.build())
888878
.submodelElement(new DefaultCapability.Builder()
889879
.idShort("ExampleCapability")
@@ -949,7 +939,7 @@ public class AASFull {
949939
.build();
950940

951941
public static final Submodel SUBMODEL_5 = new DefaultSubmodel.Builder()
952-
.idShort("")
942+
.idShort("Test_Submodel2_Mandatory")
953943
.kind(ModelingKind.INSTANCE)
954944
.identification(new DefaultIdentifier.Builder()
955945
.idType(IdentifierType.IRI)
@@ -1079,6 +1069,7 @@ public class AASFull {
10791069
.build())
10801070
.submodelElement(new DefaultOperation.Builder()
10811071
.idShort("ExampleOperation")
1072+
.kind(ModelingKind.TEMPLATE)
10821073
.category("Parameter")
10831074
.description(new LangString("Example Operation object", "en-us"))
10841075
.description(new LangString("Beispiel Operation Element", "de"))
@@ -1414,6 +1405,7 @@ public class AASFull {
14141405
.build())
14151406
.submodelElement(new DefaultOperation.Builder()
14161407
.idShort("ExampleOperation")
1408+
.kind(ModelingKind.TEMPLATE)
14171409
.category("Parameter")
14181410
.description(new LangString("Example Operation object", "en-us"))
14191411
.description(new LangString("Beispiel Operation Element", "de"))
@@ -1693,7 +1685,7 @@ public class AASFull {
16931685
.build();
16941686

16951687
public final static ConceptDescription CONCEPT_DESCRIPTION_2 = new DefaultConceptDescription.Builder()
1696-
.idShort("")
1688+
.idShort("Test_ConceptDescription_Mandatory")
16971689
.identification(new DefaultIdentifier.Builder()
16981690
.idType(IdentifierType.IRI)
16991691
.identifier("https://acplt.org/Test_ConceptDescription_Mandatory")
@@ -1756,7 +1748,7 @@ public class AASFull {
17561748
.levelType(LevelType.MAX)
17571749
.valueList(new DefaultValueList.Builder()
17581750
.valueReferencePairTypes(new DefaultValueReferencePair.Builder()
1759-
.value("exampleValue")
1751+
.value("http://acplt.org/ValueId/ExampleValueId")
17601752
.valueId(new DefaultReference.Builder()
17611753
.key(new DefaultKey.Builder()
17621754
.type(KeyElements.GLOBAL_REFERENCE)
@@ -1767,7 +1759,7 @@ public class AASFull {
17671759
// TODO valueType
17681760
.build())
17691761
.valueReferencePairTypes(new DefaultValueReferencePair.Builder()
1770-
.value("exampleValue2")
1762+
.value("http://acplt.org/ValueId/ExampleValueId2")
17711763
.valueId(new DefaultReference.Builder()
17721764
.key(new DefaultKey.Builder()
17731765
.type(KeyElements.GLOBAL_REFERENCE)

0 commit comments

Comments
 (0)