@finos/legend-extension-dsl-data-quality 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/LICENSE +201 -0
- package/README.md +1 -0
- package/lib/components/DSL_DataQuality_ClassElementDriver.d.ts +46 -0
- package/lib/components/DSL_DataQuality_ClassElementDriver.d.ts.map +1 -0
- package/lib/components/DSL_DataQuality_ClassElementDriver.js +116 -0
- package/lib/components/DSL_DataQuality_ClassElementDriver.js.map +1 -0
- package/lib/components/DSL_DataQuality_LegendStudioApplicationPlugin.d.ts +30 -0
- package/lib/components/DSL_DataQuality_LegendStudioApplicationPlugin.d.ts.map +1 -0
- package/lib/components/DSL_DataQuality_LegendStudioApplicationPlugin.js +161 -0
- package/lib/components/DSL_DataQuality_LegendStudioApplicationPlugin.js.map +1 -0
- package/lib/components/DSL_DataQuality_LegendStudioPlugin_Extension.d.ts +25 -0
- package/lib/components/DSL_DataQuality_LegendStudioPlugin_Extension.d.ts.map +1 -0
- package/lib/components/DSL_DataQuality_LegendStudioPlugin_Extension.js +2 -0
- package/lib/components/DSL_DataQuality_LegendStudioPlugin_Extension.js.map +1 -0
- package/lib/components/DSL_DataQuality_ServiceElementDriver.d.ts +27 -0
- package/lib/components/DSL_DataQuality_ServiceElementDriver.d.ts.map +1 -0
- package/lib/components/DSL_DataQuality_ServiceElementDriver.js +41 -0
- package/lib/components/DSL_DataQuality_ServiceElementDriver.js.map +1 -0
- package/lib/components/DSL_NewDataQualityClassValidationElement.d.ts +19 -0
- package/lib/components/DSL_NewDataQualityClassValidationElement.d.ts.map +1 -0
- package/lib/components/DSL_NewDataQualityClassValidationElement.js +64 -0
- package/lib/components/DSL_NewDataQualityClassValidationElement.js.map +1 -0
- package/lib/components/DSL_NewDataQualityServiceValidationElement.d.ts +19 -0
- package/lib/components/DSL_NewDataQualityServiceValidationElement.d.ts.map +1 -0
- package/lib/components/DSL_NewDataQualityServiceValidationElement.js +41 -0
- package/lib/components/DSL_NewDataQualityServiceValidationElement.js.map +1 -0
- package/lib/components/DataQualityClassValidationEditor.d.ts +19 -0
- package/lib/components/DataQualityClassValidationEditor.d.ts.map +1 -0
- package/lib/components/DataQualityClassValidationEditor.js +29 -0
- package/lib/components/DataQualityClassValidationEditor.js.map +1 -0
- package/lib/components/DataQualityConstraintsSelection.d.ts +39 -0
- package/lib/components/DataQualityConstraintsSelection.d.ts.map +1 -0
- package/lib/components/DataQualityConstraintsSelection.js +133 -0
- package/lib/components/DataQualityConstraintsSelection.js.map +1 -0
- package/lib/components/DataQualityDataSpaceBuilder.d.ts +22 -0
- package/lib/components/DataQualityDataSpaceBuilder.d.ts.map +1 -0
- package/lib/components/DataQualityDataSpaceBuilder.js +101 -0
- package/lib/components/DataQualityDataSpaceBuilder.js.map +1 -0
- package/lib/components/DataQualityExplorerPanel.d.ts +29 -0
- package/lib/components/DataQualityExplorerPanel.d.ts.map +1 -0
- package/lib/components/DataQualityExplorerPanel.js +185 -0
- package/lib/components/DataQualityExplorerPanel.js.map +1 -0
- package/lib/components/DataQualityFilterPanel.d.ts +24 -0
- package/lib/components/DataQualityFilterPanel.d.ts.map +1 -0
- package/lib/components/DataQualityFilterPanel.js +32 -0
- package/lib/components/DataQualityFilterPanel.js.map +1 -0
- package/lib/components/DataQualityMappingAndRuntimeBuilder.d.ts +22 -0
- package/lib/components/DataQualityMappingAndRuntimeBuilder.d.ts.map +1 -0
- package/lib/components/DataQualityMappingAndRuntimeBuilder.js +98 -0
- package/lib/components/DataQualityMappingAndRuntimeBuilder.js.map +1 -0
- package/lib/components/DataQualityResultPanel.d.ts +22 -0
- package/lib/components/DataQualityResultPanel.d.ts.map +1 -0
- package/lib/components/DataQualityResultPanel.js +110 -0
- package/lib/components/DataQualityResultPanel.js.map +1 -0
- package/lib/components/DataQualityResultValues.d.ts +24 -0
- package/lib/components/DataQualityResultValues.d.ts.map +1 -0
- package/lib/components/DataQualityResultValues.js +31 -0
- package/lib/components/DataQualityResultValues.js.map +1 -0
- package/lib/components/DataQualityServiceValidationEditor.d.ts +19 -0
- package/lib/components/DataQualityServiceValidationEditor.d.ts.map +1 -0
- package/lib/components/DataQualityServiceValidationEditor.js +29 -0
- package/lib/components/DataQualityServiceValidationEditor.js.map +1 -0
- package/lib/components/DataQualitySideBar.d.ts +40 -0
- package/lib/components/DataQualitySideBar.d.ts.map +1 -0
- package/lib/components/DataQualitySideBar.js +78 -0
- package/lib/components/DataQualitySideBar.js.map +1 -0
- package/lib/components/DataQualityStructuralValidationsPanel.d.ts +22 -0
- package/lib/components/DataQualityStructuralValidationsPanel.d.ts.map +1 -0
- package/lib/components/DataQualityStructuralValidationsPanel.js +50 -0
- package/lib/components/DataQualityStructuralValidationsPanel.js.map +1 -0
- package/lib/components/DataQualityTabs.d.ts +22 -0
- package/lib/components/DataQualityTabs.d.ts.map +1 -0
- package/lib/components/DataQualityTabs.js +58 -0
- package/lib/components/DataQualityTabs.js.map +1 -0
- package/lib/components/DataQualityValidationEditor.d.ts +23 -0
- package/lib/components/DataQualityValidationEditor.d.ts.map +1 -0
- package/lib/components/DataQualityValidationEditor.js +24 -0
- package/lib/components/DataQualityValidationEditor.js.map +1 -0
- package/lib/components/constants/DataQualityConstants.d.ts +24 -0
- package/lib/components/constants/DataQualityConstants.d.ts.map +1 -0
- package/lib/components/constants/DataQualityConstants.js +25 -0
- package/lib/components/constants/DataQualityConstants.js.map +1 -0
- package/lib/components/index.d.ts +19 -0
- package/lib/components/index.d.ts.map +1 -0
- package/lib/components/index.js +19 -0
- package/lib/components/index.js.map +1 -0
- package/lib/components/states/ConstraintState.d.ts +30 -0
- package/lib/components/states/ConstraintState.d.ts.map +1 -0
- package/lib/components/states/ConstraintState.js +55 -0
- package/lib/components/states/ConstraintState.js.map +1 -0
- package/lib/components/states/DataQualityClassValidationState.d.ts +43 -0
- package/lib/components/states/DataQualityClassValidationState.d.ts.map +1 -0
- package/lib/components/states/DataQualityClassValidationState.js +162 -0
- package/lib/components/states/DataQualityClassValidationState.js.map +1 -0
- package/lib/components/states/DataQualityGraphFetchTreeState.d.ts +34 -0
- package/lib/components/states/DataQualityGraphFetchTreeState.d.ts.map +1 -0
- package/lib/components/states/DataQualityGraphFetchTreeState.js +70 -0
- package/lib/components/states/DataQualityGraphFetchTreeState.js.map +1 -0
- package/lib/components/states/DataQualityQueryBuilderState.d.ts +19 -0
- package/lib/components/states/DataQualityQueryBuilderState.d.ts.map +1 -0
- package/lib/components/states/DataQualityQueryBuilderState.js +19 -0
- package/lib/components/states/DataQualityQueryBuilderState.js.map +1 -0
- package/lib/components/states/DataQualityResultState.d.ts +44 -0
- package/lib/components/states/DataQualityResultState.d.ts.map +1 -0
- package/lib/components/states/DataQualityResultState.js +154 -0
- package/lib/components/states/DataQualityResultState.js.map +1 -0
- package/lib/components/states/DataQualityServiceValidationState.d.ts +25 -0
- package/lib/components/states/DataQualityServiceValidationState.d.ts.map +1 -0
- package/lib/components/states/DataQualityServiceValidationState.js +33 -0
- package/lib/components/states/DataQualityServiceValidationState.js.map +1 -0
- package/lib/components/states/DataQualityState.d.ts +67 -0
- package/lib/components/states/DataQualityState.d.ts.map +1 -0
- package/lib/components/states/DataQualityState.js +204 -0
- package/lib/components/states/DataQualityState.js.map +1 -0
- package/lib/components/utils/DataQualityGraphFetchTreeUtil.d.ts +51 -0
- package/lib/components/utils/DataQualityGraphFetchTreeUtil.d.ts.map +1 -0
- package/lib/components/utils/DataQualityGraphFetchTreeUtil.js +321 -0
- package/lib/components/utils/DataQualityGraphFetchTreeUtil.js.map +1 -0
- package/lib/graph/metamodel/DSL_DataQuality_HashUtils.d.ts +29 -0
- package/lib/graph/metamodel/DSL_DataQuality_HashUtils.d.ts.map +1 -0
- package/lib/graph/metamodel/DSL_DataQuality_HashUtils.js +30 -0
- package/lib/graph/metamodel/DSL_DataQuality_HashUtils.js.map +1 -0
- package/lib/graph/metamodel/DSL_DataQuality_PureGraphPlugin.d.ts +22 -0
- package/lib/graph/metamodel/DSL_DataQuality_PureGraphPlugin.d.ts.map +1 -0
- package/lib/graph/metamodel/DSL_DataQuality_PureGraphPlugin.js +31 -0
- package/lib/graph/metamodel/DSL_DataQuality_PureGraphPlugin.js.map +1 -0
- package/lib/graph/metamodel/pure/packageableElements/data-quality/DataQualityGraphFetchTree.d.ts +26 -0
- package/lib/graph/metamodel/pure/packageableElements/data-quality/DataQualityGraphFetchTree.d.ts.map +1 -0
- package/lib/graph/metamodel/pure/packageableElements/data-quality/DataQualityGraphFetchTree.js +44 -0
- package/lib/graph/metamodel/pure/packageableElements/data-quality/DataQualityGraphFetchTree.js.map +1 -0
- package/lib/graph/metamodel/pure/packageableElements/data-quality/DataQualityValidationConfiguration.d.ts +47 -0
- package/lib/graph/metamodel/pure/packageableElements/data-quality/DataQualityValidationConfiguration.d.ts.map +1 -0
- package/lib/graph/metamodel/pure/packageableElements/data-quality/DataQualityValidationConfiguration.js +75 -0
- package/lib/graph/metamodel/pure/packageableElements/data-quality/DataQualityValidationConfiguration.js.map +1 -0
- package/lib/graph-manager/DSL_DataQuality_GraphManagerHelper.d.ts +20 -0
- package/lib/graph-manager/DSL_DataQuality_GraphManagerHelper.d.ts.map +1 -0
- package/lib/graph-manager/DSL_DataQuality_GraphManagerHelper.js +20 -0
- package/lib/graph-manager/DSL_DataQuality_GraphManagerHelper.js.map +1 -0
- package/lib/graph-manager/DSL_DataQuality_GraphManagerPreset.d.ts +20 -0
- package/lib/graph-manager/DSL_DataQuality_GraphManagerPreset.d.ts.map +1 -0
- package/lib/graph-manager/DSL_DataQuality_GraphManagerPreset.js +30 -0
- package/lib/graph-manager/DSL_DataQuality_GraphManagerPreset.js.map +1 -0
- package/lib/graph-manager/DSL_DataQuality_GraphModifierHelper.d.ts +26 -0
- package/lib/graph-manager/DSL_DataQuality_GraphModifierHelper.d.ts.map +1 -0
- package/lib/graph-manager/DSL_DataQuality_GraphModifierHelper.js +57 -0
- package/lib/graph-manager/DSL_DataQuality_GraphModifierHelper.js.map +1 -0
- package/lib/graph-manager/DSL_DataQuality_PureGraphManagerPlugin.d.ts +7 -0
- package/lib/graph-manager/DSL_DataQuality_PureGraphManagerPlugin.d.ts.map +1 -0
- package/lib/graph-manager/DSL_DataQuality_PureGraphManagerPlugin.js +42 -0
- package/lib/graph-manager/DSL_DataQuality_PureGraphManagerPlugin.js.map +1 -0
- package/lib/graph-manager/action/changeDetection/DSL_DataQuality_ObserverHelper.d.ts +24 -0
- package/lib/graph-manager/action/changeDetection/DSL_DataQuality_ObserverHelper.d.ts.map +1 -0
- package/lib/graph-manager/action/changeDetection/DSL_DataQuality_ObserverHelper.js +98 -0
- package/lib/graph-manager/action/changeDetection/DSL_DataQuality_ObserverHelper.js.map +1 -0
- package/lib/graph-manager/index.d.ts +19 -0
- package/lib/graph-manager/index.d.ts.map +1 -0
- package/lib/graph-manager/index.js +19 -0
- package/lib/graph-manager/index.js.map +1 -0
- package/lib/graph-manager/protocol/pure/DSL_DataQuality_PureGraphManagerExtension.d.ts +27 -0
- package/lib/graph-manager/protocol/pure/DSL_DataQuality_PureGraphManagerExtension.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/DSL_DataQuality_PureGraphManagerExtension.js +21 -0
- package/lib/graph-manager/protocol/pure/DSL_DataQuality_PureGraphManagerExtension.js.map +1 -0
- package/lib/graph-manager/protocol/pure/DSL_DataQuality_PureProtocolProcessorPlugin.d.ts +25 -0
- package/lib/graph-manager/protocol/pure/DSL_DataQuality_PureProtocolProcessorPlugin.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/DSL_DataQuality_PureProtocolProcessorPlugin.js +140 -0
- package/lib/graph-manager/protocol/pure/DSL_DataQuality_PureProtocolProcessorPlugin.js.map +1 -0
- package/lib/graph-manager/protocol/pure/DSL_DataQuality_buildGraphManagerExtension.d.ts +18 -0
- package/lib/graph-manager/protocol/pure/DSL_DataQuality_buildGraphManagerExtension.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/DSL_DataQuality_buildGraphManagerExtension.js +20 -0
- package/lib/graph-manager/protocol/pure/DSL_DataQuality_buildGraphManagerExtension.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_DSL_Data_Quality_PureGraphManagerExtension.d.ts +41 -0
- package/lib/graph-manager/protocol/pure/v1/V1_DSL_Data_Quality_PureGraphManagerExtension.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_DSL_Data_Quality_PureGraphManagerExtension.js +95 -0
- package/lib/graph-manager/protocol/pure/v1/V1_DSL_Data_Quality_PureGraphManagerExtension.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_DataQualityConstraintsConfiguration.d.ts +46 -0
- package/lib/graph-manager/protocol/pure/v1/V1_DataQualityConstraintsConfiguration.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_DataQualityConstraintsConfiguration.js +76 -0
- package/lib/graph-manager/protocol/pure/v1/V1_DataQualityConstraintsConfiguration.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/model/graphFetch/V1_DataQualityPropertyGraphFetchTree.d.ts +22 -0
- package/lib/graph-manager/protocol/pure/v1/model/graphFetch/V1_DataQualityPropertyGraphFetchTree.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/model/graphFetch/V1_DataQualityPropertyGraphFetchTree.js +32 -0
- package/lib/graph-manager/protocol/pure/v1/model/graphFetch/V1_DataQualityPropertyGraphFetchTree.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/model/graphFetch/V1_DataQualityRootGraphFetchTree.d.ts +22 -0
- package/lib/graph-manager/protocol/pure/v1/model/graphFetch/V1_DataQualityRootGraphFetchTree.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/model/graphFetch/V1_DataQualityRootGraphFetchTree.js +31 -0
- package/lib/graph-manager/protocol/pure/v1/model/graphFetch/V1_DataQualityRootGraphFetchTree.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/V1_ValueSpecificationBuilderHelper.d.ts +24 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/V1_ValueSpecificationBuilderHelper.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/V1_ValueSpecificationBuilderHelper.js +92 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/V1_ValueSpecificationBuilderHelper.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/V1_ValueSpecificationSerializer.d.ts +20 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/V1_ValueSpecificationSerializer.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/V1_ValueSpecificationSerializer.js +56 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/V1_ValueSpecificationSerializer.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/V1_ValueSpecificationTransformer.d.ts +22 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/V1_ValueSpecificationTransformer.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/V1_ValueSpecificationTransformer.js +70 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/V1_ValueSpecificationTransformer.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataQuality_ProtocolHelper.d.ts +29 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataQuality_ProtocolHelper.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataQuality_ProtocolHelper.js +80 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataQuality_ProtocolHelper.js.map +1 -0
- package/lib/index.css +17 -0
- package/lib/index.css.map +1 -0
- package/lib/package.json +87 -0
- package/package.json +87 -0
- package/src/components/DSL_DataQuality_ClassElementDriver.tsx +175 -0
- package/src/components/DSL_DataQuality_LegendStudioApplicationPlugin.tsx +220 -0
- package/src/components/DSL_DataQuality_LegendStudioPlugin_Extension.ts +39 -0
- package/src/components/DSL_DataQuality_ServiceElementDriver.tsx +57 -0
- package/src/components/DSL_NewDataQualityClassValidationElement.tsx +156 -0
- package/src/components/DSL_NewDataQualityServiceValidationElement.tsx +74 -0
- package/src/components/DataQualityClassValidationEditor.tsx +49 -0
- package/src/components/DataQualityConstraintsSelection.tsx +376 -0
- package/src/components/DataQualityDataSpaceBuilder.tsx +274 -0
- package/src/components/DataQualityExplorerPanel.tsx +584 -0
- package/src/components/DataQualityFilterPanel.tsx +50 -0
- package/src/components/DataQualityMappingAndRuntimeBuilder.tsx +224 -0
- package/src/components/DataQualityResultPanel.tsx +335 -0
- package/src/components/DataQualityResultValues.tsx +61 -0
- package/src/components/DataQualityServiceValidationEditor.tsx +49 -0
- package/src/components/DataQualitySideBar.tsx +216 -0
- package/src/components/DataQualityStructuralValidationsPanel.tsx +105 -0
- package/src/components/DataQualityTabs.tsx +104 -0
- package/src/components/DataQualityValidationEditor.tsx +52 -0
- package/src/components/constants/DataQualityConstants.ts +24 -0
- package/src/components/index.ts +19 -0
- package/src/components/states/ConstraintState.ts +70 -0
- package/src/components/states/DataQualityClassValidationState.ts +308 -0
- package/src/components/states/DataQualityGraphFetchTreeState.ts +125 -0
- package/src/components/states/DataQualityQueryBuilderState.ts +19 -0
- package/src/components/states/DataQualityResultState.ts +217 -0
- package/src/components/states/DataQualityServiceValidationState.ts +56 -0
- package/src/components/states/DataQualityState.ts +354 -0
- package/src/components/utils/DataQualityGraphFetchTreeUtil.ts +592 -0
- package/src/graph/metamodel/DSL_DataQuality_HashUtils.ts +29 -0
- package/src/graph/metamodel/DSL_DataQuality_PureGraphPlugin.ts +36 -0
- package/src/graph/metamodel/pure/packageableElements/data-quality/DataQualityGraphFetchTree.ts +55 -0
- package/src/graph/metamodel/pure/packageableElements/data-quality/DataQualityValidationConfiguration.ts +107 -0
- package/src/graph-manager/DSL_DataQuality_GraphManagerHelper.ts +46 -0
- package/src/graph-manager/DSL_DataQuality_GraphManagerPreset.ts +31 -0
- package/src/graph-manager/DSL_DataQuality_GraphModifierHelper.ts +113 -0
- package/src/graph-manager/DSL_DataQuality_PureGraphManagerPlugin.ts +59 -0
- package/src/graph-manager/action/changeDetection/DSL_DataQuality_ObserverHelper.ts +153 -0
- package/src/graph-manager/index.ts +19 -0
- package/src/graph-manager/protocol/pure/DSL_DataQuality_PureGraphManagerExtension.ts +59 -0
- package/src/graph-manager/protocol/pure/DSL_DataQuality_PureProtocolProcessorPlugin.ts +283 -0
- package/src/graph-manager/protocol/pure/DSL_DataQuality_buildGraphManagerExtension.ts +27 -0
- package/src/graph-manager/protocol/pure/v1/V1_DSL_Data_Quality_PureGraphManagerExtension.ts +246 -0
- package/src/graph-manager/protocol/pure/v1/V1_DataQualityConstraintsConfiguration.ts +103 -0
- package/src/graph-manager/protocol/pure/v1/model/graphFetch/V1_DataQualityPropertyGraphFetchTree.ts +37 -0
- package/src/graph-manager/protocol/pure/v1/model/graphFetch/V1_DataQualityRootGraphFetchTree.ts +36 -0
- package/src/graph-manager/protocol/pure/v1/transformation/V1_ValueSpecificationBuilderHelper.ts +241 -0
- package/src/graph-manager/protocol/pure/v1/transformation/V1_ValueSpecificationSerializer.ts +113 -0
- package/src/graph-manager/protocol/pure/v1/transformation/V1_ValueSpecificationTransformer.ts +139 -0
- package/src/graph-manager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataQuality_ProtocolHelper.ts +186 -0
- package/style/_data-quality-validation-builder.scss +1660 -0
- package/style/index.scss +67 -0
- package/tsconfig.json +137 -0
- package/tsconfig.package.json +9 -0
package/src/graph-manager/protocol/pure/v1/model/graphFetch/V1_DataQualityRootGraphFetchTree.ts
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
3
|
+
*
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
* you may not use this file except in compliance with the License.
|
6
|
+
* You may obtain a copy of the License at
|
7
|
+
*
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
*
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
* See the License for the specific language governing permissions and
|
14
|
+
* limitations under the License.
|
15
|
+
*/
|
16
|
+
|
17
|
+
import { type Hashable, hashArray } from '@finos/legend-shared';
|
18
|
+
import { DATA_QUALITY_HASH_STRUCTURE } from '../../../../../../graph/metamodel/DSL_DataQuality_HashUtils.js';
|
19
|
+
import { V1_RootGraphFetchTree } from '@finos/legend-graph';
|
20
|
+
|
21
|
+
export class V1_DataQualityRootGraphFetchTree
|
22
|
+
extends V1_RootGraphFetchTree
|
23
|
+
implements Hashable
|
24
|
+
{
|
25
|
+
constraints: string[] = [];
|
26
|
+
|
27
|
+
override get hashCode(): string {
|
28
|
+
return hashArray([
|
29
|
+
DATA_QUALITY_HASH_STRUCTURE.DATA_QUALITY_ROOT_GRAPH_FETCH_TREE,
|
30
|
+
hashArray(this.subTrees),
|
31
|
+
hashArray(this.subTypeTrees),
|
32
|
+
hashArray(this.constraints),
|
33
|
+
this.class,
|
34
|
+
]);
|
35
|
+
}
|
36
|
+
}
|
package/src/graph-manager/protocol/pure/v1/transformation/V1_ValueSpecificationBuilderHelper.ts
ADDED
@@ -0,0 +1,241 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
3
|
+
*
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
* you may not use this file except in compliance with the License.
|
6
|
+
* You may obtain a copy of the License at
|
7
|
+
*
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
*
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
* See the License for the specific language governing permissions and
|
14
|
+
* limitations under the License.
|
15
|
+
*/
|
16
|
+
|
17
|
+
import { V1_DataQualityPropertyGraphFetchTree } from '../model/graphFetch/V1_DataQualityPropertyGraphFetchTree.js';
|
18
|
+
import {
|
19
|
+
guaranteeNonNullable,
|
20
|
+
UnsupportedOperationError,
|
21
|
+
} from '@finos/legend-shared';
|
22
|
+
import { V1_DataQualityRootGraphFetchTree } from '../model/graphFetch/V1_DataQualityRootGraphFetchTree.js';
|
23
|
+
import {
|
24
|
+
DataQualityPropertyGraphFetchTree,
|
25
|
+
DataQualityRootGraphFetchTree,
|
26
|
+
} from '../../../../../graph/metamodel/pure/packageableElements/data-quality/DataQualityGraphFetchTree.js';
|
27
|
+
import {
|
28
|
+
type V1_DataQualityExecutionContext,
|
29
|
+
V1_DataSpaceDataQualityExecutionContext,
|
30
|
+
V1_MappingAndRuntimeDataQualityExecutionContext,
|
31
|
+
} from '../V1_DataQualityConstraintsConfiguration.js';
|
32
|
+
import {
|
33
|
+
type DataQualityExecutionContext,
|
34
|
+
DataSpaceDataQualityExecutionContext,
|
35
|
+
MappingAndRuntimeDataQualityExecutionContext,
|
36
|
+
} from '../../../../../graph/metamodel/pure/packageableElements/data-quality/DataQualityValidationConfiguration.js';
|
37
|
+
import {
|
38
|
+
type V1_GraphBuilderContext,
|
39
|
+
type Class,
|
40
|
+
type GraphFetchTree,
|
41
|
+
type Mapping,
|
42
|
+
type PackageableElementImplicitReference,
|
43
|
+
type PackageableRuntime,
|
44
|
+
type PropertyGraphFetchTree,
|
45
|
+
type RootGraphFetchTree,
|
46
|
+
type V1_GraphFetchTree,
|
47
|
+
type V1_ProcessingContext,
|
48
|
+
type V1_PropertyGraphFetchTree,
|
49
|
+
type V1_RootGraphFetchTree,
|
50
|
+
V1_buildPropertyGraphFetchTree,
|
51
|
+
V1_buildRootGraphFetchTree,
|
52
|
+
} from '@finos/legend-graph';
|
53
|
+
import type { DataSpace } from '@finos/legend-extension-dsl-data-space/graph';
|
54
|
+
|
55
|
+
export function V1_buildDataQualityExecutionContext(
|
56
|
+
dataQualityExecutionContext: V1_DataQualityExecutionContext,
|
57
|
+
graphContext: V1_GraphBuilderContext,
|
58
|
+
): DataQualityExecutionContext {
|
59
|
+
if (
|
60
|
+
dataQualityExecutionContext instanceof
|
61
|
+
V1_DataSpaceDataQualityExecutionContext
|
62
|
+
) {
|
63
|
+
const dataSpaceExecutionContext =
|
64
|
+
new DataSpaceDataQualityExecutionContext();
|
65
|
+
dataSpaceExecutionContext.context = dataQualityExecutionContext.context;
|
66
|
+
dataSpaceExecutionContext.dataSpace = graphContext.resolveElement(
|
67
|
+
dataQualityExecutionContext.dataSpace.path,
|
68
|
+
false,
|
69
|
+
) as PackageableElementImplicitReference<DataSpace>;
|
70
|
+
return dataSpaceExecutionContext;
|
71
|
+
} else if (
|
72
|
+
dataQualityExecutionContext instanceof
|
73
|
+
V1_MappingAndRuntimeDataQualityExecutionContext
|
74
|
+
) {
|
75
|
+
const mappingAndRuntimeExecutionContext =
|
76
|
+
new MappingAndRuntimeDataQualityExecutionContext();
|
77
|
+
mappingAndRuntimeExecutionContext.mapping = graphContext.resolveElement(
|
78
|
+
dataQualityExecutionContext.mapping.path,
|
79
|
+
false,
|
80
|
+
) as PackageableElementImplicitReference<Mapping>;
|
81
|
+
mappingAndRuntimeExecutionContext.runtime = graphContext.resolveElement(
|
82
|
+
dataQualityExecutionContext.runtime.path,
|
83
|
+
false,
|
84
|
+
) as PackageableElementImplicitReference<PackageableRuntime>;
|
85
|
+
return mappingAndRuntimeExecutionContext;
|
86
|
+
}
|
87
|
+
|
88
|
+
throw new UnsupportedOperationError(
|
89
|
+
`Can't build data quality execution context`,
|
90
|
+
dataQualityExecutionContext,
|
91
|
+
);
|
92
|
+
}
|
93
|
+
|
94
|
+
export function V1_buildGraphFetchTree(
|
95
|
+
graphFetchTree: V1_GraphFetchTree,
|
96
|
+
context: V1_GraphBuilderContext,
|
97
|
+
parentClass: Class | undefined,
|
98
|
+
openVariables: string[],
|
99
|
+
processingContext: V1_ProcessingContext,
|
100
|
+
canResolveLocalProperty?: boolean | undefined,
|
101
|
+
): GraphFetchTree {
|
102
|
+
if (graphFetchTree instanceof V1_DataQualityPropertyGraphFetchTree) {
|
103
|
+
return V1_buildPropertyGraphFetchTree(
|
104
|
+
graphFetchTree,
|
105
|
+
context,
|
106
|
+
guaranteeNonNullable(parentClass),
|
107
|
+
openVariables,
|
108
|
+
processingContext,
|
109
|
+
canResolveLocalProperty,
|
110
|
+
);
|
111
|
+
}
|
112
|
+
if (graphFetchTree instanceof V1_DataQualityRootGraphFetchTree) {
|
113
|
+
return V1_buildRootGraphFetchTree(
|
114
|
+
graphFetchTree,
|
115
|
+
context,
|
116
|
+
openVariables,
|
117
|
+
processingContext,
|
118
|
+
canResolveLocalProperty,
|
119
|
+
);
|
120
|
+
}
|
121
|
+
throw new UnsupportedOperationError(
|
122
|
+
`Can't build graph fetch tree`,
|
123
|
+
graphFetchTree,
|
124
|
+
);
|
125
|
+
}
|
126
|
+
|
127
|
+
export function V1_buildDataQualityGraphFetchTree(
|
128
|
+
graphFetchTree: V1_GraphFetchTree,
|
129
|
+
context: V1_GraphBuilderContext,
|
130
|
+
parentClass: Class | undefined,
|
131
|
+
openVariables: string[],
|
132
|
+
processingContext: V1_ProcessingContext,
|
133
|
+
canResolveLocalProperty?: boolean | undefined,
|
134
|
+
): GraphFetchTree {
|
135
|
+
const _graphFetchTree = V1_buildGraphFetchTree(
|
136
|
+
graphFetchTree,
|
137
|
+
context,
|
138
|
+
parentClass,
|
139
|
+
openVariables,
|
140
|
+
processingContext,
|
141
|
+
canResolveLocalProperty,
|
142
|
+
);
|
143
|
+
return transformGraphFetchTreeToDataQualityGraphFetchTree(
|
144
|
+
_graphFetchTree,
|
145
|
+
graphFetchTree,
|
146
|
+
);
|
147
|
+
}
|
148
|
+
|
149
|
+
function transformGraphFetchTreeToDataQualityGraphFetchTree(
|
150
|
+
graphFetchTree: GraphFetchTree,
|
151
|
+
V1_graphFetchTree: V1_GraphFetchTree,
|
152
|
+
): GraphFetchTree {
|
153
|
+
if (V1_graphFetchTree instanceof V1_DataQualityRootGraphFetchTree) {
|
154
|
+
return transformRootGraphFetchTreeToDataQualityRootGraphFetchTree(
|
155
|
+
graphFetchTree as RootGraphFetchTree,
|
156
|
+
V1_graphFetchTree,
|
157
|
+
);
|
158
|
+
} else if (
|
159
|
+
V1_graphFetchTree instanceof V1_DataQualityPropertyGraphFetchTree
|
160
|
+
) {
|
161
|
+
return transformPropertyGraphFetchTreeToDataQualityPropertyGraphFetchTree(
|
162
|
+
graphFetchTree as PropertyGraphFetchTree,
|
163
|
+
V1_graphFetchTree,
|
164
|
+
);
|
165
|
+
}
|
166
|
+
throw new UnsupportedOperationError(
|
167
|
+
`Can't transform graph fetch tree to data quality graph fetch tree`,
|
168
|
+
V1_graphFetchTree,
|
169
|
+
);
|
170
|
+
}
|
171
|
+
|
172
|
+
function transformRootGraphFetchTreeToDataQualityRootGraphFetchTree(
|
173
|
+
rootGraphFetchTree: RootGraphFetchTree,
|
174
|
+
V1_rootGraphFetchTree: V1_DataQualityRootGraphFetchTree,
|
175
|
+
): DataQualityRootGraphFetchTree {
|
176
|
+
const dataQualityRootGraphFetchTree = new DataQualityRootGraphFetchTree(
|
177
|
+
rootGraphFetchTree.class,
|
178
|
+
);
|
179
|
+
dataQualityRootGraphFetchTree.constraints = V1_rootGraphFetchTree.constraints;
|
180
|
+
dataQualityRootGraphFetchTree.subTrees = rootGraphFetchTree.subTrees.map(
|
181
|
+
(_propertyTree, index) =>
|
182
|
+
transformGraphFetchTreeToDataQualityGraphFetchTree(
|
183
|
+
_propertyTree,
|
184
|
+
V1_rootGraphFetchTree.subTrees[index]!,
|
185
|
+
),
|
186
|
+
);
|
187
|
+
return dataQualityRootGraphFetchTree;
|
188
|
+
}
|
189
|
+
|
190
|
+
function transformPropertyGraphFetchTreeToDataQualityPropertyGraphFetchTree(
|
191
|
+
propertyGraphFetchTree: PropertyGraphFetchTree,
|
192
|
+
V1_propertyGraphFetchTree: V1_DataQualityPropertyGraphFetchTree,
|
193
|
+
): DataQualityPropertyGraphFetchTree {
|
194
|
+
const dataQualityPropertyGraphFetchTree =
|
195
|
+
new DataQualityPropertyGraphFetchTree(
|
196
|
+
propertyGraphFetchTree.property,
|
197
|
+
propertyGraphFetchTree.subType,
|
198
|
+
);
|
199
|
+
dataQualityPropertyGraphFetchTree.alias = propertyGraphFetchTree.alias;
|
200
|
+
dataQualityPropertyGraphFetchTree.parameters =
|
201
|
+
propertyGraphFetchTree.parameters;
|
202
|
+
dataQualityPropertyGraphFetchTree.subTrees =
|
203
|
+
propertyGraphFetchTree.subTrees.map((_propertyTree, index) =>
|
204
|
+
transformGraphFetchTreeToDataQualityGraphFetchTree(
|
205
|
+
_propertyTree,
|
206
|
+
V1_propertyGraphFetchTree.subTrees[index]!,
|
207
|
+
),
|
208
|
+
);
|
209
|
+
dataQualityPropertyGraphFetchTree.constraints =
|
210
|
+
V1_propertyGraphFetchTree.constraints;
|
211
|
+
return dataQualityPropertyGraphFetchTree;
|
212
|
+
}
|
213
|
+
export function V1_transformRootGraphFetchTreeToDataQualityRootGraphFetchTree(
|
214
|
+
rootGraphFetchTree: V1_RootGraphFetchTree,
|
215
|
+
): V1_DataQualityRootGraphFetchTree {
|
216
|
+
const dataQualityRootGraphFetchTree = new V1_DataQualityRootGraphFetchTree();
|
217
|
+
dataQualityRootGraphFetchTree.class = rootGraphFetchTree.class;
|
218
|
+
dataQualityRootGraphFetchTree.subTrees = rootGraphFetchTree.subTrees.map(
|
219
|
+
(_propertyTree) =>
|
220
|
+
V1_transformPropertyGraphFetchTreeToDataQualityPropertyGraphFetchTree(
|
221
|
+
_propertyTree as V1_PropertyGraphFetchTree,
|
222
|
+
),
|
223
|
+
);
|
224
|
+
return dataQualityRootGraphFetchTree;
|
225
|
+
}
|
226
|
+
|
227
|
+
function V1_transformPropertyGraphFetchTreeToDataQualityPropertyGraphFetchTree(
|
228
|
+
graphFetchTree: V1_PropertyGraphFetchTree,
|
229
|
+
): V1_DataQualityPropertyGraphFetchTree {
|
230
|
+
const dataQualityPropertyGraphFetchTree =
|
231
|
+
new V1_DataQualityPropertyGraphFetchTree();
|
232
|
+
dataQualityPropertyGraphFetchTree.property = graphFetchTree.property;
|
233
|
+
dataQualityPropertyGraphFetchTree.parameters = graphFetchTree.parameters;
|
234
|
+
dataQualityPropertyGraphFetchTree.subTrees = graphFetchTree.subTrees.map(
|
235
|
+
(_propertyTree) =>
|
236
|
+
V1_transformPropertyGraphFetchTreeToDataQualityPropertyGraphFetchTree(
|
237
|
+
_propertyTree as V1_PropertyGraphFetchTree,
|
238
|
+
),
|
239
|
+
);
|
240
|
+
return dataQualityPropertyGraphFetchTree;
|
241
|
+
}
|
@@ -0,0 +1,113 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
3
|
+
*
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
* you may not use this file except in compliance with the License.
|
6
|
+
* You may obtain a copy of the License at
|
7
|
+
*
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
*
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
* See the License for the specific language governing permissions and
|
14
|
+
* limitations under the License.
|
15
|
+
*/
|
16
|
+
|
17
|
+
import {
|
18
|
+
type PureProtocolProcessorPlugin,
|
19
|
+
type V1_GraphFetchTree,
|
20
|
+
V1_deserializeValueSpecification,
|
21
|
+
V1_serializeValueSpecification,
|
22
|
+
} from '@finos/legend-graph';
|
23
|
+
import { V1_DataQualityRootGraphFetchTree } from '../model/graphFetch/V1_DataQualityRootGraphFetchTree.js';
|
24
|
+
import { V1_DataQualityPropertyGraphFetchTree } from '../model/graphFetch/V1_DataQualityPropertyGraphFetchTree.js';
|
25
|
+
import {
|
26
|
+
type ModelSchema,
|
27
|
+
custom,
|
28
|
+
deserialize,
|
29
|
+
serialize,
|
30
|
+
createModelSchema,
|
31
|
+
list,
|
32
|
+
optional,
|
33
|
+
primitive,
|
34
|
+
} from 'serializr';
|
35
|
+
import {
|
36
|
+
type PlainObject,
|
37
|
+
UnsupportedOperationError,
|
38
|
+
usingConstantValueSchema,
|
39
|
+
} from '@finos/legend-shared';
|
40
|
+
|
41
|
+
const DATA_QUALTIY_ROOT_GRAPH_FETCH_TREE_TYPE = 'dataQualityRootGraphFetchTree';
|
42
|
+
const DATA_QUALITY_PROPERTY_GRAPH_FETCH_TREE_TYPE =
|
43
|
+
'dataQualityPropertyGraphFetchTree';
|
44
|
+
|
45
|
+
const rootGraphFetchTreeModelSchema = (
|
46
|
+
plugins: PureProtocolProcessorPlugin[],
|
47
|
+
): ModelSchema<V1_DataQualityRootGraphFetchTree> =>
|
48
|
+
createModelSchema(V1_DataQualityRootGraphFetchTree, {
|
49
|
+
_type: usingConstantValueSchema(DATA_QUALTIY_ROOT_GRAPH_FETCH_TREE_TYPE),
|
50
|
+
class: primitive(),
|
51
|
+
constraints: list(primitive()),
|
52
|
+
subTrees: list(
|
53
|
+
custom(
|
54
|
+
(val) => V1_serializeGraphFetchTree(val, plugins),
|
55
|
+
(val) => V1_deserializeGraphFetchTree(val, plugins),
|
56
|
+
),
|
57
|
+
),
|
58
|
+
});
|
59
|
+
|
60
|
+
const propertyGraphFetchTreeModelSchema = (
|
61
|
+
plugins: PureProtocolProcessorPlugin[],
|
62
|
+
): ModelSchema<V1_DataQualityPropertyGraphFetchTree> =>
|
63
|
+
createModelSchema(V1_DataQualityPropertyGraphFetchTree, {
|
64
|
+
_type: usingConstantValueSchema(
|
65
|
+
DATA_QUALITY_PROPERTY_GRAPH_FETCH_TREE_TYPE,
|
66
|
+
),
|
67
|
+
alias: optional(primitive()),
|
68
|
+
parameters: list(
|
69
|
+
custom(
|
70
|
+
(val) => V1_serializeValueSpecification(val, plugins),
|
71
|
+
(val) => V1_deserializeValueSpecification(val, plugins),
|
72
|
+
),
|
73
|
+
),
|
74
|
+
property: primitive(),
|
75
|
+
constraints: list(primitive()),
|
76
|
+
subTrees: list(
|
77
|
+
custom(
|
78
|
+
(val) => V1_serializeGraphFetchTree(val, plugins),
|
79
|
+
(val) => V1_deserializeGraphFetchTree(val, plugins),
|
80
|
+
),
|
81
|
+
),
|
82
|
+
});
|
83
|
+
|
84
|
+
export function V1_serializeGraphFetchTree(
|
85
|
+
protocol: V1_GraphFetchTree,
|
86
|
+
plugins: PureProtocolProcessorPlugin[],
|
87
|
+
): PlainObject<V1_GraphFetchTree> {
|
88
|
+
if (protocol instanceof V1_DataQualityPropertyGraphFetchTree) {
|
89
|
+
return serialize(propertyGraphFetchTreeModelSchema(plugins), protocol);
|
90
|
+
} else if (protocol instanceof V1_DataQualityRootGraphFetchTree) {
|
91
|
+
return serialize(rootGraphFetchTreeModelSchema(plugins), protocol);
|
92
|
+
}
|
93
|
+
throw new UnsupportedOperationError(
|
94
|
+
`Can't serialize data quality graph fetch tree`,
|
95
|
+
protocol,
|
96
|
+
);
|
97
|
+
}
|
98
|
+
|
99
|
+
export function V1_deserializeGraphFetchTree(
|
100
|
+
json: PlainObject<V1_GraphFetchTree>,
|
101
|
+
plugins: PureProtocolProcessorPlugin[],
|
102
|
+
): V1_GraphFetchTree {
|
103
|
+
switch (json._type) {
|
104
|
+
case DATA_QUALITY_PROPERTY_GRAPH_FETCH_TREE_TYPE:
|
105
|
+
return deserialize(propertyGraphFetchTreeModelSchema(plugins), json);
|
106
|
+
case DATA_QUALTIY_ROOT_GRAPH_FETCH_TREE_TYPE:
|
107
|
+
return deserialize(rootGraphFetchTreeModelSchema(plugins), json);
|
108
|
+
default:
|
109
|
+
throw new UnsupportedOperationError(
|
110
|
+
`Can't deserialize data quality graph fetch tree node of type '${json._type}'`,
|
111
|
+
);
|
112
|
+
}
|
113
|
+
}
|
@@ -0,0 +1,139 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
3
|
+
*
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
* you may not use this file except in compliance with the License.
|
6
|
+
* You may obtain a copy of the License at
|
7
|
+
*
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
*
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
* See the License for the specific language governing permissions and
|
14
|
+
* limitations under the License.
|
15
|
+
*/
|
16
|
+
|
17
|
+
import {
|
18
|
+
type GraphFetchTree,
|
19
|
+
type V1_GraphFetchTree,
|
20
|
+
PackageableElementPointerType,
|
21
|
+
V1_PackageableElementPointer,
|
22
|
+
V1_PropertyGraphFetchTree,
|
23
|
+
V1_RootGraphFetchTree,
|
24
|
+
V1_transformGraphFetchTree,
|
25
|
+
} from '@finos/legend-graph';
|
26
|
+
import { V1_DataQualityRootGraphFetchTree } from '../model/graphFetch/V1_DataQualityRootGraphFetchTree.js';
|
27
|
+
import { assertType, UnsupportedOperationError } from '@finos/legend-shared';
|
28
|
+
import { V1_DataQualityPropertyGraphFetchTree } from '../model/graphFetch/V1_DataQualityPropertyGraphFetchTree.js';
|
29
|
+
import {
|
30
|
+
DataQualityPropertyGraphFetchTree,
|
31
|
+
DataQualityRootGraphFetchTree,
|
32
|
+
} from '../../../../../graph/metamodel/pure/packageableElements/data-quality/DataQualityGraphFetchTree.js';
|
33
|
+
import {
|
34
|
+
type DataQualityExecutionContext,
|
35
|
+
DataSpaceDataQualityExecutionContext,
|
36
|
+
MappingAndRuntimeDataQualityExecutionContext,
|
37
|
+
} from '../../../../../graph/metamodel/pure/packageableElements/data-quality/DataQualityValidationConfiguration.js';
|
38
|
+
import {
|
39
|
+
type V1_DataQualityExecutionContext,
|
40
|
+
V1_DataSpaceDataQualityExecutionContext,
|
41
|
+
V1_MappingAndRuntimeDataQualityExecutionContext,
|
42
|
+
} from '../V1_DataQualityConstraintsConfiguration.js';
|
43
|
+
import { DATA_SPACE_ELEMENT_POINTER } from '@finos/legend-extension-dsl-data-space/graph';
|
44
|
+
|
45
|
+
export function V1_transformDataQualityGraphFetchTree(
|
46
|
+
value: GraphFetchTree,
|
47
|
+
inScope: string[],
|
48
|
+
open: Map<string, unknown[]>,
|
49
|
+
isParameter: boolean,
|
50
|
+
useAppliedFunction: boolean,
|
51
|
+
): V1_GraphFetchTree {
|
52
|
+
const v1_GraphFetchTree = V1_transformGraphFetchTree(
|
53
|
+
value,
|
54
|
+
inScope,
|
55
|
+
open,
|
56
|
+
isParameter,
|
57
|
+
useAppliedFunction,
|
58
|
+
);
|
59
|
+
return V1_transformGraphFetchTreeToDataQualityGraphFetchTree(
|
60
|
+
v1_GraphFetchTree,
|
61
|
+
value,
|
62
|
+
);
|
63
|
+
}
|
64
|
+
|
65
|
+
export function V1_transformGraphFetchTreeToDataQualityGraphFetchTree(
|
66
|
+
v1_graphFetchTree: V1_GraphFetchTree,
|
67
|
+
graphFetchTree: GraphFetchTree,
|
68
|
+
): V1_GraphFetchTree {
|
69
|
+
if (v1_graphFetchTree instanceof V1_RootGraphFetchTree) {
|
70
|
+
assertType(graphFetchTree, DataQualityRootGraphFetchTree);
|
71
|
+
const v1_DataQualityRootGraphFetchTree =
|
72
|
+
new V1_DataQualityRootGraphFetchTree();
|
73
|
+
v1_DataQualityRootGraphFetchTree.class = v1_graphFetchTree.class;
|
74
|
+
v1_DataQualityRootGraphFetchTree.constraints = graphFetchTree.constraints;
|
75
|
+
v1_DataQualityRootGraphFetchTree.subTrees = v1_graphFetchTree.subTrees.map(
|
76
|
+
(subTree, index) =>
|
77
|
+
V1_transformGraphFetchTreeToDataQualityGraphFetchTree(
|
78
|
+
subTree,
|
79
|
+
graphFetchTree.subTrees[index]!,
|
80
|
+
),
|
81
|
+
);
|
82
|
+
return v1_DataQualityRootGraphFetchTree;
|
83
|
+
}
|
84
|
+
if (v1_graphFetchTree instanceof V1_PropertyGraphFetchTree) {
|
85
|
+
assertType(graphFetchTree, DataQualityPropertyGraphFetchTree);
|
86
|
+
const v1_DataQualityPropertyGraphFetchTree =
|
87
|
+
new V1_DataQualityPropertyGraphFetchTree();
|
88
|
+
v1_DataQualityPropertyGraphFetchTree.alias = v1_graphFetchTree.alias;
|
89
|
+
v1_DataQualityPropertyGraphFetchTree.parameters =
|
90
|
+
v1_graphFetchTree.parameters;
|
91
|
+
v1_DataQualityPropertyGraphFetchTree.property = v1_graphFetchTree.property;
|
92
|
+
v1_DataQualityPropertyGraphFetchTree.subType = v1_graphFetchTree.subType;
|
93
|
+
v1_DataQualityPropertyGraphFetchTree.constraints =
|
94
|
+
graphFetchTree.constraints;
|
95
|
+
v1_DataQualityPropertyGraphFetchTree.subTrees =
|
96
|
+
v1_graphFetchTree.subTrees.map((subTree, index) =>
|
97
|
+
V1_transformGraphFetchTreeToDataQualityGraphFetchTree(
|
98
|
+
subTree,
|
99
|
+
graphFetchTree.subTrees[index]!,
|
100
|
+
),
|
101
|
+
);
|
102
|
+
return v1_DataQualityPropertyGraphFetchTree;
|
103
|
+
}
|
104
|
+
throw new UnsupportedOperationError(
|
105
|
+
`Can't transform graph fetch tree to data quality graph fetch tree`,
|
106
|
+
);
|
107
|
+
}
|
108
|
+
|
109
|
+
export function V1_transformDataQualityExecutionContext(
|
110
|
+
value: DataQualityExecutionContext,
|
111
|
+
): V1_DataQualityExecutionContext {
|
112
|
+
if (value instanceof DataSpaceDataQualityExecutionContext) {
|
113
|
+
const dataSpaceExecutionContext =
|
114
|
+
new V1_DataSpaceDataQualityExecutionContext();
|
115
|
+
dataSpaceExecutionContext.context = value.context!;
|
116
|
+
dataSpaceExecutionContext.dataSpace = new V1_PackageableElementPointer(
|
117
|
+
DATA_SPACE_ELEMENT_POINTER,
|
118
|
+
value.dataSpace.valueForSerialization ?? '',
|
119
|
+
);
|
120
|
+
return dataSpaceExecutionContext;
|
121
|
+
} else if (value instanceof MappingAndRuntimeDataQualityExecutionContext) {
|
122
|
+
const mappingAndRuntimeExecutionContext =
|
123
|
+
new V1_MappingAndRuntimeDataQualityExecutionContext();
|
124
|
+
mappingAndRuntimeExecutionContext.mapping =
|
125
|
+
new V1_PackageableElementPointer(
|
126
|
+
PackageableElementPointerType.MAPPING,
|
127
|
+
value.mapping.valueForSerialization ?? '',
|
128
|
+
);
|
129
|
+
mappingAndRuntimeExecutionContext.runtime =
|
130
|
+
new V1_PackageableElementPointer(
|
131
|
+
PackageableElementPointerType.RUNTIME,
|
132
|
+
value.runtime.valueForSerialization ?? '',
|
133
|
+
);
|
134
|
+
return mappingAndRuntimeExecutionContext;
|
135
|
+
}
|
136
|
+
throw new UnsupportedOperationError(
|
137
|
+
`Can't build data quality execution context '${value.toString()}'`,
|
138
|
+
);
|
139
|
+
}
|