Skip to content

Commit fadee60

Browse files
authored
Fixing issues from feedback (#53)
* Refresh icon for sidebar, when deleting files from file structure * Fix abstract property relations, see #45 * Fix add custom unit documentation * Fix invalid urn cannot be loaded and add notification for its, see #46 * Fix show file correctly in editor when overwriting file when importing namespace and add file to workspace
1 parent 46da331 commit fadee60

File tree

60 files changed

+1767
-317
lines changed

Some content is hidden

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

60 files changed

+1767
-317
lines changed

core/angular.json

Lines changed: 55 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -228,28 +228,6 @@
228228
}
229229
}
230230
},
231-
"namespace-manager": {
232-
"projectType": "library",
233-
"root": "libs/namespace-manager",
234-
"sourceRoot": "libs/namespace-manager/src",
235-
"prefix": "ame",
236-
"architect": {
237-
"test": {
238-
"builder": "@nrwl/jest:jest",
239-
"outputs": ["coverage/libs/namespace-manager"],
240-
"options": {
241-
"jestConfig": "libs/namespace-manager/jest.config.js",
242-
"passWithNoTests": true
243-
}
244-
},
245-
"lint": {
246-
"builder": "@nrwl/linter:eslint",
247-
"options": {
248-
"lintFilePatterns": ["libs/namespace-manager/src/**/*.ts", "libs/namespace-manager/src/**/*.html"]
249-
}
250-
}
251-
}
252-
},
253231
"editor": {
254232
"projectType": "library",
255233
"root": "libs/editor",
@@ -360,6 +338,28 @@
360338
}
361339
}
362340
},
341+
"namespace-manager": {
342+
"projectType": "library",
343+
"root": "libs/namespace-manager",
344+
"sourceRoot": "libs/namespace-manager/src",
345+
"prefix": "ame",
346+
"architect": {
347+
"test": {
348+
"builder": "@nrwl/jest:jest",
349+
"outputs": ["coverage/libs/namespace-manager"],
350+
"options": {
351+
"jestConfig": "libs/namespace-manager/jest.config.js",
352+
"passWithNoTests": true
353+
}
354+
},
355+
"lint": {
356+
"builder": "@nrwl/linter:eslint",
357+
"options": {
358+
"lintFilePatterns": ["libs/namespace-manager/src/**/*.ts", "libs/namespace-manager/src/**/*.html"]
359+
}
360+
}
361+
}
362+
},
363363
"rdf": {
364364
"projectType": "library",
365365
"root": "libs/rdf",
@@ -426,6 +426,39 @@
426426
}
427427
}
428428
},
429+
"utils": {
430+
"root": "libs/utils",
431+
"sourceRoot": "libs/utils/src",
432+
"projectType": "library",
433+
"architect": {
434+
"build": {
435+
"builder": "@nrwl/js:tsc",
436+
"outputs": ["{options.outputPath}"],
437+
"options": {
438+
"outputPath": "dist/libs/utils",
439+
"main": "libs/utils/src/index.ts",
440+
"tsConfig": "libs/utils/tsconfig.lib.json",
441+
"assets": ["libs/utils/*.md"]
442+
}
443+
},
444+
"lint": {
445+
"builder": "@nrwl/linter:eslint",
446+
"outputs": ["{options.outputFile}"],
447+
"options": {
448+
"lintFilePatterns": ["libs/utils/**/*.ts"]
449+
}
450+
},
451+
"test": {
452+
"builder": "@nrwl/jest:jest",
453+
"outputs": ["coverage/libs/utils"],
454+
"options": {
455+
"jestConfig": "libs/utils/jest.config.ts",
456+
"passWithNoTests": true
457+
}
458+
}
459+
},
460+
"tags": []
461+
},
429462
"vocabulary": {
430463
"projectType": "library",
431464
"root": "libs/vocabulary",

core/apps/ame-e2e/.eslintrc.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
{
22
"extends": ["plugin:cypress/recommended", "../../.eslintrc.json"],
3-
"ignorePatterns": ["!**/*"],
3+
"ignorePatterns": ["!**/*", "*.html"],
44
"overrides": [
55
{
66
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
7-
"rules": {}
7+
"rules": {
8+
"cypress/no-unnecessary-waiting": "warn",
9+
"cypress/unsafe-to-chain-command": "off"
10+
}
811
},
912
{
1013
"files": ["src/plugins/index.js"],
1114
"rules": {
1215
"@typescript-eslint/no-var-requires": "off",
16+
"@typescript-eslint/no-empty-function": "off",
1317
"no-undef": "off"
1418
}
1519
}

core/apps/ame-e2e/src/fixtures/valid-documentation.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
~ SPDX-License-Identifier: MPL-2.0
1212
-->
1313

14-
<!doctype html>
14+
<!DOCTYPE html>
1515
<html lang="en">
16-
<head>
17-
<title>Test Documentation</title>
18-
</head>
19-
<body></body>
16+
<head>
17+
<title>Test Documentation</title>
18+
</head>
19+
<body></body>
2020
</html>

core/apps/ame-e2e/src/fixtures/valid-open-api.json

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@
1717
"paths": {
1818
"/{tenant-id}/aspect-default": {
1919
"get": {
20-
"tags": [
21-
"AspectDefault"
22-
],
20+
"tags": ["AspectDefault"],
2321
"operationId": "getAspectDefault",
2422
"parameters": [
2523
{
@@ -57,9 +55,7 @@
5755
"schemas": {
5856
"ErrorResponse": {
5957
"type": "object",
60-
"required": [
61-
"error"
62-
],
58+
"required": ["error"],
6359
"properties": {
6460
"error": {
6561
"$ref": "#/components/schemas/Error"
@@ -68,9 +64,7 @@
6864
},
6965
"Error": {
7066
"type": "object",
71-
"required": [
72-
"details"
73-
],
67+
"required": ["details"],
7468
"properties": {
7569
"message": {
7670
"type": "string",
@@ -103,9 +97,7 @@
10397
"$ref": "#/components/schemas/urn_samm_org.eclipse.digitaltwin_1.0.0_Characteristic1"
10498
}
10599
},
106-
"required": [
107-
"property1"
108-
]
100+
"required": ["property1"]
109101
}
110102
},
111103
"responses": {

core/apps/ame-e2e/src/fixtures/valid-open-api.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ paths:
3535
type: string
3636
format: uuid
3737
responses:
38-
"200":
38+
'200':
3939
$ref: '#/components/responses/AspectDefault'
40-
"401":
40+
'401':
4141
$ref: '#/components/responses/ClientError'
42-
"402":
42+
'402':
4343
$ref: '#/components/responses/Unauthorized'
44-
"403":
44+
'403':
4545
$ref: '#/components/responses/Forbidden'
46-
"404":
46+
'404':
4747
$ref: '#/components/responses/NotFoundError'
4848
components:
4949
schemas:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
@prefix samm: <urn:samm:org.eclipse.esmf.samm:meta-model:2.0.0#>.
2+
@prefix samm-c: <urn:samm:org.eclipse.esmf.samm:characteristic:2.0.0#>.
3+
@prefix samm-e: <urn:samm:org.eclipse.esmf.samm:entity:2.0.0#>.
4+
@prefix unit: <urn:samm:org.eclipse.esmf.samm:unit:2.0.0#>.
5+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
6+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
7+
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.
8+
@prefix : <urn:samm:org.eclipse.digitaltwin:1.0.0#>.
9+
@prefix ext-namespace: <urn:samm:different.namespace:1.0.0#>.
10+
11+
:AspectDependentDifferentNamespaces a samm:Aspect;
12+
samm:preferredName "Aspect 2"@en;
13+
samm:description "This is an aspect 2"@en;
14+
samm:properties (:property2 ext-namespace:property1);
15+
samm:operations ();
16+
samm:events ().
17+
:property2 a samm:Property;
18+
samm:preferredName "Property 2"@en;
19+
samm:description "This is a property 2"@en;
20+
samm:characteristic :Characteristic2;
21+
samm:exampleValue "Any property value 2".
22+
:Characteristic2 a samm:Characteristic;
23+
samm:preferredName "Characteristic 2"@en;
24+
samm:description "This is a characteristic 2"@en;
25+
samm:dataType xsd:string.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
@prefix samm: <urn:samm:org.eclipse.esmf.samm:meta-model:2.0.0#>.
2+
@prefix samm-c: <urn:samm:org.eclipse.esmf.samm:characteristic:2.0.0#>.
3+
@prefix samm-e: <urn:samm:org.eclipse.esmf.samm:entity:2.0.0#>.
4+
@prefix unit: <urn:samm:org.eclipse.esmf.samm:unit:2.0.0#>.
5+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
6+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
7+
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.
8+
@prefix : <urn:samm:different.namespace:1.0.0#>.
9+
10+
:AspectSharedDifferentNamespaces a samm:Aspect;
11+
samm:preferredName "Aspect 1"@en;
12+
samm:description "This is an aspect 1"@en;
13+
samm:properties (:property1);
14+
samm:operations ();
15+
samm:events ().
16+
:property1 a samm:Property;
17+
samm:preferredName "Property 1"@en;
18+
samm:description "This is a property 1"@en;
19+
samm:characteristic :Characteristic1;
20+
samm:exampleValue "Any property value 1".
21+
:Characteristic1 a samm:Characteristic;
22+
samm:preferredName "Characteristic 1"@en;
23+
samm:description "This is a characteristic 1"@en;
24+
samm:dataType xsd:string.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
{
2+
"metaModelVersion": "2.0.0",
3+
"aspectModelUrn": "urn:samm:org.eclipse.digitaltwin:1.0.0#AspectDependentDifferentNamespaces",
4+
"name": "AspectDependentDifferentNamespaces",
5+
"see": [],
6+
"anonymouseNode": false,
7+
"externalReference": false,
8+
"preferredNames": {},
9+
"descriptions": {},
10+
"properties": [
11+
{
12+
"property": {
13+
"metaModelVersion": "2.0.0",
14+
"aspectModelUrn": "urn:samm:org.eclipse.digitaltwin:1.0.0#property2",
15+
"name": "property2",
16+
"see": [],
17+
"anonymouseNode": false,
18+
"externalReference": false,
19+
"preferredNames": {},
20+
"descriptions": {},
21+
"characteristic": {
22+
"metaModelVersion": "2.0.0",
23+
"aspectModelUrn": "urn:samm:org.eclipse.digitaltwin:1.0.0#Characteristic2",
24+
"name": "Characteristic2",
25+
"see": [],
26+
"anonymouseNode": false,
27+
"externalReference": false,
28+
"preferredNames": {},
29+
"descriptions": {},
30+
"dataType": {
31+
"urn": "http://www.w3.org/2001/XMLSchema#string"
32+
},
33+
"fileName": "AspectDependentDifferentNamespaces.ttl"
34+
},
35+
"exampleValue": "Any property value 2",
36+
"predefined": false,
37+
"fileName": "AspectDependentDifferentNamespaces.ttl"
38+
},
39+
"keys": {
40+
"optional": false,
41+
"notInPayload": false
42+
}
43+
},
44+
{
45+
"property": {
46+
"metaModelVersion": "2.0.0",
47+
"aspectModelUrn": "urn:samm:newNamespace:1.0.0#property1",
48+
"name": "property1",
49+
"see": [],
50+
"anonymouseNode": false,
51+
"externalReference": true,
52+
"preferredNames": {},
53+
"descriptions": {},
54+
"characteristic": {
55+
"metaModelVersion": "2.0.0",
56+
"aspectModelUrn": "urn:samm:newNamespace:1.0.0#Characteristic1",
57+
"name": "Characteristic1",
58+
"see": [],
59+
"anonymouseNode": false,
60+
"externalReference": true,
61+
"preferredNames": {},
62+
"descriptions": {},
63+
"dataType": {
64+
"urn": "http://www.w3.org/2001/XMLSchema#string"
65+
},
66+
"fileName": "AspectSharedDifferentNamespaces.ttl"
67+
},
68+
"exampleValue": "Any property value 1",
69+
"predefined": false,
70+
"fileName": "AspectSharedDifferentNamespaces.ttl"
71+
},
72+
"keys": {
73+
"optional": false,
74+
"notInPayload": false
75+
}
76+
}
77+
],
78+
"operations": [],
79+
"events": [],
80+
"isCollectionAspect": false,
81+
"fileName": "AspectDependentDifferentNamespaces.ttl"
82+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
"metaModelVersion": "2.0.0",
3+
"aspectModelUrn": "urn:samm:newNamespace:1.0.0#AspectSharedDifferentNamespaces",
4+
"name": "AspectSharedDifferentNamespaces",
5+
"see": [],
6+
"anonymouseNode": false,
7+
"externalReference": false,
8+
"preferredNames": {},
9+
"descriptions": {},
10+
"properties": [
11+
{
12+
"property": {
13+
"metaModelVersion": "2.0.0",
14+
"aspectModelUrn": "urn:samm:newNamespace:1.0.0#property1",
15+
"name": "property1",
16+
"see": [],
17+
"anonymouseNode": false,
18+
"externalReference": false,
19+
"preferredNames": {},
20+
"descriptions": {},
21+
"characteristic": {
22+
"metaModelVersion": "2.0.0",
23+
"aspectModelUrn": "urn:samm:newNamespace:1.0.0#Characteristic1",
24+
"name": "Characteristic1",
25+
"see": [],
26+
"anonymouseNode": false,
27+
"externalReference": false,
28+
"preferredNames": {},
29+
"descriptions": {},
30+
"dataType": {
31+
"urn": "http://www.w3.org/2001/XMLSchema#string"
32+
},
33+
"fileName": "AspectSharedDifferentNamespaces.ttl"
34+
},
35+
"exampleValue": "Any property value 1",
36+
"predefined": false,
37+
"fileName": "AspectSharedDifferentNamespaces.ttl"
38+
},
39+
"keys": {
40+
"optional": false,
41+
"notInPayload": false
42+
}
43+
}
44+
],
45+
"operations": [],
46+
"events": [],
47+
"isCollectionAspect": false,
48+
"fileName": "AspectSharedDifferentNamespaces.ttl"
49+
}

0 commit comments

Comments
 (0)