@finos/legend-graph 1.2.1 → 1.3.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/GraphManagerState.d.ts +2 -2
- package/lib/GraphManagerState.d.ts.map +1 -1
- package/lib/GraphManagerState.js +2 -2
- package/lib/GraphManagerState.js.map +1 -1
- package/lib/GraphManagerTestUtils.d.ts +5 -2
- package/lib/GraphManagerTestUtils.d.ts.map +1 -1
- package/lib/GraphManagerTestUtils.js +10 -3
- package/lib/GraphManagerTestUtils.js.map +1 -1
- package/lib/MetaModelConst.d.ts +3 -1
- package/lib/MetaModelConst.d.ts.map +1 -1
- package/lib/MetaModelConst.js +2 -0
- package/lib/MetaModelConst.js.map +1 -1
- package/lib/graph/DSLExternalFormat_Extension.d.ts +22 -0
- package/lib/graph/DSLExternalFormat_Extension.d.ts.map +1 -0
- package/lib/graph/DSLExternalFormat_Extension.js +31 -0
- package/lib/graph/DSLExternalFormat_Extension.js.map +1 -0
- package/lib/graph/DSLExternalFormat_PureGraphPlugin.d.ts +23 -0
- package/lib/graph/DSLExternalFormat_PureGraphPlugin.d.ts.map +1 -0
- package/lib/graph/DSLExternalFormat_PureGraphPlugin.js +28 -0
- package/lib/graph/DSLExternalFormat_PureGraphPlugin.js.map +1 -0
- package/lib/graph/PureModel.d.ts.map +1 -1
- package/lib/graph/PureModel.js +6 -3
- package/lib/graph/PureModel.js.map +1 -1
- package/lib/graphManager/AbstractPureGraphManager.d.ts +4 -0
- package/lib/graphManager/AbstractPureGraphManager.d.ts.map +1 -1
- package/lib/graphManager/AbstractPureGraphManager.js.map +1 -1
- package/lib/graphManager/DSLExternalFormat_GraphManagerHelper.d.ts +21 -0
- package/lib/graphManager/DSLExternalFormat_GraphManagerHelper.d.ts.map +1 -0
- package/lib/graphManager/DSLExternalFormat_GraphManagerHelper.js +21 -0
- package/lib/graphManager/DSLExternalFormat_GraphManagerHelper.js.map +1 -0
- package/lib/graphManager/DSLExternalFormat_PureGraphManagerPlugin.d.ts +25 -0
- package/lib/graphManager/DSLExternalFormat_PureGraphManagerPlugin.d.ts.map +1 -0
- package/lib/graphManager/DSLExternalFormat_PureGraphManagerPlugin.js +67 -0
- package/lib/graphManager/DSLExternalFormat_PureGraphManagerPlugin.js.map +1 -0
- package/lib/graphManager/GraphBuilderReport.d.ts +18 -0
- package/lib/graphManager/GraphBuilderReport.d.ts.map +1 -0
- package/lib/graphManager/GraphBuilderReport.js +18 -0
- package/lib/graphManager/GraphBuilderReport.js.map +1 -0
- package/lib/graphManager/GraphManagerLogEvent.d.ts +1 -0
- package/lib/graphManager/GraphManagerLogEvent.d.ts.map +1 -1
- package/lib/graphManager/GraphManagerLogEvent.js +1 -0
- package/lib/graphManager/GraphManagerLogEvent.js.map +1 -1
- package/lib/graphManager/action/EngineError.d.ts +3 -0
- package/lib/graphManager/action/EngineError.d.ts.map +1 -1
- package/lib/graphManager/action/EngineError.js +3 -0
- package/lib/graphManager/action/EngineError.js.map +1 -1
- package/lib/graphManager/action/externalFormat/ExternalFormatDescription.d.ts +26 -0
- package/lib/graphManager/action/externalFormat/ExternalFormatDescription.d.ts.map +1 -0
- package/lib/graphManager/action/externalFormat/ExternalFormatDescription.js +27 -0
- package/lib/graphManager/action/externalFormat/ExternalFormatDescription.js.map +1 -0
- package/lib/index.d.ts +12 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +13 -1
- package/lib/index.js.map +1 -1
- package/lib/models/DSLExternalFormat_ModelUtils.d.ts +24 -0
- package/lib/models/DSLExternalFormat_ModelUtils.d.ts.map +1 -0
- package/lib/models/DSLExternalFormat_ModelUtils.js +25 -0
- package/lib/models/DSLExternalFormat_ModelUtils.js.map +1 -0
- package/lib/models/metamodels/pure/packageableElements/PackageableElement.js +1 -1
- package/lib/models/metamodels/pure/packageableElements/PackageableElement.js.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/domain/Package.d.ts.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/domain/Package.js +4 -2
- package/lib/models/metamodels/pure/packageableElements/domain/Package.js.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/externalFormat/connection/DSLExternalFormat_ExternalFormatConnection.d.ts +29 -0
- package/lib/models/metamodels/pure/packageableElements/externalFormat/connection/DSLExternalFormat_ExternalFormatConnection.d.ts.map +1 -0
- package/lib/models/metamodels/pure/packageableElements/externalFormat/connection/DSLExternalFormat_ExternalFormatConnection.js +45 -0
- package/lib/models/metamodels/pure/packageableElements/externalFormat/connection/DSLExternalFormat_ExternalFormatConnection.js.map +1 -0
- package/lib/models/metamodels/pure/packageableElements/externalFormat/connection/DSLExternalFormat_UrlStream.d.ts +23 -0
- package/lib/models/metamodels/pure/packageableElements/externalFormat/connection/DSLExternalFormat_UrlStream.d.ts.map +1 -0
- package/lib/models/metamodels/pure/packageableElements/externalFormat/connection/DSLExternalFormat_UrlStream.js +35 -0
- package/lib/models/metamodels/pure/packageableElements/externalFormat/connection/DSLExternalFormat_UrlStream.js.map +1 -0
- package/lib/models/metamodels/pure/packageableElements/externalFormat/schemaSet/DSLExternalFormat_Schema.d.ts +28 -0
- package/lib/models/metamodels/pure/packageableElements/externalFormat/schemaSet/DSLExternalFormat_Schema.d.ts.map +1 -0
- package/lib/models/metamodels/pure/packageableElements/externalFormat/schemaSet/DSLExternalFormat_Schema.js +53 -0
- package/lib/models/metamodels/pure/packageableElements/externalFormat/schemaSet/DSLExternalFormat_Schema.js.map +1 -0
- package/lib/models/metamodels/pure/packageableElements/externalFormat/schemaSet/DSLExternalFormat_SchemaSet.d.ts +29 -0
- package/lib/models/metamodels/pure/packageableElements/externalFormat/schemaSet/DSLExternalFormat_SchemaSet.d.ts.map +1 -0
- package/lib/models/metamodels/pure/packageableElements/externalFormat/schemaSet/DSLExternalFormat_SchemaSet.js +55 -0
- package/lib/models/metamodels/pure/packageableElements/externalFormat/schemaSet/DSLExternalFormat_SchemaSet.js.map +1 -0
- package/lib/models/metamodels/pure/packageableElements/externalFormat/store/BindingTransformer.d.ts +25 -0
- package/lib/models/metamodels/pure/packageableElements/externalFormat/store/BindingTransformer.d.ts.map +1 -0
- package/lib/models/metamodels/pure/packageableElements/externalFormat/store/BindingTransformer.js +38 -0
- package/lib/models/metamodels/pure/packageableElements/externalFormat/store/BindingTransformer.js.map +1 -0
- package/lib/models/metamodels/pure/packageableElements/externalFormat/store/DSLExternalFormat_Binding.d.ts +35 -0
- package/lib/models/metamodels/pure/packageableElements/externalFormat/store/DSLExternalFormat_Binding.d.ts.map +1 -0
- package/lib/models/metamodels/pure/packageableElements/externalFormat/store/DSLExternalFormat_Binding.js +65 -0
- package/lib/models/metamodels/pure/packageableElements/externalFormat/store/DSLExternalFormat_Binding.js.map +1 -0
- package/lib/models/metamodels/pure/packageableElements/externalFormat/store/DSLExternalFormat_ModelUnit.d.ts +31 -0
- package/lib/models/metamodels/pure/packageableElements/externalFormat/store/DSLExternalFormat_ModelUnit.d.ts.map +1 -0
- package/lib/models/metamodels/pure/packageableElements/externalFormat/store/DSLExternalFormat_ModelUnit.js +61 -0
- package/lib/models/metamodels/pure/packageableElements/externalFormat/store/DSLExternalFormat_ModelUnit.js.map +1 -0
- package/lib/models/metamodels/pure/packageableElements/mapping/MergeOperationSetImplementation.d.ts +33 -0
- package/lib/models/metamodels/pure/packageableElements/mapping/MergeOperationSetImplementation.d.ts.map +1 -0
- package/lib/models/metamodels/pure/packageableElements/mapping/MergeOperationSetImplementation.js +46 -0
- package/lib/models/metamodels/pure/packageableElements/mapping/MergeOperationSetImplementation.js.map +1 -0
- package/lib/models/metamodels/pure/packageableElements/mapping/OperationSetImplementation.d.ts +2 -1
- package/lib/models/metamodels/pure/packageableElements/mapping/OperationSetImplementation.d.ts.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/mapping/OperationSetImplementation.js +1 -1
- package/lib/models/metamodels/pure/packageableElements/mapping/OperationSetImplementation.js.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/mapping/SetImplementation.d.ts +3 -0
- package/lib/models/metamodels/pure/packageableElements/mapping/SetImplementation.d.ts.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/mapping/SetImplementation.js +1 -0
- package/lib/models/metamodels/pure/packageableElements/mapping/SetImplementation.js.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/store/relational/connection/DatasourceSpecification.d.ts +9 -3
- package/lib/models/metamodels/pure/packageableElements/store/relational/connection/DatasourceSpecification.d.ts.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/store/relational/connection/DatasourceSpecification.js +32 -8
- package/lib/models/metamodels/pure/packageableElements/store/relational/connection/DatasourceSpecification.js.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/store/relational/mapping/RelationalPropertyMapping.d.ts +3 -0
- package/lib/models/metamodels/pure/packageableElements/store/relational/mapping/RelationalPropertyMapping.d.ts.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/store/relational/mapping/RelationalPropertyMapping.js +7 -0
- package/lib/models/metamodels/pure/packageableElements/store/relational/mapping/RelationalPropertyMapping.js.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/store/relational/model/RelationalDataType.d.ts +4 -0
- package/lib/models/metamodels/pure/packageableElements/store/relational/model/RelationalDataType.d.ts.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/store/relational/model/RelationalDataType.js +11 -0
- package/lib/models/metamodels/pure/packageableElements/store/relational/model/RelationalDataType.js.map +1 -1
- package/lib/models/protocols/pure/DSLExternalFormat_PureProtocolProcessorPlugin.d.ts +34 -0
- package/lib/models/protocols/pure/DSLExternalFormat_PureProtocolProcessorPlugin.d.ts.map +1 -0
- package/lib/models/protocols/pure/DSLExternalFormat_PureProtocolProcessorPlugin.js +253 -0
- package/lib/models/protocols/pure/DSLExternalFormat_PureProtocolProcessorPlugin.js.map +1 -0
- package/lib/models/protocols/pure/v1/V1_PureGraphManager.d.ts +4 -0
- package/lib/models/protocols/pure/v1/V1_PureGraphManager.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/V1_PureGraphManager.js +23 -4
- package/lib/models/protocols/pure/v1/V1_PureGraphManager.js.map +1 -1
- package/lib/models/protocols/pure/v1/engine/V1_Engine.d.ts +4 -0
- package/lib/models/protocols/pure/v1/engine/V1_Engine.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/engine/V1_Engine.js +15 -1
- package/lib/models/protocols/pure/v1/engine/V1_Engine.js.map +1 -1
- package/lib/models/protocols/pure/v1/engine/V1_EngineHelper.d.ts +6 -2
- package/lib/models/protocols/pure/v1/engine/V1_EngineHelper.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/engine/V1_EngineHelper.js +31 -16
- package/lib/models/protocols/pure/v1/engine/V1_EngineHelper.js.map +1 -1
- package/lib/models/protocols/pure/v1/engine/V1_EngineServerClient.d.ts +10 -0
- package/lib/models/protocols/pure/v1/engine/V1_EngineServerClient.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/engine/V1_EngineServerClient.js +10 -0
- package/lib/models/protocols/pure/v1/engine/V1_EngineServerClient.js.map +1 -1
- package/lib/models/protocols/pure/v1/engine/externalFormat/V1_ExternalFormatDescription.d.ts +28 -0
- package/lib/models/protocols/pure/v1/engine/externalFormat/V1_ExternalFormatDescription.d.ts.map +1 -0
- package/lib/models/protocols/pure/v1/engine/externalFormat/V1_ExternalFormatDescription.js +38 -0
- package/lib/models/protocols/pure/v1/engine/externalFormat/V1_ExternalFormatDescription.js.map +1 -0
- package/lib/models/protocols/pure/v1/engine/externalFormat/V1_ExternalFormatModelGeneration.d.ts +25 -0
- package/lib/models/protocols/pure/v1/engine/externalFormat/V1_ExternalFormatModelGeneration.d.ts.map +1 -0
- package/lib/models/protocols/pure/v1/engine/externalFormat/V1_ExternalFormatModelGeneration.js +35 -0
- package/lib/models/protocols/pure/v1/engine/externalFormat/V1_ExternalFormatModelGeneration.js.map +1 -0
- package/lib/models/protocols/pure/v1/model/context/V1_PureModelContextData.d.ts +0 -2
- package/lib/models/protocols/pure/v1/model/context/V1_PureModelContextData.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/model/context/V1_PureModelContextData.js +0 -3
- package/lib/models/protocols/pure/v1/model/context/V1_PureModelContextData.js.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/externalFormat/connection/V1_DSLExternalFormat_ExternalFormatConnection.d.ts +24 -0
- package/lib/models/protocols/pure/v1/model/packageableElements/externalFormat/connection/V1_DSLExternalFormat_ExternalFormatConnection.d.ts.map +1 -0
- package/lib/models/protocols/pure/v1/model/packageableElements/externalFormat/connection/V1_DSLExternalFormat_ExternalFormatConnection.js +32 -0
- package/lib/models/protocols/pure/v1/model/packageableElements/externalFormat/connection/V1_DSLExternalFormat_ExternalFormatConnection.js.map +1 -0
- package/lib/models/protocols/pure/v1/model/packageableElements/externalFormat/connection/V1_DSLExternalFormat_UrlStream.d.ts +21 -0
- package/lib/models/protocols/pure/v1/model/packageableElements/externalFormat/connection/V1_DSLExternalFormat_UrlStream.d.ts.map +1 -0
- package/lib/models/protocols/pure/v1/model/packageableElements/externalFormat/connection/V1_DSLExternalFormat_UrlStream.js +24 -0
- package/lib/models/protocols/pure/v1/model/packageableElements/externalFormat/connection/V1_DSLExternalFormat_UrlStream.js.map +1 -0
- package/lib/models/protocols/pure/v1/model/packageableElements/externalFormat/schemaSet/V1_DSLExternalFormat_Schema.d.ts +23 -0
- package/lib/models/protocols/pure/v1/model/packageableElements/externalFormat/schemaSet/V1_DSLExternalFormat_Schema.d.ts.map +1 -0
- package/lib/models/protocols/pure/v1/model/packageableElements/externalFormat/schemaSet/V1_DSLExternalFormat_Schema.js +31 -0
- package/lib/models/protocols/pure/v1/model/packageableElements/externalFormat/schemaSet/V1_DSLExternalFormat_Schema.js.map +1 -0
- package/lib/models/protocols/pure/v1/model/packageableElements/externalFormat/schemaSet/V1_DSLExternalFormat_SchemaSet.d.ts +25 -0
- package/lib/models/protocols/pure/v1/model/packageableElements/externalFormat/schemaSet/V1_DSLExternalFormat_SchemaSet.d.ts.map +1 -0
- package/lib/models/protocols/pure/v1/model/packageableElements/externalFormat/schemaSet/V1_DSLExternalFormat_SchemaSet.js +34 -0
- package/lib/models/protocols/pure/v1/model/packageableElements/externalFormat/schemaSet/V1_DSLExternalFormat_SchemaSet.js.map +1 -0
- package/lib/models/protocols/pure/v1/model/packageableElements/externalFormat/store/V1_BindingTransformer.d.ts +21 -0
- package/lib/models/protocols/pure/v1/model/packageableElements/externalFormat/store/V1_BindingTransformer.d.ts.map +1 -0
- package/lib/models/protocols/pure/v1/model/packageableElements/externalFormat/store/V1_BindingTransformer.js +24 -0
- package/lib/models/protocols/pure/v1/model/packageableElements/externalFormat/store/V1_BindingTransformer.js.map +1 -0
- package/lib/models/protocols/pure/v1/model/packageableElements/externalFormat/store/V1_DSLExternalFormat_Binding.d.ts +28 -0
- package/lib/models/protocols/pure/v1/model/packageableElements/externalFormat/store/V1_DSLExternalFormat_Binding.d.ts.map +1 -0
- package/lib/models/protocols/pure/v1/model/packageableElements/externalFormat/store/V1_DSLExternalFormat_Binding.js +38 -0
- package/lib/models/protocols/pure/v1/model/packageableElements/externalFormat/store/V1_DSLExternalFormat_Binding.js.map +1 -0
- package/lib/models/protocols/pure/v1/model/packageableElements/externalFormat/store/V1_DSLExternalFormat_ModelUnit.d.ts +22 -0
- package/lib/models/protocols/pure/v1/model/packageableElements/externalFormat/store/V1_DSLExternalFormat_ModelUnit.d.ts.map +1 -0
- package/lib/models/protocols/pure/v1/model/packageableElements/externalFormat/store/V1_DSLExternalFormat_ModelUnit.js +29 -0
- package/lib/models/protocols/pure/v1/model/packageableElements/externalFormat/store/V1_DSLExternalFormat_ModelUnit.js.map +1 -0
- package/lib/models/protocols/pure/v1/model/packageableElements/mapping/V1_ClassMapping.d.ts +2 -0
- package/lib/models/protocols/pure/v1/model/packageableElements/mapping/V1_ClassMapping.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/mapping/V1_ClassMapping.js.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/mapping/V1_MergeOperationClassMapping.d.ts +25 -0
- package/lib/models/protocols/pure/v1/model/packageableElements/mapping/V1_MergeOperationClassMapping.d.ts.map +1 -0
- package/lib/models/protocols/pure/v1/model/packageableElements/mapping/V1_MergeOperationClassMapping.js +34 -0
- package/lib/models/protocols/pure/v1/model/packageableElements/mapping/V1_MergeOperationClassMapping.js.map +1 -0
- package/lib/models/protocols/pure/v1/model/packageableElements/mapping/V1_OperationClassMapping.d.ts +2 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/mapping/V1_OperationClassMapping.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/mapping/V1_OperationClassMapping.js +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/mapping/V1_OperationClassMapping.js.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/store/relational/connection/V1_DatasourceSpecification.d.ts +4 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/store/relational/connection/V1_DatasourceSpecification.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/store/relational/connection/V1_DatasourceSpecification.js +8 -2
- package/lib/models/protocols/pure/v1/model/packageableElements/store/relational/connection/V1_DatasourceSpecification.js.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/store/relational/mapping/V1_RelationalPropertyMapping.d.ts +2 -0
- package/lib/models/protocols/pure/v1/model/packageableElements/store/relational/mapping/V1_RelationalPropertyMapping.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/store/relational/mapping/V1_RelationalPropertyMapping.js +2 -0
- package/lib/models/protocols/pure/v1/model/packageableElements/store/relational/mapping/V1_RelationalPropertyMapping.js.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/store/relational/model/V1_RelationalDataType.d.ts +3 -0
- package/lib/models/protocols/pure/v1/model/packageableElements/store/relational/model/V1_RelationalDataType.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/store/relational/model/V1_RelationalDataType.js +5 -0
- package/lib/models/protocols/pure/v1/model/packageableElements/store/relational/model/V1_RelationalDataType.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/from/V1_ConnectionTransformer.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/from/V1_ConnectionTransformer.js +4 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/from/V1_ConnectionTransformer.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/from/V1_DatabaseTransformer.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/from/V1_DatabaseTransformer.js +5 -2
- package/lib/models/protocols/pure/v1/transformation/pureGraph/from/V1_DatabaseTransformer.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/from/V1_MappingTransformer.d.ts +2 -0
- package/lib/models/protocols/pure/v1/transformation/pureGraph/from/V1_MappingTransformer.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/from/V1_MappingTransformer.js +34 -2
- package/lib/models/protocols/pure/v1/transformation/pureGraph/from/V1_MappingTransformer.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_DSLExternalFormat_GraphBuilderHelper.d.ts +22 -0
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_DSLExternalFormat_GraphBuilderHelper.d.ts.map +1 -0
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_DSLExternalFormat_GraphBuilderHelper.js +19 -0
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_DSLExternalFormat_GraphBuilderHelper.js.map +1 -0
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelClassMappingFirstPassBuilder.d.ts +2 -0
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelClassMappingFirstPassBuilder.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelClassMappingFirstPassBuilder.js +8 -0
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelClassMappingFirstPassBuilder.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelClassMappingSecondPassBuilder.d.ts +2 -0
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelClassMappingSecondPassBuilder.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelClassMappingSecondPassBuilder.js +3 -0
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelClassMappingSecondPassBuilder.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelPropertyMappingBuilder.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelPropertyMappingBuilder.js +8 -0
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelPropertyMappingBuilder.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_DatabaseBuilderHelper.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_DatabaseBuilderHelper.js +5 -2
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_DatabaseBuilderHelper.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_RelationalConnectionBuilderHelper.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_RelationalConnectionBuilderHelper.js +5 -3
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_RelationalConnectionBuilderHelper.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_ValueSpecificationBuilderHelper.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_ValueSpecificationBuilderHelper.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_ConnectionSerializationHelper.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_ConnectionSerializationHelper.js +4 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_ConnectionSerializationHelper.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DSLExternalFormat_ProtocolHelper.d.ts +25 -0
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DSLExternalFormat_ProtocolHelper.d.ts.map +1 -0
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DSLExternalFormat_ProtocolHelper.js +62 -0
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DSLExternalFormat_ProtocolHelper.js.map +1 -0
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DatabaseSerializationHelper.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DatabaseSerializationHelper.js +10 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DatabaseSerializationHelper.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_MappingSerializationHelper.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_MappingSerializationHelper.js +23 -2
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_MappingSerializationHelper.js.map +1 -1
- package/lib/package.json +12 -8
- package/package.json +15 -11
- package/src/GraphManagerState.ts +10 -3
- package/src/GraphManagerTestUtils.tsx +17 -3
- package/src/MetaModelConst.ts +2 -0
- package/src/graph/DSLExternalFormat_Extension.ts +37 -0
- package/src/graph/DSLExternalFormat_PureGraphPlugin.ts +35 -0
- package/src/graph/PureModel.ts +8 -2
- package/src/graphManager/AbstractPureGraphManager.ts +13 -0
- package/src/graphManager/DSLExternalFormat_GraphManagerHelper.ts +30 -0
- package/src/graphManager/DSLExternalFormat_PureGraphManagerPlugin.ts +86 -0
- package/src/graphManager/GraphBuilderReport.ts +17 -0
- package/src/graphManager/GraphManagerLogEvent.ts +1 -1
- package/src/graphManager/action/EngineError.ts +3 -0
- package/src/graphManager/action/externalFormat/ExternalFormatDescription.ts +30 -0
- package/src/index.ts +16 -2
- package/src/models/DSLExternalFormat_ModelUtils.ts +24 -0
- package/src/models/metamodels/pure/packageableElements/PackageableElement.ts +1 -1
- package/src/models/metamodels/pure/packageableElements/domain/Package.ts +3 -2
- package/src/models/metamodels/pure/packageableElements/externalFormat/connection/DSLExternalFormat_ExternalFormatConnection.ts +57 -0
- package/src/models/metamodels/pure/packageableElements/externalFormat/connection/DSLExternalFormat_UrlStream.ts +39 -0
- package/src/models/metamodels/pure/packageableElements/externalFormat/schemaSet/DSLExternalFormat_Schema.ts +59 -0
- package/src/models/metamodels/pure/packageableElements/externalFormat/schemaSet/DSLExternalFormat_SchemaSet.ts +74 -0
- package/src/models/metamodels/pure/packageableElements/externalFormat/store/BindingTransformer.ts +44 -0
- package/src/models/metamodels/pure/packageableElements/externalFormat/store/DSLExternalFormat_Binding.ts +80 -0
- package/src/models/metamodels/pure/packageableElements/externalFormat/store/DSLExternalFormat_ModelUnit.ts +98 -0
- package/src/models/metamodels/pure/packageableElements/mapping/MergeOperationSetImplementation.ts +81 -0
- package/src/models/metamodels/pure/packageableElements/mapping/OperationSetImplementation.ts +1 -1
- package/src/models/metamodels/pure/packageableElements/mapping/SetImplementation.ts +5 -0
- package/src/models/metamodels/pure/packageableElements/store/relational/connection/DatasourceSpecification.ts +40 -9
- package/src/models/metamodels/pure/packageableElements/store/relational/mapping/RelationalPropertyMapping.ts +9 -0
- package/src/models/metamodels/pure/packageableElements/store/relational/model/RelationalDataType.ts +14 -0
- package/src/models/protocols/pure/DSLExternalFormat_PureProtocolProcessorPlugin.ts +417 -0
- package/src/models/protocols/pure/v1/V1_PureGraphManager.ts +46 -3
- package/src/models/protocols/pure/v1/engine/V1_Engine.ts +32 -0
- package/src/models/protocols/pure/v1/engine/V1_EngineHelper.ts +59 -29
- package/src/models/protocols/pure/v1/engine/V1_EngineServerClient.ts +28 -0
- package/src/models/protocols/pure/v1/engine/externalFormat/V1_ExternalFormatDescription.ts +46 -0
- package/src/models/protocols/pure/v1/engine/externalFormat/V1_ExternalFormatModelGeneration.ts +44 -0
- package/src/models/protocols/pure/v1/model/context/V1_PureModelContextData.ts +0 -9
- package/src/models/protocols/pure/v1/model/packageableElements/externalFormat/connection/V1_DSLExternalFormat_ExternalFormatConnection.ts +42 -0
- package/src/models/protocols/pure/v1/model/packageableElements/externalFormat/connection/V1_DSLExternalFormat_UrlStream.ts +26 -0
- package/src/models/protocols/pure/v1/model/packageableElements/externalFormat/schemaSet/V1_DSLExternalFormat_Schema.ts +33 -0
- package/src/models/protocols/pure/v1/model/packageableElements/externalFormat/schemaSet/V1_DSLExternalFormat_SchemaSet.ts +43 -0
- package/src/models/protocols/pure/v1/model/packageableElements/externalFormat/store/V1_BindingTransformer.ts +26 -0
- package/src/models/protocols/pure/v1/model/packageableElements/externalFormat/store/V1_DSLExternalFormat_Binding.ts +45 -0
- package/src/models/protocols/pure/v1/model/packageableElements/externalFormat/store/V1_DSLExternalFormat_ModelUnit.ts +31 -0
- package/src/models/protocols/pure/v1/model/packageableElements/mapping/V1_ClassMapping.ts +4 -0
- package/src/models/protocols/pure/v1/model/packageableElements/mapping/V1_MergeOperationClassMapping.ts +46 -0
- package/src/models/protocols/pure/v1/model/packageableElements/mapping/V1_OperationClassMapping.ts +1 -1
- package/src/models/protocols/pure/v1/model/packageableElements/store/relational/connection/V1_DatasourceSpecification.ts +8 -2
- package/src/models/protocols/pure/v1/model/packageableElements/store/relational/mapping/V1_RelationalPropertyMapping.ts +3 -0
- package/src/models/protocols/pure/v1/model/packageableElements/store/relational/model/V1_RelationalDataType.ts +9 -0
- package/src/models/protocols/pure/v1/transformation/pureGraph/from/V1_ConnectionTransformer.ts +4 -1
- package/src/models/protocols/pure/v1/transformation/pureGraph/from/V1_DatabaseTransformer.ts +4 -0
- package/src/models/protocols/pure/v1/transformation/pureGraph/from/V1_MappingTransformer.ts +53 -1
- package/src/models/protocols/pure/v1/transformation/pureGraph/to/V1_DSLExternalFormat_GraphBuilderHelper.ts +40 -0
- package/src/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelClassMappingFirstPassBuilder.ts +32 -0
- package/src/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelClassMappingSecondPassBuilder.ts +7 -0
- package/src/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelPropertyMappingBuilder.ts +11 -0
- package/src/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_DatabaseBuilderHelper.ts +4 -0
- package/src/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_RelationalConnectionBuilderHelper.ts +18 -5
- package/src/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_ValueSpecificationBuilderHelper.ts +1 -2
- package/src/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_ConnectionSerializationHelper.ts +4 -1
- package/src/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DSLExternalFormat_ProtocolHelper.ts +90 -0
- package/src/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DatabaseSerializationHelper.ts +13 -0
- package/src/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_MappingSerializationHelper.ts +30 -1
- package/tsconfig.json +28 -0
- package/CHANGELOG.md +0 -229
package/src/graph/PureModel.ts
CHANGED
|
@@ -27,6 +27,7 @@ import {
|
|
|
27
27
|
guaranteeType,
|
|
28
28
|
returnUndefOnError,
|
|
29
29
|
getClass,
|
|
30
|
+
IllegalStateError,
|
|
30
31
|
} from '@finos/legend-shared';
|
|
31
32
|
import { PrimitiveType } from '../models/metamodels/pure/packageableElements/domain/PrimitiveType';
|
|
32
33
|
import { Enumeration } from '../models/metamodels/pure/packageableElements/domain/Enumeration';
|
|
@@ -147,7 +148,7 @@ export class SystemModel extends BasicModel {
|
|
|
147
148
|
guaranteeType(
|
|
148
149
|
this.getOwnNullableElement(_package, true),
|
|
149
150
|
Package,
|
|
150
|
-
`
|
|
151
|
+
`Can't find auto-import package '${_package}'`,
|
|
151
152
|
),
|
|
152
153
|
);
|
|
153
154
|
}
|
|
@@ -429,7 +430,12 @@ export class PureModel extends BasicModel {
|
|
|
429
430
|
}
|
|
430
431
|
|
|
431
432
|
addElement(element: PackageableElement): void {
|
|
432
|
-
this.getNullableElement(element.path);
|
|
433
|
+
const existingElement = this.getNullableElement(element.path);
|
|
434
|
+
if (existingElement) {
|
|
435
|
+
throw new IllegalStateError(
|
|
436
|
+
`Can't create element '${element.path}': another element with the same path already existed`,
|
|
437
|
+
);
|
|
438
|
+
}
|
|
433
439
|
if (element instanceof Mapping) {
|
|
434
440
|
this.setOwnMapping(element.path, element);
|
|
435
441
|
} else if (element instanceof Store) {
|
|
@@ -59,6 +59,8 @@ import type { LightQuery, Query } from './action/query/Query';
|
|
|
59
59
|
import type { Entity } from '@finos/legend-model-storage';
|
|
60
60
|
import type { GraphPluginManager } from '../GraphPluginManager';
|
|
61
61
|
import type { QuerySearchSpecification } from './action/query/QuerySearchSpecification';
|
|
62
|
+
import type { ExternalFormatDescription } from './action/externalFormat/ExternalFormatDescription';
|
|
63
|
+
import type { ConfigurationProperty } from '../models/metamodels/pure/packageableElements/fileGeneration/ConfigurationProperty';
|
|
62
64
|
|
|
63
65
|
export interface TEMPORARY__EngineSetupConfig {
|
|
64
66
|
env: string;
|
|
@@ -238,6 +240,17 @@ export abstract class AbstractPureGraphManager {
|
|
|
238
240
|
graph: PureModel,
|
|
239
241
|
): Promise<Entity[]>;
|
|
240
242
|
|
|
243
|
+
// ------------------------------------------- External Format ----------------------------------
|
|
244
|
+
|
|
245
|
+
abstract getAvailableExternalFormatsDescriptions(): Promise<
|
|
246
|
+
ExternalFormatDescription[]
|
|
247
|
+
>;
|
|
248
|
+
|
|
249
|
+
abstract generateModelFromExternalFormat(
|
|
250
|
+
configs: ConfigurationProperty[],
|
|
251
|
+
graph: PureModel,
|
|
252
|
+
): Promise<string>;
|
|
253
|
+
|
|
241
254
|
// ------------------------------------------- Import -------------------------------------------
|
|
242
255
|
|
|
243
256
|
abstract getAvailableImportConfigurationDescriptions(): Promise<
|
|
@@ -0,0 +1,30 @@
|
|
|
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 { guaranteeType } from '@finos/legend-shared';
|
|
18
|
+
import type { PureModel } from '../graph/PureModel';
|
|
19
|
+
import { SchemaSet } from '../models/metamodels/pure/packageableElements/externalFormat/schemaSet/DSLExternalFormat_SchemaSet';
|
|
20
|
+
import { Binding } from '../models/metamodels/pure/packageableElements/externalFormat/store/DSLExternalFormat_Binding';
|
|
21
|
+
|
|
22
|
+
export const getSchemaSet = (path: string, graph: PureModel): SchemaSet =>
|
|
23
|
+
graph.getExtensionElement(
|
|
24
|
+
path,
|
|
25
|
+
SchemaSet,
|
|
26
|
+
`Can't find schema set element '${path}'`,
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
export const getBinding = (path: string, graph: PureModel): Binding =>
|
|
30
|
+
guaranteeType(graph.getStore(path), Binding, `Can't find binding '${path}'`);
|
|
@@ -0,0 +1,86 @@
|
|
|
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 packageJson from '../../package.json';
|
|
18
|
+
import { ExternalFormatConnection } from '../models/metamodels/pure/packageableElements/externalFormat/connection/DSLExternalFormat_ExternalFormatConnection';
|
|
19
|
+
import { SchemaSet } from '../models/metamodels/pure/packageableElements/externalFormat/schemaSet/DSLExternalFormat_SchemaSet';
|
|
20
|
+
import { Binding } from '../models/metamodels/pure/packageableElements/externalFormat/store/DSLExternalFormat_Binding';
|
|
21
|
+
import type {
|
|
22
|
+
DSLMapping_PureGraphManagerPlugin_Extension,
|
|
23
|
+
PureGrammarConnectionLabeler,
|
|
24
|
+
} from './DSLMapping_PureGraphManagerPlugin_Extension';
|
|
25
|
+
import {
|
|
26
|
+
type PureGrammarElementLabeler,
|
|
27
|
+
PureGraphManagerPlugin,
|
|
28
|
+
} from './PureGraphManagerPlugin';
|
|
29
|
+
|
|
30
|
+
const PURE_GRAMMAR_BINDING_PARSER_NAME = 'ExternalFormat';
|
|
31
|
+
const PURE_GRAMMAR_BINDING_ELEMENT_TYPE_LABEL = 'Binding';
|
|
32
|
+
const PURE_GRAMMAR_SCHEMA_SET_PARSER_NAME = 'ExternalFormat';
|
|
33
|
+
const PURE_GRAMMAR_SCHEMA_SET_ELEMENT_TYPE_LABEL = 'SchemaSet';
|
|
34
|
+
const PURE_GRAMMAR_EXTERNAL_FORMAT_CONNECTION_TYPE_LABEL =
|
|
35
|
+
'ExternalFormatConnection';
|
|
36
|
+
|
|
37
|
+
export class DSLExternalFormat_PureGraphManagerPlugin
|
|
38
|
+
extends PureGraphManagerPlugin
|
|
39
|
+
implements DSLMapping_PureGraphManagerPlugin_Extension
|
|
40
|
+
{
|
|
41
|
+
constructor() {
|
|
42
|
+
super(
|
|
43
|
+
packageJson.extensions.dsl_external_format_pureGraphManagerPlugin,
|
|
44
|
+
packageJson.version,
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
override getExtraPureGrammarParserNames(): string[] {
|
|
49
|
+
return [
|
|
50
|
+
PURE_GRAMMAR_BINDING_PARSER_NAME,
|
|
51
|
+
PURE_GRAMMAR_SCHEMA_SET_PARSER_NAME,
|
|
52
|
+
];
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
override getExtraPureGrammarKeywords(): string[] {
|
|
56
|
+
return [
|
|
57
|
+
PURE_GRAMMAR_BINDING_ELEMENT_TYPE_LABEL,
|
|
58
|
+
PURE_GRAMMAR_SCHEMA_SET_ELEMENT_TYPE_LABEL,
|
|
59
|
+
PURE_GRAMMAR_EXTERNAL_FORMAT_CONNECTION_TYPE_LABEL,
|
|
60
|
+
];
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
override getExtraPureGrammarElementLabelers(): PureGrammarElementLabeler[] {
|
|
64
|
+
return [
|
|
65
|
+
(element): string | undefined => {
|
|
66
|
+
if (element instanceof Binding) {
|
|
67
|
+
return PURE_GRAMMAR_BINDING_ELEMENT_TYPE_LABEL;
|
|
68
|
+
} else if (element instanceof SchemaSet) {
|
|
69
|
+
return PURE_GRAMMAR_SCHEMA_SET_ELEMENT_TYPE_LABEL;
|
|
70
|
+
}
|
|
71
|
+
return undefined;
|
|
72
|
+
},
|
|
73
|
+
];
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
getExtraPureGrammarConnectionLabelers(): PureGrammarConnectionLabeler[] {
|
|
77
|
+
return [
|
|
78
|
+
(connection): string | undefined => {
|
|
79
|
+
if (connection instanceof ExternalFormatConnection) {
|
|
80
|
+
return PURE_GRAMMAR_EXTERNAL_FORMAT_CONNECTION_TYPE_LABEL;
|
|
81
|
+
}
|
|
82
|
+
return undefined;
|
|
83
|
+
},
|
|
84
|
+
];
|
|
85
|
+
}
|
|
86
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
export class GraphBuilderReport {}
|
|
@@ -19,6 +19,7 @@ export enum GRAPH_MANAGER_LOG_EVENT {
|
|
|
19
19
|
|
|
20
20
|
GRAPH_BUILDER_SYSTEM_BUILT = 'GRAPH_BUILDER_SYSTEM_BUILT',
|
|
21
21
|
GRAPH_BUILDER_DEPENDENCIES_PREPROCESSED = 'GRAPH_BUILDER_DEPENDENCIES_PREPROCESSED',
|
|
22
|
+
GRAPH_BUILDER_DEPENDENCIES_ENTITIES_FETCHED = 'GRAPH_BUILDER_DEPENDENCIES_ENTITIES_FETCHED',
|
|
22
23
|
GRAPH_BUILDER_DEPENDENCIES_PROCESSED = 'GRAPH_BUILDER_DEPENDENCIES_PROCESSED',
|
|
23
24
|
GRAPH_BUILDER_DEPENDENCIES_BUILT = 'GRAPH_BUILDER_DEPENDENCIES_BUILT',
|
|
24
25
|
GRAPH_BUILDER_GENERATIONS_BUILT = 'GRAPH_BUILDER_GENERATIONS_BUILT',
|
|
@@ -32,7 +33,6 @@ export enum GRAPH_MANAGER_LOG_EVENT {
|
|
|
32
33
|
GRAPH_BUILDER_CONNECTIONS_BUILT = 'GRAPH_BUILDER_CONNECTIONS_BUILT',
|
|
33
34
|
GRAPH_BUILDER_RUNTIMES_BUILT = 'GRAPH_BUILDER_RUNTIMES_BUILT',
|
|
34
35
|
GRAPH_BUILDER_OTHER_ELEMENTS_BUILT = 'GRAPH_BUILDER_OTHER_ELEMENTS_BUILT',
|
|
35
|
-
|
|
36
36
|
// TODO: we should be able to move these out with modularization
|
|
37
37
|
GRAPH_BUILDER_FILE_GENERATIONS_BUILT = 'GRAPH_BUILDER_FILE_GENERATIONS_BUILT',
|
|
38
38
|
GRAPH_BUILDER_GENERATION_TREE_BUILT = 'GRAPH_BUILDER_GENERATION_TREE_BUILT',
|
|
@@ -39,3 +39,6 @@ export class EngineError extends ApplicationError {
|
|
|
39
39
|
export class ParserError extends EngineError {}
|
|
40
40
|
|
|
41
41
|
export class CompilationError extends EngineError {}
|
|
42
|
+
export class ExternalFormatError extends CompilationError {
|
|
43
|
+
schemaSourceInformation?: SourceInformation | undefined;
|
|
44
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
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 { GenerationProperty } from '../generation/GenerationConfigurationDescription';
|
|
18
|
+
|
|
19
|
+
export class ExternalFormatDescription {
|
|
20
|
+
name: string;
|
|
21
|
+
contentTypes: string[] = [];
|
|
22
|
+
supportsSchemaGeneration = false;
|
|
23
|
+
schemaGenerationProperties: GenerationProperty[] = [];
|
|
24
|
+
supportsModelGeneration = false;
|
|
25
|
+
modelGenerationProperties: GenerationProperty[] = [];
|
|
26
|
+
|
|
27
|
+
constructor(name: string) {
|
|
28
|
+
this.name = name;
|
|
29
|
+
}
|
|
30
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -69,7 +69,14 @@ export {
|
|
|
69
69
|
TagReference,
|
|
70
70
|
TagExplicitReference,
|
|
71
71
|
} from './models/metamodels/pure/packageableElements/domain/TagReference';
|
|
72
|
-
|
|
72
|
+
// metamodel external formats
|
|
73
|
+
export { Binding } from './models/metamodels/pure/packageableElements/externalFormat/store/DSLExternalFormat_Binding';
|
|
74
|
+
export { ModelUnit } from './models/metamodels/pure/packageableElements/externalFormat/store/DSLExternalFormat_ModelUnit';
|
|
75
|
+
export { SchemaSet } from './models/metamodels/pure/packageableElements/externalFormat/schemaSet/DSLExternalFormat_SchemaSet';
|
|
76
|
+
export { Schema as ExternalFormatSchema } from './models/metamodels/pure/packageableElements/externalFormat/schemaSet/DSLExternalFormat_Schema';
|
|
77
|
+
export { ExternalFormatConnection } from './models/metamodels/pure/packageableElements/externalFormat/connection/DSLExternalFormat_ExternalFormatConnection';
|
|
78
|
+
export { UrlStream } from './models/metamodels/pure/packageableElements/externalFormat/connection/DSLExternalFormat_UrlStream';
|
|
79
|
+
export { DSLExternalFormat_GraphPreset } from './graph/DSLExternalFormat_Extension';
|
|
73
80
|
// V1 protocols
|
|
74
81
|
export * from './models/protocols/pure/v1/model/packageableElements/V1_PackageableElement';
|
|
75
82
|
export { V1_StereotypePtr } from './models/protocols/pure/v1/model/packageableElements/domain/V1_StereotypePtr';
|
|
@@ -126,6 +133,8 @@ export { V1_Lambda } from './models/protocols/pure/v1/model/valueSpecification/r
|
|
|
126
133
|
export { V1_Variable } from './models/protocols/pure/v1/model/valueSpecification/V1_Variable';
|
|
127
134
|
export { V1_ValueSpecification } from './models/protocols/pure/v1/model/valueSpecification/V1_ValueSpecification';
|
|
128
135
|
export { V1_Multiplicity } from './models/protocols/pure/v1/model/packageableElements/domain/V1_Multiplicity';
|
|
136
|
+
export { V1_ExternalFormatDescription } from './models/protocols/pure/v1/engine/externalFormat/V1_ExternalFormatDescription';
|
|
137
|
+
export { V1_ExternalFormatModelGenerationInput } from './models/protocols/pure/v1/engine/externalFormat/V1_ExternalFormatModelGeneration';
|
|
129
138
|
|
|
130
139
|
// --------------------------------------------- EXECUTION PLAN --------------------------------------------------
|
|
131
140
|
|
|
@@ -185,6 +194,7 @@ export {
|
|
|
185
194
|
RawExecutionResult,
|
|
186
195
|
EXECUTION_SERIALIZATION_FORMAT,
|
|
187
196
|
} from './graphManager/action/execution/ExecutionResult';
|
|
197
|
+
export { ExternalFormatDescription } from './graphManager/action/externalFormat/ExternalFormatDescription';
|
|
188
198
|
export * from './graphManager/action/execution/ExecutionResultHelper';
|
|
189
199
|
export * from './graphManager/PureGraphManagerPlugin';
|
|
190
200
|
export * from './graphManager/action/query/Query';
|
|
@@ -229,7 +239,10 @@ export {
|
|
|
229
239
|
V1_serializeRawValueSpecification,
|
|
230
240
|
} from './models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_RawValueSpecificationSerializationHelper';
|
|
231
241
|
export { V1_transformPropertyReference } from './models/protocols/pure/v1/transformation/pureGraph/from/V1_MappingTransformer';
|
|
232
|
-
export {
|
|
242
|
+
export {
|
|
243
|
+
V1_EngineServerClient,
|
|
244
|
+
V1_ENGINE_LOG_EVENT,
|
|
245
|
+
} from './models/protocols/pure/v1/engine/V1_EngineServerClient';
|
|
233
246
|
export { V1_Engine } from './models/protocols/pure/v1/engine/V1_Engine';
|
|
234
247
|
export { V1_deserializePureModelContextData as V1_jsonToPureModelContextData } from './models/protocols/pure/v1/transformation/pureProtocol/V1_PureProtocolSerialization';
|
|
235
248
|
export {
|
|
@@ -240,6 +253,7 @@ export {
|
|
|
240
253
|
export { V1_serializeValueSpecification } from './models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_ValueSpecificationSerializer';
|
|
241
254
|
export { V1_ValueSpecificationBuilder } from './models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_ValueSpecificationBuilderHelper';
|
|
242
255
|
export * from './models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_CoreSerializationHelper';
|
|
256
|
+
export * from './models/protocols/pure/v1/transformation/pureGraph/to/V1_DSLExternalFormat_GraphBuilderHelper';
|
|
243
257
|
|
|
244
258
|
// --------------------------------------------- TO BE MODULARIZED --------------------------------------------------
|
|
245
259
|
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
export enum DSL_EXTERNAL_FORMAT_HASH_STRUCTURE {
|
|
18
|
+
BINDING = 'BINDING',
|
|
19
|
+
SCHEMA_SET = 'SCHEMA_SET',
|
|
20
|
+
SCHEMA = 'SCHEMA',
|
|
21
|
+
MODEL_UNIT = 'MODEL_UNIT',
|
|
22
|
+
URL_STREAM = 'URL_STREAM',
|
|
23
|
+
EXTERNAL_FORMAT_CONNECTION = 'EXTERNAL_FORMAT_CONNECTION',
|
|
24
|
+
}
|
|
@@ -90,7 +90,7 @@ export abstract class PackageableElement implements Hashable, Stubable {
|
|
|
90
90
|
isDeleted: computed,
|
|
91
91
|
path: computed,
|
|
92
92
|
_elementHashCode: computed,
|
|
93
|
-
// We need to enable `keepAlive` to facillitate
|
|
93
|
+
// We need to enable `keepAlive` to facillitate precomputation of element hash code
|
|
94
94
|
hashCode: computed({ keepAlive: true }),
|
|
95
95
|
setName: action,
|
|
96
96
|
setPackage: action,
|
|
@@ -23,7 +23,6 @@ import {
|
|
|
23
23
|
type Hashable,
|
|
24
24
|
hashArray,
|
|
25
25
|
assertTrue,
|
|
26
|
-
addUniqueEntry,
|
|
27
26
|
AssertionError,
|
|
28
27
|
} from '@finos/legend-shared';
|
|
29
28
|
import {
|
|
@@ -58,7 +57,9 @@ export class Package extends PackageableElement implements Hashable {
|
|
|
58
57
|
}
|
|
59
58
|
|
|
60
59
|
addChild(value: PackageableElement): void {
|
|
61
|
-
addUniqueEntry
|
|
60
|
+
// NOTE: here we directly push the element to the children array without any checks rather than use `addUniqueEntry` to improve performance.
|
|
61
|
+
// Duplication checks should be handled separately
|
|
62
|
+
this.children.push(value);
|
|
62
63
|
}
|
|
63
64
|
|
|
64
65
|
addElement(element: PackageableElement): void {
|
|
@@ -0,0 +1,57 @@
|
|
|
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, ContentType, hashArray } from '@finos/legend-shared';
|
|
18
|
+
import { action, computed, makeObservable, observable } from 'mobx';
|
|
19
|
+
import type { Binding } from '../store/DSLExternalFormat_Binding';
|
|
20
|
+
import type { UrlStream } from './DSLExternalFormat_UrlStream';
|
|
21
|
+
import {
|
|
22
|
+
Connection,
|
|
23
|
+
type ConnectionVisitor,
|
|
24
|
+
} from '../../connection/Connection';
|
|
25
|
+
import type { PackageableElementReference } from '../../PackageableElementReference';
|
|
26
|
+
import { DSL_EXTERNAL_FORMAT_HASH_STRUCTURE } from '../../../../../DSLExternalFormat_ModelUtils';
|
|
27
|
+
|
|
28
|
+
export class ExternalFormatConnection extends Connection implements Hashable {
|
|
29
|
+
static readonly CONTENT_TYPE = ContentType.TEXT_PLAIN;
|
|
30
|
+
externalSource!: UrlStream;
|
|
31
|
+
|
|
32
|
+
constructor(store: PackageableElementReference<Binding>) {
|
|
33
|
+
super(store);
|
|
34
|
+
|
|
35
|
+
makeObservable(this, {
|
|
36
|
+
externalSource: observable,
|
|
37
|
+
setSource: action,
|
|
38
|
+
hashCode: computed,
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
setSource(value: UrlStream): void {
|
|
43
|
+
this.externalSource = value;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
get hashCode(): string {
|
|
47
|
+
return hashArray([
|
|
48
|
+
DSL_EXTERNAL_FORMAT_HASH_STRUCTURE.EXTERNAL_FORMAT_CONNECTION,
|
|
49
|
+
this.store.hashValue,
|
|
50
|
+
this.externalSource,
|
|
51
|
+
]);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
accept_ConnectionVisitor<T>(visitor: ConnectionVisitor<T>): T {
|
|
55
|
+
return visitor.visit_Connection(this);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
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 { action, computed, makeObservable, observable } from 'mobx';
|
|
19
|
+
import { DSL_EXTERNAL_FORMAT_HASH_STRUCTURE } from '../../../../../DSLExternalFormat_ModelUtils';
|
|
20
|
+
|
|
21
|
+
export class UrlStream implements Hashable {
|
|
22
|
+
url!: string;
|
|
23
|
+
|
|
24
|
+
constructor() {
|
|
25
|
+
makeObservable(this, {
|
|
26
|
+
url: observable,
|
|
27
|
+
hashCode: computed,
|
|
28
|
+
setUrl: action,
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
setUrl(val: string): void {
|
|
33
|
+
this.url = val;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
get hashCode(): string {
|
|
37
|
+
return hashArray([DSL_EXTERNAL_FORMAT_HASH_STRUCTURE.URL_STREAM, this.url]);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
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 { observable, computed, makeObservable, action } from 'mobx';
|
|
18
|
+
import { uuid, hashArray, type Hashable } from '@finos/legend-shared';
|
|
19
|
+
import { DSL_EXTERNAL_FORMAT_HASH_STRUCTURE } from '../../../../../DSLExternalFormat_ModelUtils';
|
|
20
|
+
|
|
21
|
+
export class Schema implements Hashable {
|
|
22
|
+
uuid = uuid();
|
|
23
|
+
id?: string | undefined;
|
|
24
|
+
location?: string | undefined;
|
|
25
|
+
content!: string;
|
|
26
|
+
|
|
27
|
+
constructor() {
|
|
28
|
+
makeObservable(this, {
|
|
29
|
+
id: observable,
|
|
30
|
+
location: observable,
|
|
31
|
+
content: observable,
|
|
32
|
+
setId: action,
|
|
33
|
+
setLocation: action,
|
|
34
|
+
setContent: action,
|
|
35
|
+
hashCode: computed,
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
setId(value: string): void {
|
|
40
|
+
this.id = value;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
setLocation(value: string): void {
|
|
44
|
+
this.location = value;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
setContent(value: string): void {
|
|
48
|
+
this.content = value;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
get hashCode(): string {
|
|
52
|
+
return hashArray([
|
|
53
|
+
DSL_EXTERNAL_FORMAT_HASH_STRUCTURE.SCHEMA,
|
|
54
|
+
this.id ?? '',
|
|
55
|
+
this.location ?? '',
|
|
56
|
+
this.content,
|
|
57
|
+
]);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
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 { observable, action, makeObservable, override } from 'mobx';
|
|
18
|
+
import {
|
|
19
|
+
hashArray,
|
|
20
|
+
addUniqueEntry,
|
|
21
|
+
deleteEntry,
|
|
22
|
+
type Hashable,
|
|
23
|
+
} from '@finos/legend-shared';
|
|
24
|
+
import type { Schema } from './DSLExternalFormat_Schema';
|
|
25
|
+
import {
|
|
26
|
+
type PackageableElementVisitor,
|
|
27
|
+
PackageableElement,
|
|
28
|
+
} from '../../PackageableElement';
|
|
29
|
+
import { DSL_EXTERNAL_FORMAT_HASH_STRUCTURE } from '../../../../../DSLExternalFormat_ModelUtils';
|
|
30
|
+
|
|
31
|
+
export class SchemaSet extends PackageableElement implements Hashable {
|
|
32
|
+
format!: string;
|
|
33
|
+
schemas: Schema[] = [];
|
|
34
|
+
|
|
35
|
+
constructor(name: string) {
|
|
36
|
+
super(name);
|
|
37
|
+
|
|
38
|
+
makeObservable<SchemaSet, '_elementHashCode'>(this, {
|
|
39
|
+
format: observable,
|
|
40
|
+
schemas: observable,
|
|
41
|
+
setFormat: action,
|
|
42
|
+
addSchema: action,
|
|
43
|
+
deleteSchema: action,
|
|
44
|
+
_elementHashCode: override,
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
setFormat(value: string): void {
|
|
49
|
+
this.format = value;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
addSchema(value: Schema): void {
|
|
53
|
+
addUniqueEntry(this.schemas, value);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
deleteSchema(value: Schema): void {
|
|
57
|
+
deleteEntry(this.schemas, value);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
protected override get _elementHashCode(): string {
|
|
61
|
+
return hashArray([
|
|
62
|
+
DSL_EXTERNAL_FORMAT_HASH_STRUCTURE.SCHEMA_SET,
|
|
63
|
+
this.path,
|
|
64
|
+
this.format,
|
|
65
|
+
hashArray(this.schemas),
|
|
66
|
+
]);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
accept_PackageableElementVisitor<T>(
|
|
70
|
+
visitor: PackageableElementVisitor<T>,
|
|
71
|
+
): T {
|
|
72
|
+
return visitor.visit_PackageableElement(this);
|
|
73
|
+
}
|
|
74
|
+
}
|
package/src/models/metamodels/pure/packageableElements/externalFormat/store/BindingTransformer.ts
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
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 { action, computed, makeObservable, observable } from 'mobx';
|
|
19
|
+
import { CORE_HASH_STRUCTURE } from '../../../../../../MetaModelConst';
|
|
20
|
+
import type { PackageableElementReference } from '../../PackageableElementReference';
|
|
21
|
+
import type { Binding } from './DSLExternalFormat_Binding';
|
|
22
|
+
|
|
23
|
+
export class BindingTransformer implements Hashable {
|
|
24
|
+
binding!: PackageableElementReference<Binding>;
|
|
25
|
+
|
|
26
|
+
constructor() {
|
|
27
|
+
makeObservable(this, {
|
|
28
|
+
binding: observable,
|
|
29
|
+
hashCode: computed,
|
|
30
|
+
setBinding: action,
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
setBinding(value: PackageableElementReference<Binding>): void {
|
|
35
|
+
this.binding = value;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
get hashCode(): string {
|
|
39
|
+
return hashArray([
|
|
40
|
+
CORE_HASH_STRUCTURE.BINDING_TRANSFORMER,
|
|
41
|
+
this.binding.hashValue,
|
|
42
|
+
]);
|
|
43
|
+
}
|
|
44
|
+
}
|