@finos/legend-extension-dsl-data-space 3.0.4 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/DataSpaceViewer.d.ts.map +1 -1
- package/lib/components/DataSpaceViewer.js +5 -6
- package/lib/components/DataSpaceViewer.js.map +1 -1
- package/lib/components/query/DataSpaceQuerySetup.js +3 -3
- package/lib/components/query/DataSpaceQuerySetup.js.map +1 -1
- package/lib/components/studio/DSLDataSpace_CodeSnippets.d.ts +1 -1
- package/lib/components/studio/DSLDataSpace_CodeSnippets.d.ts.map +1 -1
- package/lib/components/studio/DSLDataSpace_CodeSnippets.js +0 -3
- package/lib/components/studio/DSLDataSpace_CodeSnippets.js.map +1 -1
- package/lib/components/studio/DSLDataSpace_LegendStudioPlugin.d.ts.map +1 -1
- package/lib/components/studio/DSLDataSpace_LegendStudioPlugin.js +5 -8
- package/lib/components/studio/DSLDataSpace_LegendStudioPlugin.js.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -1
- package/lib/index.js.map +1 -1
- package/lib/models/metamodels/pure/model/packageableElements/dataSpace/DSLDataSpace_DataSpace.d.ts +5 -7
- package/lib/models/metamodels/pure/model/packageableElements/dataSpace/DSLDataSpace_DataSpace.d.ts.map +1 -1
- package/lib/models/metamodels/pure/model/packageableElements/dataSpace/DSLDataSpace_DataSpace.js +4 -10
- package/lib/models/metamodels/pure/model/packageableElements/dataSpace/DSLDataSpace_DataSpace.js.map +1 -1
- package/lib/models/protocols/pure/DSLDataSpace_PureProtocolProcessorPlugin.d.ts +1 -36
- package/lib/models/protocols/pure/DSLDataSpace_PureProtocolProcessorPlugin.d.ts.map +1 -1
- package/lib/models/protocols/pure/DSLDataSpace_PureProtocolProcessorPlugin.js +9 -93
- package/lib/models/protocols/pure/DSLDataSpace_PureProtocolProcessorPlugin.js.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/dataSpace/V1_DSLDataSpace_DataSpace.d.ts +0 -3
- package/lib/models/protocols/pure/v1/model/packageableElements/dataSpace/V1_DSLDataSpace_DataSpace.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/dataSpace/V1_DSLDataSpace_DataSpace.js +0 -6
- package/lib/models/protocols/pure/v1/model/packageableElements/dataSpace/V1_DSLDataSpace_DataSpace.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/V1_DSLDataSpace_ProtocolHelper.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/V1_DSLDataSpace_ProtocolHelper.js +2 -5
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/V1_DSLDataSpace_ProtocolHelper.js.map +1 -1
- package/lib/package.json +3 -3
- package/lib/stores/DataSpaceViewerState.d.ts +8 -8
- package/lib/stores/DataSpaceViewerState.d.ts.map +1 -1
- package/lib/stores/DataSpaceViewerState.js +9 -9
- package/lib/stores/DataSpaceViewerState.js.map +1 -1
- package/lib/stores/query/DataSpaceQuerySetupState.d.ts +6 -12
- package/lib/stores/query/DataSpaceQuerySetupState.d.ts.map +1 -1
- package/lib/stores/query/DataSpaceQuerySetupState.js +10 -17
- package/lib/stores/query/DataSpaceQuerySetupState.js.map +1 -1
- package/package.json +13 -13
- package/src/components/DataSpaceViewer.tsx +18 -47
- package/src/components/query/DataSpaceQuerySetup.tsx +5 -5
- package/src/components/studio/DSLDataSpace_CodeSnippets.ts +0 -3
- package/src/components/studio/DSLDataSpace_LegendStudioPlugin.tsx +12 -9
- package/src/index.ts +2 -1
- package/src/models/metamodels/pure/model/packageableElements/dataSpace/DSLDataSpace_DataSpace.ts +14 -12
- package/src/models/protocols/pure/DSLDataSpace_PureProtocolProcessorPlugin.ts +15 -170
- package/src/models/protocols/pure/v1/model/packageableElements/dataSpace/V1_DSLDataSpace_DataSpace.ts +0 -6
- package/src/models/protocols/pure/v1/transformation/pureProtocol/V1_DSLDataSpace_ProtocolHelper.ts +2 -4
- package/src/stores/DataSpaceViewerState.ts +18 -18
- package/src/stores/query/DataSpaceQuerySetupState.ts +30 -61
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataSpaceQuerySetupState.js","sourceRoot":"","sources":["../../../src/stores/query/DataSpaceQuerySetupState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAc,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"DataSpaceQuerySetupState.js","sourceRoot":"","sources":["../../../src/stores/query/DataSpaceQuerySetupState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAc,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAEL,oBAAoB,EACpB,eAAe,EACf,wBAAwB,GACzB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEL,sBAAsB,EACtB,UAAU,EACV,WAAW,EACX,sBAAsB,GACvB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAGL,WAAW,EACX,iBAAiB,GAClB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,uDAAuD,CAAC;AACrF,OAAO,EAAE,kCAAkC,EAAE,MAAM,yEAAyE,CAAC;AAC7H,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AASlE,MAAM,kBAAkB,GAAG,6BAA6B,CAAC;AACzD,MAAM,4BAA4B,GAAG,WAAW,CAAC;AACjD,MAAM,uBAAuB,GAAG,GAAG,CAAC;AAEpC,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAC7C,aAAqB,EACrB,OAAe,EACf,UAAkB,EAClB,SAAiB,EACC,EAAE;IACpB,MAAM,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,CAAC,SAAS,EACnC,IAAI,CAAC,oBAAoB,CAAC,uBAAuB,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,EACpE,IAAI,CAAC,oBAAoB,CAAC,cAAc,CAAC,IAAI,EAC7C,MAAM,EAAE,IAAI,CACb,CACF,CAAC;YACF,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;SAC1C;IACH,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@finos/legend-extension-dsl-data-space",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "Legend extension for Data Space DSL",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"legend",
|
|
@@ -43,15 +43,15 @@
|
|
|
43
43
|
"test:watch": "jest --watch"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@finos/legend-application": "5.0.
|
|
47
|
-
"@finos/legend-art": "2.0.
|
|
48
|
-
"@finos/legend-extension-dsl-diagram": "4.1.
|
|
49
|
-
"@finos/legend-graph": "9.0.
|
|
50
|
-
"@finos/legend-model-storage": "2.0.
|
|
51
|
-
"@finos/legend-query": "3.0.
|
|
52
|
-
"@finos/legend-server-depot": "2.0.
|
|
53
|
-
"@finos/legend-shared": "4.0.
|
|
54
|
-
"@finos/legend-studio": "10.2.
|
|
46
|
+
"@finos/legend-application": "5.0.1",
|
|
47
|
+
"@finos/legend-art": "2.0.4",
|
|
48
|
+
"@finos/legend-extension-dsl-diagram": "4.1.1",
|
|
49
|
+
"@finos/legend-graph": "9.0.1",
|
|
50
|
+
"@finos/legend-model-storage": "2.0.4",
|
|
51
|
+
"@finos/legend-query": "3.0.5",
|
|
52
|
+
"@finos/legend-server-depot": "2.0.4",
|
|
53
|
+
"@finos/legend-shared": "4.0.1",
|
|
54
|
+
"@finos/legend-studio": "10.2.1",
|
|
55
55
|
"@types/react": "18.0.14",
|
|
56
56
|
"mobx": "6.6.1",
|
|
57
57
|
"mobx-react-lite": "3.4.0",
|
|
@@ -61,11 +61,11 @@
|
|
|
61
61
|
"serializr": "2.0.5"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
|
-
"@finos/legend-dev-utils": "2.0.
|
|
65
|
-
"@jest/globals": "28.1.
|
|
64
|
+
"@finos/legend-dev-utils": "2.0.3",
|
|
65
|
+
"@jest/globals": "28.1.2",
|
|
66
66
|
"cross-env": "7.0.3",
|
|
67
67
|
"eslint": "8.18.0",
|
|
68
|
-
"jest": "28.1.
|
|
68
|
+
"jest": "28.1.2",
|
|
69
69
|
"npm-run-all": "4.1.5",
|
|
70
70
|
"rimraf": "3.0.2",
|
|
71
71
|
"sass": "1.53.0",
|
|
@@ -31,7 +31,6 @@ import {
|
|
|
31
31
|
KeyIcon,
|
|
32
32
|
FlaskIcon,
|
|
33
33
|
ExternalLinkSquareIcon,
|
|
34
|
-
ExternalLinkIcon,
|
|
35
34
|
ShieldIcon,
|
|
36
35
|
TagsIcon,
|
|
37
36
|
LightBulbIcon,
|
|
@@ -42,9 +41,9 @@ import {
|
|
|
42
41
|
} from '@finos/legend-extension-dsl-diagram';
|
|
43
42
|
import {
|
|
44
43
|
DataSpaceSupportEmail,
|
|
44
|
+
type DataSpaceExecutionContext,
|
|
45
45
|
type DataSpaceSupportInfo,
|
|
46
46
|
} from '../models/metamodels/pure/model/packageableElements/dataSpace/DSLDataSpace_DataSpace.js';
|
|
47
|
-
import type { ResolvedDataSpaceExecutionContext } from '../models/protocols/pure/DSLDataSpace_PureProtocolProcessorPlugin.js';
|
|
48
47
|
import type { PackageableRuntime } from '@finos/legend-graph';
|
|
49
48
|
import {
|
|
50
49
|
type DataSpaceViewerState,
|
|
@@ -187,10 +186,10 @@ const DataSpaceModelsOverview = observer(
|
|
|
187
186
|
|
|
188
187
|
type ExecutionContextOption = {
|
|
189
188
|
label: string;
|
|
190
|
-
value:
|
|
189
|
+
value: DataSpaceExecutionContext;
|
|
191
190
|
};
|
|
192
191
|
const buildExecutionContextOption = (
|
|
193
|
-
value:
|
|
192
|
+
value: DataSpaceExecutionContext,
|
|
194
193
|
): ExecutionContextOption => ({
|
|
195
194
|
label: value.name,
|
|
196
195
|
value: value,
|
|
@@ -335,19 +334,19 @@ const DataSpaceTags = observer(
|
|
|
335
334
|
Tagged Values
|
|
336
335
|
</div>
|
|
337
336
|
{dataSpace.taggedValues.length !== 0 &&
|
|
338
|
-
dataSpace.taggedValues.map((
|
|
337
|
+
dataSpace.taggedValues.map((taggedValue) => (
|
|
339
338
|
<div
|
|
340
|
-
key={
|
|
339
|
+
key={taggedValue._UUID}
|
|
341
340
|
className="data-space__viewer__tags__section__entry"
|
|
342
341
|
>
|
|
343
342
|
<div
|
|
344
343
|
className="data-space__viewer__tags__tagged-value__tag"
|
|
345
|
-
title={`${
|
|
344
|
+
title={`${taggedValue.tag.ownerReference.value.name}.${taggedValue.tag.value.value}`}
|
|
346
345
|
>
|
|
347
|
-
{
|
|
346
|
+
{taggedValue.tag.value.value}
|
|
348
347
|
</div>
|
|
349
348
|
<div className="data-space__viewer__tags__tagged-value__value">
|
|
350
|
-
{
|
|
349
|
+
{taggedValue.value}
|
|
351
350
|
</div>
|
|
352
351
|
</div>
|
|
353
352
|
))}
|
|
@@ -362,14 +361,14 @@ const DataSpaceTags = observer(
|
|
|
362
361
|
Stereotypes
|
|
363
362
|
</div>
|
|
364
363
|
{dataSpace.stereotypes.length !== 0 &&
|
|
365
|
-
dataSpace.stereotypes.map((
|
|
364
|
+
dataSpace.stereotypes.map((stereotype) => (
|
|
366
365
|
<div
|
|
367
|
-
key={
|
|
366
|
+
key={stereotype.value._UUID}
|
|
368
367
|
className="data-space__viewer__tags__section__entry"
|
|
369
|
-
title={`${
|
|
368
|
+
title={`${stereotype.ownerReference.value.name}.${stereotype.value.value}`}
|
|
370
369
|
>
|
|
371
370
|
<div className="data-space__viewer__tags__steoreotype">
|
|
372
|
-
{
|
|
371
|
+
{stereotype.value.value}
|
|
373
372
|
</div>
|
|
374
373
|
</div>
|
|
375
374
|
))}
|
|
@@ -478,19 +477,12 @@ export const DataSpaceViewer = observer(
|
|
|
478
477
|
},
|
|
479
478
|
];
|
|
480
479
|
|
|
481
|
-
const viewDataSpaceProject = (): void =>
|
|
482
|
-
dataSpaceViewerState.viewProject?.(
|
|
483
|
-
dataSpaceViewerState.dataSpaceGroupId,
|
|
484
|
-
dataSpaceViewerState.dataSpaceArtifactId,
|
|
485
|
-
dataSpaceViewerState.dataSpaceVersionId,
|
|
486
|
-
dataSpace.path,
|
|
487
|
-
);
|
|
488
480
|
const viewProject = (): void =>
|
|
489
481
|
dataSpaceViewerState.viewProject?.(
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
482
|
+
dataSpaceViewerState.groupId,
|
|
483
|
+
dataSpaceViewerState.artifactId,
|
|
484
|
+
dataSpaceViewerState.versionId,
|
|
485
|
+
dataSpace.path,
|
|
494
486
|
);
|
|
495
487
|
|
|
496
488
|
return (
|
|
@@ -499,8 +491,8 @@ export const DataSpaceViewer = observer(
|
|
|
499
491
|
<button
|
|
500
492
|
className="data-space__viewer__path"
|
|
501
493
|
tabIndex={-1}
|
|
502
|
-
title="View
|
|
503
|
-
onClick={
|
|
494
|
+
title="View Project"
|
|
495
|
+
onClick={viewProject}
|
|
504
496
|
>
|
|
505
497
|
<div className="data-space__viewer__path__label">
|
|
506
498
|
{dataSpace.path}
|
|
@@ -509,27 +501,6 @@ export const DataSpaceViewer = observer(
|
|
|
509
501
|
<ExternalLinkSquareIcon />
|
|
510
502
|
</div>
|
|
511
503
|
</button>
|
|
512
|
-
<button
|
|
513
|
-
className="data-space__viewer__gav"
|
|
514
|
-
tabIndex={-1}
|
|
515
|
-
title="View Project"
|
|
516
|
-
onClick={viewProject}
|
|
517
|
-
>
|
|
518
|
-
<div className="data-space__viewer__gav__group-id">
|
|
519
|
-
{dataSpace.groupId}
|
|
520
|
-
</div>
|
|
521
|
-
<div className="data-space__viewer__gav__separator">:</div>
|
|
522
|
-
<div className="data-space__viewer__gav__artifact-id">
|
|
523
|
-
{dataSpace.artifactId}
|
|
524
|
-
</div>
|
|
525
|
-
<div className="data-space__viewer__gav__separator">:</div>
|
|
526
|
-
<div className="data-space__viewer__gav__version-id">
|
|
527
|
-
{dataSpace.versionId}
|
|
528
|
-
</div>
|
|
529
|
-
<div className="data-space__viewer__gav__link">
|
|
530
|
-
<ExternalLinkIcon />
|
|
531
|
-
</div>
|
|
532
|
-
</button>
|
|
533
504
|
<div
|
|
534
505
|
className={clsx('data-space__viewer__description', {
|
|
535
506
|
'data-space__viewer__description--empty': !dataSpace.description,
|
|
@@ -35,14 +35,14 @@ import { observer } from 'mobx-react-lite';
|
|
|
35
35
|
import { useEffect, useMemo, useRef, useState } from 'react';
|
|
36
36
|
import type {
|
|
37
37
|
DataSpaceQuerySetupState,
|
|
38
|
-
|
|
38
|
+
DataSpaceContext,
|
|
39
39
|
} from '../../stores/query/DataSpaceQuerySetupState.js';
|
|
40
40
|
import { DataSpaceViewer } from '../DataSpaceViewer.js';
|
|
41
41
|
|
|
42
|
-
type DataSpaceOption = { label: string; value:
|
|
43
|
-
const buildDataSpaceOption = (
|
|
44
|
-
label:
|
|
45
|
-
value:
|
|
42
|
+
type DataSpaceOption = { label: string; value: DataSpaceContext };
|
|
43
|
+
const buildDataSpaceOption = (value: DataSpaceContext): DataSpaceOption => ({
|
|
44
|
+
label: value.path,
|
|
45
|
+
value: value,
|
|
46
46
|
});
|
|
47
47
|
|
|
48
48
|
export const DataspaceQuerySetup = observer(
|
|
@@ -34,12 +34,16 @@ import {
|
|
|
34
34
|
LegendStudioPlugin,
|
|
35
35
|
} from '@finos/legend-studio';
|
|
36
36
|
import { SquareIcon } from '@finos/legend-art';
|
|
37
|
-
import
|
|
37
|
+
import {
|
|
38
|
+
PackageableElementExplicitReference,
|
|
39
|
+
stub_Mapping,
|
|
40
|
+
stub_PackageableRuntime,
|
|
41
|
+
type PackageableElement,
|
|
42
|
+
} from '@finos/legend-graph';
|
|
38
43
|
import {
|
|
39
44
|
DataSpace,
|
|
40
45
|
DataSpaceExecutionContext,
|
|
41
46
|
} from '../../models/metamodels/pure/model/packageableElements/dataSpace/DSLDataSpace_DataSpace.js';
|
|
42
|
-
import { LATEST_VERSION_ALIAS } from '@finos/legend-server-depot';
|
|
43
47
|
import { DSL_DATA_SPACE_LEGEND_STUDIO_DOCUMENTATION_KEY } from './DSLDataSpace_LegendStudioDocumentation.js';
|
|
44
48
|
import {
|
|
45
49
|
PURE_GRAMMAR_DATA_SPACE_ELEMENT_TYPE_LABEL,
|
|
@@ -106,15 +110,14 @@ export class DSLDataSpace_LegendStudioPlugin
|
|
|
106
110
|
): PackageableElement | undefined => {
|
|
107
111
|
if (type === DATA_SPACE_ELEMENT_TYPE) {
|
|
108
112
|
const dataSpace = new DataSpace(name);
|
|
109
|
-
dataSpace.groupId =
|
|
110
|
-
state.editorStore.projectConfigurationEditorState.currentProjectConfiguration.groupId;
|
|
111
|
-
dataSpace.artifactId =
|
|
112
|
-
state.editorStore.projectConfigurationEditorState.currentProjectConfiguration.artifactId;
|
|
113
|
-
dataSpace.versionId = LATEST_VERSION_ALIAS;
|
|
114
113
|
const dataSpaceExecutionContext = new DataSpaceExecutionContext();
|
|
115
114
|
dataSpaceExecutionContext.name = 'dummyContext';
|
|
116
|
-
dataSpaceExecutionContext.mapping =
|
|
117
|
-
|
|
115
|
+
dataSpaceExecutionContext.mapping =
|
|
116
|
+
PackageableElementExplicitReference.create(stub_Mapping());
|
|
117
|
+
dataSpaceExecutionContext.defaultRuntime =
|
|
118
|
+
PackageableElementExplicitReference.create(
|
|
119
|
+
stub_PackageableRuntime(),
|
|
120
|
+
);
|
|
118
121
|
dataSpace.executionContexts = [dataSpaceExecutionContext];
|
|
119
122
|
dataSpace.defaultExecutionContext = dataSpaceExecutionContext;
|
|
120
123
|
return dataSpace;
|
package/src/index.ts
CHANGED
|
@@ -23,7 +23,8 @@ export { DataSpaceViewer } from './components/DataSpaceViewer.js';
|
|
|
23
23
|
export {
|
|
24
24
|
DATA_SPACE_ELEMENT_CLASSIFIER_PATH,
|
|
25
25
|
extractDataSpaceTaxonomyNodes,
|
|
26
|
-
getResolvedDataSpace,
|
|
27
26
|
} from './models/protocols/pure/DSLDataSpace_PureProtocolProcessorPlugin.js';
|
|
28
27
|
|
|
29
28
|
export { DataSpaceViewerState } from './stores/DataSpaceViewerState.js';
|
|
29
|
+
|
|
30
|
+
export * from './graphManager/DSLDataSpace_GraphManagerHelper.js';
|
package/src/models/metamodels/pure/model/packageableElements/dataSpace/DSLDataSpace_DataSpace.ts
CHANGED
|
@@ -17,9 +17,13 @@
|
|
|
17
17
|
import { hashArray, type Hashable } from '@finos/legend-shared';
|
|
18
18
|
import {
|
|
19
19
|
PackageableElement,
|
|
20
|
+
type PackageableElementReference,
|
|
21
|
+
type Mapping,
|
|
22
|
+
type PackageableRuntime,
|
|
20
23
|
type PackageableElementVisitor,
|
|
21
24
|
} from '@finos/legend-graph';
|
|
22
25
|
import { DATA_SPACE_HASH_STRUCTURE } from '../../../../../DSLDataSpace_ModelUtils.js';
|
|
26
|
+
import type { Diagram } from '@finos/legend-extension-dsl-diagram';
|
|
23
27
|
|
|
24
28
|
export abstract class DataSpaceSupportInfo implements Hashable {
|
|
25
29
|
abstract get hashCode(): string;
|
|
@@ -42,27 +46,24 @@ export class DataSpaceSupportEmail
|
|
|
42
46
|
export class DataSpaceExecutionContext implements Hashable {
|
|
43
47
|
name!: string;
|
|
44
48
|
description?: string | undefined;
|
|
45
|
-
mapping!:
|
|
46
|
-
defaultRuntime!:
|
|
49
|
+
mapping!: PackageableElementReference<Mapping>;
|
|
50
|
+
defaultRuntime!: PackageableElementReference<PackageableRuntime>;
|
|
47
51
|
|
|
48
52
|
get hashCode(): string {
|
|
49
53
|
return hashArray([
|
|
50
54
|
DATA_SPACE_HASH_STRUCTURE.DATA_SPACE_EXECUTION_CONTEXT,
|
|
51
55
|
this.name,
|
|
52
56
|
this.description ?? '',
|
|
53
|
-
this.mapping,
|
|
54
|
-
this.defaultRuntime,
|
|
57
|
+
this.mapping.valueForSerialization ?? '',
|
|
58
|
+
this.defaultRuntime.valueForSerialization ?? '',
|
|
55
59
|
]);
|
|
56
60
|
}
|
|
57
61
|
}
|
|
58
62
|
|
|
59
63
|
export class DataSpace extends PackageableElement implements Hashable {
|
|
60
|
-
groupId!: string;
|
|
61
|
-
artifactId!: string;
|
|
62
|
-
versionId!: string;
|
|
63
64
|
executionContexts: DataSpaceExecutionContext[] = [];
|
|
64
65
|
defaultExecutionContext!: DataSpaceExecutionContext;
|
|
65
|
-
featuredDiagrams
|
|
66
|
+
featuredDiagrams?: PackageableElementReference<Diagram>[] | undefined;
|
|
66
67
|
description?: string | undefined;
|
|
67
68
|
supportInfo?: DataSpaceSupportInfo | undefined;
|
|
68
69
|
|
|
@@ -73,12 +74,13 @@ export class DataSpace extends PackageableElement implements Hashable {
|
|
|
73
74
|
this.stereotypes.map((stereotype) => stereotype.pointerHashCode),
|
|
74
75
|
),
|
|
75
76
|
hashArray(this.taggedValues),
|
|
76
|
-
this.groupId,
|
|
77
|
-
this.artifactId,
|
|
78
|
-
this.versionId,
|
|
79
77
|
hashArray(this.executionContexts),
|
|
80
78
|
this.defaultExecutionContext.name,
|
|
81
|
-
hashArray(
|
|
79
|
+
hashArray(
|
|
80
|
+
(this.featuredDiagrams ?? []).map(
|
|
81
|
+
(diagram) => diagram.valueForSerialization ?? '',
|
|
82
|
+
),
|
|
83
|
+
),
|
|
82
84
|
this.description ?? '',
|
|
83
85
|
this.supportInfo ?? '',
|
|
84
86
|
]);
|
|
@@ -23,7 +23,6 @@ import {
|
|
|
23
23
|
} from './v1/model/packageableElements/dataSpace/V1_DSLDataSpace_DataSpace.js';
|
|
24
24
|
import {
|
|
25
25
|
type PlainObject,
|
|
26
|
-
uuid,
|
|
27
26
|
guaranteeNonEmptyString,
|
|
28
27
|
guaranteeNonNullable,
|
|
29
28
|
UnsupportedOperationError,
|
|
@@ -37,17 +36,12 @@ import {
|
|
|
37
36
|
} from './v1/transformation/pureProtocol/V1_DSLDataSpace_ProtocolHelper.js';
|
|
38
37
|
import { getOwnDataSpace } from '../../../graphManager/DSLDataSpace_GraphManagerHelper.js';
|
|
39
38
|
import {
|
|
40
|
-
type DataSpaceSupportInfo,
|
|
41
39
|
DataSpace,
|
|
42
40
|
DataSpaceExecutionContext,
|
|
43
41
|
DataSpaceSupportEmail,
|
|
44
42
|
} from '../../metamodels/pure/model/packageableElements/dataSpace/DSLDataSpace_DataSpace.js';
|
|
45
43
|
import {
|
|
46
|
-
type Mapping,
|
|
47
44
|
type PackageableElement,
|
|
48
|
-
type PackageableElementReference,
|
|
49
|
-
type PackageableRuntime,
|
|
50
|
-
type PureModel,
|
|
51
45
|
type V1_ElementProtocolClassifierPathGetter,
|
|
52
46
|
type V1_ElementProtocolDeserializer,
|
|
53
47
|
type V1_ElementProtocolSerializer,
|
|
@@ -67,11 +61,9 @@ import {
|
|
|
67
61
|
PureProtocolProcessorPlugin,
|
|
68
62
|
V1_ElementBuilder,
|
|
69
63
|
V1_initPackageableElement,
|
|
70
|
-
V1_StereotypePtr,
|
|
71
64
|
V1_buildFullPath,
|
|
72
65
|
} from '@finos/legend-graph';
|
|
73
66
|
import {
|
|
74
|
-
type Diagram,
|
|
75
67
|
V1_DSLDiagram_PackageableElementPointerType,
|
|
76
68
|
getDiagram,
|
|
77
69
|
} from '@finos/legend-extension-dsl-diagram';
|
|
@@ -125,18 +117,6 @@ export class DSLDataSpace_PureProtocolProcessorPlugin extends PureProtocolProces
|
|
|
125
117
|
element.taggedValues = elementProtocol.taggedValues
|
|
126
118
|
.map((taggedValue) => V1_buildTaggedValue(taggedValue, context))
|
|
127
119
|
.filter(isNonNullable);
|
|
128
|
-
element.groupId = guaranteeNonEmptyString(
|
|
129
|
-
elementProtocol.groupId,
|
|
130
|
-
`Data space 'groupId' field is missing or empty`,
|
|
131
|
-
);
|
|
132
|
-
element.artifactId = guaranteeNonEmptyString(
|
|
133
|
-
elementProtocol.artifactId,
|
|
134
|
-
`Data space 'artifactId' field is missing or empty`,
|
|
135
|
-
);
|
|
136
|
-
element.versionId = guaranteeNonEmptyString(
|
|
137
|
-
elementProtocol.versionId,
|
|
138
|
-
`Data space 'versionId' field is missing or empty`,
|
|
139
|
-
);
|
|
140
120
|
element.executionContexts = guaranteeNonNullable(
|
|
141
121
|
elementProtocol.executionContexts,
|
|
142
122
|
`Data space 'executionContexts' field is missing`,
|
|
@@ -147,14 +127,13 @@ export class DSLDataSpace_PureProtocolProcessorPlugin extends PureProtocolProces
|
|
|
147
127
|
`Data space execution context 'name' field is missing or empty`,
|
|
148
128
|
);
|
|
149
129
|
execContext.description = contextProtocol.description;
|
|
150
|
-
execContext.mapping =
|
|
151
|
-
contextProtocol.mapping,
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
).path;
|
|
130
|
+
execContext.mapping = PackageableElementExplicitReference.create(
|
|
131
|
+
context.graph.getMapping(contextProtocol.mapping.path),
|
|
132
|
+
);
|
|
133
|
+
execContext.defaultRuntime =
|
|
134
|
+
PackageableElementExplicitReference.create(
|
|
135
|
+
context.graph.getRuntime(contextProtocol.defaultRuntime.path),
|
|
136
|
+
);
|
|
158
137
|
return execContext;
|
|
159
138
|
});
|
|
160
139
|
element.defaultExecutionContext = guaranteeNonNullable(
|
|
@@ -171,7 +150,10 @@ export class DSLDataSpace_PureProtocolProcessorPlugin extends PureProtocolProces
|
|
|
171
150
|
element.description = elementProtocol.description;
|
|
172
151
|
if (elementProtocol.featuredDiagrams) {
|
|
173
152
|
element.featuredDiagrams = elementProtocol.featuredDiagrams.map(
|
|
174
|
-
(pointer) =>
|
|
153
|
+
(pointer) =>
|
|
154
|
+
PackageableElementExplicitReference.create(
|
|
155
|
+
getDiagram(pointer.path, context.graph),
|
|
156
|
+
),
|
|
175
157
|
);
|
|
176
158
|
}
|
|
177
159
|
if (elementProtocol.supportInfo) {
|
|
@@ -254,9 +236,6 @@ export class DSLDataSpace_PureProtocolProcessorPlugin extends PureProtocolProces
|
|
|
254
236
|
protocol.taggedValues = metamodel.taggedValues.map(
|
|
255
237
|
V1_transformTaggedValue,
|
|
256
238
|
);
|
|
257
|
-
protocol.groupId = metamodel.groupId;
|
|
258
|
-
protocol.artifactId = metamodel.artifactId;
|
|
259
|
-
protocol.versionId = metamodel.versionId;
|
|
260
239
|
protocol.executionContexts = metamodel.executionContexts.map(
|
|
261
240
|
(execContext) => {
|
|
262
241
|
const contextProtocol = new V1_DataSpaceExecutionContext();
|
|
@@ -264,11 +243,11 @@ export class DSLDataSpace_PureProtocolProcessorPlugin extends PureProtocolProces
|
|
|
264
243
|
contextProtocol.description = execContext.description;
|
|
265
244
|
contextProtocol.mapping = new V1_PackageableElementPointer(
|
|
266
245
|
PackageableElementPointerType.MAPPING,
|
|
267
|
-
execContext.mapping,
|
|
246
|
+
execContext.mapping.valueForSerialization ?? '',
|
|
268
247
|
);
|
|
269
248
|
contextProtocol.defaultRuntime = new V1_PackageableElementPointer(
|
|
270
249
|
PackageableElementPointerType.RUNTIME,
|
|
271
|
-
execContext.defaultRuntime,
|
|
250
|
+
execContext.defaultRuntime.valueForSerialization ?? '',
|
|
272
251
|
);
|
|
273
252
|
return contextProtocol;
|
|
274
253
|
},
|
|
@@ -276,11 +255,11 @@ export class DSLDataSpace_PureProtocolProcessorPlugin extends PureProtocolProces
|
|
|
276
255
|
protocol.defaultExecutionContext =
|
|
277
256
|
metamodel.defaultExecutionContext.name;
|
|
278
257
|
protocol.description = metamodel.description;
|
|
279
|
-
protocol.featuredDiagrams = metamodel.featuredDiagrams
|
|
258
|
+
protocol.featuredDiagrams = metamodel.featuredDiagrams?.map(
|
|
280
259
|
(diagramPath) =>
|
|
281
260
|
new V1_PackageableElementPointer(
|
|
282
261
|
V1_DSLDiagram_PackageableElementPointerType,
|
|
283
|
-
diagramPath,
|
|
262
|
+
diagramPath.valueForSerialization ?? '',
|
|
284
263
|
),
|
|
285
264
|
);
|
|
286
265
|
if (metamodel.supportInfo) {
|
|
@@ -295,7 +274,6 @@ export class DSLDataSpace_PureProtocolProcessorPlugin extends PureProtocolProces
|
|
|
295
274
|
);
|
|
296
275
|
}
|
|
297
276
|
}
|
|
298
|
-
// protocol.supportInfo = metamodel.supportInfo;
|
|
299
277
|
return protocol;
|
|
300
278
|
}
|
|
301
279
|
return undefined;
|
|
@@ -304,139 +282,6 @@ export class DSLDataSpace_PureProtocolProcessorPlugin extends PureProtocolProces
|
|
|
304
282
|
}
|
|
305
283
|
}
|
|
306
284
|
|
|
307
|
-
export class ResolvedDataSpaceExecutionContext {
|
|
308
|
-
name!: string;
|
|
309
|
-
description?: string | undefined;
|
|
310
|
-
mapping!: PackageableElementReference<Mapping>;
|
|
311
|
-
defaultRuntime!: PackageableElementReference<PackageableRuntime>;
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
/**
|
|
315
|
-
* When we actually need to use the data space, we want to resolve all of its
|
|
316
|
-
* element pointers to actual reference, hence this model.
|
|
317
|
-
*/
|
|
318
|
-
export class ResolvedDataSpace {
|
|
319
|
-
taggedValues: {
|
|
320
|
-
uuid: string;
|
|
321
|
-
profile: string;
|
|
322
|
-
tag: string;
|
|
323
|
-
value: string;
|
|
324
|
-
}[] = [];
|
|
325
|
-
stereotypes: { uuid: string; profile: string; stereotype: string }[] = [];
|
|
326
|
-
path!: string;
|
|
327
|
-
groupId!: string;
|
|
328
|
-
artifactId!: string;
|
|
329
|
-
versionId!: string;
|
|
330
|
-
executionContexts: ResolvedDataSpaceExecutionContext[] = [];
|
|
331
|
-
defaultExecutionContext!: ResolvedDataSpaceExecutionContext;
|
|
332
|
-
featuredDiagrams: PackageableElementReference<Diagram>[] = [];
|
|
333
|
-
description?: string | undefined;
|
|
334
|
-
supportInfo?: DataSpaceSupportInfo | undefined;
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
export const getResolvedDataSpace = (
|
|
338
|
-
json: PlainObject<V1_DataSpace>,
|
|
339
|
-
graph: PureModel,
|
|
340
|
-
): ResolvedDataSpace => {
|
|
341
|
-
const dataSpace = new ResolvedDataSpace();
|
|
342
|
-
if (json._type === V1_DATA_SPACE_ELEMENT_PROTOCOL_TYPE) {
|
|
343
|
-
const protocol = deserialize(V1_dataSpaceModelSchema, json);
|
|
344
|
-
dataSpace.path = protocol.path;
|
|
345
|
-
if (Array.isArray(json.taggedValues)) {
|
|
346
|
-
dataSpace.taggedValues = (
|
|
347
|
-
json.taggedValues as PlainObject<V1_TaggedValue>[]
|
|
348
|
-
)
|
|
349
|
-
.map((taggedValueJson) =>
|
|
350
|
-
deserialize(V1_taggedValueSchema, taggedValueJson),
|
|
351
|
-
)
|
|
352
|
-
.map((taggedValue) => ({
|
|
353
|
-
uuid: uuid(),
|
|
354
|
-
profile: taggedValue.tag.profile,
|
|
355
|
-
tag: taggedValue.tag.value,
|
|
356
|
-
value: taggedValue.value,
|
|
357
|
-
}));
|
|
358
|
-
}
|
|
359
|
-
if (Array.isArray(json.stereotypes)) {
|
|
360
|
-
dataSpace.stereotypes = (
|
|
361
|
-
json.stereotypes as PlainObject<V1_StereotypePtr>[]
|
|
362
|
-
)
|
|
363
|
-
.map((stereotypePtrJson) =>
|
|
364
|
-
deserialize(V1_StereotypePtr, stereotypePtrJson),
|
|
365
|
-
)
|
|
366
|
-
.map((stereotypePtr) => ({
|
|
367
|
-
uuid: uuid(),
|
|
368
|
-
profile: stereotypePtr.profile,
|
|
369
|
-
stereotype: stereotypePtr.value,
|
|
370
|
-
}));
|
|
371
|
-
}
|
|
372
|
-
dataSpace.groupId = guaranteeNonEmptyString(
|
|
373
|
-
protocol.groupId,
|
|
374
|
-
`Data space 'groupId' field is missing or empty`,
|
|
375
|
-
);
|
|
376
|
-
dataSpace.artifactId = guaranteeNonEmptyString(
|
|
377
|
-
protocol.artifactId,
|
|
378
|
-
`Data space 'artifactId' field is missing or empty`,
|
|
379
|
-
);
|
|
380
|
-
dataSpace.versionId = guaranteeNonEmptyString(
|
|
381
|
-
protocol.versionId,
|
|
382
|
-
`Data space 'versionId' field is missing or empty`,
|
|
383
|
-
);
|
|
384
|
-
dataSpace.executionContexts = protocol.executionContexts.map(
|
|
385
|
-
(contextProtocol) => {
|
|
386
|
-
const context = new ResolvedDataSpaceExecutionContext();
|
|
387
|
-
context.name = guaranteeNonEmptyString(
|
|
388
|
-
contextProtocol.name,
|
|
389
|
-
`Data space execution context 'name' field is missing or empty`,
|
|
390
|
-
);
|
|
391
|
-
context.description = contextProtocol.description;
|
|
392
|
-
context.mapping = PackageableElementExplicitReference.create(
|
|
393
|
-
graph.getMapping(contextProtocol.mapping.path),
|
|
394
|
-
);
|
|
395
|
-
context.defaultRuntime = PackageableElementExplicitReference.create(
|
|
396
|
-
graph.getRuntime(contextProtocol.defaultRuntime.path),
|
|
397
|
-
);
|
|
398
|
-
return context;
|
|
399
|
-
},
|
|
400
|
-
);
|
|
401
|
-
dataSpace.defaultExecutionContext = guaranteeNonNullable(
|
|
402
|
-
dataSpace.executionContexts.find(
|
|
403
|
-
(context) =>
|
|
404
|
-
context.name ===
|
|
405
|
-
guaranteeNonEmptyString(
|
|
406
|
-
protocol.defaultExecutionContext,
|
|
407
|
-
`Data space 'defaultExecutionContext' field is missing or empty`,
|
|
408
|
-
),
|
|
409
|
-
),
|
|
410
|
-
`Can't find default execution context '${protocol.defaultExecutionContext}'`,
|
|
411
|
-
);
|
|
412
|
-
dataSpace.description = protocol.description;
|
|
413
|
-
if (protocol.featuredDiagrams) {
|
|
414
|
-
dataSpace.featuredDiagrams = protocol.featuredDiagrams.map((pointer) =>
|
|
415
|
-
PackageableElementExplicitReference.create(
|
|
416
|
-
getDiagram(pointer.path, graph),
|
|
417
|
-
),
|
|
418
|
-
);
|
|
419
|
-
}
|
|
420
|
-
if (protocol.supportInfo) {
|
|
421
|
-
if (protocol.supportInfo instanceof V1_DataSpaceSupportEmail) {
|
|
422
|
-
const supportEmail = new DataSpaceSupportEmail();
|
|
423
|
-
supportEmail.address = guaranteeNonEmptyString(
|
|
424
|
-
protocol.supportInfo.address,
|
|
425
|
-
`Data space support email 'address' field is missing or empty`,
|
|
426
|
-
);
|
|
427
|
-
dataSpace.supportInfo = supportEmail;
|
|
428
|
-
} else {
|
|
429
|
-
throw new UnsupportedOperationError(
|
|
430
|
-
`Can't build data space support info`,
|
|
431
|
-
protocol.supportInfo,
|
|
432
|
-
);
|
|
433
|
-
}
|
|
434
|
-
}
|
|
435
|
-
return dataSpace;
|
|
436
|
-
}
|
|
437
|
-
throw new UnsupportedOperationError(`Can't resolve data space`, json);
|
|
438
|
-
};
|
|
439
|
-
|
|
440
285
|
export const extractDataSpaceTaxonomyNodes = (
|
|
441
286
|
json: PlainObject<V1_DataSpace>,
|
|
442
287
|
): string[] => {
|
|
@@ -62,9 +62,6 @@ export class V1_DataSpaceExecutionContext implements Hashable {
|
|
|
62
62
|
export class V1_DataSpace extends V1_PackageableElement implements Hashable {
|
|
63
63
|
stereotypes: V1_StereotypePtr[] = [];
|
|
64
64
|
taggedValues: V1_TaggedValue[] = [];
|
|
65
|
-
groupId!: string;
|
|
66
|
-
artifactId!: string;
|
|
67
|
-
versionId!: string;
|
|
68
65
|
executionContexts!: V1_DataSpaceExecutionContext[];
|
|
69
66
|
defaultExecutionContext!: string;
|
|
70
67
|
featuredDiagrams?: V1_PackageableElementPointer[] | undefined;
|
|
@@ -76,9 +73,6 @@ export class V1_DataSpace extends V1_PackageableElement implements Hashable {
|
|
|
76
73
|
DATA_SPACE_HASH_STRUCTURE.DATA_SPACE,
|
|
77
74
|
hashArray(this.stereotypes),
|
|
78
75
|
hashArray(this.taggedValues),
|
|
79
|
-
this.groupId,
|
|
80
|
-
this.artifactId,
|
|
81
|
-
this.versionId,
|
|
82
76
|
hashArray(this.executionContexts),
|
|
83
77
|
this.defaultExecutionContext,
|
|
84
78
|
hashArray((this.featuredDiagrams ?? []).map((pointer) => pointer.path)),
|