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

Commit 608aef7

Browse files
committed
updated to latest model changes
1 parent 0f4f4e8 commit 608aef7

8 files changed

Lines changed: 63 additions & 133 deletions

File tree

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,14 @@
4848
<maven.compiler.target>1.8</maven.compiler.target>
4949
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
5050
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
51-
<revision>1.1.0</revision>
51+
<revision>1.1.1</revision>
5252
</properties>
5353

5454
<dependencies>
5555
<dependency>
5656
<groupId>io.adminshell.aas</groupId>
5757
<artifactId>model</artifactId>
58-
<version>${revision}</version>
58+
<version>1.1.2-SNAPSHOT</version>
5959
<scope>compile</scope>
6060
</dependency>
6161
<dependency>

src/main/java/io/adminshell/aas/v3/dataformat/json/mixins/AssetAdministrationShellEnvironmentMixin.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
import com.fasterxml.jackson.annotation.JsonInclude;
77

8-
import io.adminshell.aas.v3.model.Asset;
98
import io.adminshell.aas.v3.model.AssetAdministrationShell;
109
import io.adminshell.aas.v3.model.ConceptDescription;
1110
import io.adminshell.aas.v3.model.Submodel;
@@ -20,7 +19,4 @@ public interface AssetAdministrationShellEnvironmentMixin {
2019

2120
@JsonInclude(JsonInclude.Include.ALWAYS)
2221
public List<ConceptDescription> getConceptDescriptions();
23-
24-
@JsonInclude(JsonInclude.Include.ALWAYS)
25-
public List<Asset> getAssets();
2622
}

src/main/resources/aas.json

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"required": [
77
"assetAdministrationShells",
88
"submodels",
9-
"assets",
109
"conceptDescriptions"
1110
],
1211
"properties": {
@@ -22,12 +21,6 @@
2221
"$ref": "#/definitions/Submodel"
2322
}
2423
},
25-
"assets": {
26-
"type": "array",
27-
"items": {
28-
"$ref": "#/definitions/Asset"
29-
}
30-
},
3124
"conceptDescriptions": {
3225
"type": "array",
3326
"items": {
@@ -693,10 +686,10 @@
693686
{
694687
"properties": {
695688
"key": {
696-
"dataType": "string"
689+
"type": "string"
697690
},
698691
"value": {
699-
"dataType": "string"
692+
"type": "string"
700693
},
701694
"subjectId": {
702695
"$ref": "#/definitions/Reference"
@@ -864,7 +857,7 @@
864857
"$ref": "#/definitions/ModelingKind"
865858
},
866859
"idShort": {
867-
"dataType": "string"
860+
"type": "string"
868861
}
869862
},
870863
"required": [
@@ -1489,7 +1482,26 @@
14891482
"subjectAttributes": {
14901483
"type": "array",
14911484
"items": {
1492-
"$ref": "#/definitions/Reference"
1485+
"oneOf": [
1486+
{
1487+
"$ref": "#/definitions/Blob"
1488+
},
1489+
{
1490+
"$ref": "#/definitions/File"
1491+
},
1492+
{
1493+
"$ref": "#/definitions/MultiLanguageProperty"
1494+
},
1495+
{
1496+
"$ref": "#/definitions/Property"
1497+
},
1498+
{
1499+
"$ref": "#/definitions/Range"
1500+
},
1501+
{
1502+
"$ref": "#/definitions/ReferenceElement"
1503+
}
1504+
]
14931505
},
14941506
"minItems": 1
14951507
}
@@ -1546,4 +1558,4 @@
15461558
]
15471559
}
15481560
}
1549-
}
1561+
}

src/test/java/io/adminshell/aas/v3/dataformat/json/AASFull.java

Lines changed: 14 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@ public class AASFull {
3737
.value("https://acplt.org/Test_Asset")
3838
.build())
3939
.build())
40+
.billOfMaterial((new DefaultReference.Builder()
41+
.key(new DefaultKey.Builder()
42+
.type(KeyElements.SUBMODEL)
43+
.idType(KeyType.IRI)
44+
.value("http://acplt.org/Submodels/Assets/TestAsset/BillOfMaterial")
45+
.build()))
46+
.build())
4047
.build())
4148
.submodel(new DefaultReference.Builder()
4249
.key(new DefaultKey.Builder()
@@ -329,6 +336,13 @@ public class AASFull {
329336
.build())
330337
.build())
331338
.entityType(EntityType.SELF_MANAGED_ENTITY)
339+
.globalAssetId(new DefaultReference.Builder()
340+
.key(new DefaultKey.Builder()
341+
.type(KeyElements.ASSET)
342+
.idType(KeyType.IRI)
343+
.value("https://acplt.org/Test_Asset2")
344+
.build())
345+
.build())
332346
.build())
333347
.build();
334348

@@ -1425,42 +1439,6 @@ public class AASFull {
14251439
.build())
14261440
.build();
14271441

1428-
public final static Asset ASSET_1 = new DefaultAsset.Builder()
1429-
.idShort("Test_Asset")
1430-
.description(new LangString("An example asset for the test application", "en-us"))
1431-
.description(new LangString("Ein Beispiel-Asset für eine Test-Anwendung", "de"))
1432-
.identification(new DefaultIdentifier.Builder()
1433-
.idType(IdentifierType.IRI)
1434-
.identifier("https://acplt.org/Test_Asset")
1435-
.build())
1436-
.administration(new DefaultAdministrativeInformation.Builder()
1437-
.version("0.9")
1438-
.revision("0")
1439-
.build())
1440-
// TODO removed AssetIdentificationModel in full example json
1441-
// TODO removed BillOfMaterial in full example json
1442-
.build();
1443-
1444-
public final static Asset ASSET_2 = new DefaultAsset.Builder()
1445-
.idShort("")
1446-
.identification(new DefaultIdentifier.Builder()
1447-
.idType(IdentifierType.IRI)
1448-
.identifier("https://acplt.org/Test_Asset_Mandatory")
1449-
.build())
1450-
.build();
1451-
1452-
public final static Asset ASSET_3 = new DefaultAsset.Builder()
1453-
.idShort("Test_Asset")
1454-
.description(new LangString("An example asset for the test application", "en-us"))
1455-
.description(new LangString("Ein Beispiel-Asset für eine Test-Anwendung", "de"))
1456-
.identification(new DefaultIdentifier.Builder()
1457-
.idType(IdentifierType.IRI)
1458-
.identifier("https://acplt.org/Test_Asset_Missing")
1459-
.build())
1460-
.administration(new DefaultAdministrativeInformation.Builder()
1461-
.build())
1462-
.build();
1463-
14641442
public final static ConceptDescription CONCEPT_DESCRIPTION_1 = new DefaultConceptDescription.Builder()
14651443
.idShort("TestConceptDescription")
14661444
.description(new LangString("An example concept description for the test application", "en-us"))
@@ -1592,9 +1570,5 @@ public class AASFull {
15921570
CONCEPT_DESCRIPTION_2,
15931571
CONCEPT_DESCRIPTION_3,
15941572
CONCEPT_DESCRIPTION_4))
1595-
.assets(List.of(
1596-
ASSET_1,
1597-
ASSET_2,
1598-
ASSET_3))
15991573
.build();
16001574
}

src/test/java/io/adminshell/aas/v3/dataformat/json/AASSimple.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,6 @@ public AASSimple() {
354354
.conceptDescriptions(CONCEPT_DESCRIPTION_MAXROTATIONSPEED)
355355
.conceptDescriptions(CONCEPT_DESCRIPTION_ROTATIONSPEED)
356356
.conceptDescriptions(CONCEPT_DESCRIPTION_DOCUMENT)
357-
.assets(ASSET)
358357
.build();
359358

360359
}

src/test/resources/empty_aas.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"assetAdministrationShells": [],
3-
"assets": [],
43
"conceptDescriptions": [],
54
"submodels": []
65
}

src/test/resources/jsonExample.json

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -89,18 +89,6 @@
8989
]
9090
}
9191
],
92-
"assets": [
93-
{
94-
"modelType": {
95-
"name": "Asset"
96-
},
97-
"idShort": "ServoDCMotor",
98-
"identification": {
99-
"idType": "IRI",
100-
"id": "http://customer.com/assets/KHBVZJSQKIY"
101-
}
102-
}
103-
],
10492
"submodels": [
10593
{
10694
"modelType": {

src/test/resources/test_demo_full_example.json

Lines changed: 23 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,18 @@
4242
"value": "https://acplt.org/Test_Asset"
4343
}
4444
]
45-
}
45+
},
46+
"billOfMaterial": [
47+
{
48+
"keys": [
49+
{
50+
"type": "Submodel",
51+
"idType": "IRI",
52+
"value": "http://acplt.org/Submodels/Assets/TestAsset/BillOfMaterial"
53+
}
54+
]
55+
}
56+
]
4657
},
4758
"submodels": [
4859
{
@@ -513,7 +524,17 @@
513524
}
514525
]
515526
},
516-
"entityType": "SelfManagedEntity"
527+
"entityType": "SelfManagedEntity",
528+
"globalAssetId":
529+
{
530+
"keys": [
531+
{
532+
"type": "Asset",
533+
"idType": "IRI",
534+
"value": "https://acplt.org/Test_Asset2"
535+
}
536+
]
537+
}
517538
}
518539
]
519540
},
@@ -2471,65 +2492,6 @@
24712492
]
24722493
}
24732494
],
2474-
"assets": [
2475-
{
2476-
"idShort": "Test_Asset",
2477-
"description": [
2478-
{
2479-
"language": "en-us",
2480-
"text": "An example asset for the test application"
2481-
},
2482-
{
2483-
"language": "de",
2484-
"text": "Ein Beispiel-Asset für eine Test-Anwendung"
2485-
}
2486-
],
2487-
"modelType": {
2488-
"name": "Asset"
2489-
},
2490-
"identification": {
2491-
"id": "https://acplt.org/Test_Asset",
2492-
"idType": "IRI"
2493-
},
2494-
"administration": {
2495-
"version": "0.9",
2496-
"revision": "0"
2497-
}
2498-
},
2499-
{
2500-
"idShort": "",
2501-
"modelType": {
2502-
"name": "Asset"
2503-
},
2504-
"identification": {
2505-
"id": "https://acplt.org/Test_Asset_Mandatory",
2506-
"idType": "IRI"
2507-
}
2508-
},
2509-
{
2510-
"idShort": "Test_Asset",
2511-
"description": [
2512-
{
2513-
"language": "en-us",
2514-
"text": "An example asset for the test application"
2515-
},
2516-
{
2517-
"language": "de",
2518-
"text": "Ein Beispiel-Asset für eine Test-Anwendung"
2519-
}
2520-
],
2521-
"modelType": {
2522-
"name": "Asset"
2523-
},
2524-
"identification": {
2525-
"id": "https://acplt.org/Test_Asset_Missing",
2526-
"idType": "IRI"
2527-
},
2528-
"administration": {
2529-
2530-
}
2531-
}
2532-
],
25332495
"conceptDescriptions": [
25342496
{
25352497
"idShort": "TestConceptDescription",

0 commit comments

Comments
 (0)