@finos/legend-extension-dsl-data-space 10.4.253 → 10.4.255
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/DataSpaceLegendAISchema.d.ts.map +1 -1
- package/lib/components/DataSpaceLegendAISchema.js +6 -1
- package/lib/components/DataSpaceLegendAISchema.js.map +1 -1
- package/lib/components/DataSpaceSupportPanel.d.ts.map +1 -1
- package/lib/components/DataSpaceSupportPanel.js +13 -1
- package/lib/components/DataSpaceSupportPanel.js.map +1 -1
- package/lib/graph/DSL_DataSpace_HashUtils.d.ts +4 -0
- package/lib/graph/DSL_DataSpace_HashUtils.d.ts.map +1 -1
- package/lib/graph/DSL_DataSpace_HashUtils.js +4 -0
- package/lib/graph/DSL_DataSpace_HashUtils.js.map +1 -1
- package/lib/graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.d.ts +24 -0
- package/lib/graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.d.ts.map +1 -1
- package/lib/graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.js +53 -0
- package/lib/graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.js.map +1 -1
- package/lib/graph-manager/action/changeDetection/DSL_DataSpace_ObserverHelper.d.ts.map +1 -1
- package/lib/graph-manager/action/changeDetection/DSL_DataSpace_ObserverHelper.js +55 -1
- package/lib/graph-manager/action/changeDetection/DSL_DataSpace_ObserverHelper.js.map +1 -1
- package/lib/graph-manager/protocol/pure/DSL_DataSpace_PureProtocolProcessorPlugin.d.ts +4 -1
- package/lib/graph-manager/protocol/pure/DSL_DataSpace_PureProtocolProcessorPlugin.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/DSL_DataSpace_PureProtocolProcessorPlugin.js +82 -2
- package/lib/graph-manager/protocol/pure/DSL_DataSpace_PureProtocolProcessorPlugin.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_DSL_DataSpace_PureGraphManagerExtension.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_DSL_DataSpace_PureGraphManagerExtension.js +5 -1
- package/lib/graph-manager/protocol/pure/v1/V1_DSL_DataSpace_PureGraphManagerExtension.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_DSL_DataSpace_SystemModels.json +8 -1
- package/lib/graph-manager/protocol/pure/v1/model/packageableElements/dataSpace/V1_DSL_DataSpace_DataSpace.d.ts +24 -0
- package/lib/graph-manager/protocol/pure/v1/model/packageableElements/dataSpace/V1_DSL_DataSpace_DataSpace.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/model/packageableElements/dataSpace/V1_DSL_DataSpace_DataSpace.js +53 -0
- package/lib/graph-manager/protocol/pure/v1/model/packageableElements/dataSpace/V1_DSL_DataSpace_DataSpace.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataSpace_ProtocolHelper.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataSpace_ProtocolHelper.js +29 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataSpace_ProtocolHelper.js.map +1 -1
- package/lib/index.css +1 -1
- package/lib/package.json +1 -1
- package/package.json +14 -14
- package/src/components/DataSpaceLegendAISchema.ts +5 -0
- package/src/components/DataSpaceSupportPanel.tsx +125 -0
- package/src/graph/DSL_DataSpace_HashUtils.ts +4 -0
- package/src/graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.ts +64 -0
- package/src/graph-manager/action/changeDetection/DSL_DataSpace_ObserverHelper.ts +75 -0
- package/src/graph-manager/protocol/pure/DSL_DataSpace_PureProtocolProcessorPlugin.ts +125 -0
- package/src/graph-manager/protocol/pure/v1/V1_DSL_DataSpace_PureGraphManagerExtension.ts +8 -0
- package/src/graph-manager/protocol/pure/v1/V1_DSL_DataSpace_SystemModels.json +8 -1
- package/src/graph-manager/protocol/pure/v1/model/packageableElements/dataSpace/V1_DSL_DataSpace_DataSpace.ts +64 -0
- package/src/graph-manager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataSpace_ProtocolHelper.ts +41 -0
|
@@ -55,6 +55,7 @@ import {
|
|
|
55
55
|
import {
|
|
56
56
|
DataSpaceSupportEmail,
|
|
57
57
|
DataSpaceSupportCombinedInfo,
|
|
58
|
+
DataSpaceSupportFullInfo,
|
|
58
59
|
} from '../graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.js';
|
|
59
60
|
|
|
60
61
|
const MAX_QUERY_SCAN_LENGTH = 5_000;
|
|
@@ -392,6 +393,10 @@ export function extractMetadataFromDataSpaceAnalysis(
|
|
|
392
393
|
supportInfoText = result.supportInfo.address;
|
|
393
394
|
} else if (result.supportInfo instanceof DataSpaceSupportCombinedInfo) {
|
|
394
395
|
supportInfoText = (result.supportInfo.emails ?? []).join(', ');
|
|
396
|
+
} else if (result.supportInfo instanceof DataSpaceSupportFullInfo) {
|
|
397
|
+
supportInfoText = (result.supportInfo.emails ?? [])
|
|
398
|
+
.map((email) => email.address)
|
|
399
|
+
.join(', ');
|
|
395
400
|
}
|
|
396
401
|
|
|
397
402
|
const metadata: LegendAIProductMetadata = {
|
|
@@ -25,8 +25,10 @@ import {
|
|
|
25
25
|
SupportIcon,
|
|
26
26
|
} from '@finos/legend-art';
|
|
27
27
|
import {
|
|
28
|
+
type DataSpaceLink,
|
|
28
29
|
DataSpaceSupportCombinedInfo,
|
|
29
30
|
DataSpaceSupportEmail,
|
|
31
|
+
DataSpaceSupportFullInfo,
|
|
30
32
|
} from '../graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.js';
|
|
31
33
|
import { type DataSpaceViewerState } from '../stores/DataSpaceViewerState.js';
|
|
32
34
|
|
|
@@ -160,6 +162,122 @@ const DataSpaceSupportCombinedInfoViewer = observer(
|
|
|
160
162
|
},
|
|
161
163
|
);
|
|
162
164
|
|
|
165
|
+
const DataSpaceSupportLinkEntry = observer(
|
|
166
|
+
(props: {
|
|
167
|
+
label: string;
|
|
168
|
+
link: DataSpaceLink | undefined;
|
|
169
|
+
iconClassName?: string | undefined;
|
|
170
|
+
icon: React.ReactNode;
|
|
171
|
+
}) => {
|
|
172
|
+
const { label, link, iconClassName, icon } = props;
|
|
173
|
+
|
|
174
|
+
return (
|
|
175
|
+
<div className="data-space__viewer__support__entry" title={label}>
|
|
176
|
+
<div
|
|
177
|
+
className={`data-space__viewer__support__entry__icon${
|
|
178
|
+
iconClassName ? ` ${iconClassName}` : ''
|
|
179
|
+
}`}
|
|
180
|
+
>
|
|
181
|
+
{icon}
|
|
182
|
+
</div>
|
|
183
|
+
{link ? (
|
|
184
|
+
<a
|
|
185
|
+
href={link.url}
|
|
186
|
+
className="data-space__viewer__support__entry__content"
|
|
187
|
+
>
|
|
188
|
+
{link.label ?? link.url}
|
|
189
|
+
</a>
|
|
190
|
+
) : (
|
|
191
|
+
<div className="data-space__viewer__support__entry__content">
|
|
192
|
+
(not specified)
|
|
193
|
+
</div>
|
|
194
|
+
)}
|
|
195
|
+
</div>
|
|
196
|
+
);
|
|
197
|
+
},
|
|
198
|
+
);
|
|
199
|
+
|
|
200
|
+
const DataSpaceSupportFullInfoViewer = observer(
|
|
201
|
+
(props: {
|
|
202
|
+
dataSpaceViewerState: DataSpaceViewerState;
|
|
203
|
+
supportInfo: DataSpaceSupportFullInfo;
|
|
204
|
+
}) => {
|
|
205
|
+
const { supportInfo } = props;
|
|
206
|
+
|
|
207
|
+
return (
|
|
208
|
+
<>
|
|
209
|
+
<div className="data-space__viewer__support__section">
|
|
210
|
+
<DataSpaceSupportLinkEntry
|
|
211
|
+
label="Website"
|
|
212
|
+
link={supportInfo.website}
|
|
213
|
+
iconClassName="data-space__viewer__support__entry__icon--website"
|
|
214
|
+
icon={<HomeIcon />}
|
|
215
|
+
/>
|
|
216
|
+
<DataSpaceSupportLinkEntry
|
|
217
|
+
label="Documentation"
|
|
218
|
+
link={supportInfo.documentation}
|
|
219
|
+
icon={<DocumentationIcon />}
|
|
220
|
+
/>
|
|
221
|
+
<DataSpaceSupportLinkEntry
|
|
222
|
+
label="Support"
|
|
223
|
+
link={supportInfo.supportUrl}
|
|
224
|
+
iconClassName="data-space__viewer__support__entry__icon--support"
|
|
225
|
+
icon={<SupportIcon />}
|
|
226
|
+
/>
|
|
227
|
+
<DataSpaceSupportLinkEntry
|
|
228
|
+
label="FAQ"
|
|
229
|
+
link={supportInfo.faqUrl}
|
|
230
|
+
iconClassName="data-space__viewer__support__entry__icon--faq"
|
|
231
|
+
icon={<QuestionAnswerIcon />}
|
|
232
|
+
/>
|
|
233
|
+
</div>
|
|
234
|
+
{Boolean(supportInfo.emails?.length) && (
|
|
235
|
+
<div className="data-space__viewer__support__section">
|
|
236
|
+
{supportInfo.emails?.map((email) => (
|
|
237
|
+
<div
|
|
238
|
+
key={email.address}
|
|
239
|
+
className="data-space__viewer__support__entry"
|
|
240
|
+
title={email.title}
|
|
241
|
+
>
|
|
242
|
+
<div className="data-space__viewer__support__entry__icon">
|
|
243
|
+
<EnvelopeIcon />
|
|
244
|
+
</div>
|
|
245
|
+
<a
|
|
246
|
+
href={`mailto:${email.address}`}
|
|
247
|
+
className="data-space__viewer__support__entry__content"
|
|
248
|
+
>
|
|
249
|
+
{email.title} - {email.address}
|
|
250
|
+
</a>
|
|
251
|
+
</div>
|
|
252
|
+
))}
|
|
253
|
+
</div>
|
|
254
|
+
)}
|
|
255
|
+
{Boolean(supportInfo.expertise?.length) && (
|
|
256
|
+
<div className="data-space__viewer__support__section">
|
|
257
|
+
{supportInfo.expertise?.map((expertise, idx) => (
|
|
258
|
+
<div
|
|
259
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
260
|
+
key={idx}
|
|
261
|
+
className="data-space__viewer__support__entry"
|
|
262
|
+
title="Expertise"
|
|
263
|
+
>
|
|
264
|
+
<div className="data-space__viewer__support__entry__icon">
|
|
265
|
+
<SparkleIcon />
|
|
266
|
+
</div>
|
|
267
|
+
<div className="data-space__viewer__support__entry__content">
|
|
268
|
+
{expertise.description ?? '(not specified)'}
|
|
269
|
+
{Boolean(expertise.expertIds?.length) &&
|
|
270
|
+
` (${expertise.expertIds?.join(', ')})`}
|
|
271
|
+
</div>
|
|
272
|
+
</div>
|
|
273
|
+
))}
|
|
274
|
+
</div>
|
|
275
|
+
)}
|
|
276
|
+
</>
|
|
277
|
+
);
|
|
278
|
+
},
|
|
279
|
+
);
|
|
280
|
+
|
|
163
281
|
const DataSpaceSupport = observer(
|
|
164
282
|
(props: { dataSpaceViewerState: DataSpaceViewerState }) => {
|
|
165
283
|
const { dataSpaceViewerState } = props;
|
|
@@ -182,6 +300,13 @@ const DataSpaceSupport = observer(
|
|
|
182
300
|
supportInfo={supportInfo}
|
|
183
301
|
/>
|
|
184
302
|
);
|
|
303
|
+
} else if (supportInfo instanceof DataSpaceSupportFullInfo) {
|
|
304
|
+
return (
|
|
305
|
+
<DataSpaceSupportFullInfoViewer
|
|
306
|
+
dataSpaceViewerState={dataSpaceViewerState}
|
|
307
|
+
supportInfo={supportInfo}
|
|
308
|
+
/>
|
|
309
|
+
);
|
|
185
310
|
}
|
|
186
311
|
return (
|
|
187
312
|
<div className="data-space__viewer__panel__content__placeholder">
|
|
@@ -25,5 +25,9 @@ export enum DATA_SPACE_HASH_STRUCTURE {
|
|
|
25
25
|
DATA_SPACE_DIAGRAM = 'DATA_SPACE_DIAGRAM',
|
|
26
26
|
DATA_SPACE_SUPPORT_COMBINED_INFO = 'DATA_SPACE_SUPPORT_COMBINED_INFO',
|
|
27
27
|
DATA_SPACE_SUPPORT_EMAIL = 'DATA_SPACE_SUPPORT_EMAIL',
|
|
28
|
+
DATA_SPACE_SUPPORT_FULL_INFO = 'DATA_SPACE_SUPPORT_FULL_INFO',
|
|
29
|
+
DATA_SPACE_LINK = 'DATA_SPACE_LINK',
|
|
30
|
+
DATA_SPACE_EMAIL = 'DATA_SPACE_EMAIL',
|
|
31
|
+
DATA_SPACE_EXPERTISE = 'DATA_SPACE_EXPERTISE',
|
|
28
32
|
MAPPING_INCLUDE_DATASPACE = 'MAPPING_INCLUDE_DATASPACE',
|
|
29
33
|
}
|
package/src/graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.ts
CHANGED
|
@@ -201,6 +201,70 @@ export class DataSpaceSupportCombinedInfo
|
|
|
201
201
|
}
|
|
202
202
|
}
|
|
203
203
|
|
|
204
|
+
export class DataSpaceLink implements Hashable {
|
|
205
|
+
label?: string | undefined;
|
|
206
|
+
url!: string;
|
|
207
|
+
|
|
208
|
+
get hashCode(): string {
|
|
209
|
+
return hashArray([
|
|
210
|
+
DATA_SPACE_HASH_STRUCTURE.DATA_SPACE_LINK,
|
|
211
|
+
this.label ?? '',
|
|
212
|
+
this.url,
|
|
213
|
+
]);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
export class DataSpaceEmail implements Hashable {
|
|
218
|
+
title!: string;
|
|
219
|
+
address!: string;
|
|
220
|
+
|
|
221
|
+
get hashCode(): string {
|
|
222
|
+
return hashArray([
|
|
223
|
+
DATA_SPACE_HASH_STRUCTURE.DATA_SPACE_EMAIL,
|
|
224
|
+
this.title,
|
|
225
|
+
this.address,
|
|
226
|
+
]);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
export class DataSpaceExpertise implements Hashable {
|
|
231
|
+
description?: string | undefined;
|
|
232
|
+
expertIds?: string[] | undefined;
|
|
233
|
+
|
|
234
|
+
get hashCode(): string {
|
|
235
|
+
return hashArray([
|
|
236
|
+
DATA_SPACE_HASH_STRUCTURE.DATA_SPACE_EXPERTISE,
|
|
237
|
+
this.description ?? '',
|
|
238
|
+
hashArray(this.expertIds ?? []),
|
|
239
|
+
]);
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
export class DataSpaceSupportFullInfo
|
|
244
|
+
extends DataSpaceSupportInfo
|
|
245
|
+
implements Hashable
|
|
246
|
+
{
|
|
247
|
+
documentation?: DataSpaceLink | undefined;
|
|
248
|
+
website?: DataSpaceLink | undefined;
|
|
249
|
+
faqUrl?: DataSpaceLink | undefined;
|
|
250
|
+
supportUrl?: DataSpaceLink | undefined;
|
|
251
|
+
emails?: DataSpaceEmail[] | undefined;
|
|
252
|
+
expertise?: DataSpaceExpertise[] | undefined;
|
|
253
|
+
|
|
254
|
+
get hashCode(): string {
|
|
255
|
+
return hashArray([
|
|
256
|
+
DATA_SPACE_HASH_STRUCTURE.DATA_SPACE_SUPPORT_FULL_INFO,
|
|
257
|
+
this.documentationUrl ?? '',
|
|
258
|
+
this.documentation ?? '',
|
|
259
|
+
this.website ?? '',
|
|
260
|
+
this.faqUrl ?? '',
|
|
261
|
+
this.supportUrl ?? '',
|
|
262
|
+
hashArray(this.emails ?? []),
|
|
263
|
+
hashArray(this.expertise ?? []),
|
|
264
|
+
]);
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
|
|
204
268
|
export class DataSpace extends PackageableElement implements Hashable {
|
|
205
269
|
title?: string | undefined;
|
|
206
270
|
description?: string | undefined;
|
|
@@ -33,10 +33,14 @@ import {
|
|
|
33
33
|
type DataSpaceExecutionContext,
|
|
34
34
|
type DataSpaceMappingProvider,
|
|
35
35
|
type DataSpaceSupportInfo,
|
|
36
|
+
type DataSpaceEmail,
|
|
37
|
+
type DataSpaceExpertise,
|
|
38
|
+
type DataSpaceLink,
|
|
36
39
|
DataSpaceExecutableTemplate,
|
|
37
40
|
DataSpacePackageableElementExecutable,
|
|
38
41
|
DataSpaceSupportCombinedInfo,
|
|
39
42
|
DataSpaceSupportEmail,
|
|
43
|
+
DataSpaceSupportFullInfo,
|
|
40
44
|
} from '../../../graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.js';
|
|
41
45
|
|
|
42
46
|
export const observe_DataSpaceMappingProvider = skipObserved(
|
|
@@ -203,6 +207,75 @@ const observe_DataSpaceSupportCombinedInfo = skipObserved(
|
|
|
203
207
|
},
|
|
204
208
|
);
|
|
205
209
|
|
|
210
|
+
const observe_DataSpaceLink = skipObserved(
|
|
211
|
+
(metamodel: DataSpaceLink): DataSpaceLink => {
|
|
212
|
+
makeObservable(metamodel, {
|
|
213
|
+
label: observable,
|
|
214
|
+
url: observable,
|
|
215
|
+
hashCode: computed,
|
|
216
|
+
});
|
|
217
|
+
|
|
218
|
+
return metamodel;
|
|
219
|
+
},
|
|
220
|
+
);
|
|
221
|
+
|
|
222
|
+
const observe_DataSpaceEmail = skipObserved(
|
|
223
|
+
(metamodel: DataSpaceEmail): DataSpaceEmail => {
|
|
224
|
+
makeObservable(metamodel, {
|
|
225
|
+
title: observable,
|
|
226
|
+
address: observable,
|
|
227
|
+
hashCode: computed,
|
|
228
|
+
});
|
|
229
|
+
|
|
230
|
+
return metamodel;
|
|
231
|
+
},
|
|
232
|
+
);
|
|
233
|
+
|
|
234
|
+
const observe_DataSpaceExpertise = skipObserved(
|
|
235
|
+
(metamodel: DataSpaceExpertise): DataSpaceExpertise => {
|
|
236
|
+
makeObservable(metamodel, {
|
|
237
|
+
description: observable,
|
|
238
|
+
expertIds: observable,
|
|
239
|
+
hashCode: computed,
|
|
240
|
+
});
|
|
241
|
+
|
|
242
|
+
return metamodel;
|
|
243
|
+
},
|
|
244
|
+
);
|
|
245
|
+
|
|
246
|
+
const observe_DataSpaceSupportFullInfo = skipObserved(
|
|
247
|
+
(metamodel: DataSpaceSupportFullInfo): DataSpaceSupportFullInfo => {
|
|
248
|
+
observe_Abstract_DataSpaceSupportInfo(metamodel);
|
|
249
|
+
|
|
250
|
+
makeObservable(metamodel, {
|
|
251
|
+
documentation: observable,
|
|
252
|
+
website: observable,
|
|
253
|
+
faqUrl: observable,
|
|
254
|
+
supportUrl: observable,
|
|
255
|
+
emails: observable,
|
|
256
|
+
expertise: observable,
|
|
257
|
+
hashCode: computed,
|
|
258
|
+
});
|
|
259
|
+
|
|
260
|
+
if (metamodel.documentation) {
|
|
261
|
+
observe_DataSpaceLink(metamodel.documentation);
|
|
262
|
+
}
|
|
263
|
+
if (metamodel.website) {
|
|
264
|
+
observe_DataSpaceLink(metamodel.website);
|
|
265
|
+
}
|
|
266
|
+
if (metamodel.faqUrl) {
|
|
267
|
+
observe_DataSpaceLink(metamodel.faqUrl);
|
|
268
|
+
}
|
|
269
|
+
if (metamodel.supportUrl) {
|
|
270
|
+
observe_DataSpaceLink(metamodel.supportUrl);
|
|
271
|
+
}
|
|
272
|
+
metamodel.emails?.forEach(observe_DataSpaceEmail);
|
|
273
|
+
metamodel.expertise?.forEach(observe_DataSpaceExpertise);
|
|
274
|
+
|
|
275
|
+
return metamodel;
|
|
276
|
+
},
|
|
277
|
+
);
|
|
278
|
+
|
|
206
279
|
export const observe_DataSpaceSupportInfo = (
|
|
207
280
|
metamodel: DataSpaceSupportInfo,
|
|
208
281
|
): DataSpaceSupportInfo => {
|
|
@@ -210,6 +283,8 @@ export const observe_DataSpaceSupportInfo = (
|
|
|
210
283
|
return observe_DataSpaceSupportEmail(metamodel);
|
|
211
284
|
} else if (metamodel instanceof DataSpaceSupportCombinedInfo) {
|
|
212
285
|
return observe_DataSpaceSupportCombinedInfo(metamodel);
|
|
286
|
+
} else if (metamodel instanceof DataSpaceSupportFullInfo) {
|
|
287
|
+
return observe_DataSpaceSupportFullInfo(metamodel);
|
|
213
288
|
}
|
|
214
289
|
return metamodel;
|
|
215
290
|
};
|
|
@@ -23,8 +23,12 @@ import {
|
|
|
23
23
|
V1_DataSpaceExecutionContext,
|
|
24
24
|
V1_DataSpaceMappingProvider,
|
|
25
25
|
V1_DataSpacePackageableElementExecutable,
|
|
26
|
+
V1_DataSpaceEmail,
|
|
27
|
+
V1_DataSpaceExpertise,
|
|
28
|
+
V1_DataSpaceLink,
|
|
26
29
|
V1_DataSpaceSupportCombinedInfo,
|
|
27
30
|
V1_DataSpaceSupportEmail,
|
|
31
|
+
V1_DataSpaceSupportFullInfo,
|
|
28
32
|
V1_DataSpaceTemplateExecutable,
|
|
29
33
|
} from './v1/model/packageableElements/dataSpace/V1_DSL_DataSpace_DataSpace.js';
|
|
30
34
|
import {
|
|
@@ -53,8 +57,12 @@ import {
|
|
|
53
57
|
DataSpace,
|
|
54
58
|
DataSpaceExecutionContext,
|
|
55
59
|
DataSpaceMappingProvider,
|
|
60
|
+
DataSpaceEmail,
|
|
61
|
+
DataSpaceExpertise,
|
|
62
|
+
DataSpaceLink,
|
|
56
63
|
DataSpaceSupportCombinedInfo,
|
|
57
64
|
DataSpaceSupportEmail,
|
|
65
|
+
DataSpaceSupportFullInfo,
|
|
58
66
|
DataSpaceDiagram,
|
|
59
67
|
DataSpaceElementPointer,
|
|
60
68
|
DataSpaceExecutableTemplate,
|
|
@@ -126,6 +134,111 @@ export const DATA_SPACE_ELEMENT_CLASSIFIER_PATH =
|
|
|
126
134
|
|
|
127
135
|
export const DATA_SPACE_ELEMENT_POINTER = 'DATASPACE';
|
|
128
136
|
|
|
137
|
+
const V1_buildDataSpaceLink = (protocol: V1_DataSpaceLink): DataSpaceLink => {
|
|
138
|
+
const link = new DataSpaceLink();
|
|
139
|
+
link.label = protocol.label;
|
|
140
|
+
link.url = guaranteeNonEmptyString(
|
|
141
|
+
protocol.url,
|
|
142
|
+
`Data product support link 'url' field is missing or empty`,
|
|
143
|
+
);
|
|
144
|
+
return link;
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
const V1_buildDataSpaceEmail = (
|
|
148
|
+
protocol: V1_DataSpaceEmail,
|
|
149
|
+
): DataSpaceEmail => {
|
|
150
|
+
const email = new DataSpaceEmail();
|
|
151
|
+
email.title = guaranteeNonEmptyString(
|
|
152
|
+
protocol.title,
|
|
153
|
+
`Data product support email 'title' field is missing or empty`,
|
|
154
|
+
);
|
|
155
|
+
email.address = guaranteeNonEmptyString(
|
|
156
|
+
protocol.address,
|
|
157
|
+
`Data product support email 'address' field is missing or empty`,
|
|
158
|
+
);
|
|
159
|
+
return email;
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
const V1_buildDataSpaceExpertise = (
|
|
163
|
+
protocol: V1_DataSpaceExpertise,
|
|
164
|
+
): DataSpaceExpertise => {
|
|
165
|
+
const expertise = new DataSpaceExpertise();
|
|
166
|
+
expertise.description = protocol.description;
|
|
167
|
+
expertise.expertIds = protocol.expertIds;
|
|
168
|
+
return expertise;
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
export const V1_buildDataSpaceSupportFullInfo = (
|
|
172
|
+
protocol: V1_DataSpaceSupportFullInfo,
|
|
173
|
+
): DataSpaceSupportFullInfo => {
|
|
174
|
+
const fullInfo = new DataSpaceSupportFullInfo();
|
|
175
|
+
fullInfo.documentationUrl = protocol.documentationUrl;
|
|
176
|
+
fullInfo.documentation = protocol.documentation
|
|
177
|
+
? V1_buildDataSpaceLink(protocol.documentation)
|
|
178
|
+
: undefined;
|
|
179
|
+
fullInfo.website = protocol.website
|
|
180
|
+
? V1_buildDataSpaceLink(protocol.website)
|
|
181
|
+
: undefined;
|
|
182
|
+
fullInfo.faqUrl = protocol.faqUrl
|
|
183
|
+
? V1_buildDataSpaceLink(protocol.faqUrl)
|
|
184
|
+
: undefined;
|
|
185
|
+
fullInfo.supportUrl = protocol.supportUrl
|
|
186
|
+
? V1_buildDataSpaceLink(protocol.supportUrl)
|
|
187
|
+
: undefined;
|
|
188
|
+
fullInfo.emails = protocol.emails?.map(V1_buildDataSpaceEmail);
|
|
189
|
+
fullInfo.expertise = protocol.expertise?.map(V1_buildDataSpaceExpertise);
|
|
190
|
+
return fullInfo;
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
const V1_transformDataSpaceLink = (
|
|
194
|
+
metamodel: DataSpaceLink,
|
|
195
|
+
): V1_DataSpaceLink => {
|
|
196
|
+
const link = new V1_DataSpaceLink();
|
|
197
|
+
link.label = metamodel.label;
|
|
198
|
+
link.url = metamodel.url;
|
|
199
|
+
return link;
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
const V1_transformDataSpaceEmail = (
|
|
203
|
+
metamodel: DataSpaceEmail,
|
|
204
|
+
): V1_DataSpaceEmail => {
|
|
205
|
+
const email = new V1_DataSpaceEmail();
|
|
206
|
+
email.title = metamodel.title;
|
|
207
|
+
email.address = metamodel.address;
|
|
208
|
+
return email;
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
const V1_transformDataSpaceExpertise = (
|
|
212
|
+
metamodel: DataSpaceExpertise,
|
|
213
|
+
): V1_DataSpaceExpertise => {
|
|
214
|
+
const expertise = new V1_DataSpaceExpertise();
|
|
215
|
+
expertise.description = metamodel.description;
|
|
216
|
+
expertise.expertIds = metamodel.expertIds;
|
|
217
|
+
return expertise;
|
|
218
|
+
};
|
|
219
|
+
|
|
220
|
+
export const V1_transformDataSpaceSupportFullInfo = (
|
|
221
|
+
metamodel: DataSpaceSupportFullInfo,
|
|
222
|
+
): V1_DataSpaceSupportFullInfo => {
|
|
223
|
+
const fullInfo = new V1_DataSpaceSupportFullInfo();
|
|
224
|
+
fullInfo.documentationUrl = metamodel.documentationUrl;
|
|
225
|
+
fullInfo.documentation = metamodel.documentation
|
|
226
|
+
? V1_transformDataSpaceLink(metamodel.documentation)
|
|
227
|
+
: undefined;
|
|
228
|
+
fullInfo.website = metamodel.website
|
|
229
|
+
? V1_transformDataSpaceLink(metamodel.website)
|
|
230
|
+
: undefined;
|
|
231
|
+
fullInfo.faqUrl = metamodel.faqUrl
|
|
232
|
+
? V1_transformDataSpaceLink(metamodel.faqUrl)
|
|
233
|
+
: undefined;
|
|
234
|
+
fullInfo.supportUrl = metamodel.supportUrl
|
|
235
|
+
? V1_transformDataSpaceLink(metamodel.supportUrl)
|
|
236
|
+
: undefined;
|
|
237
|
+
fullInfo.emails = metamodel.emails?.map(V1_transformDataSpaceEmail);
|
|
238
|
+
fullInfo.expertise = metamodel.expertise?.map(V1_transformDataSpaceExpertise);
|
|
239
|
+
return fullInfo;
|
|
240
|
+
};
|
|
241
|
+
|
|
129
242
|
export class DSL_DataSpace_PureProtocolProcessorPlugin
|
|
130
243
|
extends PureProtocolProcessorPlugin
|
|
131
244
|
implements DSL_Mapping_PureProtocolProcessorPlugin_Extension
|
|
@@ -366,6 +479,12 @@ export class DSL_DataSpace_PureProtocolProcessorPlugin
|
|
|
366
479
|
combinedInfo.faqUrl = elementProtocol.supportInfo.faqUrl;
|
|
367
480
|
combinedInfo.supportUrl = elementProtocol.supportInfo.supportUrl;
|
|
368
481
|
element.supportInfo = combinedInfo;
|
|
482
|
+
} else if (
|
|
483
|
+
elementProtocol.supportInfo instanceof V1_DataSpaceSupportFullInfo
|
|
484
|
+
) {
|
|
485
|
+
element.supportInfo = V1_buildDataSpaceSupportFullInfo(
|
|
486
|
+
elementProtocol.supportInfo,
|
|
487
|
+
);
|
|
369
488
|
} else {
|
|
370
489
|
throw new UnsupportedOperationError(
|
|
371
490
|
`Can't build data space support info`,
|
|
@@ -593,6 +712,12 @@ export class DSL_DataSpace_PureProtocolProcessorPlugin
|
|
|
593
712
|
combinedInfo.faqUrl = metamodel.supportInfo.faqUrl;
|
|
594
713
|
combinedInfo.supportUrl = metamodel.supportInfo.supportUrl;
|
|
595
714
|
protocol.supportInfo = combinedInfo;
|
|
715
|
+
} else if (
|
|
716
|
+
metamodel.supportInfo instanceof DataSpaceSupportFullInfo
|
|
717
|
+
) {
|
|
718
|
+
protocol.supportInfo = V1_transformDataSpaceSupportFullInfo(
|
|
719
|
+
metamodel.supportInfo,
|
|
720
|
+
);
|
|
596
721
|
} else {
|
|
597
722
|
throw new UnsupportedOperationError(
|
|
598
723
|
`Can't transform data space support info`,
|
|
@@ -83,8 +83,10 @@ import {
|
|
|
83
83
|
V1_DataSpaceMappingProvider,
|
|
84
84
|
V1_DataSpaceSupportCombinedInfo,
|
|
85
85
|
V1_DataSpaceSupportEmail,
|
|
86
|
+
V1_DataSpaceSupportFullInfo,
|
|
86
87
|
V1_DataSpaceTemplateExecutable,
|
|
87
88
|
} from '../../../../graph-manager/protocol/pure/v1/model/packageableElements/dataSpace/V1_DSL_DataSpace_DataSpace.js';
|
|
89
|
+
import { V1_buildDataSpaceSupportFullInfo } from '../DSL_DataSpace_PureProtocolProcessorPlugin.js';
|
|
88
90
|
import {
|
|
89
91
|
DataSpaceAnalysisResult,
|
|
90
92
|
DataSpaceExecutableAnalysisResult,
|
|
@@ -607,6 +609,12 @@ export class V1_DSL_DataSpace_PureGraphManagerExtension extends DSL_DataSpace_Pu
|
|
|
607
609
|
combinedInfo.supportUrl = analysisResult.supportInfo.supportUrl;
|
|
608
610
|
combinedInfo.emails = analysisResult.supportInfo.emails;
|
|
609
611
|
result.supportInfo = combinedInfo;
|
|
612
|
+
} else if (
|
|
613
|
+
analysisResult.supportInfo instanceof V1_DataSpaceSupportFullInfo
|
|
614
|
+
) {
|
|
615
|
+
result.supportInfo = V1_buildDataSpaceSupportFullInfo(
|
|
616
|
+
analysisResult.supportInfo,
|
|
617
|
+
);
|
|
610
618
|
}
|
|
611
619
|
// NOTE: we will relax the check and not throw here for unknown support info type
|
|
612
620
|
}
|
|
@@ -17,7 +17,14 @@
|
|
|
17
17
|
"name": "DataSpaceInfo",
|
|
18
18
|
"package": "meta::pure::metamodel::dataSpace::profiles",
|
|
19
19
|
"stereotypes": ["Verified", "InDevelopment", "External"],
|
|
20
|
-
"tags": [
|
|
20
|
+
"tags": [
|
|
21
|
+
"deprecationNotice",
|
|
22
|
+
"relatedDataSpaces",
|
|
23
|
+
"topics",
|
|
24
|
+
"vendorLicenseStatus",
|
|
25
|
+
"vendorRelationshipOwner",
|
|
26
|
+
"vendorProviderName"
|
|
27
|
+
]
|
|
21
28
|
}
|
|
22
29
|
]
|
|
23
30
|
}
|
|
@@ -186,6 +186,70 @@ export class V1_DataSpaceSupportCombinedInfo
|
|
|
186
186
|
}
|
|
187
187
|
}
|
|
188
188
|
|
|
189
|
+
export class V1_DataSpaceLink implements Hashable {
|
|
190
|
+
label?: string | undefined;
|
|
191
|
+
url!: string;
|
|
192
|
+
|
|
193
|
+
get hashCode(): string {
|
|
194
|
+
return hashArray([
|
|
195
|
+
DATA_SPACE_HASH_STRUCTURE.DATA_SPACE_LINK,
|
|
196
|
+
this.label ?? '',
|
|
197
|
+
this.url,
|
|
198
|
+
]);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
export class V1_DataSpaceEmail implements Hashable {
|
|
203
|
+
title!: string;
|
|
204
|
+
address!: string;
|
|
205
|
+
|
|
206
|
+
get hashCode(): string {
|
|
207
|
+
return hashArray([
|
|
208
|
+
DATA_SPACE_HASH_STRUCTURE.DATA_SPACE_EMAIL,
|
|
209
|
+
this.title,
|
|
210
|
+
this.address,
|
|
211
|
+
]);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
export class V1_DataSpaceExpertise implements Hashable {
|
|
216
|
+
description?: string | undefined;
|
|
217
|
+
expertIds?: string[] | undefined;
|
|
218
|
+
|
|
219
|
+
get hashCode(): string {
|
|
220
|
+
return hashArray([
|
|
221
|
+
DATA_SPACE_HASH_STRUCTURE.DATA_SPACE_EXPERTISE,
|
|
222
|
+
this.description ?? '',
|
|
223
|
+
hashArray(this.expertIds ?? []),
|
|
224
|
+
]);
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
export class V1_DataSpaceSupportFullInfo
|
|
229
|
+
extends V1_DataSpaceSupportInfo
|
|
230
|
+
implements Hashable
|
|
231
|
+
{
|
|
232
|
+
documentation?: V1_DataSpaceLink | undefined;
|
|
233
|
+
website?: V1_DataSpaceLink | undefined;
|
|
234
|
+
faqUrl?: V1_DataSpaceLink | undefined;
|
|
235
|
+
supportUrl?: V1_DataSpaceLink | undefined;
|
|
236
|
+
emails?: V1_DataSpaceEmail[] | undefined;
|
|
237
|
+
expertise?: V1_DataSpaceExpertise[] | undefined;
|
|
238
|
+
|
|
239
|
+
get hashCode(): string {
|
|
240
|
+
return hashArray([
|
|
241
|
+
DATA_SPACE_HASH_STRUCTURE.DATA_SPACE_SUPPORT_FULL_INFO,
|
|
242
|
+
this.documentationUrl ?? '',
|
|
243
|
+
this.documentation ?? '',
|
|
244
|
+
this.website ?? '',
|
|
245
|
+
this.faqUrl ?? '',
|
|
246
|
+
this.supportUrl ?? '',
|
|
247
|
+
hashArray(this.emails ?? []),
|
|
248
|
+
hashArray(this.expertise ?? []),
|
|
249
|
+
]);
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
|
|
189
253
|
export class V1_DataSpace extends V1_PackageableElement implements Hashable {
|
|
190
254
|
stereotypes: V1_StereotypePtr[] = [];
|
|
191
255
|
taggedValues: V1_TaggedValue[] = [];
|
|
@@ -54,6 +54,10 @@ import {
|
|
|
54
54
|
V1_DataSpaceMappingProvider,
|
|
55
55
|
V1_DataSpaceSupportEmail,
|
|
56
56
|
V1_DataSpaceSupportCombinedInfo,
|
|
57
|
+
V1_DataSpaceSupportFullInfo,
|
|
58
|
+
V1_DataSpaceLink,
|
|
59
|
+
V1_DataSpaceEmail,
|
|
60
|
+
V1_DataSpaceExpertise,
|
|
57
61
|
V1_DataSpaceDiagram,
|
|
58
62
|
V1_DataSpaceElementPointer,
|
|
59
63
|
V1_DataSpaceTemplateExecutable,
|
|
@@ -64,6 +68,7 @@ import { V1_MappingIncludeDataSpace } from '../../model/packageableElements/mapp
|
|
|
64
68
|
export const V1_DATA_SPACE_ELEMENT_PROTOCOL_TYPE = 'dataSpace';
|
|
65
69
|
const V1_DATA_SPACE_SUPPORT_EMAIL_TYPE = 'email';
|
|
66
70
|
const V1_DATA_SPACE_SUPPORT_COMBINED_INFO_TYPE = 'combined';
|
|
71
|
+
const V1_DATA_SPACE_SUPPORT_FULL_INFO_TYPE = 'full';
|
|
67
72
|
const V1_DATA_SPACE_PACKAGEABLE_ELEMENT_EXECUTABLE =
|
|
68
73
|
'dataSpacePackageableElementExecutable';
|
|
69
74
|
const V1_DATA_SPACE_TEMPLATE_EXECUTABLE = 'dataSpaceTemplateExecutable';
|
|
@@ -116,6 +121,38 @@ const V1_dataSpaceSupportCombinedInfoModelSchema = createModelSchema(
|
|
|
116
121
|
},
|
|
117
122
|
);
|
|
118
123
|
|
|
124
|
+
const V1_dataSpaceLinkModelSchema = createModelSchema(V1_DataSpaceLink, {
|
|
125
|
+
label: optional(primitive()),
|
|
126
|
+
url: primitive(),
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
const V1_dataSpaceEmailModelSchema = createModelSchema(V1_DataSpaceEmail, {
|
|
130
|
+
address: primitive(),
|
|
131
|
+
title: primitive(),
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
const V1_dataSpaceExpertiseModelSchema = createModelSchema(
|
|
135
|
+
V1_DataSpaceExpertise,
|
|
136
|
+
{
|
|
137
|
+
description: optional(primitive()),
|
|
138
|
+
expertIds: optional(list(primitive())),
|
|
139
|
+
},
|
|
140
|
+
);
|
|
141
|
+
|
|
142
|
+
const V1_dataSpaceSupportFullInfoModelSchema = createModelSchema(
|
|
143
|
+
V1_DataSpaceSupportFullInfo,
|
|
144
|
+
{
|
|
145
|
+
_type: usingConstantValueSchema(V1_DATA_SPACE_SUPPORT_FULL_INFO_TYPE),
|
|
146
|
+
documentation: optional(usingModelSchema(V1_dataSpaceLinkModelSchema)),
|
|
147
|
+
documentationUrl: optional(primitive()),
|
|
148
|
+
emails: optionalCustomListWithSchema(V1_dataSpaceEmailModelSchema),
|
|
149
|
+
expertise: optionalCustomListWithSchema(V1_dataSpaceExpertiseModelSchema),
|
|
150
|
+
faqUrl: optional(usingModelSchema(V1_dataSpaceLinkModelSchema)),
|
|
151
|
+
supportUrl: optional(usingModelSchema(V1_dataSpaceLinkModelSchema)),
|
|
152
|
+
website: optional(usingModelSchema(V1_dataSpaceLinkModelSchema)),
|
|
153
|
+
},
|
|
154
|
+
);
|
|
155
|
+
|
|
119
156
|
const V1_serializeSupportInfo = (
|
|
120
157
|
protocol: V1_DataSpaceSupportInfo | undefined,
|
|
121
158
|
): PlainObject<V1_DataSpaceSupportInfo> | typeof SKIP => {
|
|
@@ -126,6 +163,8 @@ const V1_serializeSupportInfo = (
|
|
|
126
163
|
return serialize(V1_dataSpaceSupportEmailModelSchema, protocol);
|
|
127
164
|
} else if (protocol instanceof V1_DataSpaceSupportCombinedInfo) {
|
|
128
165
|
return serialize(V1_dataSpaceSupportCombinedInfoModelSchema, protocol);
|
|
166
|
+
} else if (protocol instanceof V1_DataSpaceSupportFullInfo) {
|
|
167
|
+
return serialize(V1_dataSpaceSupportFullInfoModelSchema, protocol);
|
|
129
168
|
}
|
|
130
169
|
throw new UnsupportedOperationError(`Can't serialize support info`, protocol);
|
|
131
170
|
};
|
|
@@ -141,6 +180,8 @@ export const V1_deserializeSupportInfo = (
|
|
|
141
180
|
return deserialize(V1_dataSpaceSupportEmailModelSchema, json);
|
|
142
181
|
case V1_DATA_SPACE_SUPPORT_COMBINED_INFO_TYPE:
|
|
143
182
|
return deserialize(V1_dataSpaceSupportCombinedInfoModelSchema, json);
|
|
183
|
+
case V1_DATA_SPACE_SUPPORT_FULL_INFO_TYPE:
|
|
184
|
+
return deserialize(V1_dataSpaceSupportFullInfoModelSchema, json);
|
|
144
185
|
default: {
|
|
145
186
|
throw new UnsupportedOperationError(
|
|
146
187
|
`Can't deserialize support info of type '${json._type}'`,
|