Skip to content

Commit f564424

Browse files
authored
Feature/add abstract property and abstract entities (#18)
1 parent a684ceb commit f564424

File tree

359 files changed

+8947
-2360
lines changed

Some content is hidden

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

359 files changed

+8947
-2360
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Are you having trouble with Aspect Model Editor? We want to help!
2222

2323
* Check the [developer documentation](https://openmanufacturingplatform.github.io)
2424
* Check the
25-
BAMM [specification](https://openmanufacturingplatform.github.io/sds-documentation/bamm-specification/v1.0.0/index.html)
25+
BAMM [specification](https://openmanufacturingplatform.github.io/sds-documentation/bamm-specification/2.0.0/index.html)
2626
* Having issues with the Aspect Model Editor? Open
2727
a [GitHub issue](https://github.com/OpenManufacturingPlatform/sds-aspect-model-editor/issues).
2828

core/angular.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,29 @@
294294
}
295295
}
296296
},
297+
"migrator": {
298+
"projectType": "library",
299+
"root": "libs/migrator",
300+
"sourceRoot": "libs/migrator/src",
301+
"prefix": "ame",
302+
"architect": {
303+
"test": {
304+
"builder": "@nrwl/jest:jest",
305+
"outputs": ["coverage/libs/migrator"],
306+
"options": {
307+
"jestConfig": "libs/migrator/jest.config.js",
308+
"passWithNoTests": true
309+
}
310+
},
311+
"lint": {
312+
"builder": "@nrwl/linter:eslint",
313+
"options": {
314+
"lintFilePatterns": ["libs/migrator/src/**/*.ts", "libs/migrator/src/**/*.html"]
315+
}
316+
}
317+
},
318+
"tags": []
319+
},
297320
"mx-graph": {
298321
"projectType": "library",
299322
"root": "libs/mx-graph",
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Copyright (c) 2022 Robert Bosch Manufacturing Solutions GmbH
2+
#
3+
# See the AUTHORS file(s) distributed with this work for
4+
# additional information regarding authorship.
5+
#
6+
# This Source Code Form is subject to the terms of the Mozilla Public
7+
# License, v. 2.0. If a copy of the MPL was not distributed with this
8+
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
9+
#
10+
# SPDX-License-Identifier: MPL-2.0
11+
12+
@prefix bamm: <urn:bamm:io.openmanufacturing:meta-model:2.0.0#>.
13+
@prefix bamm-c: <urn:bamm:io.openmanufacturing:characteristic:2.0.0#>.
14+
@prefix bamm-e: <urn:bamm:io.openmanufacturing:entity:2.0.0#>.
15+
@prefix unit: <urn:bamm:io.openmanufacturing:unit:2.0.0#>.
16+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
17+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
18+
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.
19+
@prefix : <urn:bamm:io.openmanufacturing.digitaltwin:1.0.0#>.
20+
21+
:AspectDefault a bamm:Aspect;
22+
bamm:properties (:property1);
23+
bamm:operations ();
24+
bamm:events ().
25+
26+
:property1 a bamm:Property;
27+
bamm:characteristic :Characteristic1.
28+
29+
:Characteristic1 a bamm:Characteristic;
30+
bamm:dataType :Entity1.
31+
32+
:Entity1 a bamm:Entity;
33+
bamm:properties (:property2 :property3);
34+
bamm:extends :AbstractEntity1.
35+
36+
:property2 a bamm:Property;
37+
bamm:extends :abstractProperty2.
38+
39+
:property3 a bamm:Property;
40+
bamm:extends :abstractProperty1.
41+
42+
:AbstractEntity1 a bamm:AbstractEntity;
43+
bamm:preferredName "Preferred Name 1"@en;
44+
bamm:description "Description 1"@en;
45+
bamm:see <http://test1.com>;
46+
bamm:properties (:abstractProperty1 :abstractProperty2).
47+
48+
:abstractProperty2 a bamm:AbstractProperty.
49+
50+
:abstractProperty1 a bamm:AbstractProperty.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Copyright (c) 2022 Robert Bosch Manufacturing Solutions GmbH
2+
#
3+
# See the AUTHORS file(s) distributed with this work for
4+
# additional information regarding authorship.
5+
#
6+
# This Source Code Form is subject to the terms of the Mozilla Public
7+
# License, v. 2.0. If a copy of the MPL was not distributed with this
8+
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
9+
#
10+
# SPDX-License-Identifier: MPL-2.0
11+
12+
@prefix bamm: <urn:bamm:io.openmanufacturing:meta-model:2.0.0#> .
13+
@prefix bamm-c: <urn:bamm:io.openmanufacturing:characteristic:2.0.0#> .
14+
@prefix bamm-e: <urn:bamm:io.openmanufacturing:entity:2.0.0#> .
15+
@prefix unit: <urn:bamm:io.openmanufacturing:unit:2.0.0#> .
16+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
17+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
18+
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
19+
@prefix : <urn:bamm:io.openmanufacturing:1.0.0#> .
20+
21+
:AspectWithAbstractProperties a bamm:Aspect ;
22+
bamm:properties ( [ bamm:extends :abstractProperty1; bamm:characteristic :Characteristic1] [bamm:extends :abstractProperty2; bamm:characteristic :Characteristic1]) ;
23+
bamm:operations ( ) .
24+
25+
:abstractProperty1 a bamm:AbstractProperty;
26+
bamm:description "Description"@en;
27+
bamm:preferredName "Preferred Name"@ro;
28+
bamm:see <http://test.com>.
29+
30+
:abstractProperty2 a bamm:AbstractProperty;
31+
bamm:extends :abstractProperty3.
32+
33+
:abstractProperty3 a bamm:AbstractProperty;
34+
bamm:description "Description"@en;
35+
bamm:preferredName "Preferred Name"@ro;
36+
bamm:see <http://test.com>.
37+
38+
:Characteristic1 a bamm:Characteristic;
39+
bamm:dataType xsd:string.

core/apps/ame-e2e/src/fixtures/all-characteristic.txt

Lines changed: 15 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,24 @@
1-
@prefix bamm: <urn:bamm:io.openmanufacturing:meta-model:1.0.0#> .
2-
@prefix bamm-c: <urn:bamm:io.openmanufacturing:characteristic:1.0.0#> .
3-
@prefix bamm-e: <urn:bamm:io.openmanufacturing:entity:1.0.0#> .
4-
@prefix unit: <urn:bamm:io.openmanufacturing:unit:1.0.0#> .
1+
# Copyright (c) 2022 Robert Bosch Manufacturing Solutions GmbH
2+
#
3+
# See the AUTHORS file(s) distributed with this work for
4+
# additional information regarding authorship.
5+
#
6+
# This Source Code Form is subject to the terms of the Mozilla Public
7+
# License, v. 2.0. If a copy of the MPL was not distributed with this
8+
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
9+
#
10+
# SPDX-License-Identifier: MPL-2.0
11+
12+
@prefix bamm: <urn:bamm:io.openmanufacturing:meta-model:2.0.0#> .
13+
@prefix bamm-c: <urn:bamm:io.openmanufacturing:characteristic:2.0.0#> .
14+
@prefix bamm-e: <urn:bamm:io.openmanufacturing:entity:2.0.0#> .
15+
@prefix unit: <urn:bamm:io.openmanufacturing:unit:2.0.0#> .
516
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
617
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
718
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
819
@prefix : <urn:bamm:io.openmanufacturing:1.0.0#> .
920

1021
:AspectWithAllCharacteristic a bamm:Aspect ;
11-
bamm:name "AspectWithAllCharacteristic" ;
1222
bamm:properties (
1323
:testCodeProperty
1424
:testCollectiontProperty
@@ -23,18 +33,15 @@
2333
bamm:operations ( ) .
2434

2535
:testCodeProperty a bamm:Property ;
26-
bamm:name "testCodeProperty" ;
2736
bamm:characteristic :TestCode .
2837

2938
:TestCode a bamm-c:Code ;
30-
bamm:name "TestCode" ;
3139
bamm:preferredName "Test Code"@en ;
3240
bamm:description "This is a test code."@en ;
3341
bamm:see <http://bosch.com/opcon> ;
3442
bamm:dataType xsd:int .
3543

3644
:testCollectiontProperty a bamm:Property ;
37-
bamm:name "testCollectiontProperty" ;
3845
bamm:preferredName "Test Property"@en ;
3946
bamm:description "This is a test property."@en ;
4047
bamm:see <http://bosch.com/opcon> ;
@@ -43,26 +50,22 @@
4350
bamm:characteristic :TestCollection .
4451

4552
:TestCollection a bamm-c:Collection ;
46-
bamm:name "TestCollection" ;
4753
bamm:preferredName "Test Collection"@en ;
4854
bamm:description "This is a test collection."@en ;
4955
bamm:see <http://bosch.com/opcon> ;
5056
bamm:dataType xsd:string .
5157

5258
:testDurationProperty a bamm:Property ;
53-
bamm:name "testDurationProperty" ;
5459
bamm:characteristic :TestDuration .
5560

5661
:TestDuration a bamm-c:Duration ;
57-
bamm:name "TestDuration" ;
5862
bamm:preferredName "Test Duration"@en ;
5963
bamm:description "This is a test Duration"@en ;
6064
bamm:see <http://bosch.com/opcon> ;
6165
bamm:dataType xsd:int ;
6266
bamm-c:unit unit:kilosecond .
6367

6468
:testEnumerationProperty a bamm:Property ;
65-
bamm:name "testEnumerationProperty" ;
6669
bamm:preferredName "Test Property"@en ;
6770
bamm:description "This is a test property."@en ;
6871
bamm:see <http://bosch.com/opcon> ;
@@ -71,15 +74,13 @@
7174
bamm:characteristic :TestEnumeration .
7275

7376
:TestEnumeration a bamm-c:Enumeration ;
74-
bamm:name "TestEnumeration" ;
7577
bamm:preferredName "Test Enumeration"@en ;
7678
bamm:description "This is a test for enumeration."@en ;
7779
bamm:see <http://bosch.com/opcon> ;
7880
bamm:dataType xsd:int ;
7981
bamm-c:values ( 1 2 3 ) .
8082

8183
:testListProperty a bamm:Property ;
82-
bamm:name "testListProperty" ;
8384
bamm:preferredName "Test Property"@en ;
8485
bamm:description "This is a test property."@en ;
8586
bamm:see <http://bosch.com/opcon> ;
@@ -88,38 +89,32 @@
8889
bamm:characteristic :TestList .
8990

9091
:TestList a bamm-c:List ;
91-
bamm:name "TestList" ;
9292
bamm:preferredName "Test List"@en ;
9393
bamm:description "This is a test list."@en ;
9494
bamm:see <http://bosch.com/opcon> ;
9595
bamm:dataType xsd:string .
9696

9797
:testMeasurementProperty a bamm:Property ;
98-
bamm:name "testMeasurementProperty" ;
9998
bamm:characteristic :TestMeasurement .
10099

101100
:TestMeasurement a bamm-c:Measurement ;
102-
bamm:name "TestMeasurement" ;
103101
bamm:preferredName "Test Measurement"@en ;
104102
bamm:description "This is a test Measurement"@en ;
105103
bamm:see <http://bosch.com/opcon> ;
106104
bamm:dataType xsd:float ;
107105
bamm-c:unit unit:kelvin .
108106

109107
:testQuantifiableProperty a bamm:Property ;
110-
bamm:name "testQuantifiableProperty" ;
111108
bamm:characteristic :TestQuantifiable .
112109

113110
:TestQuantifiable a bamm-c:Quantifiable ;
114-
bamm:name "TestQuantifiable" ;
115111
bamm:preferredName "Test Quantifiable"@en ;
116112
bamm:description "This is a test Quantifiable"@en ;
117113
bamm:see <http://bosch.com/opcon> ;
118114
bamm:dataType xsd:float ;
119115
bamm-c:unit unit:hertz .
120116

121117
:testSetProperty a bamm:Property ;
122-
bamm:name "testSetProperty" ;
123118
bamm:preferredName "Test Property"@en ;
124119
bamm:description "This is a test property."@en ;
125120
bamm:see <http://bosch.com/opcon> ;
@@ -128,14 +123,12 @@
128123
bamm:characteristic :TestSet .
129124

130125
:TestSet a bamm-c:Set ;
131-
bamm:name "TestSet" ;
132126
bamm:preferredName "Test Set"@en ;
133127
bamm:description "This is a test set."@en ;
134128
bamm:see <http://bosch.com/opcon> ;
135129
bamm:dataType xsd:string .
136130

137131
:testSortedSetProperty a bamm:Property ;
138-
bamm:name "testSortedSetProperty" ;
139132
bamm:preferredName "Test Property"@en ;
140133
bamm:description "This is a test property."@en ;
141134
bamm:see <http://bosch.com/opcon> ;
@@ -144,7 +137,6 @@
144137
bamm:characteristic :TestSortedSet .
145138

146139
:TestSortedSet a bamm-c:SortedSet ;
147-
bamm:name "TestSortedSet" ;
148140
bamm:preferredName "Test Sorted Set"@en ;
149141
bamm:description "This is a test sorted set."@en ;
150142
bamm:see <http://bosch.com/opcon> ;
Lines changed: 20 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,40 @@
1-
@prefix bamm: <urn:bamm:io.openmanufacturing:meta-model:1.0.0#> .
2-
@prefix bamm-c: <urn:bamm:io.openmanufacturing:characteristic:1.0.0#> .
3-
@prefix bamm-e: <urn:bamm:io.openmanufacturing:entity:1.0.0#> .
4-
@prefix unit: <urn:bamm:io.openmanufacturing:unit:1.0.0#> .
1+
# Copyright (c) 2022 Robert Bosch Manufacturing Solutions GmbH
2+
#
3+
# See the AUTHORS file(s) distributed with this work for
4+
# additional information regarding authorship.
5+
#
6+
# This Source Code Form is subject to the terms of the Mozilla Public
7+
# License, v. 2.0. If a copy of the MPL was not distributed with this
8+
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
9+
#
10+
# SPDX-License-Identifier: MPL-2.0
11+
12+
@prefix bamm: <urn:bamm:io.openmanufacturing:meta-model:2.0.0#> .
13+
@prefix bamm-c: <urn:bamm:io.openmanufacturing:characteristic:2.0.0#> .
14+
@prefix bamm-e: <urn:bamm:io.openmanufacturing:entity:2.0.0#> .
15+
@prefix unit: <urn:bamm:io.openmanufacturing:unit:2.0.0#> .
516
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
617
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
718
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
819
@prefix : <urn:bamm:io.openmanufacturing:1.0.0#> .
920

1021
:AspectDefault a bamm:Aspect ;
11-
bamm:name "AspectDefault" ;
1222
bamm:properties (:property1 :property2 :property3) ;
1323
bamm:operations () .
1424

1525
:property1 a bamm:Property ;
16-
bamm:name "property1" ;
1726
bamm:characteristic :Characteristic1 .
1827

1928
:property2 a bamm:Property ;
20-
bamm:name "property2" ;
21-
bamm:characteristic [ a bamm:Characteristic ;
22-
bamm:name "Characteristic2" ;
23-
bamm:dataType xsd:string ] .
29+
bamm:characteristic [ a bamm:Characteristic; bamm:dataType xsd:string ] .
2430

2531
:property3 a bamm:Property ;
26-
bamm:name "property3" ;
2732
bamm:characteristic [
2833
a bamm-c:Trait ;
29-
bamm:name "Trait1" ;
30-
bamm-c:baseCharacteristic [
31-
a bamm:Characteristic ;
32-
bamm:name "Characteristic3"
33-
] ;
34-
bamm-c:constraint [
35-
a bamm:Constraint ;
36-
bamm:name "Constraint1" ] ;
37-
bamm-c:constraint [
38-
a bamm:Constraint ;
39-
bamm:name "Constraint2"
40-
]
41-
] .
34+
bamm-c:baseCharacteristic [ a bamm:Characteristic ] ;
35+
bamm-c:constraint [ a bamm:Constraint ] ;
36+
bamm-c:constraint [ a bamm:Constraint ]
37+
] .
4238

4339
:Characteristic1 a bamm:Characteristic ;
44-
bamm:name "Characteristic1" ;
4540
bamm:dataType xsd:string .

0 commit comments

Comments
 (0)