From c9ade050f848a2e33d1c9ac592e6431766b1de21 Mon Sep 17 00:00:00 2001 From: Pierre De Belen Date: Sat, 24 Feb 2024 02:34:58 -0500 Subject: [PATCH] Clean up REPL (#2654) * Clean up REPL. Add support for the new relation project funciton in Engine * Continue module clean up * More module clean ups --- .../legend-engine-configuration/pom.xml | 5 + .../LegendPlanGeneratorExtension.java | 12 + .../legend-engine-repl-client/pom.xml | 94 ++++--- .../finos/legend/engine/repl}/LocalREPL.java | 2 +- .../legend/engine/repl/REPLInterface.java | 0 .../autocomplete/handlers/FromHandler.java | 2 - .../legend/engine/repl/client/Client.java | 238 +++--------------- .../legend/engine/repl/client/Command.java | 29 +++ .../engine/repl/client/commands/DB.java | 85 +++++++ .../engine/repl/client/commands/Debug.java | 64 +++++ .../engine/repl/client/commands/Execute.java | 153 +++++++++++ .../engine/repl/client/commands/Ext.java | 60 +++++ .../engine/repl/client/commands/Graph.java | 122 +++++++++ .../engine/repl/client/commands/Help.java | 57 +++++ .../engine/repl/client/commands/Load.java | 111 ++++++++ .../repl/client/jline3/JLine3Completer.java | 77 +----- .../repl/client/jline3/JLine3Highlighter.java | 25 +- .../legend-engine-repl-interface/pom.xml | 43 ---- .../legend-engine-repl-light/pom.xml | 31 --- .../legend-engine-repl-local/pom.xml | 96 ------- .../legend-engine-repl/pom.xml | 3 - .../legend-engine-server/pom.xml | 20 ++ .../legend/engine/server/PrintExtensions.java | 36 +++ .../plugin/InMemoryStoreExecutorBuilder.java | 7 + .../plugin/StoreStreamReaderBuilder.java | 1 - .../FakeRelationalStoreExecutorBuilder.java | 6 + .../FakeServiceStoreExecutorBuilder.java | 6 + .../extension/ExecutionExtension.java | 12 + .../ExecutionPlanJavaCompilerExtension.java | 14 ++ .../stores/StoreExecutorBuilder.java | 8 + .../ExternalFormatJavaCompilerExtension.java | 7 + .../ExternalFormatExecutionExtension.java | 7 + .../ExternalFormatRuntimeExtension.java | 13 + .../format/model/ExternalFormatExtension.java | 14 ++ ...ternalFormatSchemaGenerationExtension.java | 7 + ...xternalFormatModelGenerationExtension.java | 7 + .../ExternalFormatCompilerExtension.java | 7 + .../ExternalFormatGrammarParserExtension.java | 7 + ...xternalFormatGrammarComposerExtension.java | 6 + .../ExampleExternalFormatExtension.java | 14 ++ .../toPureGraph/CoreCompilerExtension.java | 7 + .../PackageableElementFourthPassBuilder.java | 1 + .../extension/CompilerExtension.java | 6 + .../toPureGraph/handlers/Handlers.java | 23 +- .../test/ModelStoreTestConnectionFactory.java | 7 + .../EmbeddedPureCompilerExtension.java | 7 + .../test/fromGrammar/TestRelationColumn.java | 40 --- .../TestRelationNotUsingDatabaseAccessor.java | 120 +++++++++ .../grammar/from/CorePureGrammarParser.java | 7 + .../extension/PureGrammarParserExtension.java | 6 + .../grammar/to/CorePureGrammarComposer.java | 6 + .../pure/grammar/to/PureGrammarComposer.java | 9 + .../PureGrammarComposerExtension.java | 6 + .../extensions/GrammarComposerExtension.java | 9 + .../extensions/GrammarParserExtension.java | 8 + .../extensions/ProtocolExtension.java | 9 + .../pure/v1/CorePureProtocolExtension.java | 7 + .../extension/ConnectionFactoryExtension.java | 5 + .../v1/extension/PureProtocolExtension.java | 6 + .../identity/factory/IdentityFactory.java | 3 +- .../legend-engine-shared-extensions/pom.xml | 13 + .../shared/core/extension/Extensions.java | 109 ++++++++ .../extension/LegendConnectionExtension.java | 8 + .../core/extension/LegendExtension.java | 17 ++ .../LegendExternalFormatExtension.java | 5 +- .../extension/LegendGenerationExtension.java | 3 + .../extension/LegendLanguageExtension.java | 8 + .../core/extension/LegendPlanExtension.java | 8 + .../shared/core/extension/TreeNode.java | 65 +++++ .../shared/core/extension/TestTreeNode.java | 72 ++++++ .../FunctionTestableRunnerExtension.java | 8 +- .../MappingTestableRunnerExtension.java | 7 + .../extension/TestableRunnerExtension.java | 14 ++ .../core/CoreLegendPureCoreExtension.java | 22 ++ ...ExternalFormatLegendPureCoreExtension.java | 15 ++ .../core/FeatureLegendPureCoreExtension.java | 14 ++ .../JavaBindingLegendPureCoreExtension.java | 33 +++ .../core/StoreLegendPureCoreExtension.java | 14 ++ .../core/TestLegendPureCoreExtension.java | 15 ++ ...chDocumentArtifactGenerationExtension.java | 7 + .../services/EntitlementServiceExtension.java | 3 +- .../core/ArrowLegendPureCoreExtension.java | 8 + .../format/arrow/ArrowRuntimeExtension.java | 7 + .../AuthenticationCompilerExtension.java | 7 + .../AuthenticationGrammarParserExtension.java | 7 + ...uthenticationGrammarComposerExtension.java | 7 + .../AuthenticationDemoCompilerExtension.java | 8 + .../AuthenticationDemoParserExtension.java | 7 + .../AuthenticationDemoComposerExtension.java | 8 +- .../pom.xml | 4 + .../v1/AuthenticationProtocolExtension.java | 7 + .../extension/AvroGenerationExtension.java | 7 + .../api/BigQueryFunctionService.java | 6 + ...ryFunctionArtifactGenerationExtension.java | 8 + .../pom.xml | 4 + .../BigQueryFunctionCompilerExtension.java | 9 +- ...igQueryFunctionGrammarParserExtension.java | 7 + .../to/BigQueryFunctionGrammarComposer.java | 8 +- .../pom.xml | 11 +- .../BigQueryFunctionProtocolExtension.java | 7 + .../format/daml/DamlFormatExtension.java | 6 + .../generation/DAMLGenerationExtension.java | 13 + .../DataSpaceCompilerExtension.java | 6 + ...eAnalyticsArtifactGenerationExtension.java | 7 + .../from/DataSpaceParserExtension.java | 16 +- .../to/DataSpaceGrammarComposerExtension.java | 6 + .../pom.xml | 4 + .../pure/v1/DataSpaceProtocolExtension.java | 7 + .../toPureGraph/DiagramCompilerExtension.java | 7 + .../grammar/from/DiagramParserExtension.java | 7 + .../to/DiagramGrammarComposerExtension.java | 7 +- .../legend-engine-xt-diagram-protocol/pom.xml | 4 + .../pure/v1/DiagramProtocolExtension.java | 7 + .../v7/Elasticsearch7ExecutionExtension.java | 6 + .../ElasticsearchV7StoreExecutorBuilder.java | 7 + .../ElasticsearchCompilerExtension.java | 7 + .../ElasticsearchGrammarParserExtension.java | 7 + ...ElasticsearchGrammarComposerExtension.java | 10 +- .../pom.xml | 4 + .../v7/ElasticsearchV7ProtocolExtension.java | 7 + .../ElasticsearchLegendPureCoreExtension.java | 7 + ...ataJavaBindingLegendPureCoreExtension.java | 11 +- .../FlatDataExternalFormatExtension.java | 13 + .../core/FlatDataLegendPureCoreExtension.java | 7 + .../FlatDataJavaCompilerExtension.java | 7 + .../flatdata/FlatDataRuntimeExtension.java | 6 + .../service/FunctionActivatorService.java | 7 + .../format/extension/GenerationExtension.java | 6 + .../GenerationCompilerExtensionImpl.java | 7 + .../ArtifactGenerationExtension.java | 6 + .../extension/ModelGenerationExtension.java | 5 + .../from/GenerationParserExtension.java | 7 + .../GenerationGrammarComposerExtension.java | 7 +- .../pure/v1/GenerationProtocolExtension.java | 7 + ...SimpleEnumArtifactGenerationExtension.java | 9 + .../integration/GraphQLCompilerExtension.java | 7 + .../GraphQLGrammarParserExtension.java | 7 + .../GraphQLPureGrammarComposerExtension.java | 7 + .../GraphQLPureProtocolExtension.java | 7 + .../api/format/GraphQLFormatExtension.java | 8 +- .../api/format/GraphQLSDLFormatExtension.java | 7 + .../GraphQLGenerationExtension.java | 13 + .../api/HostedServiceService.java | 9 +- .../HostedServiceCompilerExtension.java | 8 +- ...tedServiceArtifactGenerationExtension.java | 11 +- .../HostedServiceGrammarParserExtension.java | 7 + .../to/HostedServiceGrammarComposer.java | 8 +- .../HostedServiceProtocolExtension.java | 8 +- ...ingJavaBindingLegendPureCoreExtension.java | 11 +- ...M2MJavaBindingLegendPureCoreExtension.java | 11 +- .../JSONSchemaGenerationExtension.java | 13 + ...SONJavaBindingLegendPureCoreExtension.java | 11 +- .../legend-engine-xt-json-model/pom.xml | 4 + .../json/JsonExternalFormatExtension.java | 14 ++ .../json/compile/JsonSchemaCompiler.java | 7 + .../core/JSONLegendPureCoreExtension.java | 7 + .../json/JsonJavaCompilerExtension.java | 7 + .../json/JsonSchemaRuntimeExtension.java | 6 + .../toPureGraph/MasteryCompilerExtension.java | 7 + .../IMasteryModelGenerationExtension.java | 2 +- .../extension/MasterRecordGenExtension.java | 7 + .../grammar/from/MasteryParserExtension.java | 7 + .../to/MasteryGrammarComposerExtension.java | 7 +- .../legend-engine-xt-mastery-protocol/pom.xml | 4 + .../pure/v1/MasteryProtocolExtension.java | 7 + .../MongoDBStoreExecutionExtension.java | 6 + ...DBDocumentFormatJavaCompilerExtension.java | 7 + .../plugin/MongoDBStoreExecutorBuilder.java | 7 + .../MongoDBStoreTestConnectionFactory.java | 7 + .../integration/MongoDBCompilerExtension.java | 6 + .../MongoDBGrammarComposerExtension.java | 7 +- .../MongoDBGrammarParserExtension.java | 7 + .../core/MongoDBLegendPureCoreExtension.java | 7 + .../pom.xml | 4 + .../MongoDBPureProtocolExtension.java | 7 + .../extension/MorphirGenerationExtension.java | 7 + .../OpenApiArtifactGenerationExtension.java | 7 + .../pom.xml | 4 + .../PersistenceCloudCompilerExtension.java | 8 +- .../from/PersistenceCloudParserExtension.java | 7 + .../to/PersistenceCloudComposerExtension.java | 7 + .../pom.xml | 4 + .../v1/PersistenceCloudProtocolExtension.java | 7 + .../PersistenceCompilerExtension.java | 7 + .../from/PersistenceParserExtension.java | 7 + .../to/PersistenceComposerExtension.java | 7 +- .../pom.xml | 4 + .../pure/v1/PersistenceProtocolExtension.java | 7 + ...ersistenceRelationalCompilerExtension.java | 7 + .../PersistenceRelationalParserExtension.java | 7 + ...ersistenceRelationalComposerExtension.java | 6 + .../pom.xml | 4 + ...ersistenceRelationalProtocolExtension.java | 7 + .../PersistenceTestableRunnerExtension.java | 7 + .../protobuf/ProtobufFormatExtension.java | 7 + .../ProtobufGenerationExtension.java | 13 + .../relational/AthenaConnectionExtension.java | 12 + .../toPureGraph/AthenaCompilerExtension.java | 7 + .../from/AthenaGrammarParserExtension.java | 7 + .../to/AthenaGrammarComposerExtension.java | 7 + .../pure/v1/AthenaProtocolExtension.java | 7 + .../BigQueryConnectionExtension.java | 12 + .../BigQueryCompilerExtension.java | 7 + .../from/BigQueryGrammarParserExtension.java | 7 + .../to/BigQueryGrammarComposerExtension.java | 7 + .../pure/v1/BigQueryProtocolExtension.java | 7 + .../DatabricksConnectionExtension.java | 12 + .../DatabricksCompilerExtension.java | 7 + .../DatabricksGrammarParserExtension.java | 7 + .../DatabricksGrammarComposerExtension.java | 7 + .../pure/v1/DatabricksProtocolExtension.java | 7 + .../pom.xml | 14 +- .../MemSQLTestContainer.java | 11 +- .../relational/MemSQLConnectionExtension.java | 12 + .../PostgresTestContainers.java | 7 + .../PostgresConnectionExtension.java | 12 + .../RedshiftConnectionExtension.java | 12 + .../RedshiftCompilerExtension.java | 7 + .../from/RedshiftGrammarParserExtension.java | 7 + .../to/RedshiftGrammarComposerExtension.java | 7 + .../pure/v1/RedshiftProtocolExtension.java | 7 + .../SnowflakeConnectionExtension.java | 12 + .../SnowflakeCompilerExtension.java | 7 + .../from/SnowflakeGrammarParserExtension.java | 7 + .../to/SnowflakeGrammarComposerExtension.java | 6 + .../pure/v1/SnowflakeProtocolExtension.java | 7 + .../SpannerConnectionExtension.java | 12 + .../SpannerStrategicConnectionExtension.java | 40 ++- .../toPureGraph/SpannerCompilerExtension.java | 7 + .../from/SpannerGrammarParserExtension.java | 8 + .../to/SpannerGrammarComposerExtension.java | 7 + .../pure/v1/SpannerProtocolExtension.java | 7 + .../SqlServerTestContainers.java | 6 + .../SqlServerConnectionExtension.java | 12 + .../dynamicTestConnections/H2AlloyServer.java | 7 + ...stContainersWithDelegatedKerberosAuth.java | 13 + ...TestContainersWithUserAndPasswordAuth.java | 13 + .../relational/TrinoConnectionExtension.java | 12 + .../toPureGraph/TrinoCompilerExtension.java | 7 + .../from/TrinoGrammarParserExtension.java | 7 + .../to/TrinoGrammarComposerExtension.java | 6 + .../pure/v1/TrinoProtocolExtension.java | 7 + .../connection/ConnectionExtension.java | 6 + .../tests/api/DynamicTestConnection.java | 6 + .../RelationalExecutionExtension.java | 6 + .../RelationalStoreExecutorBuilder.java | 8 + .../test/RelationalConnectionFactory.java | 7 + .../RelationalCompilerExtension.java | 8 +- .../RelationalGrammarParserExtension.java | 8 +- .../RelationalGrammarComposerExtension.java | 8 +- ...nalJavaBindingLegendPureCoreExtension.java | 11 +- .../pure/v1/RelationalProtocolExtension.java | 7 + .../RelationalLegendPureCoreExtension.java | 7 + .../extension/RosettaGenerationExtension.java | 7 + .../core/ServiceLegendPureCoreExtension.java | 8 + .../ServiceCompilerExtensionImpl.java | 7 + .../grammar/from/ServiceParserExtension.java | 7 + .../to/ServiceGrammarComposerExtension.java | 7 +- .../pure/v1/ServiceProtocolExtension.java | 7 + .../ServiceTestableRunnerExtension.java | 7 + .../ServiceStoreExecutionExtension.java | 6 + .../plugin/ServiceStoreExecutorBuilder.java | 8 +- .../ServiceStoreTestConnectionFactory.java | 7 + .../ServiceStoreCompilerExtension.java | 7 + .../ServiceStoreGrammarParserExtension.java | 7 + .../ServiceStoreGrammarComposerExtension.java | 7 +- ...oreJavaBindingLegendPureCoreExtension.java | 11 +- .../pom.xml | 4 + .../v1/ServiceStoreProtocolExtension.java | 7 + .../ServiceStoreLegendPureCoreExtension.java | 7 + .../snowflakeApp/api/SnowflakeAppService.java | 7 +- .../SnowflakeAppCompilerExtension.java | 7 + ...owflakeAppArtifactGenerationExtension.java | 7 + .../SnowflakeAppGrammarParserExtension.java | 7 + .../to/SnowflakeAppGrammarComposer.java | 8 +- .../pom.xml | 21 +- .../SnowflakeAppProtocolExtension.java | 7 + .../integration/SQLCompilerExtension.java | 7 + .../SQLGrammarParserExtension.java | 7 + .../SQLPureGrammarComposerExtension.java | 7 + .../integration/SQLPureProtocolExtension.java | 7 + .../legend-engine-xt-text-compiler/pom.xml | 9 + .../toPureGraph/TextCompilerExtension.java | 7 + .../grammar/from/TextParserExtension.java | 7 + .../to/TextGrammarComposerExtension.java | 6 + .../legend-engine-xt-text-protocol/pom.xml | 4 + .../pure/v1/TextProtocolExtension.java | 7 + ...XMLJavaBindingLegendPureCoreExtension.java | 11 +- .../xsd/XsdExternalFormatExtension.java | 7 + .../code/core/XMLLegendPureCoreExtension.java | 7 + .../format/xml/XmlJavaCompilerExtension.java | 7 + .../format/xml/XsdRuntimeExtension.java | 6 + pom.xml | 6 + 293 files changed, 3268 insertions(+), 636 deletions(-) rename legend-engine-config/legend-engine-repl/{legend-engine-repl-local/src/main/java/org/finos/legend/engine/repl/local => legend-engine-repl-client/src/main/java/org/finos/legend/engine/repl}/LocalREPL.java (99%) rename legend-engine-config/legend-engine-repl/{legend-engine-repl-interface => legend-engine-repl-client}/src/main/java/org/finos/legend/engine/repl/REPLInterface.java (100%) create mode 100644 legend-engine-config/legend-engine-repl/legend-engine-repl-client/src/main/java/org/finos/legend/engine/repl/client/Command.java create mode 100644 legend-engine-config/legend-engine-repl/legend-engine-repl-client/src/main/java/org/finos/legend/engine/repl/client/commands/DB.java create mode 100644 legend-engine-config/legend-engine-repl/legend-engine-repl-client/src/main/java/org/finos/legend/engine/repl/client/commands/Debug.java create mode 100644 legend-engine-config/legend-engine-repl/legend-engine-repl-client/src/main/java/org/finos/legend/engine/repl/client/commands/Execute.java create mode 100644 legend-engine-config/legend-engine-repl/legend-engine-repl-client/src/main/java/org/finos/legend/engine/repl/client/commands/Ext.java create mode 100644 legend-engine-config/legend-engine-repl/legend-engine-repl-client/src/main/java/org/finos/legend/engine/repl/client/commands/Graph.java create mode 100644 legend-engine-config/legend-engine-repl/legend-engine-repl-client/src/main/java/org/finos/legend/engine/repl/client/commands/Help.java create mode 100644 legend-engine-config/legend-engine-repl/legend-engine-repl-client/src/main/java/org/finos/legend/engine/repl/client/commands/Load.java delete mode 100644 legend-engine-config/legend-engine-repl/legend-engine-repl-interface/pom.xml delete mode 100644 legend-engine-config/legend-engine-repl/legend-engine-repl-light/pom.xml delete mode 100644 legend-engine-config/legend-engine-repl/legend-engine-repl-local/pom.xml create mode 100644 legend-engine-config/legend-engine-server/src/test/java/org/finos/legend/engine/server/PrintExtensions.java delete mode 100644 legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-compiler/src/test/java/org/finos/legend/engine/language/pure/compiler/test/fromGrammar/TestRelationColumn.java create mode 100644 legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-compiler/src/test/java/org/finos/legend/engine/language/pure/compiler/test/fromGrammar/TestRelationNotUsingDatabaseAccessor.java create mode 100644 legend-engine-core/legend-engine-core-shared/legend-engine-shared-extensions/src/main/java/org/finos/legend/engine/shared/core/extension/Extensions.java create mode 100644 legend-engine-core/legend-engine-core-shared/legend-engine-shared-extensions/src/main/java/org/finos/legend/engine/shared/core/extension/TreeNode.java create mode 100644 legend-engine-core/legend-engine-core-shared/legend-engine-shared-extensions/src/test/java/org/finos/legend/engine/shared/core/extension/TestTreeNode.java create mode 100644 legend-engine-pure/legend-engine-pure-code/legend-engine-pure-code-core-extension/src/main/java/org/finos/legend/engine/pure/code/core/JavaBindingLegendPureCoreExtension.java diff --git a/legend-engine-config/legend-engine-configuration/pom.xml b/legend-engine-config/legend-engine-configuration/pom.xml index c09c07baa47..164416939d7 100644 --- a/legend-engine-config/legend-engine-configuration/pom.xml +++ b/legend-engine-config/legend-engine-configuration/pom.xml @@ -42,9 +42,14 @@ org.finos.legend.engine legend-engine-executionPlan-generation + org.eclipse.collections eclipse-collections-api + + org.eclipse.collections + eclipse-collections + diff --git a/legend-engine-config/legend-engine-configuration/src/main/java/org/finos/legend/engine/plan/generation/extension/LegendPlanGeneratorExtension.java b/legend-engine-config/legend-engine-configuration/src/main/java/org/finos/legend/engine/plan/generation/extension/LegendPlanGeneratorExtension.java index fbae6346d2d..3f2a68e7214 100644 --- a/legend-engine-config/legend-engine-configuration/src/main/java/org/finos/legend/engine/plan/generation/extension/LegendPlanGeneratorExtension.java +++ b/legend-engine-config/legend-engine-configuration/src/main/java/org/finos/legend/engine/plan/generation/extension/LegendPlanGeneratorExtension.java @@ -22,6 +22,18 @@ public class LegendPlanGeneratorExtension implements PlanGeneratorExtension { + @Override + public String type() + { + return "Protocol_Version_Transformer"; + } + + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Version_Transformer"); + } + @Override public MutableList getExtraPlanTransformers() { diff --git a/legend-engine-config/legend-engine-repl/legend-engine-repl-client/pom.xml b/legend-engine-config/legend-engine-repl/legend-engine-repl-client/pom.xml index 57c0a48293d..a3290de42ab 100644 --- a/legend-engine-config/legend-engine-repl/legend-engine-repl-client/pom.xml +++ b/legend-engine-config/legend-engine-repl/legend-engine-repl-client/pom.xml @@ -27,98 +27,124 @@ Legend Engine - REPL - Client + org.jline jline - 3.24.1 + + + - org.finos.legend.engine - legend-engine-repl-interface + org.finos.legend.pure + legend-pure-m4 - org.eclipse.collections - eclipse-collections + org.finos.legend.pure + legend-pure-m3-core - org.eclipse.collections - eclipse-collections-api + org.finos.legend.engine + legend-engine-protocol - org.finos.legend.pure - legend-pure-runtime-java-engine-compiled + org.finos.legend.engine + legend-engine-protocol-pure - org.finos.legend.pure - legend-pure-m2-dsl-store-pure + org.finos.legend.engine + legend-engine-language-pure-grammar - org.finos.legend.pure - legend-pure-m4 + org.finos.legend.engine + legend-engine-language-pure-compiler - org.finos.legend.pure - legend-pure-m2-store-relational-pure + org.finos.legend.engine + legend-engine-shared-extensions + + + + + + org.finos.legend.engine + legend-engine-pure-code-compiled-core org.finos.legend.pure - legend-pure-m3-core + legend-pure-runtime-java-engine-compiled org.finos.legend.engine - legend-engine-repl-local + legend-engine-pure-platform-java + Runtime + + + org.finos.legend.engine - legend-engine-executionPlan-execution + legend-engine-pure-code-core-extension org.finos.legend.engine - legend-engine-xt-relationalStore-executionPlan + legend-engine-executionPlan-generation org.finos.legend.engine - legend-engine-language-pure-compiler + legend-engine-executionPlan-execution + + + - org.finos.legend.engine - legend-engine-protocol-pure + org.finos.legend.pure + legend-pure-m2-dsl-store-pure - org.finos.legend.engine - legend-engine-language-pure-grammar + org.finos.legend.pure + legend-pure-m2-store-relational-pure org.finos.legend.engine - legend-engine-pure-code-core-extension + legend-engine-xt-relationalStore-executionPlan org.finos.legend.engine - legend-engine-executionPlan-generation + legend-engine-xt-relationalStore-grammar + Runtime + + - org.finos.legend.engine - legend-engine-pure-code-compiled-core + org.eclipse.collections + eclipse-collections - org.finos.legend.engine - legend-engine-shared-core + org.eclipse.collections + eclipse-collections-api + com.fasterxml.jackson.core jackson-databind - - org.finos.legend.engine - legend-engine-protocol - + org.apache.commons commons-lang3 + junit junit + + + + + org.finos.legend.engine + legend-engine-shared-core + diff --git a/legend-engine-config/legend-engine-repl/legend-engine-repl-local/src/main/java/org/finos/legend/engine/repl/local/LocalREPL.java b/legend-engine-config/legend-engine-repl/legend-engine-repl-client/src/main/java/org/finos/legend/engine/repl/LocalREPL.java similarity index 99% rename from legend-engine-config/legend-engine-repl/legend-engine-repl-local/src/main/java/org/finos/legend/engine/repl/local/LocalREPL.java rename to legend-engine-config/legend-engine-repl/legend-engine-repl-client/src/main/java/org/finos/legend/engine/repl/LocalREPL.java index c5e743adf65..b891fd4e0a9 100644 --- a/legend-engine-config/legend-engine-repl/legend-engine-repl-local/src/main/java/org/finos/legend/engine/repl/local/LocalREPL.java +++ b/legend-engine-config/legend-engine-repl/legend-engine-repl-client/src/main/java/org/finos/legend/engine/repl/LocalREPL.java @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package org.finos.legend.engine.repl.local; +package org.finos.legend.engine.repl; import org.eclipse.collections.api.RichIterable; import org.eclipse.collections.api.tuple.Pair; diff --git a/legend-engine-config/legend-engine-repl/legend-engine-repl-interface/src/main/java/org/finos/legend/engine/repl/REPLInterface.java b/legend-engine-config/legend-engine-repl/legend-engine-repl-client/src/main/java/org/finos/legend/engine/repl/REPLInterface.java similarity index 100% rename from legend-engine-config/legend-engine-repl/legend-engine-repl-interface/src/main/java/org/finos/legend/engine/repl/REPLInterface.java rename to legend-engine-config/legend-engine-repl/legend-engine-repl-client/src/main/java/org/finos/legend/engine/repl/REPLInterface.java diff --git a/legend-engine-config/legend-engine-repl/legend-engine-repl-client/src/main/java/org/finos/legend/engine/repl/autocomplete/handlers/FromHandler.java b/legend-engine-config/legend-engine-repl/legend-engine-repl-client/src/main/java/org/finos/legend/engine/repl/autocomplete/handlers/FromHandler.java index 2d9bc692a31..ad1e906ef6d 100644 --- a/legend-engine-config/legend-engine-repl/legend-engine-repl-client/src/main/java/org/finos/legend/engine/repl/autocomplete/handlers/FromHandler.java +++ b/legend-engine-config/legend-engine-repl/legend-engine-repl-client/src/main/java/org/finos/legend/engine/repl/autocomplete/handlers/FromHandler.java @@ -40,7 +40,6 @@ public String functionName() public MutableList proposedParameters(AppliedFunction currentFunc, GenericType leftType, PureModel pureModel, Completer completer, ProcessingContext processingContext, ValueSpecification currentVS) { RichIterable runtimes; - if (currentFunc.parameters.size() == 1) { runtimes = pureModel.getAllRuntimes(); @@ -49,7 +48,6 @@ public MutableList proposedParameters(AppliedFunction currentFun { String path = ((PackageableElementPtr) currentFunc.parameters.get(1)).fullPath; runtimes = pureModel.getAllRuntimes().select(c -> PackageableElement.getUserPathForPackageableElement(c).startsWith(path)); - } return runtimes.collect(c -> new CompletionItem(PackageableElement.getUserPathForPackageableElement(c), PackageableElement.getUserPathForPackageableElement(c) + ")")).toList(); } diff --git a/legend-engine-config/legend-engine-repl/legend-engine-repl-client/src/main/java/org/finos/legend/engine/repl/client/Client.java b/legend-engine-config/legend-engine-repl/legend-engine-repl-client/src/main/java/org/finos/legend/engine/repl/client/Client.java index cc5d5364984..051b2f8eaf1 100644 --- a/legend-engine-config/legend-engine-repl/legend-engine-repl-client/src/main/java/org/finos/legend/engine/repl/client/Client.java +++ b/legend-engine-config/legend-engine-repl/legend-engine-repl-client/src/main/java/org/finos/legend/engine/repl/client/Client.java @@ -15,34 +15,18 @@ package org.finos.legend.engine.repl.client; import com.fasterxml.jackson.databind.ObjectMapper; -import org.eclipse.collections.api.RichIterable; import org.eclipse.collections.api.factory.Lists; import org.eclipse.collections.api.list.MutableList; -import org.eclipse.collections.impl.block.factory.Predicates; -import org.eclipse.collections.impl.utility.ListIterate; -import org.finos.legend.engine.language.pure.compiler.toPureGraph.PureModel; -import org.finos.legend.engine.language.pure.grammar.to.PureGrammarComposerContext; -import org.finos.legend.engine.language.pure.grammar.to.extension.PureGrammarComposerExtension; -import org.finos.legend.engine.language.pure.grammar.to.extension.PureGrammarComposerExtensionLoader; -import org.finos.legend.engine.plan.execution.PlanExecutor; -import org.finos.legend.engine.plan.execution.result.ConstantResult; -import org.finos.legend.engine.plan.execution.result.Result; +import org.eclipse.collections.impl.block.predicate.checked.CheckedPredicate; import org.finos.legend.engine.plan.execution.stores.StoreType; import org.finos.legend.engine.plan.execution.stores.relational.plugin.RelationalStoreExecutor; -import org.finos.legend.engine.plan.execution.stores.relational.result.RelationalResult; -import org.finos.legend.engine.plan.generation.PlanGenerator; -import org.finos.legend.engine.plan.generation.transformers.LegendPlanTransformers; -import org.finos.legend.engine.protocol.pure.v1.model.context.PureModelContextData; -import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.PackageableElement; -import org.finos.legend.engine.pure.code.core.PureCoreExtensionLoader; +import org.finos.legend.engine.repl.client.commands.*; import org.finos.legend.engine.repl.client.jline3.JLine3Completer; import org.finos.legend.engine.repl.client.jline3.JLine3Highlighter; import org.finos.legend.engine.repl.REPLInterface; import org.finos.legend.engine.repl.client.jline3.JLine3Parser; -import org.finos.legend.engine.repl.local.LocalREPL; +import org.finos.legend.engine.repl.LocalREPL; import org.finos.legend.engine.shared.core.operational.errorManagement.EngineException; -import org.finos.legend.pure.generated.Root_meta_pure_executionPlan_ExecutionPlan; -import org.finos.legend.pure.generated.Root_meta_pure_extension_Extension; import org.jline.reader.LineReader; import org.jline.reader.LineReaderBuilder; import org.jline.terminal.Terminal; @@ -50,149 +34,82 @@ import org.jline.utils.AttributedStringBuilder; import org.jline.utils.AttributedStyle; -import java.io.IOException; import java.sql.*; -import java.util.List; import static org.finos.legend.engine.repl.database.MetadataReader.getTables; -import static org.finos.legend.engine.repl.grid.Grid.prettyGridPrint; public class Client { - private static final PlanExecutor planExecutor; - public static final REPLInterface replInterface = new LocalREPL(); public static MutableList state = Lists.mutable.empty(); - public static int count; - - public static List loader = PureGrammarComposerExtensionLoader.extensions(); - public static Terminal terminal; public static boolean debug = false; public static ObjectMapper objectMapper = new ObjectMapper(); - static { System.setProperty("legend.test.h2.port", "1975"); + } - planExecutor = PlanExecutor.newPlanExecutorBuilder().withAvailableStoreExecutors().build(); - - count = getTables(getConnection()).size(); - + public static void main(String[] args) throws Exception + { + new Client().loop(); } + public LineReader reader; + + public MutableList commands; - public static void main(String[] args) throws IOException + public Client() throws Exception { terminal = TerminalBuilder.terminal(); terminal.writer().println("\n" + Logos.logos.get((int) (Logos.logos.size() * Math.random())) + "\n"); - LineReader reader = LineReaderBuilder.builder() + this.commands = Lists.mutable.with(new DB(this), new Ext(this), new Debug(this), new Graph(this), new Load(this), new Execute(this)); + this.commands.add(0, new Help(this, this.commands)); + + reader = LineReaderBuilder.builder() .terminal(terminal) .highlighter(new JLine3Highlighter()) .parser(new JLine3Parser())//new DefaultParser().quoteChars(new char[]{'"'})) - .completer(new JLine3Completer()) + .completer(new JLine3Completer(this.commands)) .build(); terminal.writer().println("Warming up..."); terminal.flush(); - execute("1+1"); + ((Execute) this.commands.getLast()).execute("1+1"); terminal.writer().println("Ready!\n"); + + } + + public void loop() + { while (true) { - String line = reader.readLine("> "); + String line = this.reader.readLine("> "); if (line == null || line.equalsIgnoreCase("exit")) { break; } - reader.getHistory().add(line); + this.reader.getHistory().add(line); try { - if (line.isEmpty()) - { - terminal.writer().println("Commands:"); - terminal.writer().println(" load "); - terminal.writer().println(" db"); - terminal.writer().println(" graph []"); - terminal.writer().println(" debug"); - } - else if (line.startsWith("debug")) + commands.detect(new CheckedPredicate() { - String[] cmd = line.split(" "); - if (cmd.length == 1) + @Override + public boolean safeAccept(Command c) throws Exception { - debug = !debug; + return c.process(line); } - else - { - debug = Boolean.parseBoolean(cmd[1]); - } - terminal.writer().println("debug: " + debug); - } - else if (line.startsWith("load ")) - { - String path = line.substring("load ".length()).trim(); - - String tableName = "test" + count++; - - try (Connection connection = getConnection()) - { - try (Statement statement = connection.createStatement()) - { - statement.executeUpdate("CREATE TABLE " + tableName + " AS SELECT * FROM CSVREAD('" + path + "');"); - } - } - } - else if (line.startsWith("graph")) - { - MutableList all = Lists.mutable.with(line.split(" ")); - MutableList showArgs = all.subList(1, all.size()); - if (showArgs.isEmpty()) - { - PureModelContextData d = replInterface.parse(buildState().makeString("\n")); - ListIterate.forEach( - ListIterate.collect( - ListIterate.select(d.getElements(), c -> !c._package.equals("__internal__")), - c -> - { - AttributedStringBuilder ab = new AttributedStringBuilder(); - ab.append(" "); - drawPath(ab, c._package, c.name); - return ab.toAnsi(); - } - ), - e -> terminal.writer().println(e)); - } - else - { - PureModelContextData d = replInterface.parse(buildState().makeString("\n")); - PackageableElement element = ListIterate.select(d.getElements(), c -> c.getPath().equals(showArgs.getFirst())).getFirst(); - String result = ListIterate.flatCollect(loader, c -> c.getExtraPackageableElementComposers().collect(x -> x.apply(element, PureGrammarComposerContext.Builder.newInstance().build()))).select(Predicates.notNull()).getFirst(); - terminal.writer().println(result); - } - } - else if (line.startsWith("db")) - { - try (Connection connection = getConnection()) - { - terminal.writer().println( - getTables(connection).collect(c -> c.schema + "." + c.name + "(" + c.columns.collect(col -> col.name + " " + col.type).makeString(", ") + ")").makeString("\n") - ); - } - } - else - { - terminal.writer().println(execute(line)); - } + }); } catch (EngineException e) { @@ -235,48 +152,13 @@ public static void printError(EngineException e, String line) } } - private static Connection getConnection() + public Connection getConnection() { - RelationalStoreExecutor r = (RelationalStoreExecutor) planExecutor.getExecutorsOfType(StoreType.Relational).getFirst(); + RelationalStoreExecutor r = (RelationalStoreExecutor) ((Execute) this.commands.getLast()).planExecutor.getExecutorsOfType(StoreType.Relational).getFirst(); return r.getStoreState().getRelationalExecutor().getConnectionManager().getTestDatabaseConnection(); } - public static void drawPath(AttributedStringBuilder ab, String path) - { - MutableList spl = Lists.mutable.with(path.split("::")); - if (path.endsWith("::")) - { - spl.add(""); - } - if (spl.size() == 1) - { - drawPath(ab, null, spl.get(0)); - } - else - { - drawPath(ab, spl.subList(0, spl.size() - 1).makeString("::"), spl.getLast()); - } - } - - public static void drawPath(AttributedStringBuilder ab, String _package, String name) - { - ab.style(new AttributedStyle().foreground(100, 100, 100).italic()); - ab.append(_package == null || _package.isEmpty() ? "" : _package + "::"); - ab.style(new AttributedStyle().foreground(200, 200, 200).italic()); - ab.append(name); - } - - public static void drawCommand(AttributedStringBuilder ab, String command) - { - ab.style(new AttributedStyle().foreground(0, 200, 0).italic()); - ab.append(command); - } - - - - - - public static MutableList buildState() + public MutableList buildState() { MutableList res = Lists.mutable.withAll(state); @@ -287,7 +169,7 @@ public static MutableList buildState() ")\n"); res.add("###Connection\n" + - "RelationalDatabaseConnection test::testConnection\n" + + "RelationalDatabaseConnection test::TestConnection\n" + "{\n" + " store: test::TestDatabase;" + " specification: LocalH2{};" + @@ -296,12 +178,12 @@ public static MutableList buildState() "}\n"); res.add("###Runtime\n" + - "Runtime test::test\n" + + "Runtime test::TestRuntime\n" + "{\n" + " mappings : [];" + " connections:\n" + " [\n" + - " test::TestDatabase : [connection: test::testConnection]\n" + + " test::TestDatabase : [connection: test::TestConnection]\n" + " ];\n" + "}\n"); @@ -309,54 +191,4 @@ public static MutableList buildState() } - public static String execute(String txt) - { - String code = "###Pure\n" + - "function a::b::c::d():Any[*]\n{\n" + txt + ";\n}"; - - PureModelContextData d = replInterface.parse(buildState().makeString("\n") + code); - if (debug) - { - try - { - terminal.writer().println((objectMapper.writeValueAsString(d))); - } - catch (Exception e) - { - throw new RuntimeException(e); - } - } - - // Compile - PureModel pureModel = replInterface.compile(d); - RichIterable extensions = PureCoreExtensionLoader.extensions().flatCollect(e -> e.extraPureCoreExtensions(pureModel.getExecutionSupport())); - if (debug) - { - terminal.writer().println(">> " + extensions.collect(Root_meta_pure_extension_Extension::_type).makeString(", ")); - } - - // Plan - Root_meta_pure_executionPlan_ExecutionPlan plan = replInterface.generatePlan(pureModel, debug); - String planStr = PlanGenerator.serializeToJSON(plan, "vX_X_X", pureModel, extensions, LegendPlanTransformers.transformers); - if (debug) - { - terminal.writer().println(planStr); - } - - // Execute - Result res = planExecutor.execute(planStr); - if (res instanceof RelationalResult) - { - return prettyGridPrint((RelationalResult) res, 60); -// Serializer s = new RelationalResultToCSVSerializer((RelationalResult) res); -// return s.flush().toString(); - } - else if (res instanceof ConstantResult) - { - return ((ConstantResult) res).getValue().toString(); - } - throw new RuntimeException(res.getClass() + " not supported!"); - } - - } diff --git a/legend-engine-config/legend-engine-repl/legend-engine-repl-client/src/main/java/org/finos/legend/engine/repl/client/Command.java b/legend-engine-config/legend-engine-repl/legend-engine-repl-client/src/main/java/org/finos/legend/engine/repl/client/Command.java new file mode 100644 index 00000000000..ebed0c2cb99 --- /dev/null +++ b/legend-engine-config/legend-engine-repl/legend-engine-repl-client/src/main/java/org/finos/legend/engine/repl/client/Command.java @@ -0,0 +1,29 @@ +// Copyright 2024 Goldman Sachs +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package org.finos.legend.engine.repl.client; + +import org.eclipse.collections.api.list.MutableList; +import org.jline.reader.Candidate; +import org.jline.reader.LineReader; +import org.jline.reader.ParsedLine; + +public interface Command +{ + public boolean process(String cmd) throws Exception; + + public String documentation(); + + public MutableList complete(String cmd, LineReader lineReader, ParsedLine parsedLine); +} diff --git a/legend-engine-config/legend-engine-repl/legend-engine-repl-client/src/main/java/org/finos/legend/engine/repl/client/commands/DB.java b/legend-engine-config/legend-engine-repl/legend-engine-repl-client/src/main/java/org/finos/legend/engine/repl/client/commands/DB.java new file mode 100644 index 00000000000..db96127f79f --- /dev/null +++ b/legend-engine-config/legend-engine-repl/legend-engine-repl-client/src/main/java/org/finos/legend/engine/repl/client/commands/DB.java @@ -0,0 +1,85 @@ +// Copyright 2024 Goldman Sachs +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package org.finos.legend.engine.repl.client.commands; + +import org.eclipse.collections.api.list.MutableList; +import org.eclipse.collections.impl.factory.Lists; +import org.eclipse.collections.impl.utility.ListIterate; +import org.finos.legend.engine.language.pure.grammar.to.PureGrammarComposerUtility; +import org.finos.legend.engine.protocol.pure.v1.model.context.PureModelContextData; +import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.connection.PackageableConnection; +import org.finos.legend.engine.repl.client.Client; +import org.finos.legend.engine.repl.client.Command; +import org.jline.reader.Candidate; +import org.jline.reader.LineReader; +import org.jline.reader.ParsedLine; + +import java.sql.Connection; + +import static org.finos.legend.engine.repl.database.MetadataReader.getTables; + +public class DB implements Command +{ + private Client client; + + public DB(Client client) + { + this.client = client; + } + + @Override + public String documentation() + { + return "db "; + } + + @Override + public boolean process(String line) throws Exception + { + if (line.startsWith("db")) + { + String[] tokens = line.split(" "); + if (tokens.length != 2) + { + throw new RuntimeException("Error, load should be used as 'db '"); + } + try (Connection connection = client.getConnection()) + { + client.terminal.writer().println( + getTables(connection).collect(c -> c.schema + "." + c.name + "(" + c.columns.collect(col -> col.name + " " + col.type).makeString(", ") + ")").makeString("\n") + ); + } + return true; + } + return false; + } + + @Override + public MutableList complete(String inScope, LineReader lineReader, ParsedLine parsedLine) + { + if (inScope.startsWith("db ")) + { + MutableList words = Lists.mutable.withAll(parsedLine.words()).drop(2); + String start = words.get(0); + PureModelContextData d = Client.replInterface.parse(client.buildState().makeString("\n")); + return + ListIterate.select(d.getElementsOfType(PackageableConnection.class), c -> !c._package.equals("__internal__")) + .collect(c -> PureGrammarComposerUtility.convertPath(c.getPath())) + .select(c -> c.startsWith(start)) + .collect(Candidate::new); + } + return null; + } +} diff --git a/legend-engine-config/legend-engine-repl/legend-engine-repl-client/src/main/java/org/finos/legend/engine/repl/client/commands/Debug.java b/legend-engine-config/legend-engine-repl/legend-engine-repl-client/src/main/java/org/finos/legend/engine/repl/client/commands/Debug.java new file mode 100644 index 00000000000..ab5dc6e2c06 --- /dev/null +++ b/legend-engine-config/legend-engine-repl/legend-engine-repl-client/src/main/java/org/finos/legend/engine/repl/client/commands/Debug.java @@ -0,0 +1,64 @@ +// Copyright 2024 Goldman Sachs +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package org.finos.legend.engine.repl.client.commands; + +import org.eclipse.collections.api.list.MutableList; +import org.finos.legend.engine.repl.client.Client; +import org.finos.legend.engine.repl.client.Command; +import org.jline.reader.Candidate; +import org.jline.reader.LineReader; +import org.jline.reader.ParsedLine; + +public class Debug implements Command +{ + private Client client; + + public Debug(Client client) + { + this.client = client; + } + + @Override + public String documentation() + { + return "debug ()"; + } + + @Override + public boolean process(String line) throws Exception + { + if (line.startsWith("debug")) + { + String[] cmd = line.split(" "); + if (cmd.length == 1) + { + client.debug = !client.debug; + } + else + { + client.debug = Boolean.parseBoolean(cmd[1]); + } + client.terminal.writer().println("debug: " + client.debug); + return true; + } + return false; + } + + @Override + public MutableList complete(String cmd, LineReader lineReader, ParsedLine parsedLine) + { + return null; + } +} diff --git a/legend-engine-config/legend-engine-repl/legend-engine-repl-client/src/main/java/org/finos/legend/engine/repl/client/commands/Execute.java b/legend-engine-config/legend-engine-repl/legend-engine-repl-client/src/main/java/org/finos/legend/engine/repl/client/commands/Execute.java new file mode 100644 index 00000000000..ca070946ac2 --- /dev/null +++ b/legend-engine-config/legend-engine-repl/legend-engine-repl-client/src/main/java/org/finos/legend/engine/repl/client/commands/Execute.java @@ -0,0 +1,153 @@ +// Copyright 2024 Goldman Sachs +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package org.finos.legend.engine.repl.client.commands; + +import org.eclipse.collections.api.RichIterable; +import org.eclipse.collections.api.list.MutableList; +import org.eclipse.collections.impl.factory.Lists; +import org.finos.legend.engine.language.pure.compiler.toPureGraph.PureModel; +import org.finos.legend.engine.plan.execution.PlanExecutor; +import org.finos.legend.engine.plan.execution.result.ConstantResult; +import org.finos.legend.engine.plan.execution.result.Result; +import org.finos.legend.engine.plan.execution.stores.relational.result.RelationalResult; +import org.finos.legend.engine.plan.generation.PlanGenerator; +import org.finos.legend.engine.plan.generation.transformers.LegendPlanTransformers; +import org.finos.legend.engine.protocol.pure.v1.model.context.PureModelContextData; +import org.finos.legend.engine.pure.code.core.PureCoreExtensionLoader; +import org.finos.legend.engine.repl.autocomplete.CompletionItem; +import org.finos.legend.engine.repl.autocomplete.CompletionResult; +import org.finos.legend.engine.repl.client.Client; +import org.finos.legend.engine.repl.client.Command; +import org.finos.legend.pure.generated.Root_meta_pure_executionPlan_ExecutionPlan; +import org.finos.legend.pure.generated.Root_meta_pure_extension_Extension; +import org.jline.reader.Candidate; +import org.jline.reader.LineReader; +import org.jline.reader.ParsedLine; +import org.jline.utils.AttributedStringBuilder; +import org.jline.utils.AttributedStyle; + +import static org.finos.legend.engine.repl.client.Client.*; +import static org.finos.legend.engine.repl.grid.Grid.prettyGridPrint; + +public class Execute implements Command +{ + private Client client; + + public final PlanExecutor planExecutor; + + public Execute(Client client) + { + this.client = client; + planExecutor = PlanExecutor.newPlanExecutorBuilder().withAvailableStoreExecutors().build(); + } + + @Override + public String documentation() + { + return ""; + } + + @Override + public boolean process(String line) throws Exception + { + client.terminal.writer().println(execute(line)); + return true; + } + + @Override + public MutableList complete(String inScope, LineReader lineReader, ParsedLine parsedLine) + { + try + { + MutableList list = Lists.mutable.empty(); + CompletionResult result = new org.finos.legend.engine.repl.autocomplete.Completer(client.buildState().makeString("\n")).complete(inScope); + if (result.getEngineException() == null) + { + list.addAll(result.getCompletion().collect(this::buildCandidate)); + return list; + } + else + { + printError(result.getEngineException(), parsedLine.line()); + AttributedStringBuilder ab = new AttributedStringBuilder(); + ab.append("> "); + ab.style(new AttributedStyle().underlineOff().boldOff().foreground(0, 200, 0)); + ab.append(parsedLine.line()); + terminal.writer().print(ab.toAnsi()); + } + } + catch (Exception e) + { + e.printStackTrace(); + } + return null; + } + + private Candidate buildCandidate(CompletionItem s) + { + return new Candidate(s.getCompletion(), s.getDisplay(), (String) null, (String) null, (String) null, (String) null, false, 0); + } + + + public String execute(String txt) + { + String code = "###Pure\n" + + "function a::b::c::d():Any[*]\n{\n" + txt + ";\n}"; + + PureModelContextData d = replInterface.parse(client.buildState().makeString("\n") + code); + if (debug) + { + try + { + terminal.writer().println((objectMapper.writeValueAsString(d))); + } + catch (Exception e) + { + throw new RuntimeException(e); + } + } + + // Compile + PureModel pureModel = replInterface.compile(d); + RichIterable extensions = PureCoreExtensionLoader.extensions().flatCollect(e -> e.extraPureCoreExtensions(pureModel.getExecutionSupport())); + if (debug) + { + terminal.writer().println(">> " + extensions.collect(Root_meta_pure_extension_Extension::_type).makeString(", ")); + } + + // Plan + Root_meta_pure_executionPlan_ExecutionPlan plan = replInterface.generatePlan(pureModel, debug); + String planStr = PlanGenerator.serializeToJSON(plan, "vX_X_X", pureModel, extensions, LegendPlanTransformers.transformers); + if (debug) + { + terminal.writer().println(planStr); + } + + // Execute + Result res = planExecutor.execute(planStr); + if (res instanceof RelationalResult) + { + return prettyGridPrint((RelationalResult) res, 60); +// Serializer s = new RelationalResultToCSVSerializer((RelationalResult) res); +// return s.flush().toString(); + } + else if (res instanceof ConstantResult) + { + return ((ConstantResult) res).getValue().toString(); + } + throw new RuntimeException(res.getClass() + " not supported!"); + } + +} diff --git a/legend-engine-config/legend-engine-repl/legend-engine-repl-client/src/main/java/org/finos/legend/engine/repl/client/commands/Ext.java b/legend-engine-config/legend-engine-repl/legend-engine-repl-client/src/main/java/org/finos/legend/engine/repl/client/commands/Ext.java new file mode 100644 index 00000000000..08c8f431e3b --- /dev/null +++ b/legend-engine-config/legend-engine-repl/legend-engine-repl-client/src/main/java/org/finos/legend/engine/repl/client/commands/Ext.java @@ -0,0 +1,60 @@ +// Copyright 2024 Goldman Sachs +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package org.finos.legend.engine.repl.client.commands; + +import org.eclipse.collections.api.list.MutableList; +import org.finos.legend.engine.repl.client.Client; +import org.finos.legend.engine.repl.client.Command; +import org.finos.legend.engine.shared.core.extension.TreeNode; +import org.finos.legend.engine.shared.core.extension.Extensions; +import org.finos.legend.engine.shared.core.extension.LegendExtension; +import org.jline.reader.Candidate; +import org.jline.reader.LineReader; +import org.jline.reader.ParsedLine; + +public class Ext implements Command +{ + private final Client client; + + public Ext(Client client) + { + this.client = client; + } + + @Override + public String documentation() + { + return "ext"; + } + + @Override + public boolean process(String line) throws Exception + { + if (line.equals("ext")) + { + MutableList extensionList = Extensions.get(); + TreeNode extensions = Extensions.buildTree(extensionList); + client.terminal.writer().println(extensions.print()); + return true; + } + return false; + } + + @Override + public MutableList complete(String cmd, LineReader lineReader, ParsedLine parsedLine) + { + return null; + } +} diff --git a/legend-engine-config/legend-engine-repl/legend-engine-repl-client/src/main/java/org/finos/legend/engine/repl/client/commands/Graph.java b/legend-engine-config/legend-engine-repl/legend-engine-repl-client/src/main/java/org/finos/legend/engine/repl/client/commands/Graph.java new file mode 100644 index 00000000000..c09208fa9fd --- /dev/null +++ b/legend-engine-config/legend-engine-repl/legend-engine-repl-client/src/main/java/org/finos/legend/engine/repl/client/commands/Graph.java @@ -0,0 +1,122 @@ +// Copyright 2024 Goldman Sachs +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package org.finos.legend.engine.repl.client.commands; + +import org.eclipse.collections.api.factory.Lists; +import org.eclipse.collections.api.list.MutableList; +import org.eclipse.collections.impl.utility.LazyIterate; +import org.eclipse.collections.impl.utility.ListIterate; +import org.finos.legend.engine.language.pure.grammar.to.PureGrammarComposer; +import org.finos.legend.engine.language.pure.grammar.to.PureGrammarComposerContext; +import org.finos.legend.engine.language.pure.grammar.to.PureGrammarComposerUtility; +import org.finos.legend.engine.protocol.pure.v1.model.context.PureModelContextData; +import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.PackageableElement; +import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.section.Section; +import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.section.SectionIndex; +import org.finos.legend.engine.repl.client.Client; +import org.finos.legend.engine.repl.client.Command; +import org.jline.reader.Candidate; +import org.jline.reader.LineReader; +import org.jline.reader.ParsedLine; +import org.jline.utils.AttributedStringBuilder; +import org.jline.utils.AttributedStyle; + +public class Graph implements Command +{ + private Client client; + + public Graph(Client client) + { + this.client = client; + } + + @Override + public String documentation() + { + return "graph ()"; + } + + @Override + public boolean process(String line) throws Exception + { + if (line.startsWith("graph")) + { + MutableList all = Lists.mutable.with(line.split(" ")); + MutableList showArgs = all.subList(1, all.size()); + if (showArgs.isEmpty()) + { + PureModelContextData d = client.replInterface.parse(client.buildState().makeString("\n")); + ListIterate.forEach( + ListIterate.collect( + ListIterate.select(d.getElements(), c -> !c._package.equals("__internal__")), + c -> + { + AttributedStringBuilder ab = new AttributedStringBuilder(); + ab.append(" "); + drawPath(ab, c._package, c.name); + return ab.toAnsi(); + } + ), + e -> client.terminal.writer().println(e)); + } + else + { + PureModelContextData d = client.replInterface.parse(client.buildState().makeString("\n")); + PackageableElement element = ListIterate.select(d.getElements(), c -> c.getPath().equals(showArgs.getFirst())).getFirst(); + Section section = LazyIterate.selectInstancesOf(d.getElements(), SectionIndex.class).flatCollect(c -> c.sections).select(c -> c.elements.contains(PureGrammarComposerUtility.convertPath(element.getPath()))).getFirst(); + PureGrammarComposer composer = PureGrammarComposer.newInstance(PureGrammarComposerContext.Builder.newInstance().build()); + client.terminal.writer().println(composer.render(element, section.parserName)); + } + return true; + } + return false; + } + + public static void drawPath(AttributedStringBuilder ab, String _package, String name) + { + ab.style(new AttributedStyle().foreground(100, 100, 100).italic()); + ab.append(_package == null || _package.isEmpty() ? "" : _package + "::"); + ab.style(new AttributedStyle().foreground(200, 200, 200).italic()); + ab.append(name); + } + + @Override + public MutableList complete(String inScope, LineReader lineReader, ParsedLine parsedLine) + { + if (inScope.startsWith("graph")) + { + PureModelContextData d = Client.replInterface.parse(client.buildState().makeString("\n")); + return ListIterate.collect(ListIterate.select(d.getElements(), c -> !c._package.equals("__internal__")), c -> new org.jline.reader.Candidate(PureGrammarComposerUtility.convertPath(c.getPath()))); + } + return null; + } + + public static void drawPath(AttributedStringBuilder ab, String path) + { + MutableList spl = Lists.mutable.with(path.split("::")); + if (path.endsWith("::")) + { + spl.add(""); + } + if (spl.size() == 1) + { + drawPath(ab, null, spl.get(0)); + } + else + { + drawPath(ab, spl.subList(0, spl.size() - 1).makeString("::"), spl.getLast()); + } + } +} diff --git a/legend-engine-config/legend-engine-repl/legend-engine-repl-client/src/main/java/org/finos/legend/engine/repl/client/commands/Help.java b/legend-engine-config/legend-engine-repl/legend-engine-repl-client/src/main/java/org/finos/legend/engine/repl/client/commands/Help.java new file mode 100644 index 00000000000..2061544db19 --- /dev/null +++ b/legend-engine-config/legend-engine-repl/legend-engine-repl-client/src/main/java/org/finos/legend/engine/repl/client/commands/Help.java @@ -0,0 +1,57 @@ +// Copyright 2024 Goldman Sachs +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package org.finos.legend.engine.repl.client.commands; + +import org.eclipse.collections.api.list.MutableList; +import org.finos.legend.engine.repl.client.Client; +import org.finos.legend.engine.repl.client.Command; +import org.jline.reader.Candidate; +import org.jline.reader.LineReader; +import org.jline.reader.ParsedLine; + +public class Help implements Command +{ + MutableList commands; + Client client; + + public Help(Client client, MutableList commands) + { + this.commands = commands; + this.client = client; + } + + @Override + public String documentation() + { + return "help"; + } + + @Override + public boolean process(String cmd) throws Exception + { + if (cmd.isEmpty() || cmd.equals("help")) + { + client.terminal.writer().println(commands.collect(c -> " " + c.documentation()).makeString("\n")); + return true; + } + return false; + } + + @Override + public MutableList complete(String cmd, LineReader lineReader, ParsedLine parsedLine) + { + return null; + } +} diff --git a/legend-engine-config/legend-engine-repl/legend-engine-repl-client/src/main/java/org/finos/legend/engine/repl/client/commands/Load.java b/legend-engine-config/legend-engine-repl/legend-engine-repl-client/src/main/java/org/finos/legend/engine/repl/client/commands/Load.java new file mode 100644 index 00000000000..dc208f2c893 --- /dev/null +++ b/legend-engine-config/legend-engine-repl/legend-engine-repl-client/src/main/java/org/finos/legend/engine/repl/client/commands/Load.java @@ -0,0 +1,111 @@ +// Copyright 2024 Goldman Sachs +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package org.finos.legend.engine.repl.client.commands; + +import org.eclipse.collections.api.list.MutableList; +import org.eclipse.collections.impl.factory.Lists; +import org.eclipse.collections.impl.utility.ListIterate; +import org.finos.legend.engine.language.pure.grammar.to.PureGrammarComposerUtility; +import org.finos.legend.engine.protocol.pure.v1.model.context.PureModelContextData; +import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.connection.PackageableConnection; +import org.finos.legend.engine.repl.client.Client; +import org.finos.legend.engine.repl.client.Command; +import org.finos.legend.engine.repl.client.jline3.JLine3Parser; +import org.jline.builtins.Completers; +import org.jline.reader.Candidate; +import org.jline.reader.LineReader; +import org.jline.reader.ParsedLine; + +import java.io.File; +import java.sql.Connection; +import java.sql.Statement; + +import static org.finos.legend.engine.repl.database.MetadataReader.getTables; + +public class Load implements Command +{ + private Client client; + private Completers.FilesCompleter completer = new Completers.FilesCompleter(new File("/")); + + public Load(Client client) + { + this.client = client; + } + + @Override + public String documentation() + { + return "load "; + } + + @Override + public boolean process(String line) throws Exception + { + if (line.startsWith("load")) + { + String[] tokens = line.split(" "); + if (tokens.length != 3) + { + throw new RuntimeException("Error, load should be used as 'load '"); + } + String tableName = "test" + getTables(client.getConnection()).size() + 1; + + try (Connection connection = client.getConnection()) + { + try (Statement statement = connection.createStatement()) + { + statement.executeUpdate("CREATE TABLE " + tableName + " AS SELECT * FROM CSVREAD('" + tokens[1] + "');"); + } + } + + return true; + } + return false; + } + + @Override + public MutableList complete(String inScope, LineReader lineReader, ParsedLine parsedLine) + { + if (inScope.startsWith("load ")) + { + MutableList words = Lists.mutable.withAll(parsedLine.words()).drop(2); + if (!words.contains(" ")) + { + String compressed = words.makeString(""); + MutableList list = Lists.mutable.empty(); + completer.complete(lineReader, new JLine3Parser.MyParsedLine(new JLine3Parser.ParserResult(parsedLine.line(), Lists.mutable.with("load", " ", compressed))), list); + MutableList ca = ListIterate.collect(list, c -> + { + String val = compressed.length() == 1 ? c.value() : c.value().substring(1); + return new Candidate(val, val, (String) null, (String) null, (String) null, (String) null, false, 0); + }); + list.clear(); + list.addAll(ca); + return list; + } + else + { + String start = words.subList(words.indexOf(" ") + 1, words.size()).get(0); + PureModelContextData d = Client.replInterface.parse(client.buildState().makeString("\n")); + return + ListIterate.select(d.getElementsOfType(PackageableConnection.class), c -> !c._package.equals("__internal__")) + .collect(c -> PureGrammarComposerUtility.convertPath(c.getPath())) + .select(c -> c.startsWith(start)) + .collect(Candidate::new); + } + } + return null; + } +} diff --git a/legend-engine-config/legend-engine-repl/legend-engine-repl-client/src/main/java/org/finos/legend/engine/repl/client/jline3/JLine3Completer.java b/legend-engine-config/legend-engine-repl/legend-engine-repl-client/src/main/java/org/finos/legend/engine/repl/client/jline3/JLine3Completer.java index 6e536e8afe2..4ac290b6e28 100644 --- a/legend-engine-config/legend-engine-repl/legend-engine-repl-client/src/main/java/org/finos/legend/engine/repl/client/jline3/JLine3Completer.java +++ b/legend-engine-config/legend-engine-repl/legend-engine-repl-client/src/main/java/org/finos/legend/engine/repl/client/jline3/JLine3Completer.java @@ -15,89 +15,36 @@ package org.finos.legend.engine.repl.client.jline3; import org.eclipse.collections.api.list.MutableList; -import org.eclipse.collections.impl.factory.Lists; -import org.eclipse.collections.impl.utility.ListIterate; -import org.finos.legend.engine.language.pure.grammar.to.PureGrammarComposerUtility; -import org.finos.legend.engine.protocol.pure.v1.model.context.PureModelContextData; -import org.finos.legend.engine.repl.autocomplete.CompletionItem; -import org.finos.legend.engine.repl.autocomplete.CompletionResult; -import org.finos.legend.engine.repl.client.Client; -import org.jline.builtins.Completers; +import org.finos.legend.engine.repl.client.Command; import org.jline.reader.Candidate; import org.jline.reader.Completer; import org.jline.reader.LineReader; import org.jline.reader.ParsedLine; -import org.jline.utils.AttributedStringBuilder; -import org.jline.utils.AttributedStyle; -import java.io.File; import java.util.List; -import static org.finos.legend.engine.repl.client.Client.*; - public class JLine3Completer implements Completer { - Completers.FilesCompleter completer = new Completers.FilesCompleter(new File("/")); + private MutableList commands; + + public JLine3Completer(MutableList commands) + { + this.commands = commands; + } @Override public void complete(LineReader lineReader, ParsedLine parsedLine, List list) { String inScope = parsedLine.line().substring(0, parsedLine.cursor()); - if (inScope.startsWith("graph")) - { - PureModelContextData d = Client.replInterface.parse(buildState().makeString("\n")); - list.addAll(ListIterate.collect(ListIterate.select(d.getElements(), c -> !c._package.equals("__internal__")), c -> new Candidate(PureGrammarComposerUtility.convertPath(c.getPath())))); - } - else if (inScope.startsWith("load ")) - { - MutableList words = Lists.mutable.withAll(parsedLine.words()).drop(2); - if (words.detect(" "::equals) == null) - { - String compressed = words.makeString(""); - completer.complete(lineReader, new JLine3Parser.MyParsedLine(new JLine3Parser.ParserResult(parsedLine.line(), Lists.mutable.with("load", " ", compressed))), list); - List ca = ListIterate.collect(list, c -> - { - String val = compressed.length() == 1 ? c.value() : c.value().substring(1); - return new Candidate(val, val, (String) null, (String) null, (String) null, (String) null, false, 0); - }); - list.clear(); - list.addAll(ca); - } - else - { - // Connection?! - } - - } - else + for (Command command : this.commands) { - try + List candidates = command.complete(inScope, lineReader, parsedLine); + if (candidates != null) { - CompletionResult result = new org.finos.legend.engine.repl.autocomplete.Completer(buildState().makeString("\n")).complete(inScope); - if (result.getEngineException() == null) - { - list.addAll(result.getCompletion().collect(this::buildCandidate)); - } - else - { - printError(result.getEngineException(), parsedLine.line()); - AttributedStringBuilder ab = new AttributedStringBuilder(); - ab.append("> "); - ab.style(new AttributedStyle().underlineOff().boldOff().foreground(0, 200, 0)); - ab.append(parsedLine.line()); - terminal.writer().print(ab.toAnsi()); - } - } - catch (Exception e) - { - e.printStackTrace(); + list.addAll(candidates); + break; } } } - - private Candidate buildCandidate(CompletionItem s) - { - return new Candidate(s.getCompletion(), s.getDisplay(), (String) null, (String) null, (String) null, (String) null, false, 0); - } } diff --git a/legend-engine-config/legend-engine-repl/legend-engine-repl-client/src/main/java/org/finos/legend/engine/repl/client/jline3/JLine3Highlighter.java b/legend-engine-config/legend-engine-repl/legend-engine-repl-client/src/main/java/org/finos/legend/engine/repl/client/jline3/JLine3Highlighter.java index 2be2543a3f9..546728c1e37 100644 --- a/legend-engine-config/legend-engine-repl/legend-engine-repl-client/src/main/java/org/finos/legend/engine/repl/client/jline3/JLine3Highlighter.java +++ b/legend-engine-config/legend-engine-repl/legend-engine-repl-client/src/main/java/org/finos/legend/engine/repl/client/jline3/JLine3Highlighter.java @@ -14,36 +14,19 @@ package org.finos.legend.engine.repl.client.jline3; -import org.eclipse.collections.api.list.MutableList; -import org.eclipse.collections.impl.factory.Lists; import org.jline.reader.Highlighter; import org.jline.reader.LineReader; import org.jline.utils.AttributedString; import org.jline.utils.AttributedStringBuilder; +import org.jline.utils.AttributedStyle; import java.util.regex.Pattern; -import static org.finos.legend.engine.repl.client.Client.drawCommand; -import static org.finos.legend.engine.repl.client.Client.drawPath; - public class JLine3Highlighter implements Highlighter { @Override public AttributedString highlight(LineReader lineReader, String s) { - if (s.startsWith("show")) - { - MutableList split = Lists.mutable.with(s.split(" ")); - if (split.size() > 1) - { - AttributedStringBuilder ab = new AttributedStringBuilder(); - drawCommand(ab, "show"); - ab.append(" "); - drawPath(ab, split.get(1)); - return ab.toAttributedString(); - } - } - AttributedStringBuilder ab = new AttributedStringBuilder(); drawCommand(ab, s); return ab.toAttributedString(); @@ -60,4 +43,10 @@ public void setErrorIndex(int i) { } + + public static void drawCommand(AttributedStringBuilder ab, String command) + { + ab.style(new AttributedStyle().foreground(0, 200, 0).italic()); + ab.append(command); + } } diff --git a/legend-engine-config/legend-engine-repl/legend-engine-repl-interface/pom.xml b/legend-engine-config/legend-engine-repl/legend-engine-repl-interface/pom.xml deleted file mode 100644 index 69e0539e1df..00000000000 --- a/legend-engine-config/legend-engine-repl/legend-engine-repl-interface/pom.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - legend-engine-repl - org.finos.legend.engine - 4.39.1-SNAPSHOT - - 4.0.0 - - legend-engine-repl-interface - Legend Engine - REPL - Interface - - - - org.finos.legend.engine - legend-engine-protocol-pure - - - org.finos.legend.engine - legend-engine-language-pure-compiler - - - org.finos.legend.engine - legend-engine-pure-code-compiled-core - - - diff --git a/legend-engine-config/legend-engine-repl/legend-engine-repl-light/pom.xml b/legend-engine-config/legend-engine-repl/legend-engine-repl-light/pom.xml deleted file mode 100644 index 7c5575a424f..00000000000 --- a/legend-engine-config/legend-engine-repl/legend-engine-repl-light/pom.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - legend-engine-repl - org.finos.legend.engine - 4.39.1-SNAPSHOT - - 4.0.0 - - legend-engine-repl-light - Legend Engine - REPL - Light - - - - diff --git a/legend-engine-config/legend-engine-repl/legend-engine-repl-local/pom.xml b/legend-engine-config/legend-engine-repl/legend-engine-repl-local/pom.xml deleted file mode 100644 index 0613323f3a7..00000000000 --- a/legend-engine-config/legend-engine-repl/legend-engine-repl-local/pom.xml +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - legend-engine-repl - org.finos.legend.engine - 4.39.1-SNAPSHOT - - 4.0.0 - - legend-engine-repl-local - Legend Engine - REPL - Local - - - - org.finos.legend.engine - legend-engine-repl-interface - - - org.finos.legend.engine - legend-engine-language-pure-grammar - - - org.finos.legend.engine - legend-engine-language-pure-compiler - - - org.finos.legend.engine - legend-engine-pure-code-core-extension - - - org.finos.legend.engine - legend-engine-shared-core - - - org.finos.legend.engine - legend-engine-pure-code-compiled-core - - - org.finos.legend.engine - legend-engine-protocol-pure - - - org.finos.legend.engine - legend-engine-executionPlan-generation - - - - - - org.finos.legend.engine - legend-engine-xt-relationalStore-protocol - runtime - - - org.finos.legend.engine - legend-engine-xt-relationalStore-grammar - runtime - - - org.finos.legend.engine - legend-engine-xt-relationalStore-javaPlatformBinding-pure - runtime - - - org.finos.legend.engine - legend-engine-xt-relationalStore-pure - runtime - - - org.finos.legend.engine - legend-engine-xt-relationalStore-executionPlan - runtime - - - - org.eclipse.collections - eclipse-collections-api - - - diff --git a/legend-engine-config/legend-engine-repl/pom.xml b/legend-engine-config/legend-engine-repl/pom.xml index 1e5bd0854df..100d8cdbe1e 100644 --- a/legend-engine-config/legend-engine-repl/pom.xml +++ b/legend-engine-config/legend-engine-repl/pom.xml @@ -27,9 +27,6 @@ Legend Engine - REPL - legend-engine-repl-light - legend-engine-repl-local legend-engine-repl-client - legend-engine-repl-interface \ No newline at end of file diff --git a/legend-engine-config/legend-engine-server/pom.xml b/legend-engine-config/legend-engine-server/pom.xml index f68d9aa7406..e62b6baf2b2 100644 --- a/legend-engine-config/legend-engine-server/pom.xml +++ b/legend-engine-config/legend-engine-server/pom.xml @@ -78,6 +78,10 @@ + + org.finos.legend.engine + legend-engine-shared-extensions + org.finos.legend.engine legend-engine-server-support-core @@ -1005,6 +1009,22 @@ legend-engine-pure-runtime-extensions test + + org.finos.legend.engine + legend-engine-xt-relationalStore-executionPlan-connection + test + + + org.finos.legend.engine + legend-engine-external-shared-format-runtime + test + + + ch.qos.logback + logback-classic + test + + diff --git a/legend-engine-config/legend-engine-server/src/test/java/org/finos/legend/engine/server/PrintExtensions.java b/legend-engine-config/legend-engine-server/src/test/java/org/finos/legend/engine/server/PrintExtensions.java new file mode 100644 index 00000000000..5fc10a9d2ab --- /dev/null +++ b/legend-engine-config/legend-engine-server/src/test/java/org/finos/legend/engine/server/PrintExtensions.java @@ -0,0 +1,36 @@ +// Copyright 2024 Goldman Sachs +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package org.finos.legend.engine.server; + +import ch.qos.logback.classic.Level; +import ch.qos.logback.classic.Logger; +import org.eclipse.collections.api.list.MutableList; +import org.finos.legend.engine.shared.core.extension.Extensions; +import org.finos.legend.engine.shared.core.extension.LegendExtension; +import org.finos.legend.engine.shared.core.extension.TreeNode; +import org.slf4j.LoggerFactory; + +public class PrintExtensions +{ + public static void main(String[] args) + { + Logger l = (Logger) LoggerFactory.getLogger(org.slf4j.Logger.ROOT_LOGGER_NAME); + l.setLevel(Level.INFO); + + MutableList extensionList = Extensions.get(); + TreeNode extensions = Extensions.buildTree(extensionList); + System.out.println(extensions.print()); + } +} diff --git a/legend-engine-core/legend-engine-core-executionPlan-execution/legend-engine-executionPlan-execution-store-inMemory/src/main/java/org/finos/legend/engine/plan/execution/stores/inMemory/plugin/InMemoryStoreExecutorBuilder.java b/legend-engine-core/legend-engine-core-executionPlan-execution/legend-engine-executionPlan-execution-store-inMemory/src/main/java/org/finos/legend/engine/plan/execution/stores/inMemory/plugin/InMemoryStoreExecutorBuilder.java index d16d77b4df9..41eb1378250 100644 --- a/legend-engine-core/legend-engine-core-executionPlan-execution/legend-engine-executionPlan-execution-store-inMemory/src/main/java/org/finos/legend/engine/plan/execution/stores/inMemory/plugin/InMemoryStoreExecutorBuilder.java +++ b/legend-engine-core/legend-engine-core-executionPlan-execution/legend-engine-executionPlan-execution-store-inMemory/src/main/java/org/finos/legend/engine/plan/execution/stores/inMemory/plugin/InMemoryStoreExecutorBuilder.java @@ -14,6 +14,7 @@ package org.finos.legend.engine.plan.execution.stores.inMemory.plugin; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.plan.execution.stores.StoreExecutor; import org.finos.legend.engine.plan.execution.stores.StoreExecutorBuilder; import org.finos.legend.engine.plan.execution.stores.StoreExecutorConfiguration; @@ -21,6 +22,12 @@ public class InMemoryStoreExecutorBuilder implements StoreExecutorBuilder { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "M2M"); + } + @Override public StoreType getStoreType() { diff --git a/legend-engine-core/legend-engine-core-executionPlan-execution/legend-engine-executionPlan-execution-store-inMemory/src/main/java/org/finos/legend/engine/plan/execution/stores/inMemory/plugin/StoreStreamReaderBuilder.java b/legend-engine-core/legend-engine-core-executionPlan-execution/legend-engine-executionPlan-execution-store-inMemory/src/main/java/org/finos/legend/engine/plan/execution/stores/inMemory/plugin/StoreStreamReaderBuilder.java index 3f99039a1f2..f2cfa2d882e 100644 --- a/legend-engine-core/legend-engine-core-executionPlan-execution/legend-engine-executionPlan-execution-store-inMemory/src/main/java/org/finos/legend/engine/plan/execution/stores/inMemory/plugin/StoreStreamReaderBuilder.java +++ b/legend-engine-core/legend-engine-core-executionPlan-execution/legend-engine-executionPlan-execution-store-inMemory/src/main/java/org/finos/legend/engine/plan/execution/stores/inMemory/plugin/StoreStreamReaderBuilder.java @@ -17,7 +17,6 @@ import org.finos.legend.engine.plan.dependencies.store.inMemory.IStoreStreamReader; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.Store; import org.finos.legend.engine.shared.core.extension.LegendModuleSpecificExtension; -import org.finos.legend.engine.shared.core.extension.LegendPlanExtension; public interface StoreStreamReaderBuilder extends LegendModuleSpecificExtension { diff --git a/legend-engine-core/legend-engine-core-executionPlan-execution/legend-engine-executionPlan-execution-store-inMemory/src/test/java/org/finos/legend/engine/plan/execution/stores/relational/plugin/FakeRelationalStoreExecutorBuilder.java b/legend-engine-core/legend-engine-core-executionPlan-execution/legend-engine-executionPlan-execution-store-inMemory/src/test/java/org/finos/legend/engine/plan/execution/stores/relational/plugin/FakeRelationalStoreExecutorBuilder.java index 6bd0f46a993..39acb572ff8 100644 --- a/legend-engine-core/legend-engine-core-executionPlan-execution/legend-engine-executionPlan-execution-store-inMemory/src/test/java/org/finos/legend/engine/plan/execution/stores/relational/plugin/FakeRelationalStoreExecutorBuilder.java +++ b/legend-engine-core/legend-engine-core-executionPlan-execution/legend-engine-executionPlan-execution-store-inMemory/src/test/java/org/finos/legend/engine/plan/execution/stores/relational/plugin/FakeRelationalStoreExecutorBuilder.java @@ -15,6 +15,7 @@ package org.finos.legend.engine.plan.execution.stores.relational.plugin; import org.eclipse.collections.api.list.MutableList; +import org.eclipse.collections.impl.factory.Lists; import org.finos.legend.engine.plan.execution.nodes.state.ExecutionState; import org.finos.legend.engine.plan.execution.result.Result; import org.finos.legend.engine.plan.execution.stores.StoreExecutionState; @@ -28,6 +29,11 @@ public class FakeRelationalStoreExecutorBuilder implements StoreExecutorBuilder { + @Override + public MutableList group() + { + return Lists.mutable.with("__Test__"); + } @Override public StoreType getStoreType() diff --git a/legend-engine-core/legend-engine-core-executionPlan-execution/legend-engine-executionPlan-execution-store-inMemory/src/test/java/org/finos/legend/engine/plan/execution/stores/relational/plugin/FakeServiceStoreExecutorBuilder.java b/legend-engine-core/legend-engine-core-executionPlan-execution/legend-engine-executionPlan-execution-store-inMemory/src/test/java/org/finos/legend/engine/plan/execution/stores/relational/plugin/FakeServiceStoreExecutorBuilder.java index ee7d9b5ad7c..49f3c9754d3 100644 --- a/legend-engine-core/legend-engine-core-executionPlan-execution/legend-engine-executionPlan-execution-store-inMemory/src/test/java/org/finos/legend/engine/plan/execution/stores/relational/plugin/FakeServiceStoreExecutorBuilder.java +++ b/legend-engine-core/legend-engine-core-executionPlan-execution/legend-engine-executionPlan-execution-store-inMemory/src/test/java/org/finos/legend/engine/plan/execution/stores/relational/plugin/FakeServiceStoreExecutorBuilder.java @@ -15,6 +15,7 @@ package org.finos.legend.engine.plan.execution.stores.relational.plugin; import org.eclipse.collections.api.list.MutableList; +import org.eclipse.collections.impl.factory.Lists; import org.finos.legend.engine.plan.execution.nodes.state.ExecutionState; import org.finos.legend.engine.plan.execution.result.Result; import org.finos.legend.engine.plan.execution.stores.StoreExecutionState; @@ -28,6 +29,11 @@ public class FakeServiceStoreExecutorBuilder implements StoreExecutorBuilder { + @Override + public MutableList group() + { + return Lists.mutable.with("__Test__"); + } @Override public StoreType getStoreType() diff --git a/legend-engine-core/legend-engine-core-executionPlan-execution/legend-engine-executionPlan-execution/src/main/java/org/finos/legend/engine/plan/execution/extension/ExecutionExtension.java b/legend-engine-core/legend-engine-core-executionPlan-execution/legend-engine-executionPlan-execution/src/main/java/org/finos/legend/engine/plan/execution/extension/ExecutionExtension.java index 565faef243c..a5acba98c61 100644 --- a/legend-engine-core/legend-engine-core-executionPlan-execution/legend-engine-executionPlan-execution/src/main/java/org/finos/legend/engine/plan/execution/extension/ExecutionExtension.java +++ b/legend-engine-core/legend-engine-core-executionPlan-execution/legend-engine-executionPlan-execution/src/main/java/org/finos/legend/engine/plan/execution/extension/ExecutionExtension.java @@ -16,6 +16,7 @@ import org.eclipse.collections.api.block.function.Function3; import org.eclipse.collections.api.list.MutableList; +import org.eclipse.collections.impl.factory.Lists; import org.finos.legend.engine.plan.execution.nodes.state.ExecutionState; import org.finos.legend.engine.plan.execution.result.Result; import org.finos.legend.engine.protocol.pure.v1.model.executionPlan.nodes.ExecutionNode; @@ -36,4 +37,15 @@ default List, ExecutionState { return Collections.emptyList(); } + + @Override + default String type() + { + return "Execution"; + } + + default MutableList typeGroup() + { + return Lists.mutable.with("Plan"); + } } diff --git a/legend-engine-core/legend-engine-core-executionPlan-execution/legend-engine-executionPlan-execution/src/main/java/org/finos/legend/engine/plan/execution/nodes/helpers/platform/ExecutionPlanJavaCompilerExtension.java b/legend-engine-core/legend-engine-core-executionPlan-execution/legend-engine-executionPlan-execution/src/main/java/org/finos/legend/engine/plan/execution/nodes/helpers/platform/ExecutionPlanJavaCompilerExtension.java index 7e0440d5d3c..e0e4336795f 100644 --- a/legend-engine-core/legend-engine-core-executionPlan-execution/legend-engine-executionPlan-execution/src/main/java/org/finos/legend/engine/plan/execution/nodes/helpers/platform/ExecutionPlanJavaCompilerExtension.java +++ b/legend-engine-core/legend-engine-core-executionPlan-execution/legend-engine-executionPlan-execution/src/main/java/org/finos/legend/engine/plan/execution/nodes/helpers/platform/ExecutionPlanJavaCompilerExtension.java @@ -14,10 +14,24 @@ package org.finos.legend.engine.plan.execution.nodes.helpers.platform; +import org.eclipse.collections.api.list.MutableList; +import org.eclipse.collections.impl.factory.Lists; import org.finos.legend.engine.shared.core.extension.LegendPlanExtension; import org.finos.legend.engine.shared.javaCompiler.ClassPathFilter; public interface ExecutionPlanJavaCompilerExtension extends LegendPlanExtension { ClassPathFilter getExtraClassPathFilter(); + + @Override + default MutableList typeGroup() + { + return Lists.mutable.with("Plan", "Generation", "Binding_Java"); + } + + @Override + default String type() + { + return "Class_Path_Extension"; + } } diff --git a/legend-engine-core/legend-engine-core-executionPlan-execution/legend-engine-executionPlan-execution/src/main/java/org/finos/legend/engine/plan/execution/stores/StoreExecutorBuilder.java b/legend-engine-core/legend-engine-core-executionPlan-execution/legend-engine-executionPlan-execution/src/main/java/org/finos/legend/engine/plan/execution/stores/StoreExecutorBuilder.java index 0ef1cde50ab..bbdf3c54279 100644 --- a/legend-engine-core/legend-engine-core-executionPlan-execution/legend-engine-executionPlan-execution/src/main/java/org/finos/legend/engine/plan/execution/stores/StoreExecutorBuilder.java +++ b/legend-engine-core/legend-engine-core-executionPlan-execution/legend-engine-executionPlan-execution/src/main/java/org/finos/legend/engine/plan/execution/stores/StoreExecutorBuilder.java @@ -14,10 +14,18 @@ package org.finos.legend.engine.plan.execution.stores; +import org.eclipse.collections.api.factory.Lists; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.shared.core.extension.LegendPlanExtension; public interface StoreExecutorBuilder extends LegendPlanExtension { + @Override + default String type() + { + return "ExecutorBuilder"; + } + StoreType getStoreType(); StoreExecutor build(); diff --git a/legend-engine-core/legend-engine-core-executionPlan-execution/legend-engine-external-shared-format-runtime/src/main/java/org/finos/legend/engine/external/shared/ExternalFormatJavaCompilerExtension.java b/legend-engine-core/legend-engine-core-executionPlan-execution/legend-engine-external-shared-format-runtime/src/main/java/org/finos/legend/engine/external/shared/ExternalFormatJavaCompilerExtension.java index a498d02eb7c..4d13013465c 100644 --- a/legend-engine-core/legend-engine-core-executionPlan-execution/legend-engine-external-shared-format-runtime/src/main/java/org/finos/legend/engine/external/shared/ExternalFormatJavaCompilerExtension.java +++ b/legend-engine-core/legend-engine-core-executionPlan-execution/legend-engine-external-shared-format-runtime/src/main/java/org/finos/legend/engine/external/shared/ExternalFormatJavaCompilerExtension.java @@ -14,6 +14,7 @@ package org.finos.legend.engine.external.shared; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.external.shared.runtime.dependencies.ExternalDataAdder; import org.finos.legend.engine.external.shared.runtime.dependencies.ExternalDataBooleanAdder; import org.finos.legend.engine.external.shared.runtime.dependencies.ExternalDataDoubleAdder; @@ -46,6 +47,12 @@ public class ExternalFormatJavaCompilerExtension implements ExecutionPlanJavaCom DEPENDENCIES.put(PURE_PACKAGE + "_IExternalDataFactory", IExternalDataFactory.class); } + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("External_Format", "-Core"); + } + @Override public ClassPathFilter getExtraClassPathFilter() { diff --git a/legend-engine-core/legend-engine-core-executionPlan-execution/legend-engine-external-shared-format-runtime/src/main/java/org/finos/legend/engine/external/shared/runtime/ExternalFormatExecutionExtension.java b/legend-engine-core/legend-engine-core-executionPlan-execution/legend-engine-external-shared-format-runtime/src/main/java/org/finos/legend/engine/external/shared/runtime/ExternalFormatExecutionExtension.java index ccb36ef03fa..59869be424c 100644 --- a/legend-engine-core/legend-engine-core-executionPlan-execution/legend-engine-external-shared-format-runtime/src/main/java/org/finos/legend/engine/external/shared/runtime/ExternalFormatExecutionExtension.java +++ b/legend-engine-core/legend-engine-core-executionPlan-execution/legend-engine-external-shared-format-runtime/src/main/java/org/finos/legend/engine/external/shared/runtime/ExternalFormatExecutionExtension.java @@ -16,6 +16,7 @@ import org.eclipse.collections.api.block.function.Function3; import org.eclipse.collections.api.list.MutableList; +import org.eclipse.collections.impl.factory.Lists; import org.finos.legend.engine.external.shared.runtime.read.ExecutionHelper; import org.finos.legend.engine.external.shared.utils.ExternalFormatRuntime; import org.finos.legend.engine.plan.dependencies.domain.dataQuality.BasicChecked; @@ -54,6 +55,12 @@ public class ExternalFormatExecutionExtension implements ExecutionExtension { private final Map EXTENSIONS = ExternalFormatRuntimeExtensionLoader.extensions(); + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("External_Format", "-Core"); + } + @Override public List, ExecutionState, Result>> getExtraNodeExecutors() { diff --git a/legend-engine-core/legend-engine-core-executionPlan-execution/legend-engine-external-shared-format-runtime/src/main/java/org/finos/legend/engine/external/shared/runtime/ExternalFormatRuntimeExtension.java b/legend-engine-core/legend-engine-core-executionPlan-execution/legend-engine-external-shared-format-runtime/src/main/java/org/finos/legend/engine/external/shared/runtime/ExternalFormatRuntimeExtension.java index 84b9591b487..b173db941c5 100644 --- a/legend-engine-core/legend-engine-core-executionPlan-execution/legend-engine-external-shared-format-runtime/src/main/java/org/finos/legend/engine/external/shared/runtime/ExternalFormatRuntimeExtension.java +++ b/legend-engine-core/legend-engine-core-executionPlan-execution/legend-engine-external-shared-format-runtime/src/main/java/org/finos/legend/engine/external/shared/runtime/ExternalFormatRuntimeExtension.java @@ -14,6 +14,7 @@ package org.finos.legend.engine.external.shared.runtime; +import org.eclipse.collections.api.factory.Lists; import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.plan.execution.nodes.state.ExecutionState; import org.finos.legend.engine.plan.execution.result.Result; @@ -30,6 +31,18 @@ public interface ExternalFormatRuntimeExtension extends LegendExternalFormatExtension { + @Override + default String type() + { + return "Runtime"; + } + + @Override + default MutableList typeGroup() + { + return Lists.mutable.with("Plan", "Execution"); + } + List getContentTypes(); default StreamingObjectResult executeInternalizeExecutionNode(ExternalFormatInternalizeExecutionNode node, InputStream inputStream, MutableList profiles, ExecutionState executionState) diff --git a/legend-engine-core/legend-engine-core-language-pure/legend-engine-external-shared-format-model/src/main/java/org/finos/legend/engine/external/shared/format/model/ExternalFormatExtension.java b/legend-engine-core/legend-engine-core-language-pure/legend-engine-external-shared-format-model/src/main/java/org/finos/legend/engine/external/shared/format/model/ExternalFormatExtension.java index c28965196d2..33d96913ff3 100644 --- a/legend-engine-core/legend-engine-core-language-pure/legend-engine-external-shared-format-model/src/main/java/org/finos/legend/engine/external/shared/format/model/ExternalFormatExtension.java +++ b/legend-engine-core/legend-engine-core-language-pure/legend-engine-external-shared-format-model/src/main/java/org/finos/legend/engine/external/shared/format/model/ExternalFormatExtension.java @@ -14,6 +14,8 @@ package org.finos.legend.engine.external.shared.format.model; +import org.eclipse.collections.api.factory.Lists; +import org.eclipse.collections.api.list.MutableList; import org.eclipse.collections.impl.list.mutable.FastList; import org.finos.legend.engine.external.shared.format.model.compile.ExternalSchemaCompileContext; import org.finos.legend.engine.language.pure.compiler.toPureGraph.CompileContext; @@ -38,6 +40,18 @@ */ public interface ExternalFormatExtension extends LegendExternalFormatExtension { + @Override + default String type() + { + return "External_Format"; + } + + @Override + default MutableList typeGroup() + { + return Lists.mutable.with("External_Format"); + } + /** * Returns the contract for this external format written in PURE */ diff --git a/legend-engine-core/legend-engine-core-language-pure/legend-engine-external-shared-format-model/src/main/java/org/finos/legend/engine/external/shared/format/model/transformation/fromModel/ExternalFormatSchemaGenerationExtension.java b/legend-engine-core/legend-engine-core-language-pure/legend-engine-external-shared-format-model/src/main/java/org/finos/legend/engine/external/shared/format/model/transformation/fromModel/ExternalFormatSchemaGenerationExtension.java index 992ff4ed78f..e86f49e7234 100644 --- a/legend-engine-core/legend-engine-core-language-pure/legend-engine-external-shared-format-model/src/main/java/org/finos/legend/engine/external/shared/format/model/transformation/fromModel/ExternalFormatSchemaGenerationExtension.java +++ b/legend-engine-core/legend-engine-core-language-pure/legend-engine-external-shared-format-model/src/main/java/org/finos/legend/engine/external/shared/format/model/transformation/fromModel/ExternalFormatSchemaGenerationExtension.java @@ -16,6 +16,7 @@ import org.eclipse.collections.api.RichIterable; import org.eclipse.collections.api.factory.Lists; +import org.eclipse.collections.api.list.MutableList; import org.eclipse.collections.impl.utility.ListIterate; import org.finos.legend.engine.external.shared.format.model.ExternalFormatExtension; import org.finos.legend.engine.language.pure.compiler.toPureGraph.PureModel; @@ -33,6 +34,12 @@ */ public interface ExternalFormatSchemaGenerationExtension extends ExternalFormatExtension { + @Override + default String type() + { + return "Schema_Generation"; + } + /** * Called to compile an external format ModelToSchemaConfiguration. */ diff --git a/legend-engine-core/legend-engine-core-language-pure/legend-engine-external-shared-format-model/src/main/java/org/finos/legend/engine/external/shared/format/model/transformation/toModel/ExternalFormatModelGenerationExtension.java b/legend-engine-core/legend-engine-core-language-pure/legend-engine-external-shared-format-model/src/main/java/org/finos/legend/engine/external/shared/format/model/transformation/toModel/ExternalFormatModelGenerationExtension.java index cb40eec267c..f85f866ceac 100644 --- a/legend-engine-core/legend-engine-core-language-pure/legend-engine-external-shared-format-model/src/main/java/org/finos/legend/engine/external/shared/format/model/transformation/toModel/ExternalFormatModelGenerationExtension.java +++ b/legend-engine-core/legend-engine-core-language-pure/legend-engine-external-shared-format-model/src/main/java/org/finos/legend/engine/external/shared/format/model/transformation/toModel/ExternalFormatModelGenerationExtension.java @@ -16,6 +16,7 @@ import org.eclipse.collections.api.RichIterable; import org.eclipse.collections.api.factory.Lists; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.external.shared.format.model.ExternalFormatExtension; import org.finos.legend.engine.language.pure.compiler.toPureGraph.PureModel; import org.finos.legend.engine.shared.core.operational.errorManagement.EngineException; @@ -38,6 +39,12 @@ */ public interface ExternalFormatModelGenerationExtension extends ExternalFormatExtension { + @Override + default String type() + { + return "Model_Generation"; + } + /** * Called to compile an external format SchemaToModelConfiguration. */ diff --git a/legend-engine-core/legend-engine-core-language-pure/legend-engine-external-shared-format-model/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/ExternalFormatCompilerExtension.java b/legend-engine-core/legend-engine-core-language-pure/legend-engine-external-shared-format-model/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/ExternalFormatCompilerExtension.java index 50806de8ad5..f1791275257 100644 --- a/legend-engine-core/legend-engine-core-language-pure/legend-engine-external-shared-format-model/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/ExternalFormatCompilerExtension.java +++ b/legend-engine-core/legend-engine-core-language-pure/legend-engine-external-shared-format-model/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/ExternalFormatCompilerExtension.java @@ -19,6 +19,7 @@ import org.eclipse.collections.api.block.procedure.Procedure2; import org.eclipse.collections.api.factory.Lists; import org.eclipse.collections.api.list.ImmutableList; +import org.eclipse.collections.api.list.MutableList; import org.eclipse.collections.impl.utility.ListIterate; import org.finos.legend.engine.external.shared.format.model.ExternalFormatExtension; import org.finos.legend.engine.external.shared.format.model.ExternalFormatExtensionLoader; @@ -45,6 +46,12 @@ public ExternalFormatCompilerExtension() bindingCompiler = new BindingCompiler(externalFormatExtensions); } + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("External_Format", "-Core"); + } + @Override public CompilerExtension build() { diff --git a/legend-engine-core/legend-engine-core-language-pure/legend-engine-external-shared-format-model/src/main/java/org/finos/legend/engine/language/pure/grammar/from/ExternalFormatGrammarParserExtension.java b/legend-engine-core/legend-engine-core-language-pure/legend-engine-external-shared-format-model/src/main/java/org/finos/legend/engine/language/pure/grammar/from/ExternalFormatGrammarParserExtension.java index a72d65a662c..2fafe816f30 100644 --- a/legend-engine-core/legend-engine-core-language-pure/legend-engine-external-shared-format-model/src/main/java/org/finos/legend/engine/language/pure/grammar/from/ExternalFormatGrammarParserExtension.java +++ b/legend-engine-core/legend-engine-core-language-pure/legend-engine-external-shared-format-model/src/main/java/org/finos/legend/engine/language/pure/grammar/from/ExternalFormatGrammarParserExtension.java @@ -17,6 +17,7 @@ import org.antlr.v4.runtime.CharStream; import org.antlr.v4.runtime.CharStreams; import org.antlr.v4.runtime.CommonTokenStream; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.language.pure.grammar.from.antlr4.ExternalFormatLexerGrammar; import org.finos.legend.engine.language.pure.grammar.from.antlr4.ExternalFormatParserGrammar; import org.finos.legend.engine.language.pure.grammar.from.extension.PureGrammarParserExtension; @@ -33,6 +34,12 @@ public class ExternalFormatGrammarParserExtension implements PureGrammarParserEx { public static final String NAME = "ExternalFormat"; + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("External_Format", "-Core"); + } + public List getExtraSectionParsers() { return Collections.singletonList(SectionParser.newParser(NAME, ExternalFormatGrammarParserExtension::parse)); diff --git a/legend-engine-core/legend-engine-core-language-pure/legend-engine-external-shared-format-model/src/main/java/org/finos/legend/engine/language/pure/grammar/to/ExternalFormatGrammarComposerExtension.java b/legend-engine-core/legend-engine-core-language-pure/legend-engine-external-shared-format-model/src/main/java/org/finos/legend/engine/language/pure/grammar/to/ExternalFormatGrammarComposerExtension.java index 608e7a0e5c4..2eef9668d12 100644 --- a/legend-engine-core/legend-engine-core-language-pure/legend-engine-external-shared-format-model/src/main/java/org/finos/legend/engine/language/pure/grammar/to/ExternalFormatGrammarComposerExtension.java +++ b/legend-engine-core/legend-engine-core-language-pure/legend-engine-external-shared-format-model/src/main/java/org/finos/legend/engine/language/pure/grammar/to/ExternalFormatGrammarComposerExtension.java @@ -35,6 +35,12 @@ public class ExternalFormatGrammarComposerExtension implements PureGrammarComposerExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("External_Format", "-Core"); + } + private MutableList> renderers = Lists.mutable.with((element, context) -> renderElement(element)); @Override diff --git a/legend-engine-core/legend-engine-core-language-pure/legend-engine-external-shared-format-model/src/test/java/org/finos/legend/engine/external/shared/format/model/exampleSchema/ExampleExternalFormatExtension.java b/legend-engine-core/legend-engine-core-language-pure/legend-engine-external-shared-format-model/src/test/java/org/finos/legend/engine/external/shared/format/model/exampleSchema/ExampleExternalFormatExtension.java index 86aa513962f..6d0194045a7 100644 --- a/legend-engine-core/legend-engine-core-language-pure/legend-engine-external-shared-format-model/src/test/java/org/finos/legend/engine/external/shared/format/model/exampleSchema/ExampleExternalFormatExtension.java +++ b/legend-engine-core/legend-engine-core-language-pure/legend-engine-external-shared-format-model/src/test/java/org/finos/legend/engine/external/shared/format/model/exampleSchema/ExampleExternalFormatExtension.java @@ -14,6 +14,8 @@ package org.finos.legend.engine.external.shared.format.model.exampleSchema; +import org.eclipse.collections.api.list.MutableList; +import org.eclipse.collections.impl.factory.Lists; import org.finos.legend.engine.external.shared.format.model.compile.ExternalSchemaCompileContext; import org.finos.legend.engine.external.shared.format.model.transformation.fromModel.ExternalFormatSchemaGenerationExtension; import org.finos.legend.engine.external.shared.format.model.transformation.toModel.ExternalFormatModelGenerationExtension; @@ -29,6 +31,18 @@ public class ExampleExternalFormatExtension implements ExternalFormatSchemaGenerationExtension, ExternalFormatModelGenerationExtension { + @Override + public String type() + { + return "MIX_Model_Generation_&_Schema_Generation"; + } + + @Override + public MutableList group() + { + return Lists.mutable.with("__Test__"); + } + private static final Root_meta_external_format_shared_ExternalFormatContract externalFormatContract = (Root_meta_external_format_shared_ExternalFormatContract) core_pure_binding_transformation_tests_externalFormatContract.Root_meta_external_format_shared_transformation_tests_exampleFormatContract__ExternalFormatContract_1_(PureModel.CORE_PURE_MODEL.getExecutionSupport()); public static final String TYPE = externalFormatContract._id(); diff --git a/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-compiler/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/CoreCompilerExtension.java b/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-compiler/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/CoreCompilerExtension.java index 3576b8d2601..75e13d6f791 100644 --- a/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-compiler/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/CoreCompilerExtension.java +++ b/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-compiler/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/CoreCompilerExtension.java @@ -16,6 +16,7 @@ import org.eclipse.collections.api.block.function.Function2; import org.eclipse.collections.api.block.function.Function3; +import org.eclipse.collections.api.list.MutableList; import org.eclipse.collections.impl.factory.Maps; import org.eclipse.collections.impl.utility.ListIterate; import org.finos.legend.engine.language.pure.compiler.toPureGraph.data.core.EmbeddedDataCompilerExtension; @@ -39,6 +40,12 @@ public class CoreCompilerExtension implements CompilerExtension, EmbeddedDataCompilerExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Core"); + } + @Override public Iterable> getExtraProcessors() { diff --git a/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-compiler/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/PackageableElementFourthPassBuilder.java b/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-compiler/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/PackageableElementFourthPassBuilder.java index 1fbd53c8dc0..17c1d1db9c8 100644 --- a/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-compiler/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/PackageableElementFourthPassBuilder.java +++ b/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-compiler/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/PackageableElementFourthPassBuilder.java @@ -111,6 +111,7 @@ public PackageableElement visit(Class srcClass) { throw e; } + e.printStackTrace(); throw new EngineException(e.getMessage(), property.sourceInformation, EngineErrorType.COMPILATION); } ctx.flushVariable("this"); diff --git a/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-compiler/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/extension/CompilerExtension.java b/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-compiler/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/extension/CompilerExtension.java index 10dedde1c0b..68210e1098b 100644 --- a/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-compiler/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/extension/CompilerExtension.java +++ b/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-compiler/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/extension/CompilerExtension.java @@ -63,6 +63,12 @@ public interface CompilerExtension extends LegendLanguageExtension { Iterable> getExtraProcessors(); + @Override + default String type() + { + return "Compiler"; + } + @Deprecated default List, ProcessingContext, org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.valuespecification.ValueSpecification>> getExtraValueSpecificationProcessors() { diff --git a/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-compiler/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/handlers/Handlers.java b/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-compiler/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/handlers/Handlers.java index b4912827aa3..6578697fca0 100644 --- a/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-compiler/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/handlers/Handlers.java +++ b/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-compiler/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/handlers/Handlers.java @@ -240,6 +240,11 @@ public static TypeAndMultiplicity GroupByReturnInference(List ps, PureModel pureModel) + { + return getTypeAndMultiplicity(Lists.mutable.with((RelationType) ps.get(1)._genericType()._typeArguments().getLast()._rawType()), pureModel); + } + private static TypeAndMultiplicity getTypeAndMultiplicity(MutableList> types, PureModel pureModel) { ProcessorSupport processorSupport = pureModel.getExecutionSupport().getProcessorSupport(); @@ -411,8 +416,15 @@ public static org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.relation { ValueSpecification firstProcessedParameter = parameters.get(0).accept(new ValueSpecificationBuilder(cc, ov, pc)); GenericType gt = firstProcessedParameter._genericType(); - final GenericType gt2 = gt._rawType()._name().equals("TabularDataSet") || gt._rawType()._name().equals("TableTDS") ? cc.pureModel.getGenericType("meta::pure::tds::TDSRow") : gt; - toCollection(parameters.get(1)).values.forEach(l -> updateLambdaWithCol(gt2, l)); + if (parameters.get(1) instanceof ClassInstance) + { + ((ColSpecArray)((ClassInstance) parameters.get(1)).value).colSpecs.forEach(col -> updateSimpleLambda(col.function1, gt, new org.finos.legend.engine.protocol.pure.v1.model.packageableElement.domain.Multiplicity(1, 1))); + } + else + { + final GenericType gt2 = gt._rawType()._name().equals("TabularDataSet") || gt._rawType()._name().equals("TableTDS") ? cc.pureModel.getGenericType("meta::pure::tds::TDSRow") : gt; + toCollection(parameters.get(1)).values.forEach(l -> updateLambdaWithCol(gt2, l)); + } return Stream.concat(Stream.of(firstProcessedParameter), parameters.stream().skip(1).map(p -> p.accept(new ValueSpecificationBuilder(cc, ov, pc)))).collect(Collectors.toList()); }; @@ -680,13 +692,16 @@ public Handlers(PureModel pureModel) register(m( // meta::pure::tds::project(set:T[*], paths:Path[*]):TabularDataSet[1] m(h("meta::pure::tds::project_T_MANY__Path_MANY__TabularDataSet_1_", false, ps -> res("meta::pure::tds::TabularDataSet", "one"), ps -> ps.size() == 2 && typeMany(ps.get(1), "Path"))), + //meta::pure::functions::relation::project(cl:C[*], x:FuncColSpecArray<{C[1]->Any[*]},T>[1]):Relation[1]; // meta::pure::tds::project(set:K[*], functions:Function<{K[1]->Any[*]}>[*], ids:String[*]):TabularDataSet[1] grp(LambdaCollectionInference, h("meta::pure::tds::project_K_MANY__Function_MANY__String_MANY__TabularDataSet_1_", false, ps -> res("meta::pure::tds::TabularDataSet", "one"), ps -> ps.size() == 3)), grp(LambdaColCollectionInference, //meta::pure::tds::project(tds:TabularDataSet[1], columnFunctions:ColumnSpecification[*]):TabularDataSet[1] h("meta::pure::tds::project_TabularDataSet_1__ColumnSpecification_MANY__TabularDataSet_1_", false, ps -> res("meta::pure::tds::TabularDataSet", "one"), ps -> typeOne(ps.get(0), "TabularDataSet")), // meta::pure::tds::project(set:T[*], columnSpecifications:ColumnSpecification[*]):TabularDataSet[1] - h("meta::pure::tds::project_T_MANY__ColumnSpecification_MANY__TabularDataSet_1_", false, ps -> res("meta::pure::tds::TabularDataSet", "one"), ps -> true) + h("meta::pure::tds::project_T_MANY__ColumnSpecification_MANY__TabularDataSet_1_", false, ps -> res("meta::pure::tds::TabularDataSet", "one"), ps -> true), + //meta::pure::functions::relation::project(cl:C[*], x:FuncColSpecArray<{C[1]->Any[*]},T>[1]):Relation[1]; + h("meta::pure::functions::relation::project_C_MANY__FuncColSpecArray_1__Relation_1_", true, ps -> ProjectReturnInference(ps, this.pureModel), ps -> true) ) ) ); @@ -2602,7 +2617,7 @@ private Map buildDispatch() map.put("meta::pure::functions::relation::groupBy_Relation_1__ColSpec_1__AggColSpec_1__Relation_1_", (List ps) -> ps.size() == 3 && isOne(ps.get(0)._multiplicity()) && Sets.immutable.with("Nil", "Relation", "RelationElementAccessor", "TDS", "RelationStoreAccessor").contains(ps.get(0)._genericType()._rawType()._name()) && isOne(ps.get(1)._multiplicity()) && ("Nil".equals(ps.get(1)._genericType()._rawType()._name()) || "ColSpec".equals(ps.get(1)._genericType()._rawType()._name())) && isOne(ps.get(2)._multiplicity()) && ("Nil".equals(ps.get(2)._genericType()._rawType()._name()) || "AggColSpec".equals(ps.get(2)._genericType()._rawType()._name()))); map.put("meta::pure::functions::relation::select_Relation_1__ColSpec_1__Relation_1_", (List ps) -> ps.size() == 2 && isOne(ps.get(0)._multiplicity()) && Sets.immutable.with("Nil", "Relation", "RelationElementAccessor", "TDS", "RelationStoreAccessor").contains(ps.get(0)._genericType()._rawType()._name()) && isOne(ps.get(1)._multiplicity()) && ("Nil".equals(ps.get(1)._genericType()._rawType()._name()) || "ColSpec".equals(ps.get(1)._genericType()._rawType()._name()))); map.put("meta::pure::functions::relation::select_Relation_1__ColSpecArray_1__Relation_1_", (List ps) -> ps.size() == 2 && isOne(ps.get(0)._multiplicity()) && Sets.immutable.with("Nil", "Relation", "RelationElementAccessor", "TDS", "RelationStoreAccessor").contains(ps.get(0)._genericType()._rawType()._name()) && isOne(ps.get(1)._multiplicity()) && ("Nil".equals(ps.get(1)._genericType()._rawType()._name()) || "ColSpecArray".equals(ps.get(1)._genericType()._rawType()._name()))); - + map.put("meta::pure::functions::relation::project_C_MANY__FuncColSpecArray_1__Relation_1_", (List ps) -> ps.size() == 2 && isOne(ps.get(1)._multiplicity()) && ("Nil".equals(ps.get(1)._genericType()._rawType()._name()) || "FuncColSpecArray".equals(ps.get(1)._genericType()._rawType()._name()))); map.put("meta::pure::functions::relation::size_Relation_1__Integer_1_", (List ps) -> ps.size() == 1 && isOne(ps.get(0)._multiplicity()) && Sets.immutable.with("Nil", "Relation", "RelationElementAccessor", "TDS", "RelationStoreAccessor").contains(ps.get(0)._genericType()._rawType()._name())); // map.put("meta::pure::functions::relation::project_C_MANY__FuncColSpecArray_1__Relation_1_", (List ps) -> ps.size() == 2 && isOne(ps.get(1)._multiplicity()) && ("Nil".equals(ps.get(1)._genericType()._rawType()._name()) || "FuncColSpecArray".equals(ps.get(1)._genericType()._rawType()._name()))); diff --git a/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-compiler/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/test/ModelStoreTestConnectionFactory.java b/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-compiler/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/test/ModelStoreTestConnectionFactory.java index 94177c0a825..8449f408ef6 100644 --- a/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-compiler/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/test/ModelStoreTestConnectionFactory.java +++ b/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-compiler/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/test/ModelStoreTestConnectionFactory.java @@ -14,6 +14,7 @@ package org.finos.legend.engine.language.pure.compiler.toPureGraph.test; +import org.eclipse.collections.api.list.MutableList; import org.eclipse.collections.api.tuple.Pair; import org.eclipse.collections.impl.tuple.Tuples; import org.finos.legend.engine.protocol.pure.v1.extension.ConnectionFactoryExtension; @@ -39,6 +40,12 @@ // TO BE MOVED TO MODEL STORE MODULE ONCE CREATED public class ModelStoreTestConnectionFactory implements ConnectionFactoryExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "M2M"); + } + public static final String MODEL_STORE = "ModelStore"; //TODO: after refactor use the already present variables //currently creates a circular dependency, hence cannot use the already present variables diff --git a/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-compiler/src/test/java/org/finos/legend/engine/language/pure/compiler/test/fromGrammar/EmbeddedPureCompilerExtension.java b/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-compiler/src/test/java/org/finos/legend/engine/language/pure/compiler/test/fromGrammar/EmbeddedPureCompilerExtension.java index a6054018c55..f83a946a63d 100644 --- a/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-compiler/src/test/java/org/finos/legend/engine/language/pure/compiler/test/fromGrammar/EmbeddedPureCompilerExtension.java +++ b/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-compiler/src/test/java/org/finos/legend/engine/language/pure/compiler/test/fromGrammar/EmbeddedPureCompilerExtension.java @@ -15,6 +15,7 @@ package org.finos.legend.engine.language.pure.compiler.test.fromGrammar; import org.eclipse.collections.api.block.function.Function3; +import org.eclipse.collections.api.list.MutableList; import org.eclipse.collections.impl.factory.Lists; import org.eclipse.collections.impl.factory.Maps; import org.finos.legend.engine.language.pure.compiler.toPureGraph.CompileContext; @@ -29,6 +30,12 @@ public class EmbeddedPureCompilerExtension implements CompilerExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Embedded"); + } + @Override public Iterable> getExtraProcessors() { diff --git a/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-compiler/src/test/java/org/finos/legend/engine/language/pure/compiler/test/fromGrammar/TestRelationColumn.java b/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-compiler/src/test/java/org/finos/legend/engine/language/pure/compiler/test/fromGrammar/TestRelationColumn.java deleted file mode 100644 index fbe6f61f8c2..00000000000 --- a/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-compiler/src/test/java/org/finos/legend/engine/language/pure/compiler/test/fromGrammar/TestRelationColumn.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2023 Goldman Sachs -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package org.finos.legend.engine.language.pure.compiler.test.fromGrammar; - -import org.finos.legend.engine.language.pure.compiler.test.TestCompilationFromGrammar; - -public class TestRelationColumn extends TestCompilationFromGrammar.TestCompilationFromGrammarTestSuite -{ - @Override - protected String getDuplicatedElementTestCode() - { - return "Class anything::class {}\n" + - "###Mapping\n" + - "Mapping anything::somethingelse ()\n" + - "###Pure\n" + - "Class anything::somethingelse\n" + - "{\n" + - "}\n"; - } - - @Override - protected String getDuplicatedElementTestExpectedErrorMessage() - { - return "COMPILATION error at [5:1-7:1]: Duplicated element 'anything::somethingelse'"; - } - - // More advanced tests can be found in the Relational Section -} diff --git a/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-compiler/src/test/java/org/finos/legend/engine/language/pure/compiler/test/fromGrammar/TestRelationNotUsingDatabaseAccessor.java b/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-compiler/src/test/java/org/finos/legend/engine/language/pure/compiler/test/fromGrammar/TestRelationNotUsingDatabaseAccessor.java new file mode 100644 index 00000000000..c1cadbfdaff --- /dev/null +++ b/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-compiler/src/test/java/org/finos/legend/engine/language/pure/compiler/test/fromGrammar/TestRelationNotUsingDatabaseAccessor.java @@ -0,0 +1,120 @@ +// Copyright 2023 Goldman Sachs +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package org.finos.legend.engine.language.pure.compiler.test.fromGrammar; + +import org.finos.legend.engine.language.pure.compiler.test.TestCompilationFromGrammar; +import org.junit.Test; + +public class TestRelationNotUsingDatabaseAccessor extends TestCompilationFromGrammar.TestCompilationFromGrammarTestSuite +{ + @Override + protected String getDuplicatedElementTestCode() + { + return "Class anything::class {}\n" + + "###Mapping\n" + + "Mapping anything::somethingelse ()\n" + + "###Pure\n" + + "Class anything::somethingelse\n" + + "{\n" + + "}\n"; + } + + @Override + protected String getDuplicatedElementTestExpectedErrorMessage() + { + return "COMPILATION error at [5:1-7:1]: Duplicated element 'anything::somethingelse'"; + } + + // More advanced tests can be found in the Relational Section + // org.finos.legend.engine.language.pure.compiler.test.TestRelationFunctions + + @Test + public void testProject() + { + test( + "###Pure\n" + + "Class test::Person{name : String[1];}" + + "function test::f():Any[*]\n" + + "{\n" + + " test::Person.all()->project(~[mycol:x|$x.name])\n" + + "}" + ); + } + + @Test + public void testProjectError() + { + test( + "###Pure\n" + + "Class test::Person{name : String[1];}" + + "function test::f():Any[*]\n" + + "{\n" + + " test::Person.all()->project(~[mycol:x|$x.nme])\n" + + "}","COMPILATION error at [4:45-47]: Can't find property 'nme' in class 'test::Person'" + ); + } + + @Test + public void testProjectMulti() + { + test( + "###Pure\n" + + "Class test::Person{name : String[1]; val : Integer[1];}" + + "function test::f():Any[*]\n" + + "{\n" + + " test::Person.all()->project(~[mycol:x|$x.name, co:x|$x.val])\n" + + "}" + ); + } + + @Test + public void testProjectMultiError() + { + test( + "###Pure\n" + + "Class test::Person{name : String[1]; val : Integer[1];}" + + "function test::f():Any[*]\n" + + "{\n" + + " test::Person.all()->project(~[mycol:x|$x.name, co:x|$x.vals])\n" + + "}","COMPILATION error at [4:59-62]: Can't find property 'vals' in class 'test::Person'" + ); + } + + @Test + public void testProjectReturn() + { + test( + "###Pure\n" + + "Class test::Person{name : String[1]; val : Integer[1];}" + + "function test::f():Any[*]\n" + + "{\n" + + " test::Person.all()->project(~[mycol:x|$x.name, co:x|$x.val])->filter(x|$x.co > 2)\n" + + "}" + ); + } + + @Test + public void testProjectReturnError() + { + test( + "###Pure\n" + + "Class test::Person{name : String[1]; val : Integer[1];}" + + "function test::f():Any[*]\n" + + "{\n" + + " test::Person.all()->project(~[mycol:x|$x.name, co:x|$x.val])->filter(x|$x.ceo > 2)\n" + + "}", "COMPILATION error at [4:78-80]: The column 'ceo' can't be found in the relation (mycol:String, co:Integer)" + ); + } +} diff --git a/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/from/CorePureGrammarParser.java b/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/from/CorePureGrammarParser.java index 386dba8b626..6ece89983fd 100644 --- a/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/from/CorePureGrammarParser.java +++ b/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/from/CorePureGrammarParser.java @@ -18,6 +18,7 @@ import org.antlr.v4.runtime.CharStreams; import org.antlr.v4.runtime.CommonTokenStream; import org.eclipse.collections.api.factory.Lists; +import org.eclipse.collections.api.list.MutableList; import org.eclipse.collections.impl.utility.ArrayIterate; import org.eclipse.collections.impl.utility.ListIterate; import org.finos.legend.engine.language.pure.grammar.from.antlr4.connection.modelConnection.ModelConnectionLexerGrammar; @@ -87,6 +88,12 @@ public class CorePureGrammarParser implements PureGrammarParserExtension private static RelationStoreAccessorPureParser relationStoreAccessorPureParser = new RelationStoreAccessorPureParser(); + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Core"); + } + @Override public Iterable getExtraMappingElementParsers() { diff --git a/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/from/extension/PureGrammarParserExtension.java b/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/from/extension/PureGrammarParserExtension.java index 670b26b4283..60b34831157 100644 --- a/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/from/extension/PureGrammarParserExtension.java +++ b/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/from/extension/PureGrammarParserExtension.java @@ -23,6 +23,12 @@ public interface PureGrammarParserExtension extends LegendLanguageExtension { + @Override + default String type() + { + return "Parser"; + } + default Iterable getExtraSectionParsers() { return Collections.emptyList(); diff --git a/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/to/CorePureGrammarComposer.java b/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/to/CorePureGrammarComposer.java index 904319605b0..058c0e3d2ad 100644 --- a/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/to/CorePureGrammarComposer.java +++ b/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/to/CorePureGrammarComposer.java @@ -39,6 +39,12 @@ public class CorePureGrammarComposer implements PureGrammarComposerExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Core"); + } + private MutableList> renderers = Lists.mutable.with((element, context) -> { if (element instanceof DataElement) diff --git a/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/to/PureGrammarComposer.java b/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/to/PureGrammarComposer.java index f4b10e33492..b69a8624735 100644 --- a/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/to/PureGrammarComposer.java +++ b/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/to/PureGrammarComposer.java @@ -163,6 +163,15 @@ public String render(PackageableElement element) return DEPRECATED_renderElement(element); } + public String render(PackageableElement element, String parser) + { + return this.context.extraSectionComposers.stream().map(composer -> composer.value(Lists.mutable.with(element), this.context, parser)).filter(Objects::nonNull).findFirst() + // NOTE: this is the old way (no-plugin) way to render section elements, this approach is not great since it does not enforce + // the types of elements a section can have, the newer approach does the check and compose unsupported message when such violations occur + // TO BE REMOVED when we moved everything to extensions + .orElseGet(() -> LazyIterate.collect(Lists.mutable.with(element), this::DEPRECATED_renderElement).makeString("\n\n")); + } + static String processReturn(PackageableElement element, MutableList select) { if (select.size() == 1) diff --git a/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/to/extension/PureGrammarComposerExtension.java b/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/to/extension/PureGrammarComposerExtension.java index a70fddaed96..ba147ec14d8 100644 --- a/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/to/extension/PureGrammarComposerExtension.java +++ b/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/to/extension/PureGrammarComposerExtension.java @@ -42,6 +42,12 @@ public interface PureGrammarComposerExtension extends LegendLanguageExtension { + @Override + default String type() + { + return "Composer"; + } + /** * This method takes a list of elements which are supposed to be within a section (specified by the parser name) */ diff --git a/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-grammar/src/test/java/org/finos/legend/engine/language/pure/grammar/test/roundtrip/embedded/extensions/GrammarComposerExtension.java b/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-grammar/src/test/java/org/finos/legend/engine/language/pure/grammar/test/roundtrip/embedded/extensions/GrammarComposerExtension.java index d3d2395c6a0..4f3afce1aeb 100644 --- a/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-grammar/src/test/java/org/finos/legend/engine/language/pure/grammar/test/roundtrip/embedded/extensions/GrammarComposerExtension.java +++ b/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-grammar/src/test/java/org/finos/legend/engine/language/pure/grammar/test/roundtrip/embedded/extensions/GrammarComposerExtension.java @@ -15,7 +15,9 @@ package org.finos.legend.engine.language.pure.grammar.test.roundtrip.embedded.extensions; import org.eclipse.collections.api.block.function.Function2; +import org.eclipse.collections.api.factory.Lists; import org.eclipse.collections.api.factory.Maps; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.language.pure.grammar.to.PureGrammarComposerContext; import org.finos.legend.engine.language.pure.grammar.to.extension.PureGrammarComposerExtension; @@ -23,6 +25,13 @@ public class GrammarComposerExtension implements PureGrammarComposerExtension { + @Override + public MutableList group() + { + return Lists.mutable.with("__Test__"); + + } + @Override public Map> getExtraEmbeddedPureComposers() { diff --git a/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-grammar/src/test/java/org/finos/legend/engine/language/pure/grammar/test/roundtrip/embedded/extensions/GrammarParserExtension.java b/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-grammar/src/test/java/org/finos/legend/engine/language/pure/grammar/test/roundtrip/embedded/extensions/GrammarParserExtension.java index 4cbaddfc790..8164b6185c6 100644 --- a/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-grammar/src/test/java/org/finos/legend/engine/language/pure/grammar/test/roundtrip/embedded/extensions/GrammarParserExtension.java +++ b/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-grammar/src/test/java/org/finos/legend/engine/language/pure/grammar/test/roundtrip/embedded/extensions/GrammarParserExtension.java @@ -14,12 +14,20 @@ package org.finos.legend.engine.language.pure.grammar.test.roundtrip.embedded.extensions; +import org.eclipse.collections.api.list.MutableList; import org.eclipse.collections.impl.factory.Lists; import org.finos.legend.engine.language.pure.grammar.from.extension.EmbeddedPureParser; import org.finos.legend.engine.language.pure.grammar.from.extension.PureGrammarParserExtension; public class GrammarParserExtension implements PureGrammarParserExtension { + @Override + public MutableList group() + { + return Lists.mutable.with("__Test__"); + + } + @Override public Iterable getExtraEmbeddedPureParsers() { diff --git a/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-grammar/src/test/java/org/finos/legend/engine/language/pure/grammar/test/roundtrip/embedded/extensions/ProtocolExtension.java b/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-grammar/src/test/java/org/finos/legend/engine/language/pure/grammar/test/roundtrip/embedded/extensions/ProtocolExtension.java index 4d52b399986..4d0df0e734b 100644 --- a/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-grammar/src/test/java/org/finos/legend/engine/language/pure/grammar/test/roundtrip/embedded/extensions/ProtocolExtension.java +++ b/legend-engine-core/legend-engine-core-language-pure/legend-engine-language-pure-grammar/src/test/java/org/finos/legend/engine/language/pure/grammar/test/roundtrip/embedded/extensions/ProtocolExtension.java @@ -14,6 +14,8 @@ package org.finos.legend.engine.language.pure.grammar.test.roundtrip.embedded.extensions; +import org.eclipse.collections.api.list.MutableList; +import org.eclipse.collections.impl.factory.Lists; import org.eclipse.collections.impl.factory.Maps; import org.finos.legend.engine.protocol.pure.v1.extension.PureProtocolExtension; @@ -21,6 +23,13 @@ public class ProtocolExtension implements PureProtocolExtension { + @Override + public MutableList group() + { + return Lists.mutable.with("__Test__"); + + } + @Override public Map getExtraClassInstanceTypeMappings() { diff --git a/legend-engine-core/legend-engine-core-language-pure/legend-engine-protocol-pure/src/main/java/org/finos/legend/engine/protocol/pure/v1/CorePureProtocolExtension.java b/legend-engine-core/legend-engine-core-language-pure/legend-engine-protocol-pure/src/main/java/org/finos/legend/engine/protocol/pure/v1/CorePureProtocolExtension.java index 1a7015ca98d..344785b9db9 100644 --- a/legend-engine-core/legend-engine-core-language-pure/legend-engine-protocol-pure/src/main/java/org/finos/legend/engine/protocol/pure/v1/CorePureProtocolExtension.java +++ b/legend-engine-core/legend-engine-core-language-pure/legend-engine-protocol-pure/src/main/java/org/finos/legend/engine/protocol/pure/v1/CorePureProtocolExtension.java @@ -17,6 +17,7 @@ import org.eclipse.collections.api.block.function.Function0; import org.eclipse.collections.api.factory.Lists; import org.eclipse.collections.api.factory.Maps; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.protocol.pure.v1.extension.ProtocolSubTypeInfo; import org.finos.legend.engine.protocol.pure.v1.extension.PureProtocolExtension; import org.finos.legend.engine.protocol.pure.v1.model.data.DataElementReference; @@ -77,6 +78,12 @@ public class CorePureProtocolExtension implements PureProtocolExtension public static final String MAPPING_CLASSIFIER_PATH = "meta::pure::mapping::Mapping"; public static final String FUNCTION_CLASSIFIER_PATH = "meta::pure::metamodel::function::ConcreteFunctionDefinition"; + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Core"); + } + @Override public List>>> getExtraProtocolSubTypeInfoCollectors() { diff --git a/legend-engine-core/legend-engine-core-language-pure/legend-engine-protocol-pure/src/main/java/org/finos/legend/engine/protocol/pure/v1/extension/ConnectionFactoryExtension.java b/legend-engine-core/legend-engine-core-language-pure/legend-engine-protocol-pure/src/main/java/org/finos/legend/engine/protocol/pure/v1/extension/ConnectionFactoryExtension.java index b4cddf2fbec..816a45ceafe 100644 --- a/legend-engine-core/legend-engine-core-language-pure/legend-engine-protocol-pure/src/main/java/org/finos/legend/engine/protocol/pure/v1/extension/ConnectionFactoryExtension.java +++ b/legend-engine-core/legend-engine-core-language-pure/legend-engine-protocol-pure/src/main/java/org/finos/legend/engine/protocol/pure/v1/extension/ConnectionFactoryExtension.java @@ -33,6 +33,11 @@ */ public interface ConnectionFactoryExtension extends LegendConnectionExtension { + @Override + default String type() + { + return "Connection_Factory"; + } /** * Deprecated as part of deprecated of Legacy Mapping Test diff --git a/legend-engine-core/legend-engine-core-language-pure/legend-engine-protocol-pure/src/main/java/org/finos/legend/engine/protocol/pure/v1/extension/PureProtocolExtension.java b/legend-engine-core/legend-engine-core-language-pure/legend-engine-protocol-pure/src/main/java/org/finos/legend/engine/protocol/pure/v1/extension/PureProtocolExtension.java index cccf7d52cdd..4913301d80a 100644 --- a/legend-engine-core/legend-engine-core-language-pure/legend-engine-protocol-pure/src/main/java/org/finos/legend/engine/protocol/pure/v1/extension/PureProtocolExtension.java +++ b/legend-engine-core/legend-engine-core-language-pure/legend-engine-protocol-pure/src/main/java/org/finos/legend/engine/protocol/pure/v1/extension/PureProtocolExtension.java @@ -25,6 +25,12 @@ public interface PureProtocolExtension extends LegendLanguageExtension { + @Override + default String type() + { + return "Protocol"; + } + @Deprecated default List>>> getExtraProtocolSubTypeInfoCollectors() { diff --git a/legend-engine-core/legend-engine-core-shared/legend-engine-shared-core/src/main/java/org/finos/legend/engine/shared/core/identity/factory/IdentityFactory.java b/legend-engine-core/legend-engine-core-shared/legend-engine-shared-core/src/main/java/org/finos/legend/engine/shared/core/identity/factory/IdentityFactory.java index 145903edfe8..f2979dc4543 100644 --- a/legend-engine-core/legend-engine-core-shared/legend-engine-shared-core/src/main/java/org/finos/legend/engine/shared/core/identity/factory/IdentityFactory.java +++ b/legend-engine-core/legend-engine-core-shared/legend-engine-shared-core/src/main/java/org/finos/legend/engine/shared/core/identity/factory/IdentityFactory.java @@ -16,6 +16,7 @@ import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.shared.core.extension.LegendConnectionExtension; +import org.finos.legend.engine.shared.core.extension.LegendExtension; import org.finos.legend.engine.shared.core.identity.Identity; import org.pac4j.core.profile.CommonProfile; @@ -23,7 +24,7 @@ import java.util.Collections; import java.util.List; -public interface IdentityFactory extends LegendConnectionExtension +public interface IdentityFactory extends LegendExtension { Identity makeIdentity(Subject subject); diff --git a/legend-engine-core/legend-engine-core-shared/legend-engine-shared-extensions/pom.xml b/legend-engine-core/legend-engine-core-shared/legend-engine-shared-extensions/pom.xml index fb3939a1587..2bee5218532 100644 --- a/legend-engine-core/legend-engine-core-shared/legend-engine-shared-extensions/pom.xml +++ b/legend-engine-core/legend-engine-core-shared/legend-engine-shared-extensions/pom.xml @@ -26,5 +26,18 @@ Legend Engine - Shared - Extensions + + org.eclipse.collections + eclipse-collections-api + + + org.eclipse.collections + eclipse-collections + + + junit + junit + test + \ No newline at end of file diff --git a/legend-engine-core/legend-engine-core-shared/legend-engine-shared-extensions/src/main/java/org/finos/legend/engine/shared/core/extension/Extensions.java b/legend-engine-core/legend-engine-core-shared/legend-engine-shared-extensions/src/main/java/org/finos/legend/engine/shared/core/extension/Extensions.java new file mode 100644 index 00000000000..cdefbcd953b --- /dev/null +++ b/legend-engine-core/legend-engine-core-shared/legend-engine-shared-extensions/src/main/java/org/finos/legend/engine/shared/core/extension/Extensions.java @@ -0,0 +1,109 @@ +// Copyright 2024 Goldman Sachs +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package org.finos.legend.engine.shared.core.extension; + +import org.eclipse.collections.api.list.MutableList; +import org.eclipse.collections.impl.factory.Lists; + +import java.util.ServiceLoader; + +public class Extensions +{ + public static MutableList get() + { + return Lists.mutable + // Pure code extension for Store, External Format, etc. + .withAll(loadExtensions("org.finos.legend.engine.pure.code.core.LegendPureCoreExtension")) + + // All Function Activators + .withAll(loadExtensions("org.finos.legend.engine.functionActivator.service.FunctionActivatorService")) + + // Language Extensions + .withAll(loadExtensions("org.finos.legend.engine.protocol.pure.v1.extension.PureProtocolExtension")) + .withAll(loadExtensions("org.finos.legend.engine.language.pure.grammar.from.extension.PureGrammarParserExtension")) + .withAll(loadExtensions("org.finos.legend.engine.language.pure.grammar.to.extension.PureGrammarComposerExtension")) + .withAll(loadExtensions("org.finos.legend.engine.language.pure.compiler.toPureGraph.extension.CompilerExtension")) + + // ExternalFormat Extension + .withAll(loadExtensions("org.finos.legend.engine.external.shared.format.model.ExternalFormatExtension")) + .withAll(loadExtensions("org.finos.legend.engine.external.shared.runtime.ExternalFormatRuntimeExtension")) + + // Plan extensions + .withAll(loadExtensions("org.finos.legend.engine.plan.generation.extension.PlanGeneratorExtension")) + .withAll(loadExtensions("org.finos.legend.engine.plan.execution.extension.ExecutionExtension")) + .withAll(loadExtensions("org.finos.legend.engine.plan.execution.nodes.helpers.platform.ExecutionPlanJavaCompilerExtension")) + .withAll(loadExtensions("org.finos.legend.engine.plan.execution.stores.StoreExecutorBuilder")) + + // Code generation extensions + .withAll(loadExtensions("org.finos.legend.engine.language.pure.dsl.generation.extension.ArtifactGenerationExtension")) + .withAll(loadExtensions("org.finos.legend.engine.language.pure.dsl.generation.extension.ModelGenerationExtension")) + .withAll(loadExtensions("org.finos.legend.engine.external.shared.format.extension.GenerationExtension")) + + // Connections + .withAll(loadExtensions("org.finos.legend.engine.plan.execution.stores.relational.connection.manager.strategic.StrategicConnectionExtension")) + .withAll(loadExtensions("org.finos.legend.engine.protocol.pure.v1.extension.ConnectionFactoryExtension")) + .withAll(loadExtensions("org.finos.legend.engine.plan.execution.stores.relational.connection.ConnectionExtension")) + .withAll(loadExtensions("org.finos.legend.engine.plan.execution.stores.relational.connection.tests.api.DynamicTestConnection")) + + // All Testable Packageable Elements + .withAll(loadExtensions("org.finos.legend.engine.testable.extension.TestableRunnerExtension")); + } + + public static TreeNode buildTree(MutableList extensionList) + { + TreeNode extensions = new TreeNode("Extensions"); + extensionList + .groupBy(LegendExtension::group) + .keyMultiValuePairsView() + .toSortedListBy(x -> x.getOne().toString()) + .forEach(c -> + { + TreeNode module = extensions; + for (String x : c.getOne()) + { + module = module.createOrReturnChild("#" + x + "#"); + } + for (LegendExtension z : c.getTwo()) + { + TreeNode cursor = module; + for (String x : z.typeGroup()) + { + cursor = cursor.createOrReturnChild(x); + } + cursor.createOrReturnChild(z.type() + " [" + z.getClass().getSimpleName() + ".class]"); + } + }); + return extensions; + } + + private static MutableList loadExtensions(String _class) + { + MutableList res = Lists.mutable.empty(); + try + { + Class _cl = Class.forName(_class); + for (LegendExtension ext : (ServiceLoader) ServiceLoader.load(_cl)) + { + res.add(ext); + } + return res; + } + catch (Exception e) + { + System.out.println("Not Found: " + _class); + return res; + } + } +} diff --git a/legend-engine-core/legend-engine-core-shared/legend-engine-shared-extensions/src/main/java/org/finos/legend/engine/shared/core/extension/LegendConnectionExtension.java b/legend-engine-core/legend-engine-core-shared/legend-engine-shared-extensions/src/main/java/org/finos/legend/engine/shared/core/extension/LegendConnectionExtension.java index 833ec619ec6..f81277d8c27 100644 --- a/legend-engine-core/legend-engine-core-shared/legend-engine-shared-extensions/src/main/java/org/finos/legend/engine/shared/core/extension/LegendConnectionExtension.java +++ b/legend-engine-core/legend-engine-core-shared/legend-engine-shared-extensions/src/main/java/org/finos/legend/engine/shared/core/extension/LegendConnectionExtension.java @@ -14,6 +14,14 @@ package org.finos.legend.engine.shared.core.extension; +import org.eclipse.collections.api.factory.Lists; +import org.eclipse.collections.api.list.MutableList; + public interface LegendConnectionExtension extends LegendExtension { + @Override + default MutableList typeGroup() + { + return Lists.mutable.with("Connection"); + } } diff --git a/legend-engine-core/legend-engine-core-shared/legend-engine-shared-extensions/src/main/java/org/finos/legend/engine/shared/core/extension/LegendExtension.java b/legend-engine-core/legend-engine-core-shared/legend-engine-shared-extensions/src/main/java/org/finos/legend/engine/shared/core/extension/LegendExtension.java index 8e53c35fd5d..36389cc5b0b 100644 --- a/legend-engine-core/legend-engine-core-shared/legend-engine-shared-extensions/src/main/java/org/finos/legend/engine/shared/core/extension/LegendExtension.java +++ b/legend-engine-core/legend-engine-core-shared/legend-engine-shared-extensions/src/main/java/org/finos/legend/engine/shared/core/extension/LegendExtension.java @@ -14,6 +14,23 @@ package org.finos.legend.engine.shared.core.extension; +import org.eclipse.collections.api.factory.Lists; +import org.eclipse.collections.api.list.MutableList; + public interface LegendExtension { + default MutableList group() + { + return Lists.mutable.empty(); + } + + default String type() + { + return "Unknown Type " + this.getClass().getName(); + } + + default MutableList typeGroup() + { + return Lists.mutable.empty(); + } } diff --git a/legend-engine-core/legend-engine-core-shared/legend-engine-shared-extensions/src/main/java/org/finos/legend/engine/shared/core/extension/LegendExternalFormatExtension.java b/legend-engine-core/legend-engine-core-shared/legend-engine-shared-extensions/src/main/java/org/finos/legend/engine/shared/core/extension/LegendExternalFormatExtension.java index 0139e10ba52..8a385096093 100644 --- a/legend-engine-core/legend-engine-core-shared/legend-engine-shared-extensions/src/main/java/org/finos/legend/engine/shared/core/extension/LegendExternalFormatExtension.java +++ b/legend-engine-core/legend-engine-core-shared/legend-engine-shared-extensions/src/main/java/org/finos/legend/engine/shared/core/extension/LegendExternalFormatExtension.java @@ -14,6 +14,9 @@ package org.finos.legend.engine.shared.core.extension; -public interface LegendExternalFormatExtension +import org.eclipse.collections.api.factory.Lists; +import org.eclipse.collections.api.list.MutableList; + +public interface LegendExternalFormatExtension extends LegendExtension { } diff --git a/legend-engine-core/legend-engine-core-shared/legend-engine-shared-extensions/src/main/java/org/finos/legend/engine/shared/core/extension/LegendGenerationExtension.java b/legend-engine-core/legend-engine-core-shared/legend-engine-shared-extensions/src/main/java/org/finos/legend/engine/shared/core/extension/LegendGenerationExtension.java index df38cb438aa..d7735bb30e3 100644 --- a/legend-engine-core/legend-engine-core-shared/legend-engine-shared-extensions/src/main/java/org/finos/legend/engine/shared/core/extension/LegendGenerationExtension.java +++ b/legend-engine-core/legend-engine-core-shared/legend-engine-shared-extensions/src/main/java/org/finos/legend/engine/shared/core/extension/LegendGenerationExtension.java @@ -14,6 +14,9 @@ package org.finos.legend.engine.shared.core.extension; +import org.eclipse.collections.api.factory.Lists; +import org.eclipse.collections.api.list.MutableList; + public interface LegendGenerationExtension extends LegendExtension { } diff --git a/legend-engine-core/legend-engine-core-shared/legend-engine-shared-extensions/src/main/java/org/finos/legend/engine/shared/core/extension/LegendLanguageExtension.java b/legend-engine-core/legend-engine-core-shared/legend-engine-shared-extensions/src/main/java/org/finos/legend/engine/shared/core/extension/LegendLanguageExtension.java index 4ee995f1b8e..ce63a2a98d7 100644 --- a/legend-engine-core/legend-engine-core-shared/legend-engine-shared-extensions/src/main/java/org/finos/legend/engine/shared/core/extension/LegendLanguageExtension.java +++ b/legend-engine-core/legend-engine-core-shared/legend-engine-shared-extensions/src/main/java/org/finos/legend/engine/shared/core/extension/LegendLanguageExtension.java @@ -14,6 +14,14 @@ package org.finos.legend.engine.shared.core.extension; +import org.eclipse.collections.api.factory.Lists; +import org.eclipse.collections.api.list.MutableList; + public interface LegendLanguageExtension extends LegendExtension { + @Override + default MutableList typeGroup() + { + return Lists.mutable.with("Lang"); + } } diff --git a/legend-engine-core/legend-engine-core-shared/legend-engine-shared-extensions/src/main/java/org/finos/legend/engine/shared/core/extension/LegendPlanExtension.java b/legend-engine-core/legend-engine-core-shared/legend-engine-shared-extensions/src/main/java/org/finos/legend/engine/shared/core/extension/LegendPlanExtension.java index 628679e8b8c..d6433c57e08 100644 --- a/legend-engine-core/legend-engine-core-shared/legend-engine-shared-extensions/src/main/java/org/finos/legend/engine/shared/core/extension/LegendPlanExtension.java +++ b/legend-engine-core/legend-engine-core-shared/legend-engine-shared-extensions/src/main/java/org/finos/legend/engine/shared/core/extension/LegendPlanExtension.java @@ -14,6 +14,14 @@ package org.finos.legend.engine.shared.core.extension; +import org.eclipse.collections.api.factory.Lists; +import org.eclipse.collections.api.list.MutableList; + public interface LegendPlanExtension extends LegendExtension { + @Override + default MutableList typeGroup() + { + return Lists.mutable.with("Plan"); + } } diff --git a/legend-engine-core/legend-engine-core-shared/legend-engine-shared-extensions/src/main/java/org/finos/legend/engine/shared/core/extension/TreeNode.java b/legend-engine-core/legend-engine-core-shared/legend-engine-shared-extensions/src/main/java/org/finos/legend/engine/shared/core/extension/TreeNode.java new file mode 100644 index 00000000000..c85a732ad08 --- /dev/null +++ b/legend-engine-core/legend-engine-core-shared/legend-engine-shared-extensions/src/main/java/org/finos/legend/engine/shared/core/extension/TreeNode.java @@ -0,0 +1,65 @@ +// Copyright 2024 Goldman Sachs +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package org.finos.legend.engine.shared.core.extension; + +import org.eclipse.collections.api.list.MutableList; +import org.eclipse.collections.impl.factory.Lists; + +public class TreeNode +{ + private final String name; + private final MutableList children = Lists.mutable.empty(); + + public TreeNode(String name) + { + this.name = name; + } + + public TreeNode createOrReturnChild(String name) + { + TreeNode node = children.detect(c -> name.equals(c.name)); + return node == null ? addChild(new TreeNode(name)) : node; + } + + public TreeNode addChild(TreeNode child) + { + children.add(child); + return child; + } + + public String print() + { + return printWithDepth(0, Lists.mutable.empty(), false); + } + + private String space = " "; + + private String printWithDepth(int depth, MutableList parentLast, boolean last) + { + StringBuilder builder = new StringBuilder(); + for (int i = 0; i < depth - 1; i++) + { + builder.append(space); + builder.append(parentLast.get(i + 1) ? " " : "│"); + } + if (depth > 0) + { + builder.append(space); + builder.append(last ? "└" : "├"); + } + String prefix = builder.toString(); + return prefix + name + (children.isEmpty() ? "" : "\n") + children.collectWithIndex((c, i) -> c.printWithDepth(depth + 1, Lists.mutable.withAll(parentLast).with(last), i == children.size() - 1)).makeString("\n"); + } +} diff --git a/legend-engine-core/legend-engine-core-shared/legend-engine-shared-extensions/src/test/java/org/finos/legend/engine/shared/core/extension/TestTreeNode.java b/legend-engine-core/legend-engine-core-shared/legend-engine-shared-extensions/src/test/java/org/finos/legend/engine/shared/core/extension/TestTreeNode.java new file mode 100644 index 00000000000..624e73346e8 --- /dev/null +++ b/legend-engine-core/legend-engine-core-shared/legend-engine-shared-extensions/src/test/java/org/finos/legend/engine/shared/core/extension/TestTreeNode.java @@ -0,0 +1,72 @@ +// Copyright 2024 Goldman Sachs +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package org.finos.legend.engine.shared.core.extension; + +import org.junit.Assert; +import org.junit.Test; + +public class TestTreeNode +{ + @Test + public void testPrint() + { + TreeNode root = new TreeNode("Core"); + TreeNode child1 = new TreeNode("Core"); + TreeNode child2 = new TreeNode("Pure"); + TreeNode child21 = new TreeNode("Pure2"); + TreeNode child3 = new TreeNode("Lang"); + TreeNode child4 = new TreeNode("Compiler"); + TreeNode child5 = new TreeNode("Composer"); + TreeNode child6 = new TreeNode("Parser"); + TreeNode child7 = new TreeNode("Protocol"); + TreeNode child8 = new TreeNode("Plan"); + TreeNode child9 = new TreeNode("Binding_Java"); + TreeNode child10 = new TreeNode("Pure"); + + root.addChild(child1); + + child1.addChild(child2); + + child2.addChild(child21); + + root.addChild(child3); + + child3.addChild(child4); + child3.addChild(child5); + child3.addChild(child6); + child3.addChild(child7); + + root.addChild(child8); + + child8.addChild(child9); + child9.addChild(child10); + + + Assert.assertEquals( + "Core\n" + + " ├Core\n" + + " │ └Pure\n" + + " │ └Pure2\n" + + " ├Lang\n" + + " │ ├Compiler\n" + + " │ ├Composer\n" + + " │ ├Parser\n" + + " │ └Protocol\n" + + " └Plan\n" + + " └Binding_Java\n" + + " └Pure", root.print()); + + } +} diff --git a/legend-engine-core/legend-engine-core-test/legend-engine-test-runner-function/src/main/java/org/finos/legend/engine/testable/function/extension/FunctionTestableRunnerExtension.java b/legend-engine-core/legend-engine-core-test/legend-engine-test-runner-function/src/main/java/org/finos/legend/engine/testable/function/extension/FunctionTestableRunnerExtension.java index d1c86b0250d..f7929b1202c 100644 --- a/legend-engine-core/legend-engine-core-test/legend-engine-test-runner-function/src/main/java/org/finos/legend/engine/testable/function/extension/FunctionTestableRunnerExtension.java +++ b/legend-engine-core/legend-engine-core-test/legend-engine-test-runner-function/src/main/java/org/finos/legend/engine/testable/function/extension/FunctionTestableRunnerExtension.java @@ -14,6 +14,7 @@ package org.finos.legend.engine.testable.function.extension; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.protocol.pure.PureClientVersions; import org.finos.legend.engine.protocol.pure.v1.CorePureProtocolExtension; import org.finos.legend.engine.testable.extension.TestRunner; @@ -23,7 +24,6 @@ public class FunctionTestableRunnerExtension implements TestableRunnerExtension { - private String pureVersion = PureClientVersions.production; @Override @@ -32,6 +32,12 @@ public String getSupportedClassifierPath() return CorePureProtocolExtension.FUNCTION_CLASSIFIER_PATH; } + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("PackageableElement", "Function"); + } + @Override public TestRunner getTestRunner(Testable testable) { diff --git a/legend-engine-core/legend-engine-core-test/legend-engine-test-runner-mapping/src/main/java/org/finos/legend/engine/testable/mapping/extension/MappingTestableRunnerExtension.java b/legend-engine-core/legend-engine-core-test/legend-engine-test-runner-mapping/src/main/java/org/finos/legend/engine/testable/mapping/extension/MappingTestableRunnerExtension.java index 2378484bd6b..086c732e293 100644 --- a/legend-engine-core/legend-engine-core-test/legend-engine-test-runner-mapping/src/main/java/org/finos/legend/engine/testable/mapping/extension/MappingTestableRunnerExtension.java +++ b/legend-engine-core/legend-engine-core-test/legend-engine-test-runner-mapping/src/main/java/org/finos/legend/engine/testable/mapping/extension/MappingTestableRunnerExtension.java @@ -14,6 +14,7 @@ package org.finos.legend.engine.testable.mapping.extension; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.language.pure.compiler.toPureGraph.PureModel; import org.finos.legend.engine.protocol.pure.v1.CorePureProtocolExtension; import org.finos.legend.engine.protocol.pure.v1.model.context.PureModelContextData; @@ -31,6 +32,12 @@ public class MappingTestableRunnerExtension implements TestableRunnerExtension { private String pureVersion; + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("PackageableElement", "Mapping"); + } + @Override public String getSupportedClassifierPath() { diff --git a/legend-engine-core/legend-engine-core-test/legend-engine-testable/src/main/java/org/finos/legend/engine/testable/extension/TestableRunnerExtension.java b/legend-engine-core/legend-engine-core-test/legend-engine-testable/src/main/java/org/finos/legend/engine/testable/extension/TestableRunnerExtension.java index b50144c6ee8..3eaf4951ee9 100644 --- a/legend-engine-core/legend-engine-core-test/legend-engine-testable/src/main/java/org/finos/legend/engine/testable/extension/TestableRunnerExtension.java +++ b/legend-engine-core/legend-engine-core-test/legend-engine-testable/src/main/java/org/finos/legend/engine/testable/extension/TestableRunnerExtension.java @@ -14,11 +14,25 @@ package org.finos.legend.engine.testable.extension; +import org.eclipse.collections.api.factory.Lists; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.shared.core.extension.LegendExtension; import org.finos.legend.pure.m3.coreinstance.meta.pure.test.Testable; public interface TestableRunnerExtension extends LegendExtension { + @Override + default MutableList typeGroup() + { + return Lists.mutable.with("Testable"); + } + + @Override + default String type() + { + return "Runner"; + } + String getSupportedClassifierPath(); TestRunner getTestRunner(Testable testable); diff --git a/legend-engine-pure/legend-engine-pure-code/legend-engine-pure-code-core-extension/src/main/java/org/finos/legend/engine/pure/code/core/CoreLegendPureCoreExtension.java b/legend-engine-pure/legend-engine-pure-code/legend-engine-pure-code-core-extension/src/main/java/org/finos/legend/engine/pure/code/core/CoreLegendPureCoreExtension.java index 15a6aa680f3..38c764a7fb1 100644 --- a/legend-engine-pure/legend-engine-pure-code/legend-engine-pure-code-core-extension/src/main/java/org/finos/legend/engine/pure/code/core/CoreLegendPureCoreExtension.java +++ b/legend-engine-pure/legend-engine-pure-code/legend-engine-pure-code-core-extension/src/main/java/org/finos/legend/engine/pure/code/core/CoreLegendPureCoreExtension.java @@ -14,8 +14,30 @@ package org.finos.legend.engine.pure.code.core; +import org.eclipse.collections.api.list.MutableList; +import org.eclipse.collections.impl.factory.Lists; + public class CoreLegendPureCoreExtension implements LegendPureCoreExtension { + @Override + public String type() + { + return "Pure"; + } + + @Override + public MutableList typeGroup() + { + return Lists.mutable.with("Plan", "Generation", "Platform"); + } + + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Core"); + } + + @Override public String functionFile() { diff --git a/legend-engine-pure/legend-engine-pure-code/legend-engine-pure-code-core-extension/src/main/java/org/finos/legend/engine/pure/code/core/ExternalFormatLegendPureCoreExtension.java b/legend-engine-pure/legend-engine-pure-code/legend-engine-pure-code-core-extension/src/main/java/org/finos/legend/engine/pure/code/core/ExternalFormatLegendPureCoreExtension.java index 6608fe29c92..14deb36afeb 100644 --- a/legend-engine-pure/legend-engine-pure-code/legend-engine-pure-code-core-extension/src/main/java/org/finos/legend/engine/pure/code/core/ExternalFormatLegendPureCoreExtension.java +++ b/legend-engine-pure/legend-engine-pure-code/legend-engine-pure-code-core-extension/src/main/java/org/finos/legend/engine/pure/code/core/ExternalFormatLegendPureCoreExtension.java @@ -14,6 +14,21 @@ package org.finos.legend.engine.pure.code.core; +import org.eclipse.collections.api.list.MutableList; +import org.eclipse.collections.impl.factory.Lists; + public interface ExternalFormatLegendPureCoreExtension extends LegendPureCoreExtension { + @Override + default String type() + { + return "Pure-Contract"; + } + + @Override + default MutableList typeGroup() + { + return Lists.mutable.with("Plan", "Generation"); + } + } diff --git a/legend-engine-pure/legend-engine-pure-code/legend-engine-pure-code-core-extension/src/main/java/org/finos/legend/engine/pure/code/core/FeatureLegendPureCoreExtension.java b/legend-engine-pure/legend-engine-pure-code/legend-engine-pure-code-core-extension/src/main/java/org/finos/legend/engine/pure/code/core/FeatureLegendPureCoreExtension.java index 39efd5de687..ad605b257cf 100644 --- a/legend-engine-pure/legend-engine-pure-code/legend-engine-pure-code-core-extension/src/main/java/org/finos/legend/engine/pure/code/core/FeatureLegendPureCoreExtension.java +++ b/legend-engine-pure/legend-engine-pure-code/legend-engine-pure-code-core-extension/src/main/java/org/finos/legend/engine/pure/code/core/FeatureLegendPureCoreExtension.java @@ -14,6 +14,20 @@ package org.finos.legend.engine.pure.code.core; +import org.eclipse.collections.api.list.MutableList; +import org.eclipse.collections.impl.factory.Lists; + public interface FeatureLegendPureCoreExtension extends LegendPureCoreExtension { + @Override + default String type() + { + return "Pure"; + } + + @Override + default MutableList typeGroup() + { + return Lists.mutable.with("Feature"); + } } diff --git a/legend-engine-pure/legend-engine-pure-code/legend-engine-pure-code-core-extension/src/main/java/org/finos/legend/engine/pure/code/core/JavaBindingLegendPureCoreExtension.java b/legend-engine-pure/legend-engine-pure-code/legend-engine-pure-code-core-extension/src/main/java/org/finos/legend/engine/pure/code/core/JavaBindingLegendPureCoreExtension.java new file mode 100644 index 00000000000..a5554104ce3 --- /dev/null +++ b/legend-engine-pure/legend-engine-pure-code/legend-engine-pure-code-core-extension/src/main/java/org/finos/legend/engine/pure/code/core/JavaBindingLegendPureCoreExtension.java @@ -0,0 +1,33 @@ +// Copyright 2024 Goldman Sachs +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package org.finos.legend.engine.pure.code.core; + +import org.eclipse.collections.api.list.MutableList; +import org.eclipse.collections.impl.factory.Lists; + +public interface JavaBindingLegendPureCoreExtension extends BindingLegendPureCoreExtension +{ + @Override + default String type() + { + return "Pure"; + } + + @Override + default MutableList typeGroup() + { + return Lists.mutable.with("Plan", "Generation", "Binding_Java"); + } +} diff --git a/legend-engine-pure/legend-engine-pure-code/legend-engine-pure-code-core-extension/src/main/java/org/finos/legend/engine/pure/code/core/StoreLegendPureCoreExtension.java b/legend-engine-pure/legend-engine-pure-code/legend-engine-pure-code-core-extension/src/main/java/org/finos/legend/engine/pure/code/core/StoreLegendPureCoreExtension.java index 2952f664fbd..8f2aa45e7f7 100644 --- a/legend-engine-pure/legend-engine-pure-code/legend-engine-pure-code-core-extension/src/main/java/org/finos/legend/engine/pure/code/core/StoreLegendPureCoreExtension.java +++ b/legend-engine-pure/legend-engine-pure-code/legend-engine-pure-code-core-extension/src/main/java/org/finos/legend/engine/pure/code/core/StoreLegendPureCoreExtension.java @@ -14,6 +14,20 @@ package org.finos.legend.engine.pure.code.core; +import org.eclipse.collections.api.list.MutableList; +import org.eclipse.collections.impl.factory.Lists; + public interface StoreLegendPureCoreExtension extends LegendPureCoreExtension { + @Override + default String type() + { + return "Pure-Contract"; + } + + @Override + default MutableList typeGroup() + { + return Lists.mutable.with("Plan", "Generation"); + } } diff --git a/legend-engine-pure/legend-engine-pure-code/legend-engine-pure-code-core-extension/src/main/java/org/finos/legend/engine/pure/code/core/TestLegendPureCoreExtension.java b/legend-engine-pure/legend-engine-pure-code/legend-engine-pure-code-core-extension/src/main/java/org/finos/legend/engine/pure/code/core/TestLegendPureCoreExtension.java index 94efb79cff1..d3fde6b0077 100644 --- a/legend-engine-pure/legend-engine-pure-code/legend-engine-pure-code-core-extension/src/main/java/org/finos/legend/engine/pure/code/core/TestLegendPureCoreExtension.java +++ b/legend-engine-pure/legend-engine-pure-code/legend-engine-pure-code-core-extension/src/main/java/org/finos/legend/engine/pure/code/core/TestLegendPureCoreExtension.java @@ -14,6 +14,21 @@ package org.finos.legend.engine.pure.code.core; +import org.eclipse.collections.api.list.MutableList; +import org.eclipse.collections.impl.factory.Lists; + public interface TestLegendPureCoreExtension extends LegendPureCoreExtension { + @Override + default String type() + { + return "__Test__"; + + } + + @Override + default MutableList group() + { + return Lists.mutable.with("__Test__"); + } } diff --git a/legend-engine-xts-analytics/legend-engine-xts-analytics-search/legend-engine-xt-analytics-search-generation/src/main/java/org/finos/legend/engine/generation/SearchDocumentArtifactGenerationExtension.java b/legend-engine-xts-analytics/legend-engine-xts-analytics-search/legend-engine-xt-analytics-search-generation/src/main/java/org/finos/legend/engine/generation/SearchDocumentArtifactGenerationExtension.java index 55a5dfd8f76..f76ec569c0f 100644 --- a/legend-engine-xts-analytics/legend-engine-xts-analytics-search/legend-engine-xt-analytics-search-generation/src/main/java/org/finos/legend/engine/generation/SearchDocumentArtifactGenerationExtension.java +++ b/legend-engine-xts-analytics/legend-engine-xts-analytics-search/legend-engine-xt-analytics-search-generation/src/main/java/org/finos/legend/engine/generation/SearchDocumentArtifactGenerationExtension.java @@ -19,6 +19,7 @@ import java.util.Collections; import java.util.List; +import org.eclipse.collections.api.list.MutableList; import org.eclipse.collections.impl.list.mutable.FastList; import org.finos.legend.engine.language.pure.compiler.toPureGraph.PureModel; import org.finos.legend.engine.language.pure.dsl.generation.extension.Artifact; @@ -39,6 +40,12 @@ public class SearchDocumentArtifactGenerationExtension implements ArtifactGenera public final String ROOT_PATH = "searchDocuments"; public static final String FILE_NAME = "SearchDocumentResult.json"; + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Generation", "Artifact", "Search_Document"); + } + private static final Logger LOGGER = org.slf4j.LoggerFactory.getLogger(SearchDocumentArtifactGenerationExtension.class); @Override diff --git a/legend-engine-xts-analytics/legend-engine-xts-analytics-store/legend-engine-xt-analytics-store-entitlement/src/main/java/org/finos/legend/engine/entitlement/services/EntitlementServiceExtension.java b/legend-engine-xts-analytics/legend-engine-xts-analytics-store/legend-engine-xt-analytics-store-entitlement/src/main/java/org/finos/legend/engine/entitlement/services/EntitlementServiceExtension.java index fcb3f2f5558..65a7cde51b9 100644 --- a/legend-engine-xts-analytics/legend-engine-xts-analytics-store/legend-engine-xt-analytics-store-entitlement/src/main/java/org/finos/legend/engine/entitlement/services/EntitlementServiceExtension.java +++ b/legend-engine-xts-analytics/legend-engine-xts-analytics-store/legend-engine-xt-analytics-store-entitlement/src/main/java/org/finos/legend/engine/entitlement/services/EntitlementServiceExtension.java @@ -24,6 +24,7 @@ import org.finos.legend.engine.protocol.pure.v1.model.valueSpecification.raw.Lambda; import org.finos.legend.engine.shared.core.extension.LegendConnectionExtension; import org.finos.legend.engine.shared.core.extension.LegendExtension; +import org.finos.legend.engine.shared.core.extension.LegendModuleSpecificExtension; import org.finos.legend.pure.generated.Root_meta_core_runtime_Runtime; import org.finos.legend.pure.m3.coreinstance.meta.pure.mapping.Mapping; import org.pac4j.core.profile.CommonProfile; @@ -31,7 +32,7 @@ import java.util.Collections; import java.util.List; -public interface EntitlementServiceExtension extends LegendConnectionExtension +public interface EntitlementServiceExtension extends LegendModuleSpecificExtension { default List generateDatasetSpecifications(Lambda query, String runtimePath, Root_meta_core_runtime_Runtime runtime, String mappingPath, Mapping mapping, PureModelContext model, PureModel pureModel) { diff --git a/legend-engine-xts-arrow/legend-engine-xt-arrow-pure/src/main/java/org/finos/legend/pure/code/core/ArrowLegendPureCoreExtension.java b/legend-engine-xts-arrow/legend-engine-xt-arrow-pure/src/main/java/org/finos/legend/pure/code/core/ArrowLegendPureCoreExtension.java index a6a609c1877..c39089d8fbe 100644 --- a/legend-engine-xts-arrow/legend-engine-xt-arrow-pure/src/main/java/org/finos/legend/pure/code/core/ArrowLegendPureCoreExtension.java +++ b/legend-engine-xts-arrow/legend-engine-xt-arrow-pure/src/main/java/org/finos/legend/pure/code/core/ArrowLegendPureCoreExtension.java @@ -14,6 +14,8 @@ package org.finos.legend.pure.code.core; +import org.eclipse.collections.api.list.MutableList; +import org.eclipse.collections.impl.factory.Lists; import org.finos.legend.engine.pure.code.core.ExternalFormatLegendPureCoreExtension; public class ArrowLegendPureCoreExtension implements ExternalFormatLegendPureCoreExtension @@ -29,4 +31,10 @@ public String functionSignature() { return "meta::external::format::arrow::extension::arrowFormatExtension__Extension_1_"; } + + @Override + public MutableList group() + { + return Lists.mutable.with("External_Format", "Arrow"); + } } diff --git a/legend-engine-xts-arrow/legend-engine-xt-arrow-runtime/src/main/java/org/finos/legend/engine/external/format/arrow/ArrowRuntimeExtension.java b/legend-engine-xts-arrow/legend-engine-xt-arrow-runtime/src/main/java/org/finos/legend/engine/external/format/arrow/ArrowRuntimeExtension.java index 326a6053071..22d2db9417a 100644 --- a/legend-engine-xts-arrow/legend-engine-xt-arrow-runtime/src/main/java/org/finos/legend/engine/external/format/arrow/ArrowRuntimeExtension.java +++ b/legend-engine-xts-arrow/legend-engine-xt-arrow-runtime/src/main/java/org/finos/legend/engine/external/format/arrow/ArrowRuntimeExtension.java @@ -16,6 +16,7 @@ package org.finos.legend.engine.external.format.arrow; import org.eclipse.collections.api.list.MutableList; +import org.eclipse.collections.impl.factory.Lists; import org.finos.legend.engine.external.shared.runtime.ExternalFormatRuntimeExtension; import org.finos.legend.engine.external.shared.runtime.write.ExternalFormatSerializeResult; import org.finos.legend.engine.plan.execution.nodes.state.ExecutionState; @@ -40,6 +41,12 @@ public List getContentTypes() return Collections.singletonList(CONTENT_TYPE); } + @Override + public MutableList group() + { + return Lists.mutable.with("External_Format", "Arrow"); + } + @Override public Result executeExternalizeTDSExecutionNode(ExternalFormatExternalizeTDSExecutionNode node, Result result, MutableList profiles, ExecutionState executionState) { diff --git a/legend-engine-xts-authentication/legend-engine-xt-authentication-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/authentication/compiler/toPureGraph/AuthenticationCompilerExtension.java b/legend-engine-xts-authentication/legend-engine-xt-authentication-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/authentication/compiler/toPureGraph/AuthenticationCompilerExtension.java index 208253663d0..7fec733d608 100644 --- a/legend-engine-xts-authentication/legend-engine-xt-authentication-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/authentication/compiler/toPureGraph/AuthenticationCompilerExtension.java +++ b/legend-engine-xts-authentication/legend-engine-xt-authentication-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/authentication/compiler/toPureGraph/AuthenticationCompilerExtension.java @@ -16,6 +16,7 @@ import org.eclipse.collections.api.block.function.Function2; import org.eclipse.collections.api.factory.Lists; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.language.pure.compiler.toPureGraph.CompileContext; import org.finos.legend.engine.language.pure.compiler.toPureGraph.extension.CompilerExtension; import org.finos.legend.engine.language.pure.compiler.toPureGraph.extension.Processor; @@ -32,6 +33,12 @@ public class AuthenticationCompilerExtension implements IAuthenticationCompilerExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("PackageableElement", "Authentication"); + } + @Override public CompilerExtension build() { diff --git a/legend-engine-xts-authentication/legend-engine-xt-authentication-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/authentication/grammar/from/AuthenticationGrammarParserExtension.java b/legend-engine-xts-authentication/legend-engine-xt-authentication-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/authentication/grammar/from/AuthenticationGrammarParserExtension.java index d90838f5ff8..02ba80735a5 100644 --- a/legend-engine-xts-authentication/legend-engine-xt-authentication-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/authentication/grammar/from/AuthenticationGrammarParserExtension.java +++ b/legend-engine-xts-authentication/legend-engine-xt-authentication-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/authentication/grammar/from/AuthenticationGrammarParserExtension.java @@ -18,6 +18,7 @@ import org.antlr.v4.runtime.CharStreams; import org.antlr.v4.runtime.CommonTokenStream; import org.eclipse.collections.api.block.function.Function; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.language.pure.grammar.from.ParserErrorListener; import org.finos.legend.engine.language.pure.grammar.from.PureIslandGrammarSourceCode; import org.finos.legend.engine.language.pure.grammar.from.antlr4.authentication.AuthenticationLexerGrammar; @@ -30,6 +31,12 @@ public class AuthenticationGrammarParserExtension implements IAuthenticationGrammarParserExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("PackageableElement", "Authentication"); + } + public List> getExtraAuthenticationParsers() { return Collections.singletonList(code -> diff --git a/legend-engine-xts-authentication/legend-engine-xt-authentication-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/authentication/grammar/to/AuthenticationGrammarComposerExtension.java b/legend-engine-xts-authentication/legend-engine-xt-authentication-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/authentication/grammar/to/AuthenticationGrammarComposerExtension.java index 688fa217ef4..bbbb574d56d 100644 --- a/legend-engine-xts-authentication/legend-engine-xt-authentication-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/authentication/grammar/to/AuthenticationGrammarComposerExtension.java +++ b/legend-engine-xts-authentication/legend-engine-xt-authentication-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/authentication/grammar/to/AuthenticationGrammarComposerExtension.java @@ -16,6 +16,7 @@ import java.util.List; import org.eclipse.collections.api.block.function.Function3; +import org.eclipse.collections.api.list.MutableList; import org.eclipse.collections.impl.factory.Lists; import org.finos.legend.engine.language.pure.grammar.to.PureGrammarComposerContext; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.authentication.specification.AuthenticationSpecification; @@ -28,6 +29,12 @@ public class AuthenticationGrammarComposerExtension implements IAuthenticationGrammarComposerExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("PackageableElement", "Authentication"); + } + @Override public List> getExtraAuthenticationSpecificationComposers() { diff --git a/legend-engine-xts-authentication/legend-engine-xt-authentication-grammar/src/test/java/org/finos/legend/engine/language/pure/dsl/authentication/compiler/toPureGraph/AuthenticationDemoCompilerExtension.java b/legend-engine-xts-authentication/legend-engine-xt-authentication-grammar/src/test/java/org/finos/legend/engine/language/pure/dsl/authentication/compiler/toPureGraph/AuthenticationDemoCompilerExtension.java index 9465cee3e02..8cbcf0dc3d3 100644 --- a/legend-engine-xts-authentication/legend-engine-xt-authentication-grammar/src/test/java/org/finos/legend/engine/language/pure/dsl/authentication/compiler/toPureGraph/AuthenticationDemoCompilerExtension.java +++ b/legend-engine-xts-authentication/legend-engine-xt-authentication-grammar/src/test/java/org/finos/legend/engine/language/pure/dsl/authentication/compiler/toPureGraph/AuthenticationDemoCompilerExtension.java @@ -15,6 +15,7 @@ package org.finos.legend.engine.language.pure.dsl.authentication.compiler.toPureGraph; import org.eclipse.collections.api.factory.Lists; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.language.pure.compiler.toPureGraph.extension.CompilerExtension; import org.finos.legend.engine.language.pure.compiler.toPureGraph.extension.Processor; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.authentication.demo.AuthenticationDemo; @@ -23,6 +24,13 @@ public class AuthenticationDemoCompilerExtension implements IAuthenticationDemoCompilerExtension { + @Override + public MutableList group() + { + return Lists.mutable.with("__Test__"); + + } + @Override public CompilerExtension build() { diff --git a/legend-engine-xts-authentication/legend-engine-xt-authentication-grammar/src/test/java/org/finos/legend/engine/language/pure/dsl/authentication/grammar/from/demo/AuthenticationDemoParserExtension.java b/legend-engine-xts-authentication/legend-engine-xt-authentication-grammar/src/test/java/org/finos/legend/engine/language/pure/dsl/authentication/grammar/from/demo/AuthenticationDemoParserExtension.java index a318aad461d..fec50dbf825 100644 --- a/legend-engine-xts-authentication/legend-engine-xt-authentication-grammar/src/test/java/org/finos/legend/engine/language/pure/dsl/authentication/grammar/from/demo/AuthenticationDemoParserExtension.java +++ b/legend-engine-xts-authentication/legend-engine-xt-authentication-grammar/src/test/java/org/finos/legend/engine/language/pure/dsl/authentication/grammar/from/demo/AuthenticationDemoParserExtension.java @@ -17,6 +17,7 @@ import org.antlr.v4.runtime.CharStream; import org.antlr.v4.runtime.CharStreams; import org.antlr.v4.runtime.CommonTokenStream; +import org.eclipse.collections.api.list.MutableList; import org.eclipse.collections.impl.factory.Lists; import org.finos.legend.engine.language.pure.grammar.from.ParserErrorListener; import org.finos.legend.engine.language.pure.grammar.from.PureGrammarParserContext; @@ -35,6 +36,12 @@ public class AuthenticationDemoParserExtension implements IAuthenticationDemoPar { public static final String NAME = "AuthenticationDemo"; + @Override + public MutableList group() + { + return Lists.mutable.with("__Test__"); + } + @Override public Iterable getExtraSectionParsers() { diff --git a/legend-engine-xts-authentication/legend-engine-xt-authentication-grammar/src/test/java/org/finos/legend/engine/language/pure/dsl/authentication/grammar/to/demo/AuthenticationDemoComposerExtension.java b/legend-engine-xts-authentication/legend-engine-xt-authentication-grammar/src/test/java/org/finos/legend/engine/language/pure/dsl/authentication/grammar/to/demo/AuthenticationDemoComposerExtension.java index 5223f1d813c..c404d575d05 100644 --- a/legend-engine-xts-authentication/legend-engine-xt-authentication-grammar/src/test/java/org/finos/legend/engine/language/pure/dsl/authentication/grammar/to/demo/AuthenticationDemoComposerExtension.java +++ b/legend-engine-xts-authentication/legend-engine-xt-authentication-grammar/src/test/java/org/finos/legend/engine/language/pure/dsl/authentication/grammar/to/demo/AuthenticationDemoComposerExtension.java @@ -14,7 +14,6 @@ package org.finos.legend.engine.language.pure.dsl.authentication.grammar.to.demo; -import org.eclipse.collections.api.block.function.Function; import org.eclipse.collections.api.block.function.Function2; import org.eclipse.collections.api.block.function.Function3; import org.eclipse.collections.api.list.MutableList; @@ -32,6 +31,13 @@ public class AuthenticationDemoComposerExtension implements IAuthenticationDemoComposerExtension { + @Override + public MutableList group() + { + return Lists.mutable.with("__Test__"); + + } + private MutableList> renderers = Lists.mutable.with((element, context) -> { if (element instanceof AuthenticationDemo) diff --git a/legend-engine-xts-authentication/legend-engine-xt-authentication-protocol/pom.xml b/legend-engine-xts-authentication/legend-engine-xt-authentication-protocol/pom.xml index e4920fa748c..079c7bde5f7 100644 --- a/legend-engine-xts-authentication/legend-engine-xt-authentication-protocol/pom.xml +++ b/legend-engine-xts-authentication/legend-engine-xt-authentication-protocol/pom.xml @@ -51,6 +51,10 @@ org.eclipse.collections eclipse-collections-api + + org.eclipse.collections + eclipse-collections + \ No newline at end of file diff --git a/legend-engine-xts-authentication/legend-engine-xt-authentication-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/AuthenticationProtocolExtension.java b/legend-engine-xts-authentication/legend-engine-xt-authentication-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/AuthenticationProtocolExtension.java index 5d75ff8f292..69dbbf378c7 100644 --- a/legend-engine-xts-authentication/legend-engine-xt-authentication-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/AuthenticationProtocolExtension.java +++ b/legend-engine-xts-authentication/legend-engine-xt-authentication-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/AuthenticationProtocolExtension.java @@ -17,6 +17,7 @@ import org.eclipse.collections.api.block.function.Function0; import org.eclipse.collections.api.factory.Lists; import org.eclipse.collections.api.factory.Maps; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.protocol.pure.v1.extension.ProtocolSubTypeInfo; import org.finos.legend.engine.protocol.pure.v1.extension.PureProtocolExtension; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.PackageableElement; @@ -44,6 +45,12 @@ public class AuthenticationProtocolExtension implements PureProtocolExtension { public static final String AUTHENTICATION_DEMO_CLASSIFIER_PATH = "meta::pure::runtime::connection::authentication::demo::AuthenticationDemo"; + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("PackageableElement", "Authentication"); + } + @Override public List>>> getExtraProtocolSubTypeInfoCollectors() { diff --git a/legend-engine-xts-avro/legend-engine-xt-avro/src/main/java/org/finos/legend/engine/external/format/avro/extension/AvroGenerationExtension.java b/legend-engine-xts-avro/legend-engine-xt-avro/src/main/java/org/finos/legend/engine/external/format/avro/extension/AvroGenerationExtension.java index 19e89a31313..835fea9f2dd 100644 --- a/legend-engine-xts-avro/legend-engine-xt-avro/src/main/java/org/finos/legend/engine/external/format/avro/extension/AvroGenerationExtension.java +++ b/legend-engine-xts-avro/legend-engine-xt-avro/src/main/java/org/finos/legend/engine/external/format/avro/extension/AvroGenerationExtension.java @@ -15,6 +15,7 @@ package org.finos.legend.engine.external.format.avro.extension; import org.eclipse.collections.api.RichIterable; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.external.format.avro.schema.generations.AvroGenerationConfig; import org.finos.legend.engine.external.format.avro.schema.generations.AvroGenerationService; import org.finos.legend.engine.external.shared.format.extension.GenerationExtension; @@ -38,6 +39,12 @@ public class AvroGenerationExtension implements GenerationExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Generation", "!!MoveToArtifact!!", "Avro"); + } + @Override public String getLabel() { diff --git a/legend-engine-xts-bigqueryFunction/legend-engine-xt-bigqueryFunction-api/src/main/java/org/finos/legend/engine/language/bigqueryFunction/api/BigQueryFunctionService.java b/legend-engine-xts-bigqueryFunction/legend-engine-xt-bigqueryFunction-api/src/main/java/org/finos/legend/engine/language/bigqueryFunction/api/BigQueryFunctionService.java index a2114bc6975..3255d8de703 100644 --- a/legend-engine-xts-bigqueryFunction/legend-engine-xt-bigqueryFunction-api/src/main/java/org/finos/legend/engine/language/bigqueryFunction/api/BigQueryFunctionService.java +++ b/legend-engine-xts-bigqueryFunction/legend-engine-xt-bigqueryFunction-api/src/main/java/org/finos/legend/engine/language/bigqueryFunction/api/BigQueryFunctionService.java @@ -44,6 +44,12 @@ public BigQueryFunctionService() this.bigQueryFunctionDeploymentManager = new BigQueryFunctionDeploymentManager(); } + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Function_Activator", "BigQuery"); + } + @Override public FunctionActivatorInfo info(PureModel pureModel, String version) { diff --git a/legend-engine-xts-bigqueryFunction/legend-engine-xt-bigqueryFunction-api/src/main/java/org/finos/legend/engine/language/bigqueryFunction/deployment/BigQueryFunctionArtifactGenerationExtension.java b/legend-engine-xts-bigqueryFunction/legend-engine-xt-bigqueryFunction-api/src/main/java/org/finos/legend/engine/language/bigqueryFunction/deployment/BigQueryFunctionArtifactGenerationExtension.java index 0dd3ca8877d..d4593895ece 100644 --- a/legend-engine-xts-bigqueryFunction/legend-engine-xt-bigqueryFunction-api/src/main/java/org/finos/legend/engine/language/bigqueryFunction/deployment/BigQueryFunctionArtifactGenerationExtension.java +++ b/legend-engine-xts-bigqueryFunction/legend-engine-xt-bigqueryFunction-api/src/main/java/org/finos/legend/engine/language/bigqueryFunction/deployment/BigQueryFunctionArtifactGenerationExtension.java @@ -14,6 +14,7 @@ package org.finos.legend.engine.language.bigqueryFunction.deployment; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.language.pure.compiler.toPureGraph.PureModel; import org.finos.legend.engine.language.pure.dsl.generation.extension.Artifact; import org.finos.legend.engine.language.pure.dsl.generation.extension.ArtifactGenerationExtension; @@ -26,6 +27,13 @@ public class BigQueryFunctionArtifactGenerationExtension implements ArtifactGene { private static final String ROOT_PATH = "bigQueryFunction"; + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Function_Activator", "BigQuery"); + } + + @Override public String getKey() { diff --git a/legend-engine-xts-bigqueryFunction/legend-engine-xt-bigqueryFunction-compiler/pom.xml b/legend-engine-xts-bigqueryFunction/legend-engine-xt-bigqueryFunction-compiler/pom.xml index 9a341f923ae..583cc4b3659 100644 --- a/legend-engine-xts-bigqueryFunction/legend-engine-xt-bigqueryFunction-compiler/pom.xml +++ b/legend-engine-xts-bigqueryFunction/legend-engine-xt-bigqueryFunction-compiler/pom.xml @@ -71,6 +71,10 @@ org.eclipse.collections eclipse-collections-api + + org.eclipse.collections + eclipse-collections + diff --git a/legend-engine-xts-bigqueryFunction/legend-engine-xt-bigqueryFunction-compiler/src/main/java/org/finos/legend/engine/language/bigqueryFunction/compiler/toPureGraph/BigQueryFunctionCompilerExtension.java b/legend-engine-xts-bigqueryFunction/legend-engine-xt-bigqueryFunction-compiler/src/main/java/org/finos/legend/engine/language/bigqueryFunction/compiler/toPureGraph/BigQueryFunctionCompilerExtension.java index 2cff33483a6..2ba2dfaf8aa 100644 --- a/legend-engine-xts-bigqueryFunction/legend-engine-xt-bigqueryFunction-compiler/src/main/java/org/finos/legend/engine/language/bigqueryFunction/compiler/toPureGraph/BigQueryFunctionCompilerExtension.java +++ b/legend-engine-xts-bigqueryFunction/legend-engine-xt-bigqueryFunction-compiler/src/main/java/org/finos/legend/engine/language/bigqueryFunction/compiler/toPureGraph/BigQueryFunctionCompilerExtension.java @@ -15,6 +15,7 @@ package org.finos.legend.engine.language.bigqueryFunction.compiler.toPureGraph; import org.eclipse.collections.api.factory.Lists; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.code.core.CoreFunctionActivatorCodeRepositoryProvider; import org.finos.legend.engine.language.pure.compiler.toPureGraph.CompileContext; import org.finos.legend.engine.language.pure.compiler.toPureGraph.extension.CompilerExtension; @@ -26,13 +27,17 @@ import org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.function.PackageableFunction; import org.finos.legend.pure.m3.navigation.function.FunctionDescriptor; -import java.util.Collections; - public class BigQueryFunctionCompilerExtension implements CompilerExtension { // Here only for dependency check error ... CoreFunctionActivatorCodeRepositoryProvider forDependencies; + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Function_Activator", "BigQuery"); + } + @Override public CompilerExtension build() { diff --git a/legend-engine-xts-bigqueryFunction/legend-engine-xt-bigqueryFunction-grammar/src/main/java/org/finos/legend/engine/language/bigqueryFunction/grammar/from/BigQueryFunctionGrammarParserExtension.java b/legend-engine-xts-bigqueryFunction/legend-engine-xt-bigqueryFunction-grammar/src/main/java/org/finos/legend/engine/language/bigqueryFunction/grammar/from/BigQueryFunctionGrammarParserExtension.java index a2c960bbd38..a8f9c043c1f 100644 --- a/legend-engine-xts-bigqueryFunction/legend-engine-xt-bigqueryFunction-grammar/src/main/java/org/finos/legend/engine/language/bigqueryFunction/grammar/from/BigQueryFunctionGrammarParserExtension.java +++ b/legend-engine-xts-bigqueryFunction/legend-engine-xt-bigqueryFunction-grammar/src/main/java/org/finos/legend/engine/language/bigqueryFunction/grammar/from/BigQueryFunctionGrammarParserExtension.java @@ -17,6 +17,7 @@ import org.antlr.v4.runtime.CharStream; import org.antlr.v4.runtime.CharStreams; import org.antlr.v4.runtime.CommonTokenStream; +import org.eclipse.collections.api.list.MutableList; import org.eclipse.collections.impl.factory.Lists; import org.finos.legend.engine.language.pure.grammar.from.ParserErrorListener; import org.finos.legend.engine.language.pure.grammar.from.PureGrammarParserContext; @@ -36,6 +37,12 @@ public class BigQueryFunctionGrammarParserExtension implements PureGrammarParser { public static final String NAME = "BigQuery"; + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Function_Activator", "BigQuery"); + } + @Override public Iterable getExtraSectionParsers() { diff --git a/legend-engine-xts-bigqueryFunction/legend-engine-xt-bigqueryFunction-grammar/src/main/java/org/finos/legend/engine/language/bigqueryFunction/grammar/to/BigQueryFunctionGrammarComposer.java b/legend-engine-xts-bigqueryFunction/legend-engine-xt-bigqueryFunction-grammar/src/main/java/org/finos/legend/engine/language/bigqueryFunction/grammar/to/BigQueryFunctionGrammarComposer.java index a77af44cbd2..56792a0f5b9 100644 --- a/legend-engine-xts-bigqueryFunction/legend-engine-xt-bigqueryFunction-grammar/src/main/java/org/finos/legend/engine/language/bigqueryFunction/grammar/to/BigQueryFunctionGrammarComposer.java +++ b/legend-engine-xts-bigqueryFunction/legend-engine-xt-bigqueryFunction-grammar/src/main/java/org/finos/legend/engine/language/bigqueryFunction/grammar/to/BigQueryFunctionGrammarComposer.java @@ -14,13 +14,11 @@ package org.finos.legend.engine.language.bigqueryFunction.grammar.to; -import org.eclipse.collections.api.block.function.Function; import org.eclipse.collections.api.block.function.Function2; import org.eclipse.collections.api.block.function.Function3; import org.eclipse.collections.api.factory.Lists; import org.eclipse.collections.api.list.MutableList; import org.eclipse.collections.impl.utility.Iterate; -import org.eclipse.collections.impl.utility.ListIterate; import org.finos.legend.engine.language.bigqueryFunction.grammar.from.BigQueryFunctionGrammarParserExtension; import org.finos.legend.engine.language.pure.grammar.to.PureGrammarComposerContext; import org.finos.legend.engine.language.pure.grammar.to.extension.PureGrammarComposerExtension; @@ -37,6 +35,12 @@ public class BigQueryFunctionGrammarComposer implements PureGrammarComposerExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Function_Activator", "BigQuery"); + } + private MutableList> renderers = org.eclipse.collections.impl.factory.Lists.mutable.with((element, context) -> { if (element instanceof BigQueryFunction) diff --git a/legend-engine-xts-bigqueryFunction/legend-engine-xt-bigqueryFunction-protocol/pom.xml b/legend-engine-xts-bigqueryFunction/legend-engine-xt-bigqueryFunction-protocol/pom.xml index 0d8d9597703..b83067c090b 100644 --- a/legend-engine-xts-bigqueryFunction/legend-engine-xt-bigqueryFunction-protocol/pom.xml +++ b/legend-engine-xts-bigqueryFunction/legend-engine-xt-bigqueryFunction-protocol/pom.xml @@ -38,13 +38,20 @@ ${project.version} + + org.finos.legend.engine + legend-engine-xt-relationalStore-protocol + + + org.eclipse.collections eclipse-collections-api - org.finos.legend.engine - legend-engine-xt-relationalStore-protocol + org.eclipse.collections + eclipse-collections + \ No newline at end of file diff --git a/legend-engine-xts-bigqueryFunction/legend-engine-xt-bigqueryFunction-protocol/src/main/java/org/finos/legend/engine/protocol/bigqueryFunction/metamodel/BigQueryFunctionProtocolExtension.java b/legend-engine-xts-bigqueryFunction/legend-engine-xt-bigqueryFunction-protocol/src/main/java/org/finos/legend/engine/protocol/bigqueryFunction/metamodel/BigQueryFunctionProtocolExtension.java index 56e3b30ab3f..c9f8cff0a0b 100644 --- a/legend-engine-xts-bigqueryFunction/legend-engine-xt-bigqueryFunction-protocol/src/main/java/org/finos/legend/engine/protocol/bigqueryFunction/metamodel/BigQueryFunctionProtocolExtension.java +++ b/legend-engine-xts-bigqueryFunction/legend-engine-xt-bigqueryFunction-protocol/src/main/java/org/finos/legend/engine/protocol/bigqueryFunction/metamodel/BigQueryFunctionProtocolExtension.java @@ -17,6 +17,7 @@ import org.eclipse.collections.api.block.function.Function0; import org.eclipse.collections.api.factory.Lists; import org.eclipse.collections.api.factory.Maps; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.protocol.bigqueryFunction.deployment.BigQueryFunctionArtifact; import org.finos.legend.engine.protocol.bigqueryFunction.deployment.BigQueryFunctionContent; import org.finos.legend.engine.protocol.functionActivator.deployment.FunctionActivatorArtifact; @@ -33,6 +34,12 @@ public class BigQueryFunctionProtocolExtension implements PureProtocolExtension { public static String packageJSONType = "bigQueryFunction"; + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Function_Activator", "BigQuery"); + } + @Override public List>>> getExtraProtocolSubTypeInfoCollectors() { diff --git a/legend-engine-xts-daml/legend-engine-xt-daml-model/src/main/java/org/finos/legend/engine/external/format/daml/DamlFormatExtension.java b/legend-engine-xts-daml/legend-engine-xt-daml-model/src/main/java/org/finos/legend/engine/external/format/daml/DamlFormatExtension.java index ab95005241a..649a0cd6213 100644 --- a/legend-engine-xts-daml/legend-engine-xt-daml-model/src/main/java/org/finos/legend/engine/external/format/daml/DamlFormatExtension.java +++ b/legend-engine-xts-daml/legend-engine-xt-daml-model/src/main/java/org/finos/legend/engine/external/format/daml/DamlFormatExtension.java @@ -14,6 +14,7 @@ package org.finos.legend.engine.external.format.daml; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.external.format.daml.fromModel.ModelToDamlConfiguration; import org.finos.legend.engine.external.shared.format.model.compile.ExternalSchemaCompileContext; import org.finos.legend.engine.external.shared.format.model.transformation.fromModel.ExternalFormatSchemaGenerationExtension; @@ -36,6 +37,11 @@ public class DamlFormatExtension implements ExternalFormatSchemaGenerationExtens public static final String TYPE = damlContract._id(); + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("External_Format", "DAML"); + } @Override public Root_meta_external_format_shared_ExternalFormatContract getExternalFormatContract() diff --git a/legend-engine-xts-daml/legend-engine-xt-daml-model/src/main/java/org/finos/legend/engine/external/format/daml/generation/DAMLGenerationExtension.java b/legend-engine-xts-daml/legend-engine-xt-daml-model/src/main/java/org/finos/legend/engine/external/format/daml/generation/DAMLGenerationExtension.java index 6ddb5789fc2..388b90c99df 100644 --- a/legend-engine-xts-daml/legend-engine-xt-daml-model/src/main/java/org/finos/legend/engine/external/format/daml/generation/DAMLGenerationExtension.java +++ b/legend-engine-xts-daml/legend-engine-xt-daml-model/src/main/java/org/finos/legend/engine/external/format/daml/generation/DAMLGenerationExtension.java @@ -16,6 +16,7 @@ package org.finos.legend.engine.external.format.daml.generation; import org.eclipse.collections.api.RichIterable; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.external.shared.format.extension.GenerationExtension; import org.finos.legend.engine.external.shared.format.extension.GenerationMode; import org.finos.legend.engine.external.shared.format.generations.description.FileGenerationDescription; @@ -37,6 +38,18 @@ @Deprecated public class DAMLGenerationExtension implements GenerationExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("External_Format", "DAML"); + } + + @Override + public String type() + { + return "Generation - To Delete?"; + } + @Override public String getLabel() { diff --git a/legend-engine-xts-data-space/legend-engine-xt-data-space-compiler/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/DataSpaceCompilerExtension.java b/legend-engine-xts-data-space/legend-engine-xt-data-space-compiler/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/DataSpaceCompilerExtension.java index e0e21555562..49c55f3b74f 100644 --- a/legend-engine-xts-data-space/legend-engine-xt-data-space-compiler/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/DataSpaceCompilerExtension.java +++ b/legend-engine-xts-data-space/legend-engine-xt-data-space-compiler/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/DataSpaceCompilerExtension.java @@ -47,6 +47,12 @@ public class DataSpaceCompilerExtension implements CompilerExtension, EmbeddedDataCompilerExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("PackageableElement", "DataSpace"); + } + static final MutableMap dataSpacesIndex = Maps.mutable.empty(); @Override diff --git a/legend-engine-xts-data-space/legend-engine-xt-data-space-generation/src/main/java/org/finos/legend/engine/generation/DataSpaceAnalyticsArtifactGenerationExtension.java b/legend-engine-xts-data-space/legend-engine-xt-data-space-generation/src/main/java/org/finos/legend/engine/generation/DataSpaceAnalyticsArtifactGenerationExtension.java index cca2841e6b0..230b9b6a608 100644 --- a/legend-engine-xts-data-space/legend-engine-xt-data-space-generation/src/main/java/org/finos/legend/engine/generation/DataSpaceAnalyticsArtifactGenerationExtension.java +++ b/legend-engine-xts-data-space/legend-engine-xt-data-space-generation/src/main/java/org/finos/legend/engine/generation/DataSpaceAnalyticsArtifactGenerationExtension.java @@ -20,6 +20,7 @@ import java.util.Collections; import java.util.List; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.generation.analytics.DataSpaceAnalyticsHelper; import org.finos.legend.engine.generation.analytics.model.DataSpaceAnalysisResult; import org.finos.legend.engine.language.pure.compiler.toPureGraph.PureModel; @@ -38,6 +39,12 @@ public class DataSpaceAnalyticsArtifactGenerationExtension implements ArtifactGe public static ObjectMapper objectMapper = DataSpaceAnalyticsHelper.getNewObjectMapper(); + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("PackageableElement", "DataSpace"); + } + @Override public String getKey() { diff --git a/legend-engine-xts-data-space/legend-engine-xt-data-space-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/from/DataSpaceParserExtension.java b/legend-engine-xts-data-space/legend-engine-xt-data-space-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/from/DataSpaceParserExtension.java index a1a9d39d6bb..01f6561092b 100644 --- a/legend-engine-xts-data-space/legend-engine-xt-data-space-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/from/DataSpaceParserExtension.java +++ b/legend-engine-xts-data-space/legend-engine-xt-data-space-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/from/DataSpaceParserExtension.java @@ -17,36 +17,34 @@ import org.antlr.v4.runtime.CharStream; import org.antlr.v4.runtime.CharStreams; import org.antlr.v4.runtime.CommonTokenStream; -import org.eclipse.collections.api.block.function.Function2; +import org.eclipse.collections.api.list.MutableList; import org.eclipse.collections.impl.factory.Lists; -import org.eclipse.collections.impl.utility.Iterate; -import org.eclipse.collections.impl.utility.ListIterate; import org.finos.legend.engine.language.pure.grammar.from.antlr4.DataSpaceLexerGrammar; import org.finos.legend.engine.language.pure.grammar.from.antlr4.DataSpaceParserGrammar; import org.finos.legend.engine.language.pure.grammar.from.antlr4.mapping.MappingParserGrammar; import org.finos.legend.engine.language.pure.grammar.from.extension.PureGrammarParserExtension; -import org.finos.legend.engine.language.pure.grammar.from.extension.PureGrammarParserExtensions; import org.finos.legend.engine.language.pure.grammar.from.extension.SectionParser; import org.finos.legend.engine.language.pure.grammar.from.extension.data.EmbeddedDataParser; import org.finos.legend.engine.language.pure.grammar.from.mapping.MappingIncludeParser; -import org.finos.legend.engine.protocol.pure.v1.model.context.PureModelContextData; -import org.finos.legend.engine.protocol.pure.v1.model.data.DataElementReference; -import org.finos.legend.engine.protocol.pure.v1.model.data.EmbeddedData; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.PackageableElement; -import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.dataSpace.DataSpace; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.dataSpace.MappingIncludeDataSpace; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.mapping.MappingInclude; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.section.DefaultCodeSection; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.section.Section; import java.util.Collections; -import java.util.List; import java.util.function.Consumer; public class DataSpaceParserExtension implements PureGrammarParserExtension { public static final String NAME = "DataSpace"; + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("PackageableElement", "DataSpace"); + } + @Override public Iterable getExtraSectionParsers() { diff --git a/legend-engine-xts-data-space/legend-engine-xt-data-space-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/to/DataSpaceGrammarComposerExtension.java b/legend-engine-xts-data-space/legend-engine-xt-data-space-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/to/DataSpaceGrammarComposerExtension.java index 1d940badd62..033550e06e2 100644 --- a/legend-engine-xts-data-space/legend-engine-xt-data-space-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/to/DataSpaceGrammarComposerExtension.java +++ b/legend-engine-xts-data-space/legend-engine-xt-data-space-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/to/DataSpaceGrammarComposerExtension.java @@ -42,6 +42,12 @@ public class DataSpaceGrammarComposerExtension implements PureGrammarComposerExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("PackageableElement", "DataSpace"); + } + private MutableList> renderers = org.eclipse.collections.impl.factory.Lists.mutable.with((element, context) -> { if (element instanceof DataSpace) diff --git a/legend-engine-xts-data-space/legend-engine-xt-data-space-protocol/pom.xml b/legend-engine-xts-data-space/legend-engine-xt-data-space-protocol/pom.xml index d078d79f9a5..3c88999babf 100644 --- a/legend-engine-xts-data-space/legend-engine-xt-data-space-protocol/pom.xml +++ b/legend-engine-xts-data-space/legend-engine-xt-data-space-protocol/pom.xml @@ -58,6 +58,10 @@ org.eclipse.collections eclipse-collections-api + + org.eclipse.collections + eclipse-collections + diff --git a/legend-engine-xts-data-space/legend-engine-xt-data-space-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/DataSpaceProtocolExtension.java b/legend-engine-xts-data-space/legend-engine-xt-data-space-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/DataSpaceProtocolExtension.java index 1d8cabd3ff6..77a232dc5d7 100644 --- a/legend-engine-xts-data-space/legend-engine-xt-data-space-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/DataSpaceProtocolExtension.java +++ b/legend-engine-xts-data-space/legend-engine-xt-data-space-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/DataSpaceProtocolExtension.java @@ -17,6 +17,7 @@ import org.eclipse.collections.api.block.function.Function0; import org.eclipse.collections.api.factory.Lists; import org.eclipse.collections.api.factory.Maps; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.protocol.pure.v1.extension.ProtocolSubTypeInfo; import org.finos.legend.engine.protocol.pure.v1.extension.PureProtocolExtension; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.PackageableElement; @@ -29,6 +30,12 @@ public class DataSpaceProtocolExtension implements PureProtocolExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("PackageableElement", "DataSpace"); + } + @Override public List>>> getExtraProtocolSubTypeInfoCollectors() { diff --git a/legend-engine-xts-diagram/legend-engine-xt-diagram-compiler/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/DiagramCompilerExtension.java b/legend-engine-xts-diagram/legend-engine-xt-diagram-compiler/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/DiagramCompilerExtension.java index 5b1f8332d80..c4b554b7974 100644 --- a/legend-engine-xts-diagram/legend-engine-xt-diagram-compiler/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/DiagramCompilerExtension.java +++ b/legend-engine-xts-diagram/legend-engine-xt-diagram-compiler/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/DiagramCompilerExtension.java @@ -15,6 +15,7 @@ package org.finos.legend.engine.language.pure.compiler.toPureGraph; import org.eclipse.collections.api.factory.Maps; +import org.eclipse.collections.api.list.MutableList; import org.eclipse.collections.api.map.MutableMap; import org.eclipse.collections.impl.utility.ListIterate; import org.finos.legend.engine.language.pure.compiler.toPureGraph.extension.CompilerExtension; @@ -29,6 +30,12 @@ public class DiagramCompilerExtension implements CompilerExtension { protected final MutableMap diagramsIndex = Maps.mutable.empty(); + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("PackageableElement", "Diagram"); + } + @Override public Iterable> getExtraProcessors() { diff --git a/legend-engine-xts-diagram/legend-engine-xt-diagram-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/from/DiagramParserExtension.java b/legend-engine-xts-diagram/legend-engine-xt-diagram-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/from/DiagramParserExtension.java index e719c7d2cbb..70b8a29773d 100644 --- a/legend-engine-xts-diagram/legend-engine-xt-diagram-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/from/DiagramParserExtension.java +++ b/legend-engine-xts-diagram/legend-engine-xt-diagram-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/from/DiagramParserExtension.java @@ -18,6 +18,7 @@ import org.antlr.v4.runtime.CharStreams; import org.antlr.v4.runtime.CommonTokenStream; import org.eclipse.collections.api.factory.Lists; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.language.pure.grammar.from.antlr4.DiagramLexerGrammar; import org.finos.legend.engine.language.pure.grammar.from.antlr4.DiagramParserGrammar; import org.finos.legend.engine.language.pure.grammar.from.extension.PureGrammarParserExtension; @@ -32,6 +33,12 @@ public class DiagramParserExtension implements PureGrammarParserExtension { public static final String NAME = "Diagram"; + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("PackageableElement", "Diagram"); + } + @Override public Iterable getExtraSectionParsers() { diff --git a/legend-engine-xts-diagram/legend-engine-xt-diagram-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/to/DiagramGrammarComposerExtension.java b/legend-engine-xts-diagram/legend-engine-xt-diagram-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/to/DiagramGrammarComposerExtension.java index 0cf206d5ac3..ced08dd8c53 100644 --- a/legend-engine-xts-diagram/legend-engine-xt-diagram-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/to/DiagramGrammarComposerExtension.java +++ b/legend-engine-xts-diagram/legend-engine-xt-diagram-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/to/DiagramGrammarComposerExtension.java @@ -14,7 +14,6 @@ package org.finos.legend.engine.language.pure.grammar.to; -import org.eclipse.collections.api.block.function.Function; import org.eclipse.collections.api.block.function.Function2; import org.eclipse.collections.api.block.function.Function3; import org.eclipse.collections.api.list.MutableList; @@ -40,6 +39,12 @@ public class DiagramGrammarComposerExtension implements PureGrammarComposerExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("PackageableElement", "Diagram"); + } + private MutableList> renderers = Lists.mutable.with((element, context) -> { if (element instanceof Diagram) diff --git a/legend-engine-xts-diagram/legend-engine-xt-diagram-protocol/pom.xml b/legend-engine-xts-diagram/legend-engine-xt-diagram-protocol/pom.xml index f9ef973e8d6..f8817cffe07 100644 --- a/legend-engine-xts-diagram/legend-engine-xt-diagram-protocol/pom.xml +++ b/legend-engine-xts-diagram/legend-engine-xt-diagram-protocol/pom.xml @@ -58,6 +58,10 @@ org.eclipse.collections eclipse-collections-api + + org.eclipse.collections + eclipse-collections + diff --git a/legend-engine-xts-diagram/legend-engine-xt-diagram-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/DiagramProtocolExtension.java b/legend-engine-xts-diagram/legend-engine-xt-diagram-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/DiagramProtocolExtension.java index 96558f8d205..f7ac9b9200b 100644 --- a/legend-engine-xts-diagram/legend-engine-xt-diagram-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/DiagramProtocolExtension.java +++ b/legend-engine-xts-diagram/legend-engine-xt-diagram-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/DiagramProtocolExtension.java @@ -17,6 +17,7 @@ import org.eclipse.collections.api.block.function.Function0; import org.eclipse.collections.api.factory.Lists; import org.eclipse.collections.api.factory.Maps; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.protocol.pure.v1.extension.ProtocolSubTypeInfo; import org.finos.legend.engine.protocol.pure.v1.extension.PureProtocolExtension; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.PackageableElement; @@ -27,6 +28,12 @@ public class DiagramProtocolExtension implements PureProtocolExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("PackageableElement", "Diagram"); + } + @Override public List>>> getExtraProtocolSubTypeInfoCollectors() { diff --git a/legend-engine-xts-elasticsearch/legend-engine-xt-elasticsearch-V7-executionPlan/src/main/java/org/finos/legend/engine/plan/execution/stores/elasticsearch/v7/Elasticsearch7ExecutionExtension.java b/legend-engine-xts-elasticsearch/legend-engine-xt-elasticsearch-V7-executionPlan/src/main/java/org/finos/legend/engine/plan/execution/stores/elasticsearch/v7/Elasticsearch7ExecutionExtension.java index d300958dbf1..f8ec491add7 100644 --- a/legend-engine-xts-elasticsearch/legend-engine-xt-elasticsearch-V7-executionPlan/src/main/java/org/finos/legend/engine/plan/execution/stores/elasticsearch/v7/Elasticsearch7ExecutionExtension.java +++ b/legend-engine-xts-elasticsearch/legend-engine-xt-elasticsearch-V7-executionPlan/src/main/java/org/finos/legend/engine/plan/execution/stores/elasticsearch/v7/Elasticsearch7ExecutionExtension.java @@ -30,6 +30,12 @@ public class Elasticsearch7ExecutionExtension implements ExecutionExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Elastic"); + } + @Override public List, ExecutionState, Result>> getExtraNodeExecutors() { diff --git a/legend-engine-xts-elasticsearch/legend-engine-xt-elasticsearch-V7-executionPlan/src/main/java/org/finos/legend/engine/plan/execution/stores/elasticsearch/v7/plugin/ElasticsearchV7StoreExecutorBuilder.java b/legend-engine-xts-elasticsearch/legend-engine-xt-elasticsearch-V7-executionPlan/src/main/java/org/finos/legend/engine/plan/execution/stores/elasticsearch/v7/plugin/ElasticsearchV7StoreExecutorBuilder.java index 6960b69fed9..03873c9d641 100644 --- a/legend-engine-xts-elasticsearch/legend-engine-xt-elasticsearch-V7-executionPlan/src/main/java/org/finos/legend/engine/plan/execution/stores/elasticsearch/v7/plugin/ElasticsearchV7StoreExecutorBuilder.java +++ b/legend-engine-xts-elasticsearch/legend-engine-xt-elasticsearch-V7-executionPlan/src/main/java/org/finos/legend/engine/plan/execution/stores/elasticsearch/v7/plugin/ElasticsearchV7StoreExecutorBuilder.java @@ -15,6 +15,7 @@ package org.finos.legend.engine.plan.execution.stores.elasticsearch.v7.plugin; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.plan.execution.stores.StoreExecutor; import org.finos.legend.engine.plan.execution.stores.StoreExecutorBuilder; import org.finos.legend.engine.plan.execution.stores.StoreExecutorConfiguration; @@ -22,6 +23,12 @@ public class ElasticsearchV7StoreExecutorBuilder implements StoreExecutorBuilder { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Elastic"); + } + @Override public StoreType getStoreType() { diff --git a/legend-engine-xts-elasticsearch/legend-engine-xt-elasticsearch-V7-grammar/src/main/java/org/finos/legend/engine/language/stores/elasticsearch/v7/compiler/ElasticsearchCompilerExtension.java b/legend-engine-xts-elasticsearch/legend-engine-xt-elasticsearch-V7-grammar/src/main/java/org/finos/legend/engine/language/stores/elasticsearch/v7/compiler/ElasticsearchCompilerExtension.java index d16e3f4712d..05eda215590 100644 --- a/legend-engine-xts-elasticsearch/legend-engine-xt-elasticsearch-V7-grammar/src/main/java/org/finos/legend/engine/language/stores/elasticsearch/v7/compiler/ElasticsearchCompilerExtension.java +++ b/legend-engine-xts-elasticsearch/legend-engine-xt-elasticsearch-V7-grammar/src/main/java/org/finos/legend/engine/language/stores/elasticsearch/v7/compiler/ElasticsearchCompilerExtension.java @@ -23,6 +23,7 @@ import org.eclipse.collections.api.block.procedure.Procedure2; import org.eclipse.collections.api.factory.Lists; import org.eclipse.collections.api.list.ImmutableList; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.language.pure.compiler.toPureGraph.CompileContext; import org.finos.legend.engine.language.pure.compiler.toPureGraph.extension.CompilerExtension; import org.finos.legend.engine.language.pure.compiler.toPureGraph.extension.Processor; @@ -39,6 +40,12 @@ public class ElasticsearchCompilerExtension implements CompilerExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Elastic"); + } + @Override public CompilerExtension build() { diff --git a/legend-engine-xts-elasticsearch/legend-engine-xt-elasticsearch-V7-grammar/src/main/java/org/finos/legend/engine/language/stores/elasticsearch/v7/from/ElasticsearchGrammarParserExtension.java b/legend-engine-xts-elasticsearch/legend-engine-xt-elasticsearch-V7-grammar/src/main/java/org/finos/legend/engine/language/stores/elasticsearch/v7/from/ElasticsearchGrammarParserExtension.java index 2a36de55c12..8401528a83a 100644 --- a/legend-engine-xts-elasticsearch/legend-engine-xt-elasticsearch-V7-grammar/src/main/java/org/finos/legend/engine/language/stores/elasticsearch/v7/from/ElasticsearchGrammarParserExtension.java +++ b/legend-engine-xts-elasticsearch/legend-engine-xt-elasticsearch-V7-grammar/src/main/java/org/finos/legend/engine/language/stores/elasticsearch/v7/from/ElasticsearchGrammarParserExtension.java @@ -21,6 +21,7 @@ import org.antlr.v4.runtime.CharStreams; import org.antlr.v4.runtime.CommonTokenStream; import org.antlr.v4.runtime.ParserRuleContext; +import org.eclipse.collections.api.list.MutableList; import org.eclipse.collections.impl.factory.Lists; import org.finos.legend.engine.language.pure.grammar.from.*; import org.finos.legend.engine.language.pure.grammar.from.antlr4.ElasticsearchLexerGrammar; @@ -50,6 +51,12 @@ public ElasticsearchGrammarParserExtension() this.connectionValueParser = Lists.immutable.with(ConnectionValueParser.newParser(V7_CONNECTION_TYPE_NAME, this::parseConnection)); } + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Elastic"); + } + @Override public Iterable getExtraSectionParsers() { diff --git a/legend-engine-xts-elasticsearch/legend-engine-xt-elasticsearch-V7-grammar/src/main/java/org/finos/legend/engine/language/stores/elasticsearch/v7/to/ElasticsearchGrammarComposerExtension.java b/legend-engine-xts-elasticsearch/legend-engine-xt-elasticsearch-V7-grammar/src/main/java/org/finos/legend/engine/language/stores/elasticsearch/v7/to/ElasticsearchGrammarComposerExtension.java index 9daa4361658..3478700f360 100644 --- a/legend-engine-xts-elasticsearch/legend-engine-xt-elasticsearch-V7-grammar/src/main/java/org/finos/legend/engine/language/stores/elasticsearch/v7/to/ElasticsearchGrammarComposerExtension.java +++ b/legend-engine-xts-elasticsearch/legend-engine-xt-elasticsearch-V7-grammar/src/main/java/org/finos/legend/engine/language/stores/elasticsearch/v7/to/ElasticsearchGrammarComposerExtension.java @@ -16,9 +16,7 @@ package org.finos.legend.engine.language.stores.elasticsearch.v7.to; import java.util.List; -import java.util.stream.Collectors; -import org.eclipse.collections.api.block.function.Function; import org.eclipse.collections.api.block.function.Function2; import org.eclipse.collections.api.block.function.Function3; import org.eclipse.collections.api.list.MutableList; @@ -28,17 +26,21 @@ import org.finos.legend.engine.language.pure.grammar.to.PureGrammarComposerContext; import org.finos.legend.engine.language.pure.grammar.to.extension.PureGrammarComposerExtension; import org.finos.legend.engine.language.stores.elasticsearch.v7.from.ElasticsearchGrammarParserExtension; -import org.finos.legend.engine.protocol.pure.v1.model.context.EngineErrorType; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.PackageableElement; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.connection.Connection; import org.finos.legend.engine.protocol.store.elasticsearch.v7.metamodel.runtime.Elasticsearch7StoreConnection; import org.finos.legend.engine.protocol.store.elasticsearch.v7.metamodel.store.Elasticsearch7Store; -import org.finos.legend.engine.shared.core.operational.errorManagement.EngineException; import static org.finos.legend.engine.language.pure.grammar.to.PureGrammarComposer.buildSectionComposer; public class ElasticsearchGrammarComposerExtension implements PureGrammarComposerExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Elastic"); + } + private MutableList> renderers = Lists.mutable.with((element, context) -> { if (element instanceof Elasticsearch7Store) diff --git a/legend-engine-xts-elasticsearch/legend-engine-xt-elasticsearch-V7-protocol/pom.xml b/legend-engine-xts-elasticsearch/legend-engine-xt-elasticsearch-V7-protocol/pom.xml index 8f2458f43f8..89eecc575b4 100644 --- a/legend-engine-xts-elasticsearch/legend-engine-xt-elasticsearch-V7-protocol/pom.xml +++ b/legend-engine-xts-elasticsearch/legend-engine-xt-elasticsearch-V7-protocol/pom.xml @@ -154,6 +154,10 @@ org.eclipse.collections eclipse-collections-api + + org.eclipse.collections + eclipse-collections + diff --git a/legend-engine-xts-elasticsearch/legend-engine-xt-elasticsearch-V7-protocol/src/main/java/org/finos/legend/engine/protocol/store/elasticsearch/v7/ElasticsearchV7ProtocolExtension.java b/legend-engine-xts-elasticsearch/legend-engine-xt-elasticsearch-V7-protocol/src/main/java/org/finos/legend/engine/protocol/store/elasticsearch/v7/ElasticsearchV7ProtocolExtension.java index 2dc2c5456b9..d9bdb8ad31f 100644 --- a/legend-engine-xts-elasticsearch/legend-engine-xt-elasticsearch-V7-protocol/src/main/java/org/finos/legend/engine/protocol/store/elasticsearch/v7/ElasticsearchV7ProtocolExtension.java +++ b/legend-engine-xts-elasticsearch/legend-engine-xt-elasticsearch-V7-protocol/src/main/java/org/finos/legend/engine/protocol/store/elasticsearch/v7/ElasticsearchV7ProtocolExtension.java @@ -20,6 +20,7 @@ import org.eclipse.collections.api.block.function.Function0; import org.eclipse.collections.api.factory.Lists; import org.eclipse.collections.api.factory.Maps; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.protocol.pure.v1.extension.ProtocolSubTypeInfo; import org.finos.legend.engine.protocol.pure.v1.extension.PureProtocolExtension; import org.finos.legend.engine.protocol.pure.v1.model.executionPlan.nodes.ExecutionNode; @@ -33,6 +34,12 @@ public class ElasticsearchV7ProtocolExtension implements PureProtocolExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Elastic"); + } + @Override public List>>> getExtraProtocolSubTypeInfoCollectors() { diff --git a/legend-engine-xts-elasticsearch/legend-engine-xt-elasticsearch-V7-pure-metamodel/src/main/java/org/finos/legend/pure/code/core/ElasticsearchLegendPureCoreExtension.java b/legend-engine-xts-elasticsearch/legend-engine-xt-elasticsearch-V7-pure-metamodel/src/main/java/org/finos/legend/pure/code/core/ElasticsearchLegendPureCoreExtension.java index 1f4802f7fa9..5becc8e5315 100644 --- a/legend-engine-xts-elasticsearch/legend-engine-xt-elasticsearch-V7-pure-metamodel/src/main/java/org/finos/legend/pure/code/core/ElasticsearchLegendPureCoreExtension.java +++ b/legend-engine-xts-elasticsearch/legend-engine-xt-elasticsearch-V7-pure-metamodel/src/main/java/org/finos/legend/pure/code/core/ElasticsearchLegendPureCoreExtension.java @@ -15,6 +15,7 @@ package org.finos.legend.pure.code.core; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.pure.code.core.StoreLegendPureCoreExtension; public class ElasticsearchLegendPureCoreExtension implements StoreLegendPureCoreExtension @@ -30,4 +31,10 @@ public String functionSignature() { return "meta::external::store::elasticsearch::v7::extension::elasticsearchV7Extension__Extension_1_"; } + + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Elastic"); + } } diff --git a/legend-engine-xts-flatdata/legend-engine-xt-flatdata-javaPlatformBinding-pure/src/main/java/org/finos/legend/pure/code/core/FlatDataJavaBindingLegendPureCoreExtension.java b/legend-engine-xts-flatdata/legend-engine-xt-flatdata-javaPlatformBinding-pure/src/main/java/org/finos/legend/pure/code/core/FlatDataJavaBindingLegendPureCoreExtension.java index 84ff2ac8156..1b5b0da20bc 100644 --- a/legend-engine-xts-flatdata/legend-engine-xt-flatdata-javaPlatformBinding-pure/src/main/java/org/finos/legend/pure/code/core/FlatDataJavaBindingLegendPureCoreExtension.java +++ b/legend-engine-xts-flatdata/legend-engine-xt-flatdata-javaPlatformBinding-pure/src/main/java/org/finos/legend/pure/code/core/FlatDataJavaBindingLegendPureCoreExtension.java @@ -14,10 +14,17 @@ package org.finos.legend.pure.code.core; -import org.finos.legend.engine.pure.code.core.BindingLegendPureCoreExtension; +import org.eclipse.collections.api.list.MutableList; +import org.finos.legend.engine.pure.code.core.JavaBindingLegendPureCoreExtension; -public class FlatDataJavaBindingLegendPureCoreExtension implements BindingLegendPureCoreExtension +public class FlatDataJavaBindingLegendPureCoreExtension implements JavaBindingLegendPureCoreExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("External_Format", "FlatData"); + } + @Override public String functionFile() { diff --git a/legend-engine-xts-flatdata/legend-engine-xt-flatdata-model/src/main/java/org/finos/legend/engine/external/format/flatdata/FlatDataExternalFormatExtension.java b/legend-engine-xts-flatdata/legend-engine-xt-flatdata-model/src/main/java/org/finos/legend/engine/external/format/flatdata/FlatDataExternalFormatExtension.java index 1a8d35dea21..9b4c0798ca2 100644 --- a/legend-engine-xts-flatdata/legend-engine-xt-flatdata-model/src/main/java/org/finos/legend/engine/external/format/flatdata/FlatDataExternalFormatExtension.java +++ b/legend-engine-xts-flatdata/legend-engine-xt-flatdata-model/src/main/java/org/finos/legend/engine/external/format/flatdata/FlatDataExternalFormatExtension.java @@ -14,6 +14,7 @@ package org.finos.legend.engine.external.format.flatdata; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.external.format.flatdata.grammar.fromPure.FlatDataSchemaParseException; import org.finos.legend.engine.external.format.flatdata.grammar.fromPure.FlatDataSchemaParser; import org.finos.legend.engine.external.format.flatdata.grammar.toPure.FlatDataSchemaComposer; @@ -44,6 +45,18 @@ public class FlatDataExternalFormatExtension implements ExternalFormatSchemaGene private static final Root_meta_external_format_shared_ExternalFormatContract flatDataContract = (Root_meta_external_format_shared_ExternalFormatContract) core_external_format_flatdata_externalFormatContract.Root_meta_external_format_flatdata_contract_flatDataFormatContract__ExternalFormatContract_1_(PureModel.CORE_PURE_MODEL.getExecutionSupport()); public static final String TYPE = flatDataContract._id(); + @Override + public String type() + { + return "MIX_Model_Generation_&_Schema_Generation"; + } + + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("External_Format", "FlatData"); + } + @Override public Root_meta_external_format_shared_ExternalFormatContract getExternalFormatContract() { diff --git a/legend-engine-xts-flatdata/legend-engine-xt-flatdata-pure/src/main/java/org/finos/legend/pure/code/core/FlatDataLegendPureCoreExtension.java b/legend-engine-xts-flatdata/legend-engine-xt-flatdata-pure/src/main/java/org/finos/legend/pure/code/core/FlatDataLegendPureCoreExtension.java index 774e7eba63a..c3f18b1263f 100644 --- a/legend-engine-xts-flatdata/legend-engine-xt-flatdata-pure/src/main/java/org/finos/legend/pure/code/core/FlatDataLegendPureCoreExtension.java +++ b/legend-engine-xts-flatdata/legend-engine-xt-flatdata-pure/src/main/java/org/finos/legend/pure/code/core/FlatDataLegendPureCoreExtension.java @@ -14,6 +14,7 @@ package org.finos.legend.pure.code.core; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.pure.code.core.ExternalFormatLegendPureCoreExtension; public class FlatDataLegendPureCoreExtension implements ExternalFormatLegendPureCoreExtension @@ -29,4 +30,10 @@ public String functionSignature() { return "meta::external::format::flatdata::extension::flatDataFormatExtension__Extension_1_"; } + + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("External_Format", "FlatData"); + } } \ No newline at end of file diff --git a/legend-engine-xts-flatdata/legend-engine-xt-flatdata-runtime/src/main/java/org/finos/legend/engine/external/format/flatdata/FlatDataJavaCompilerExtension.java b/legend-engine-xts-flatdata/legend-engine-xt-flatdata-runtime/src/main/java/org/finos/legend/engine/external/format/flatdata/FlatDataJavaCompilerExtension.java index 58e232f6712..b07fa1b4a26 100644 --- a/legend-engine-xts-flatdata/legend-engine-xt-flatdata-runtime/src/main/java/org/finos/legend/engine/external/format/flatdata/FlatDataJavaCompilerExtension.java +++ b/legend-engine-xts-flatdata/legend-engine-xt-flatdata-runtime/src/main/java/org/finos/legend/engine/external/format/flatdata/FlatDataJavaCompilerExtension.java @@ -14,6 +14,7 @@ package org.finos.legend.engine.external.format.flatdata; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.external.format.flatdata.driver.spi.ObjectToParsedFlatData; import org.finos.legend.engine.external.format.flatdata.driver.spi.ParsedFlatData; import org.finos.legend.engine.external.format.flatdata.driver.spi.ParsedFlatDataToObject; @@ -74,6 +75,12 @@ public class FlatDataJavaCompilerExtension implements ExecutionPlanJavaCompilerE DEPENDENCIES.put(PURE_PACKAGE + "_FlatDataTemporal", FlatDataTemporal.class); } + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("External_Format", "FlatData"); + } + @Override public ClassPathFilter getExtraClassPathFilter() { diff --git a/legend-engine-xts-flatdata/legend-engine-xt-flatdata-runtime/src/main/java/org/finos/legend/engine/external/format/flatdata/FlatDataRuntimeExtension.java b/legend-engine-xts-flatdata/legend-engine-xt-flatdata-runtime/src/main/java/org/finos/legend/engine/external/format/flatdata/FlatDataRuntimeExtension.java index 8f55d6d1d6c..4ec3f8d8d41 100644 --- a/legend-engine-xts-flatdata/legend-engine-xt-flatdata-runtime/src/main/java/org/finos/legend/engine/external/format/flatdata/FlatDataRuntimeExtension.java +++ b/legend-engine-xts-flatdata/legend-engine-xt-flatdata-runtime/src/main/java/org/finos/legend/engine/external/format/flatdata/FlatDataRuntimeExtension.java @@ -48,6 +48,12 @@ public List getContentTypes() return Collections.singletonList(CONTENT_TYPE); } + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("External_Format", "FlatData"); + } + @Override public StreamingObjectResult executeInternalizeExecutionNode(ExternalFormatInternalizeExecutionNode node, InputStream inputStream, MutableList profiles, ExecutionState executionState) { diff --git a/legend-engine-xts-functionActivator/legend-engine-xt-functionActivator-api/src/main/java/org/finos/legend/engine/functionActivator/service/FunctionActivatorService.java b/legend-engine-xts-functionActivator/legend-engine-xt-functionActivator-api/src/main/java/org/finos/legend/engine/functionActivator/service/FunctionActivatorService.java index 687ae896825..bdc162d0472 100644 --- a/legend-engine-xts-functionActivator/legend-engine-xt-functionActivator-api/src/main/java/org/finos/legend/engine/functionActivator/service/FunctionActivatorService.java +++ b/legend-engine-xts-functionActivator/legend-engine-xt-functionActivator-api/src/main/java/org/finos/legend/engine/functionActivator/service/FunctionActivatorService.java @@ -16,6 +16,7 @@ import org.eclipse.collections.api.RichIterable; import org.eclipse.collections.api.block.function.Function; +import org.eclipse.collections.api.factory.Lists; import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.functionActivator.api.output.FunctionActivatorInfo; import org.finos.legend.engine.protocol.functionActivator.deployment.FunctionActivatorArtifact; @@ -32,6 +33,12 @@ public interface FunctionActivatorService extends LegendExtension { + @Override + default String type() + { + return "Function_Activator"; + } + FunctionActivatorInfo info(PureModel pureModel, String version); boolean supports(Root_meta_external_function_activator_FunctionActivator packageableElement); diff --git a/legend-engine-xts-generation/legend-engine-external-shared/src/main/java/org/finos/legend/engine/external/shared/format/extension/GenerationExtension.java b/legend-engine-xts-generation/legend-engine-external-shared/src/main/java/org/finos/legend/engine/external/shared/format/extension/GenerationExtension.java index 513f009f8e5..d3df8144b95 100644 --- a/legend-engine-xts-generation/legend-engine-external-shared/src/main/java/org/finos/legend/engine/external/shared/format/extension/GenerationExtension.java +++ b/legend-engine-xts-generation/legend-engine-external-shared/src/main/java/org/finos/legend/engine/external/shared/format/extension/GenerationExtension.java @@ -27,6 +27,12 @@ public interface GenerationExtension extends LegendGenerationExtension { + @Override + default String type() + { + return "Generation"; + } + String getLabel(); String getKey(); diff --git a/legend-engine-xts-generation/legend-engine-language-pure-dsl-generation/src/main/java/org/finos/legend/engine/language/pure/dsl/generation/compiler/toPureGraph/GenerationCompilerExtensionImpl.java b/legend-engine-xts-generation/legend-engine-language-pure-dsl-generation/src/main/java/org/finos/legend/engine/language/pure/dsl/generation/compiler/toPureGraph/GenerationCompilerExtensionImpl.java index c008a135dc3..58e420a7fe1 100644 --- a/legend-engine-xts-generation/legend-engine-language-pure-dsl-generation/src/main/java/org/finos/legend/engine/language/pure/dsl/generation/compiler/toPureGraph/GenerationCompilerExtensionImpl.java +++ b/legend-engine-xts-generation/legend-engine-language-pure-dsl-generation/src/main/java/org/finos/legend/engine/language/pure/dsl/generation/compiler/toPureGraph/GenerationCompilerExtensionImpl.java @@ -15,6 +15,7 @@ package org.finos.legend.engine.language.pure.dsl.generation.compiler.toPureGraph; import org.eclipse.collections.api.factory.Maps; +import org.eclipse.collections.api.list.MutableList; import org.eclipse.collections.api.map.MutableMap; import org.eclipse.collections.impl.factory.Lists; import org.finos.legend.engine.language.pure.compiler.toPureGraph.extension.CompilerExtension; @@ -35,6 +36,12 @@ public class GenerationCompilerExtensionImpl implements GenerationCompilerExtens final MutableMap generationSpecificationsIndex = Maps.mutable.empty(); final MutableMap fileConfigurationsIndex = Maps.mutable.empty(); + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Generation", "!!MoveToArtifact!!", "-Core"); + } + @Override public CompilerExtension build() { diff --git a/legend-engine-xts-generation/legend-engine-language-pure-dsl-generation/src/main/java/org/finos/legend/engine/language/pure/dsl/generation/extension/ArtifactGenerationExtension.java b/legend-engine-xts-generation/legend-engine-language-pure-dsl-generation/src/main/java/org/finos/legend/engine/language/pure/dsl/generation/extension/ArtifactGenerationExtension.java index 7321434738c..c7fa80ada1e 100644 --- a/legend-engine-xts-generation/legend-engine-language-pure-dsl-generation/src/main/java/org/finos/legend/engine/language/pure/dsl/generation/extension/ArtifactGenerationExtension.java +++ b/legend-engine-xts-generation/legend-engine-language-pure-dsl-generation/src/main/java/org/finos/legend/engine/language/pure/dsl/generation/extension/ArtifactGenerationExtension.java @@ -27,6 +27,12 @@ */ public interface ArtifactGenerationExtension extends LegendGenerationExtension { + @Override + default String type() + { + return "Generation_Artifact"; + } + /** * Gives the key for the extension * diff --git a/legend-engine-xts-generation/legend-engine-language-pure-dsl-generation/src/main/java/org/finos/legend/engine/language/pure/dsl/generation/extension/ModelGenerationExtension.java b/legend-engine-xts-generation/legend-engine-language-pure-dsl-generation/src/main/java/org/finos/legend/engine/language/pure/dsl/generation/extension/ModelGenerationExtension.java index 274d1f1dbc3..ae12b41c6df 100644 --- a/legend-engine-xts-generation/legend-engine-language-pure-dsl-generation/src/main/java/org/finos/legend/engine/language/pure/dsl/generation/extension/ModelGenerationExtension.java +++ b/legend-engine-xts-generation/legend-engine-language-pure-dsl-generation/src/main/java/org/finos/legend/engine/language/pure/dsl/generation/extension/ModelGenerationExtension.java @@ -25,6 +25,11 @@ public interface ModelGenerationExtension extends LegendGenerationExtension { + @Override + default String type() + { + return "Generation_Model"; + } default List> getPureModelContextDataGenerators() { diff --git a/legend-engine-xts-generation/legend-engine-language-pure-dsl-generation/src/main/java/org/finos/legend/engine/language/pure/dsl/generation/grammar/from/GenerationParserExtension.java b/legend-engine-xts-generation/legend-engine-language-pure-dsl-generation/src/main/java/org/finos/legend/engine/language/pure/dsl/generation/grammar/from/GenerationParserExtension.java index 5c7b25c8cb1..3fb5b759042 100644 --- a/legend-engine-xts-generation/legend-engine-language-pure-dsl-generation/src/main/java/org/finos/legend/engine/language/pure/dsl/generation/grammar/from/GenerationParserExtension.java +++ b/legend-engine-xts-generation/legend-engine-language-pure-dsl-generation/src/main/java/org/finos/legend/engine/language/pure/dsl/generation/grammar/from/GenerationParserExtension.java @@ -17,6 +17,7 @@ import org.antlr.v4.runtime.CharStream; import org.antlr.v4.runtime.CharStreams; import org.antlr.v4.runtime.CommonTokenStream; +import org.eclipse.collections.api.list.MutableList; import org.eclipse.collections.impl.factory.Lists; import org.finos.legend.engine.language.pure.grammar.from.ParserErrorListener; import org.finos.legend.engine.language.pure.grammar.from.PureGrammarParserContext; @@ -39,6 +40,12 @@ public class GenerationParserExtension implements PureGrammarParserExtension public static final String FILE_GENERATION_SECTION_NAME = "FileGeneration"; public static final String GENERATION_SPECIFICATION_SECTION_NAME = "GenerationSpecification"; + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Generation", "!!MoveToArtifact!!", "-Core"); + } + @Override public Iterable getExtraSectionParsers() { diff --git a/legend-engine-xts-generation/legend-engine-language-pure-dsl-generation/src/main/java/org/finos/legend/engine/language/pure/dsl/generation/grammar/to/GenerationGrammarComposerExtension.java b/legend-engine-xts-generation/legend-engine-language-pure-dsl-generation/src/main/java/org/finos/legend/engine/language/pure/dsl/generation/grammar/to/GenerationGrammarComposerExtension.java index 5959f49ad2b..b1942e63447 100644 --- a/legend-engine-xts-generation/legend-engine-language-pure-dsl-generation/src/main/java/org/finos/legend/engine/language/pure/dsl/generation/grammar/to/GenerationGrammarComposerExtension.java +++ b/legend-engine-xts-generation/legend-engine-language-pure-dsl-generation/src/main/java/org/finos/legend/engine/language/pure/dsl/generation/grammar/to/GenerationGrammarComposerExtension.java @@ -14,7 +14,6 @@ package org.finos.legend.engine.language.pure.dsl.generation.grammar.to; -import org.eclipse.collections.api.block.function.Function; import org.eclipse.collections.api.block.function.Function2; import org.eclipse.collections.api.block.function.Function3; import org.eclipse.collections.api.list.MutableList; @@ -37,6 +36,12 @@ public class GenerationGrammarComposerExtension implements PureGrammarComposerExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Generation", "!!MoveToArtifact!!", "-Core"); + } + private MutableList> renderersFile = Lists.mutable.with((element, context) -> { if (element instanceof FileGenerationSpecification) diff --git a/legend-engine-xts-generation/legend-engine-language-pure-dsl-generation/src/main/java/org/finos/legend/engine/protocol/pure/v1/GenerationProtocolExtension.java b/legend-engine-xts-generation/legend-engine-language-pure-dsl-generation/src/main/java/org/finos/legend/engine/protocol/pure/v1/GenerationProtocolExtension.java index eeb49b4e56a..40cdce606cd 100644 --- a/legend-engine-xts-generation/legend-engine-language-pure-dsl-generation/src/main/java/org/finos/legend/engine/protocol/pure/v1/GenerationProtocolExtension.java +++ b/legend-engine-xts-generation/legend-engine-language-pure-dsl-generation/src/main/java/org/finos/legend/engine/protocol/pure/v1/GenerationProtocolExtension.java @@ -17,6 +17,7 @@ import org.eclipse.collections.api.block.function.Function0; import org.eclipse.collections.api.factory.Lists; import org.eclipse.collections.api.factory.Maps; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.protocol.pure.v1.extension.ProtocolSubTypeInfo; import org.finos.legend.engine.protocol.pure.v1.extension.PureProtocolExtension; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.PackageableElement; @@ -28,6 +29,12 @@ public class GenerationProtocolExtension implements PureProtocolExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Generation", "!!MoveToArtifact!!", "-Core"); + } + @Override public List>>> getExtraProtocolSubTypeInfoCollectors() { diff --git a/legend-engine-xts-generation/legend-engine-xt-artifact-generation-api/src/test/java/org/finos/legend/engine/generation/artifact/api/TestSimpleEnumArtifactGenerationExtension.java b/legend-engine-xts-generation/legend-engine-xt-artifact-generation-api/src/test/java/org/finos/legend/engine/generation/artifact/api/TestSimpleEnumArtifactGenerationExtension.java index 9dca44cb27d..31357fb2d58 100644 --- a/legend-engine-xts-generation/legend-engine-xt-artifact-generation-api/src/test/java/org/finos/legend/engine/generation/artifact/api/TestSimpleEnumArtifactGenerationExtension.java +++ b/legend-engine-xts-generation/legend-engine-xt-artifact-generation-api/src/test/java/org/finos/legend/engine/generation/artifact/api/TestSimpleEnumArtifactGenerationExtension.java @@ -16,6 +16,7 @@ import java.util.List; import org.eclipse.collections.api.factory.Lists; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.language.pure.compiler.toPureGraph.PureModel; import org.finos.legend.engine.language.pure.dsl.generation.extension.Artifact; import org.finos.legend.engine.language.pure.dsl.generation.extension.ArtifactGenerationExtension; @@ -32,6 +33,14 @@ public String getKey() return "test-enumeration-generation"; } + @Override + public MutableList group() + { + return Lists.mutable.with("__Test__"); + + } + + @Override public boolean canGenerate(PackageableElement packageableElement) { diff --git a/legend-engine-xts-graphQL/legend-engine-xt-graphQL-grammar-integration/src/main/java/org/finos/legend/engine/language/graphQL/grammar/integration/GraphQLCompilerExtension.java b/legend-engine-xts-graphQL/legend-engine-xt-graphQL-grammar-integration/src/main/java/org/finos/legend/engine/language/graphQL/grammar/integration/GraphQLCompilerExtension.java index a446780c5ce..a9982faed4e 100644 --- a/legend-engine-xts-graphQL/legend-engine-xt-graphQL-grammar-integration/src/main/java/org/finos/legend/engine/language/graphQL/grammar/integration/GraphQLCompilerExtension.java +++ b/legend-engine-xts-graphQL/legend-engine-xt-graphQL-grammar-integration/src/main/java/org/finos/legend/engine/language/graphQL/grammar/integration/GraphQLCompilerExtension.java @@ -15,6 +15,7 @@ package org.finos.legend.engine.language.graphQL.grammar.integration; import org.eclipse.collections.api.block.function.Function3; +import org.eclipse.collections.api.list.MutableList; import org.eclipse.collections.impl.factory.Lists; import org.eclipse.collections.impl.factory.Maps; import org.finos.legend.engine.language.pure.compiler.toPureGraph.CompileContext; @@ -29,6 +30,12 @@ public class GraphQLCompilerExtension implements CompilerExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Query", "GraphQL"); + } + @Override public Iterable> getExtraProcessors() { diff --git a/legend-engine-xts-graphQL/legend-engine-xt-graphQL-grammar-integration/src/main/java/org/finos/legend/engine/language/graphQL/grammar/integration/GraphQLGrammarParserExtension.java b/legend-engine-xts-graphQL/legend-engine-xt-graphQL-grammar-integration/src/main/java/org/finos/legend/engine/language/graphQL/grammar/integration/GraphQLGrammarParserExtension.java index 9bd580f847d..2bc9b19c488 100644 --- a/legend-engine-xts-graphQL/legend-engine-xt-graphQL-grammar-integration/src/main/java/org/finos/legend/engine/language/graphQL/grammar/integration/GraphQLGrammarParserExtension.java +++ b/legend-engine-xts-graphQL/legend-engine-xt-graphQL-grammar-integration/src/main/java/org/finos/legend/engine/language/graphQL/grammar/integration/GraphQLGrammarParserExtension.java @@ -15,11 +15,18 @@ package org.finos.legend.engine.language.graphQL.grammar.integration; import org.eclipse.collections.api.factory.Lists; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.language.pure.grammar.from.extension.EmbeddedPureParser; import org.finos.legend.engine.language.pure.grammar.from.extension.PureGrammarParserExtension; public class GraphQLGrammarParserExtension implements PureGrammarParserExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Query", "GraphQL"); + } + @Override public Iterable getExtraEmbeddedPureParsers() { diff --git a/legend-engine-xts-graphQL/legend-engine-xt-graphQL-grammar-integration/src/main/java/org/finos/legend/engine/language/graphQL/grammar/integration/GraphQLPureGrammarComposerExtension.java b/legend-engine-xts-graphQL/legend-engine-xt-graphQL-grammar-integration/src/main/java/org/finos/legend/engine/language/graphQL/grammar/integration/GraphQLPureGrammarComposerExtension.java index 3b5bc3ba572..994e0b233b3 100644 --- a/legend-engine-xts-graphQL/legend-engine-xt-graphQL-grammar-integration/src/main/java/org/finos/legend/engine/language/graphQL/grammar/integration/GraphQLPureGrammarComposerExtension.java +++ b/legend-engine-xts-graphQL/legend-engine-xt-graphQL-grammar-integration/src/main/java/org/finos/legend/engine/language/graphQL/grammar/integration/GraphQLPureGrammarComposerExtension.java @@ -16,6 +16,7 @@ import org.eclipse.collections.api.block.function.Function2; import org.eclipse.collections.api.factory.Maps; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.language.graphQL.grammar.to.GraphQLGrammarComposer; import org.finos.legend.engine.language.pure.grammar.to.PureGrammarComposerContext; import org.finos.legend.engine.language.pure.grammar.to.extension.PureGrammarComposerExtension; @@ -25,6 +26,12 @@ public class GraphQLPureGrammarComposerExtension implements PureGrammarComposerExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Query", "GraphQL"); + } + @Override public Map> getExtraEmbeddedPureComposers() { diff --git a/legend-engine-xts-graphQL/legend-engine-xt-graphQL-grammar-integration/src/main/java/org/finos/legend/engine/language/graphQL/grammar/integration/GraphQLPureProtocolExtension.java b/legend-engine-xts-graphQL/legend-engine-xt-graphQL-grammar-integration/src/main/java/org/finos/legend/engine/language/graphQL/grammar/integration/GraphQLPureProtocolExtension.java index e4a6f4ad7cf..7eaa0b49a89 100644 --- a/legend-engine-xts-graphQL/legend-engine-xt-graphQL-grammar-integration/src/main/java/org/finos/legend/engine/language/graphQL/grammar/integration/GraphQLPureProtocolExtension.java +++ b/legend-engine-xts-graphQL/legend-engine-xt-graphQL-grammar-integration/src/main/java/org/finos/legend/engine/language/graphQL/grammar/integration/GraphQLPureProtocolExtension.java @@ -14,6 +14,7 @@ package org.finos.legend.engine.language.graphQL.grammar.integration; +import org.eclipse.collections.api.list.MutableList; import org.eclipse.collections.impl.factory.Maps; import org.finos.legend.engine.protocol.graphQL.metamodel.Document; import org.finos.legend.engine.protocol.pure.v1.extension.PureProtocolExtension; @@ -22,6 +23,12 @@ public class GraphQLPureProtocolExtension implements PureProtocolExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Query", "GraphQL"); + } + @Override public Map getExtraClassInstanceTypeMappings() { diff --git a/legend-engine-xts-graphQL/legend-engine-xt-graphQL-query/src/main/java/org/finos/legend/engine/query/graphQL/api/format/GraphQLFormatExtension.java b/legend-engine-xts-graphQL/legend-engine-xt-graphQL-query/src/main/java/org/finos/legend/engine/query/graphQL/api/format/GraphQLFormatExtension.java index 8eb5c193b27..fa807f2d113 100644 --- a/legend-engine-xts-graphQL/legend-engine-xt-graphQL-query/src/main/java/org/finos/legend/engine/query/graphQL/api/format/GraphQLFormatExtension.java +++ b/legend-engine-xts-graphQL/legend-engine-xt-graphQL-query/src/main/java/org/finos/legend/engine/query/graphQL/api/format/GraphQLFormatExtension.java @@ -16,9 +16,9 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.external.shared.format.model.compile.ExternalSchemaCompileContext; import org.finos.legend.engine.external.shared.format.model.transformation.toModel.ExternalFormatModelGenerationExtension; -import org.finos.legend.engine.external.shared.format.model.transformation.toModel.SchemaToModelConfiguration; import org.finos.legend.engine.language.pure.compiler.toPureGraph.PureModel; import org.finos.legend.engine.protocol.graphQL.introspection.model.ProtocolToMetamodelTranslator; import org.finos.legend.engine.protocol.graphQL.introspection.model.__Schema; @@ -31,6 +31,12 @@ public class GraphQLFormatExtension implements ExternalFormatModelGenerationExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Query", "GraphQL"); + } + private final Root_meta_external_format_shared_ExternalFormatContract graphQLIntrospectionContract = (Root_meta_external_format_shared_ExternalFormatContract) core_external_query_graphql_contract.Root_meta_external_query_graphQL_contract_graphQLIntrospectionContract__ExternalFormatContract_1_(PureModel.CORE_PURE_MODEL.getExecutionSupport()); @Override diff --git a/legend-engine-xts-graphQL/legend-engine-xt-graphQL-query/src/main/java/org/finos/legend/engine/query/graphQL/api/format/GraphQLSDLFormatExtension.java b/legend-engine-xts-graphQL/legend-engine-xt-graphQL-query/src/main/java/org/finos/legend/engine/query/graphQL/api/format/GraphQLSDLFormatExtension.java index 5fdbf456d5a..0c2bfe971e8 100644 --- a/legend-engine-xts-graphQL/legend-engine-xt-graphQL-query/src/main/java/org/finos/legend/engine/query/graphQL/api/format/GraphQLSDLFormatExtension.java +++ b/legend-engine-xts-graphQL/legend-engine-xt-graphQL-query/src/main/java/org/finos/legend/engine/query/graphQL/api/format/GraphQLSDLFormatExtension.java @@ -14,6 +14,7 @@ package org.finos.legend.engine.query.graphQL.api.format; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.external.shared.format.model.compile.ExternalSchemaCompileContext; import org.finos.legend.engine.external.shared.format.model.transformation.fromModel.ExternalFormatSchemaGenerationExtension; import org.finos.legend.engine.language.pure.compiler.toPureGraph.PureModel; @@ -32,6 +33,12 @@ public class GraphQLSDLFormatExtension implements ExternalFormatSchemaGeneration PureModel.CORE_PURE_MODEL.getExecutionSupport()); public static final String TYPE = contract._id(); + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Query", "GraphQL"); + } + @Override public Root_meta_external_format_shared_ExternalFormatContract getExternalFormatContract() { diff --git a/legend-engine-xts-graphQL/legend-engine-xt-graphQL-query/src/main/java/org/finos/legend/engine/query/graphQL/api/format/generation/GraphQLGenerationExtension.java b/legend-engine-xts-graphQL/legend-engine-xt-graphQL-query/src/main/java/org/finos/legend/engine/query/graphQL/api/format/generation/GraphQLGenerationExtension.java index d8911922e07..5e6ce114253 100644 --- a/legend-engine-xts-graphQL/legend-engine-xt-graphQL-query/src/main/java/org/finos/legend/engine/query/graphQL/api/format/generation/GraphQLGenerationExtension.java +++ b/legend-engine-xts-graphQL/legend-engine-xt-graphQL-query/src/main/java/org/finos/legend/engine/query/graphQL/api/format/generation/GraphQLGenerationExtension.java @@ -15,6 +15,7 @@ package org.finos.legend.engine.query.graphQL.api.format.generation; import org.eclipse.collections.api.RichIterable; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.external.shared.format.extension.GenerationExtension; import org.finos.legend.engine.external.shared.format.extension.GenerationMode; import org.finos.legend.engine.external.shared.format.generations.description.FileGenerationDescription; @@ -36,6 +37,18 @@ @Deprecated public class GraphQLGenerationExtension implements GenerationExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Query", "GraphQL"); + } + + @Override + public String type() + { + return "Generation - To Delete?"; + } + @Override public String getLabel() { diff --git a/legend-engine-xts-hostedService/legend-engine-xt-hostedService-api/src/main/java/org/finos/legend/engine/language/hostedService/api/HostedServiceService.java b/legend-engine-xts-hostedService/legend-engine-xt-hostedService-api/src/main/java/org/finos/legend/engine/language/hostedService/api/HostedServiceService.java index ac3d1718c16..ac56081b9bd 100644 --- a/legend-engine-xts-hostedService/legend-engine-xt-hostedService-api/src/main/java/org/finos/legend/engine/language/hostedService/api/HostedServiceService.java +++ b/legend-engine-xts-hostedService/legend-engine-xt-hostedService-api/src/main/java/org/finos/legend/engine/language/hostedService/api/HostedServiceService.java @@ -26,7 +26,6 @@ import org.finos.legend.engine.functionActivator.service.FunctionActivatorService; import org.finos.legend.engine.language.hostedService.generation.deployment.HostedServiceDeploymentManager; import org.finos.legend.engine.protocol.hostedService.deployment.model.GenerationInfoData; -import org.finos.legend.engine.protocol.hostedService.metamodel.HostedService; import org.finos.legend.engine.protocol.hostedService.deployment.HostedServiceDeploymentResult; import org.finos.legend.engine.language.hostedService.generation.HostedServiceArtifactGenerator; import org.finos.legend.engine.language.pure.compiler.toPureGraph.PureModel; @@ -39,8 +38,6 @@ import java.util.List; -import static org.finos.legend.pure.generated.platform_pure_basics_meta_elementToPath.Root_meta_pure_functions_meta_elementToPath_PackageableElement_1__String_1_; - public class HostedServiceService implements FunctionActivatorService { private final HostedServiceArtifactGenerator hostedServiceArtifactgenerator; @@ -53,6 +50,12 @@ public HostedServiceService() this.hostedServiceDeploymentManager = new HostedServiceDeploymentManager(); } + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Function_Activator", "Hosted_Service"); + } + @Override public FunctionActivatorInfo info(PureModel pureModel, String version) { diff --git a/legend-engine-xts-hostedService/legend-engine-xt-hostedService-compiler/src/main/java/org/finos/legend/engine/language/hostedService/compiler/toPureGraph/HostedServiceCompilerExtension.java b/legend-engine-xts-hostedService/legend-engine-xt-hostedService-compiler/src/main/java/org/finos/legend/engine/language/hostedService/compiler/toPureGraph/HostedServiceCompilerExtension.java index 26cc8ad03c5..d169902ec5b 100644 --- a/legend-engine-xts-hostedService/legend-engine-xt-hostedService-compiler/src/main/java/org/finos/legend/engine/language/hostedService/compiler/toPureGraph/HostedServiceCompilerExtension.java +++ b/legend-engine-xts-hostedService/legend-engine-xt-hostedService-compiler/src/main/java/org/finos/legend/engine/language/hostedService/compiler/toPureGraph/HostedServiceCompilerExtension.java @@ -15,6 +15,7 @@ package org.finos.legend.engine.language.hostedService.compiler.toPureGraph; import org.eclipse.collections.api.factory.Lists; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.code.core.CoreFunctionActivatorCodeRepositoryProvider; import org.finos.legend.engine.language.pure.compiler.toPureGraph.CompileContext; import org.finos.legend.engine.language.pure.compiler.toPureGraph.extension.CompilerExtension; @@ -22,7 +23,6 @@ import org.finos.legend.engine.protocol.functionActivator.metamodel.DeploymentOwner; import org.finos.legend.engine.protocol.hostedService.metamodel.HostedService; import org.finos.legend.engine.protocol.hostedService.metamodel.HostedServiceDeploymentConfiguration; -import org.finos.legend.engine.protocol.functionActivator.metamodel.DeploymentOwner; import org.finos.legend.engine.protocol.functionActivator.metamodel.Ownership; import org.finos.legend.engine.protocol.hostedService.metamodel.control.UserList; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.service.ExecutionEnvironmentInstance; @@ -39,6 +39,12 @@ public class HostedServiceCompilerExtension implements CompilerExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Function_Activator", "Hosted_Service"); + } + // Here only for dependency check error ... CoreFunctionActivatorCodeRepositoryProvider forDependencies; diff --git a/legend-engine-xts-hostedService/legend-engine-xt-hostedService-generation/src/main/java/org/finos/legend/engine/language/hostedService/generation/deployment/HostedServiceArtifactGenerationExtension.java b/legend-engine-xts-hostedService/legend-engine-xt-hostedService-generation/src/main/java/org/finos/legend/engine/language/hostedService/generation/deployment/HostedServiceArtifactGenerationExtension.java index ee63dd261bb..40218f61b90 100644 --- a/legend-engine-xts-hostedService/legend-engine-xt-hostedService-generation/src/main/java/org/finos/legend/engine/language/hostedService/generation/deployment/HostedServiceArtifactGenerationExtension.java +++ b/legend-engine-xts-hostedService/legend-engine-xt-hostedService-generation/src/main/java/org/finos/legend/engine/language/hostedService/generation/deployment/HostedServiceArtifactGenerationExtension.java @@ -26,7 +26,6 @@ import org.finos.legend.engine.language.pure.compiler.toPureGraph.PureModel; import org.finos.legend.engine.language.pure.dsl.generation.extension.Artifact; import org.finos.legend.engine.language.pure.dsl.generation.extension.ArtifactGenerationExtension; -import org.finos.legend.engine.plan.generation.extension.PlanGeneratorExtension; import org.finos.legend.engine.protocol.hostedService.metamodel.HostedService; import org.finos.legend.engine.protocol.pure.v1.model.context.*; import org.finos.legend.engine.shared.core.ObjectMapperFactory; @@ -37,10 +36,9 @@ import org.slf4j.Logger; import java.util.List; -import java.util.ServiceLoader; //import static com.sun.tools.javac.tree.TreeInfo.fullName; -import static org.finos.legend.pure.runtime.java.compiled.generation.processors.support.Pure.elementToPath; + public class HostedServiceArtifactGenerationExtension implements ArtifactGenerationExtension { @@ -52,6 +50,13 @@ public class HostedServiceArtifactGenerationExtension implements ArtifactGenerat private static final String FILE_NAME = "hostedServiceArtifact.json"; + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Function_Activator", "Hosted_Service"); + } + + @Override public String getKey() { diff --git a/legend-engine-xts-hostedService/legend-engine-xt-hostedService-grammar/src/main/java/org/finos/legend/engine/language/hostedService/grammar/from/HostedServiceGrammarParserExtension.java b/legend-engine-xts-hostedService/legend-engine-xt-hostedService-grammar/src/main/java/org/finos/legend/engine/language/hostedService/grammar/from/HostedServiceGrammarParserExtension.java index 2fa1d71c33d..88cf4bfef96 100644 --- a/legend-engine-xts-hostedService/legend-engine-xt-hostedService-grammar/src/main/java/org/finos/legend/engine/language/hostedService/grammar/from/HostedServiceGrammarParserExtension.java +++ b/legend-engine-xts-hostedService/legend-engine-xt-hostedService-grammar/src/main/java/org/finos/legend/engine/language/hostedService/grammar/from/HostedServiceGrammarParserExtension.java @@ -17,6 +17,7 @@ import org.antlr.v4.runtime.CharStream; import org.antlr.v4.runtime.CharStreams; import org.antlr.v4.runtime.CommonTokenStream; +import org.eclipse.collections.api.list.MutableList; import org.eclipse.collections.impl.factory.Lists; import org.finos.legend.engine.language.pure.grammar.from.ParserErrorListener; import org.finos.legend.engine.language.pure.grammar.from.PureGrammarParserContext; @@ -36,6 +37,12 @@ public class HostedServiceGrammarParserExtension implements PureGrammarParserExt { public static final String NAME = "HostedService"; + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Function_Activator", "Hosted_Service"); + } + @Override public Iterable getExtraSectionParsers() { diff --git a/legend-engine-xts-hostedService/legend-engine-xt-hostedService-grammar/src/main/java/org/finos/legend/engine/language/hostedService/grammar/to/HostedServiceGrammarComposer.java b/legend-engine-xts-hostedService/legend-engine-xt-hostedService-grammar/src/main/java/org/finos/legend/engine/language/hostedService/grammar/to/HostedServiceGrammarComposer.java index 5c6162b4842..aaf674c2003 100644 --- a/legend-engine-xts-hostedService/legend-engine-xt-hostedService-grammar/src/main/java/org/finos/legend/engine/language/hostedService/grammar/to/HostedServiceGrammarComposer.java +++ b/legend-engine-xts-hostedService/legend-engine-xt-hostedService-grammar/src/main/java/org/finos/legend/engine/language/hostedService/grammar/to/HostedServiceGrammarComposer.java @@ -14,14 +14,12 @@ package org.finos.legend.engine.language.hostedService.grammar.to; -import org.eclipse.collections.api.block.function.Function; import org.eclipse.collections.api.block.function.Function2; import org.eclipse.collections.api.block.function.Function3; import org.eclipse.collections.api.factory.Lists; import org.eclipse.collections.api.list.MutableList; import org.eclipse.collections.impl.utility.Iterate; import org.eclipse.collections.impl.utility.LazyIterate; -import org.eclipse.collections.impl.utility.ListIterate; import org.finos.legend.engine.language.pure.grammar.to.PureGrammarComposerContext; import org.finos.legend.engine.language.pure.grammar.to.PureGrammarComposerUtility; import org.finos.legend.engine.language.pure.grammar.to.extension.PureGrammarComposerExtension; @@ -43,6 +41,12 @@ public class HostedServiceGrammarComposer implements PureGrammarComposerExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Function_Activator", "Hosted_Service"); + } + private MutableList> renderers = Lists.mutable.with((element, context) -> { if (element instanceof HostedService) diff --git a/legend-engine-xts-hostedService/legend-engine-xt-hostedService-protocol/src/main/java/org/finos/legend/engine/protocol/hostedService/metamodel/HostedServiceProtocolExtension.java b/legend-engine-xts-hostedService/legend-engine-xt-hostedService-protocol/src/main/java/org/finos/legend/engine/protocol/hostedService/metamodel/HostedServiceProtocolExtension.java index 6c451e1ba91..bd5476df58e 100644 --- a/legend-engine-xts-hostedService/legend-engine-xt-hostedService-protocol/src/main/java/org/finos/legend/engine/protocol/hostedService/metamodel/HostedServiceProtocolExtension.java +++ b/legend-engine-xts-hostedService/legend-engine-xt-hostedService-protocol/src/main/java/org/finos/legend/engine/protocol/hostedService/metamodel/HostedServiceProtocolExtension.java @@ -17,13 +17,13 @@ import org.eclipse.collections.api.block.function.Function0; import org.eclipse.collections.api.factory.Lists; import org.eclipse.collections.api.factory.Maps; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.protocol.functionActivator.deployment.FunctionActivatorArtifact; import org.finos.legend.engine.protocol.functionActivator.deployment.FunctionActivatorDeploymentConfiguration; import org.finos.legend.engine.protocol.functionActivator.deployment.FunctionActivatorDeploymentContent; import org.finos.legend.engine.protocol.functionActivator.metamodel.DeploymentConfiguration; import org.finos.legend.engine.protocol.hostedService.deployment.HostedServiceArtifact; import org.finos.legend.engine.protocol.hostedService.deployment.HostedServiceContent; -import org.finos.legend.engine.protocol.functionActivator.metamodel.DeploymentOwner; import org.finos.legend.engine.protocol.functionActivator.metamodel.Ownership; import org.finos.legend.engine.protocol.hostedService.metamodel.control.UserList; import org.finos.legend.engine.protocol.pure.v1.extension.ProtocolSubTypeInfo; @@ -37,6 +37,12 @@ public class HostedServiceProtocolExtension implements PureProtocolExtension { public static String packageJSONType = "hostedService"; + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Function_Activator", "Hosted_Service"); + } + @Override public List>>> getExtraProtocolSubTypeInfoCollectors() { diff --git a/legend-engine-xts-java/legend-engine-xt-javaPlatformBinding-pure/src/main/java/org/finos/legend/pure/code/core/BindingJavaBindingLegendPureCoreExtension.java b/legend-engine-xts-java/legend-engine-xt-javaPlatformBinding-pure/src/main/java/org/finos/legend/pure/code/core/BindingJavaBindingLegendPureCoreExtension.java index 2efbe981c5e..2856a5f6cd1 100644 --- a/legend-engine-xts-java/legend-engine-xt-javaPlatformBinding-pure/src/main/java/org/finos/legend/pure/code/core/BindingJavaBindingLegendPureCoreExtension.java +++ b/legend-engine-xts-java/legend-engine-xt-javaPlatformBinding-pure/src/main/java/org/finos/legend/pure/code/core/BindingJavaBindingLegendPureCoreExtension.java @@ -14,10 +14,17 @@ package org.finos.legend.pure.code.core; -import org.finos.legend.engine.pure.code.core.BindingLegendPureCoreExtension; +import org.eclipse.collections.api.list.MutableList; +import org.finos.legend.engine.pure.code.core.JavaBindingLegendPureCoreExtension; -public class BindingJavaBindingLegendPureCoreExtension implements BindingLegendPureCoreExtension +public class BindingJavaBindingLegendPureCoreExtension implements JavaBindingLegendPureCoreExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("External_Format", "-Core"); + } + @Override public String functionFile() { diff --git a/legend-engine-xts-java/legend-engine-xt-javaPlatformBinding-pure/src/main/java/org/finos/legend/pure/code/core/M2MJavaBindingLegendPureCoreExtension.java b/legend-engine-xts-java/legend-engine-xt-javaPlatformBinding-pure/src/main/java/org/finos/legend/pure/code/core/M2MJavaBindingLegendPureCoreExtension.java index 1276b181870..afe12ef7bd8 100644 --- a/legend-engine-xts-java/legend-engine-xt-javaPlatformBinding-pure/src/main/java/org/finos/legend/pure/code/core/M2MJavaBindingLegendPureCoreExtension.java +++ b/legend-engine-xts-java/legend-engine-xt-javaPlatformBinding-pure/src/main/java/org/finos/legend/pure/code/core/M2MJavaBindingLegendPureCoreExtension.java @@ -14,10 +14,17 @@ package org.finos.legend.pure.code.core; -import org.finos.legend.engine.pure.code.core.BindingLegendPureCoreExtension; +import org.eclipse.collections.api.list.MutableList; +import org.finos.legend.engine.pure.code.core.JavaBindingLegendPureCoreExtension; -public class M2MJavaBindingLegendPureCoreExtension implements BindingLegendPureCoreExtension +public class M2MJavaBindingLegendPureCoreExtension implements JavaBindingLegendPureCoreExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "M2M"); + } + @Override public String functionFile() { diff --git a/legend-engine-xts-json/legend-engine-external-format-jsonSchema/src/main/java/org/finos/legend/engine/external/format/jsonSchema/extension/JSONSchemaGenerationExtension.java b/legend-engine-xts-json/legend-engine-external-format-jsonSchema/src/main/java/org/finos/legend/engine/external/format/jsonSchema/extension/JSONSchemaGenerationExtension.java index e1139791169..f7056c69b47 100644 --- a/legend-engine-xts-json/legend-engine-external-format-jsonSchema/src/main/java/org/finos/legend/engine/external/format/jsonSchema/extension/JSONSchemaGenerationExtension.java +++ b/legend-engine-xts-json/legend-engine-external-format-jsonSchema/src/main/java/org/finos/legend/engine/external/format/jsonSchema/extension/JSONSchemaGenerationExtension.java @@ -15,6 +15,7 @@ package org.finos.legend.engine.external.format.jsonSchema.extension; import org.eclipse.collections.api.RichIterable; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.external.format.jsonSchema.schema.generations.JSONSchemaConfig; import org.finos.legend.engine.external.format.jsonSchema.schema.generations.JSONSchemaGenerationService; import org.finos.legend.engine.external.shared.format.extension.GenerationExtension; @@ -37,6 +38,18 @@ public class JSONSchemaGenerationExtension implements GenerationExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("External_Format", "JSON"); + } + + @Override + public String type() + { + return "Generation - To Delete?"; + } + @Override public String getLabel() { diff --git a/legend-engine-xts-json/legend-engine-xt-json-javaPlatformBinding-pure/src/main/java/org/finos/legend/pure/code/core/JSONJavaBindingLegendPureCoreExtension.java b/legend-engine-xts-json/legend-engine-xt-json-javaPlatformBinding-pure/src/main/java/org/finos/legend/pure/code/core/JSONJavaBindingLegendPureCoreExtension.java index 1929c59e37d..82c32bf7b7e 100644 --- a/legend-engine-xts-json/legend-engine-xt-json-javaPlatformBinding-pure/src/main/java/org/finos/legend/pure/code/core/JSONJavaBindingLegendPureCoreExtension.java +++ b/legend-engine-xts-json/legend-engine-xt-json-javaPlatformBinding-pure/src/main/java/org/finos/legend/pure/code/core/JSONJavaBindingLegendPureCoreExtension.java @@ -14,10 +14,17 @@ package org.finos.legend.pure.code.core; -import org.finos.legend.engine.pure.code.core.BindingLegendPureCoreExtension; +import org.eclipse.collections.api.list.MutableList; +import org.finos.legend.engine.pure.code.core.JavaBindingLegendPureCoreExtension; -public class JSONJavaBindingLegendPureCoreExtension implements BindingLegendPureCoreExtension +public class JSONJavaBindingLegendPureCoreExtension implements JavaBindingLegendPureCoreExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("External_Format", "JSON"); + } + @Override public String functionFile() { diff --git a/legend-engine-xts-json/legend-engine-xt-json-model/pom.xml b/legend-engine-xts-json/legend-engine-xt-json-model/pom.xml index 0d004360c2d..e656144403d 100644 --- a/legend-engine-xts-json/legend-engine-xt-json-model/pom.xml +++ b/legend-engine-xts-json/legend-engine-xt-json-model/pom.xml @@ -68,6 +68,10 @@ org.eclipse.collections eclipse-collections-api + + org.eclipse.collections + eclipse-collections + diff --git a/legend-engine-xts-json/legend-engine-xt-json-model/src/main/java/org/finos/legend/engine/external/format/json/JsonExternalFormatExtension.java b/legend-engine-xts-json/legend-engine-xt-json-model/src/main/java/org/finos/legend/engine/external/format/json/JsonExternalFormatExtension.java index c400bb8bc2d..2b34007a7dd 100644 --- a/legend-engine-xts-json/legend-engine-xt-json-model/src/main/java/org/finos/legend/engine/external/format/json/JsonExternalFormatExtension.java +++ b/legend-engine-xts-json/legend-engine-xt-json-model/src/main/java/org/finos/legend/engine/external/format/json/JsonExternalFormatExtension.java @@ -14,6 +14,7 @@ package org.finos.legend.engine.external.format.json; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.external.format.json.compile.JsonSchemaCompiler; import org.finos.legend.engine.external.format.json.fromModel.ModelToJsonSchemaConfiguration; import org.finos.legend.engine.external.format.json.toModel.JsonSchemaToModelConfiguration; @@ -34,6 +35,19 @@ public class JsonExternalFormatExtension implements ExternalFormatSchemaGenerati private static final Root_meta_external_format_shared_ExternalFormatContract jsonSchemaContract = (Root_meta_external_format_shared_ExternalFormatContract) core_external_format_json_externalFormatContract.Root_meta_external_format_json_contract_jsonSchemaFormatContract__ExternalFormatContract_1_(PureModel.CORE_PURE_MODEL.getExecutionSupport()); public static final String TYPE = jsonSchemaContract._id(); + @Override + public String type() + { + return "MIX_Model_Generation_&_Schema_Generation"; + } + + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("External_Format", "JSON"); + } + + @Override public Root_meta_external_format_shared_ExternalFormatContract getExternalFormatContract() { diff --git a/legend-engine-xts-json/legend-engine-xt-json-model/src/main/java/org/finos/legend/engine/external/format/json/compile/JsonSchemaCompiler.java b/legend-engine-xts-json/legend-engine-xt-json-model/src/main/java/org/finos/legend/engine/external/format/json/compile/JsonSchemaCompiler.java index 02c1c6a86a4..01e7c28e25e 100644 --- a/legend-engine-xts-json/legend-engine-xt-json-model/src/main/java/org/finos/legend/engine/external/format/json/compile/JsonSchemaCompiler.java +++ b/legend-engine-xts-json/legend-engine-xt-json-model/src/main/java/org/finos/legend/engine/external/format/json/compile/JsonSchemaCompiler.java @@ -16,6 +16,7 @@ import org.eclipse.collections.api.block.function.Function; import org.eclipse.collections.api.factory.Lists; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.external.shared.format.model.compile.ExternalSchemaCompileContext; import org.finos.legend.engine.language.pure.compiler.toPureGraph.extension.CompilerExtension; import org.finos.legend.engine.language.pure.compiler.toPureGraph.extension.Processor; @@ -32,6 +33,12 @@ public class JsonSchemaCompiler implements CompilerExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("External_Format", "JSON"); + } + public Root_meta_external_format_json_metamodel_JsonSchema compile(ExternalSchemaCompileContext context) { String content = context.getContent(); diff --git a/legend-engine-xts-json/legend-engine-xt-json-pure/src/main/java/org/finos/legend/pure/code/core/JSONLegendPureCoreExtension.java b/legend-engine-xts-json/legend-engine-xt-json-pure/src/main/java/org/finos/legend/pure/code/core/JSONLegendPureCoreExtension.java index 6fce2f3267d..b7f9e86c6ab 100644 --- a/legend-engine-xts-json/legend-engine-xt-json-pure/src/main/java/org/finos/legend/pure/code/core/JSONLegendPureCoreExtension.java +++ b/legend-engine-xts-json/legend-engine-xt-json-pure/src/main/java/org/finos/legend/pure/code/core/JSONLegendPureCoreExtension.java @@ -14,6 +14,7 @@ package org.finos.legend.pure.code.core; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.pure.code.core.ExternalFormatLegendPureCoreExtension; public class JSONLegendPureCoreExtension implements ExternalFormatLegendPureCoreExtension @@ -29,5 +30,11 @@ public String functionSignature() { return "meta::external::format::json::extension::jsonSchemaFormatExtension__Extension_1_"; } + + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("External_Format", "JSON"); + } } diff --git a/legend-engine-xts-json/legend-engine-xt-json-runtime/src/main/java/org/finos/legend/engine/external/format/json/JsonJavaCompilerExtension.java b/legend-engine-xts-json/legend-engine-xt-json-runtime/src/main/java/org/finos/legend/engine/external/format/json/JsonJavaCompilerExtension.java index e3daeceac39..403b66dc330 100644 --- a/legend-engine-xts-json/legend-engine-xt-json-runtime/src/main/java/org/finos/legend/engine/external/format/json/JsonJavaCompilerExtension.java +++ b/legend-engine-xts-json/legend-engine-xt-json-runtime/src/main/java/org/finos/legend/engine/external/format/json/JsonJavaCompilerExtension.java @@ -14,6 +14,7 @@ package org.finos.legend.engine.external.format.json; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.external.format.json.read.IJsonDeserializeExecutionNodeSpecifics; import org.finos.legend.engine.external.format.json.read.IJsonInternalizeExecutionNodeSpecifics; import org.finos.legend.engine.external.format.json.read.JsonDataReader; @@ -46,6 +47,12 @@ public class JsonJavaCompilerExtension implements ExecutionPlanJavaCompilerExten DEPENDENCIES.put(PURE_PACKAGE + "IJsonWriter", IJsonWriter.class); } + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("External_Format", "JSON"); + } + @Override public ClassPathFilter getExtraClassPathFilter() { diff --git a/legend-engine-xts-json/legend-engine-xt-json-runtime/src/main/java/org/finos/legend/engine/external/format/json/JsonSchemaRuntimeExtension.java b/legend-engine-xts-json/legend-engine-xt-json-runtime/src/main/java/org/finos/legend/engine/external/format/json/JsonSchemaRuntimeExtension.java index 2920438da88..029c611cfee 100644 --- a/legend-engine-xts-json/legend-engine-xt-json-runtime/src/main/java/org/finos/legend/engine/external/format/json/JsonSchemaRuntimeExtension.java +++ b/legend-engine-xts-json/legend-engine-xt-json-runtime/src/main/java/org/finos/legend/engine/external/format/json/JsonSchemaRuntimeExtension.java @@ -56,6 +56,12 @@ public List getContentTypes() return Collections.singletonList(CONTENT_TYPE); } + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("External_Format", "JSON"); + } + @Override public StreamingObjectResult executeInternalizeExecutionNode(ExternalFormatInternalizeExecutionNode node, InputStream inputStream, MutableList profiles, ExecutionState executionState) { diff --git a/legend-engine-xts-mastery/legend-engine-xt-mastery-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/mastery/compiler/toPureGraph/MasteryCompilerExtension.java b/legend-engine-xts-mastery/legend-engine-xt-mastery-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/mastery/compiler/toPureGraph/MasteryCompilerExtension.java index a4f60e9f53f..b66f0d78850 100644 --- a/legend-engine-xts-mastery/legend-engine-xt-mastery-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/mastery/compiler/toPureGraph/MasteryCompilerExtension.java +++ b/legend-engine-xts-mastery/legend-engine-xt-mastery-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/mastery/compiler/toPureGraph/MasteryCompilerExtension.java @@ -18,6 +18,7 @@ import org.eclipse.collections.api.block.function.Function3; import org.eclipse.collections.api.factory.Lists; import org.eclipse.collections.api.factory.Sets; +import org.eclipse.collections.api.list.MutableList; import org.eclipse.collections.impl.utility.Iterate; import org.eclipse.collections.impl.utility.ListIterate; import org.finos.legend.engine.language.pure.compiler.toPureGraph.CompileContext; @@ -55,6 +56,12 @@ public class MasteryCompilerExtension implements IMasteryCompilerExtension public static final String REGULATOR = "Regulator"; public static final String EXCHANGE = "Exchange"; + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("PackageableElement", "Mastery"); + } + @Override public CompilerExtension build() { diff --git a/legend-engine-xts-mastery/legend-engine-xt-mastery-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/mastery/extension/IMasteryModelGenerationExtension.java b/legend-engine-xts-mastery/legend-engine-xt-mastery-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/mastery/extension/IMasteryModelGenerationExtension.java index 2475394c73d..8cd1040d59f 100644 --- a/legend-engine-xts-mastery/legend-engine-xt-mastery-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/mastery/extension/IMasteryModelGenerationExtension.java +++ b/legend-engine-xts-mastery/legend-engine-xt-mastery-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/mastery/extension/IMasteryModelGenerationExtension.java @@ -36,7 +36,7 @@ static List getExtensions() static PureModelContextData generate(Root_meta_pure_mastery_metamodel_MasterRecordDefinition item, List> generators, CompileContext context, String version) { PureModelContextData.Builder builder = PureModelContextData.newBuilder().withSerializer(new Protocol("pure", version)); - for (Function3 generator: generators) + for (Function3 generator : generators) { PureModelContextData pureModelContextData = generator.value(item, context, version); builder.addPureModelContextData(pureModelContextData); diff --git a/legend-engine-xts-mastery/legend-engine-xt-mastery-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/mastery/extension/MasterRecordGenExtension.java b/legend-engine-xts-mastery/legend-engine-xt-mastery-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/mastery/extension/MasterRecordGenExtension.java index 94a59c108e1..ed10f6e898a 100644 --- a/legend-engine-xts-mastery/legend-engine-xt-mastery-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/mastery/extension/MasterRecordGenExtension.java +++ b/legend-engine-xts-mastery/legend-engine-xt-mastery-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/mastery/extension/MasterRecordGenExtension.java @@ -15,6 +15,7 @@ package org.finos.legend.engine.language.pure.dsl.mastery.extension; import org.eclipse.collections.api.block.function.Function3; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.language.pure.compiler.toPureGraph.CompileContext; import org.finos.legend.engine.language.pure.dsl.mastery.compiler.toPureGraph.HelperMasterRecordDefinitionBuilder; import org.finos.legend.engine.protocol.pure.v1.model.context.PureModelContextData; @@ -27,6 +28,12 @@ public class MasterRecordGenExtension implements IMasteryModelGenerationExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("PackageableElement", "Mastery"); + } + @Override public List> getPureModelContextDataGenerators() { diff --git a/legend-engine-xts-mastery/legend-engine-xt-mastery-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/mastery/grammar/from/MasteryParserExtension.java b/legend-engine-xts-mastery/legend-engine-xt-mastery-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/mastery/grammar/from/MasteryParserExtension.java index 0260d57cf4e..136ebc02720 100644 --- a/legend-engine-xts-mastery/legend-engine-xt-mastery-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/mastery/grammar/from/MasteryParserExtension.java +++ b/legend-engine-xts-mastery/legend-engine-xt-mastery-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/mastery/grammar/from/MasteryParserExtension.java @@ -18,6 +18,7 @@ import org.antlr.v4.runtime.CharStreams; import org.antlr.v4.runtime.CommonTokenStream; import org.eclipse.collections.api.factory.Sets; +import org.eclipse.collections.api.list.MutableList; import org.eclipse.collections.impl.factory.Lists; import org.eclipse.collections.impl.utility.ListIterate; import org.finos.legend.engine.language.pure.dsl.mastery.grammar.from.acquisition.AcquisitionProtocolParseTreeWalker; @@ -71,6 +72,12 @@ public class MasteryParserExtension implements IMasteryParserExtension private static final String MANUAL_TRIGGER = "Manual"; private static final String REST_ACQUISITION = "REST"; + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("PackageableElement", "Mastery"); + } + @Override public Iterable getExtraSectionParsers() { diff --git a/legend-engine-xts-mastery/legend-engine-xt-mastery-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/mastery/grammar/to/MasteryGrammarComposerExtension.java b/legend-engine-xts-mastery/legend-engine-xt-mastery-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/mastery/grammar/to/MasteryGrammarComposerExtension.java index 2304cc67292..756783d3c28 100644 --- a/legend-engine-xts-mastery/legend-engine-xt-mastery-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/mastery/grammar/to/MasteryGrammarComposerExtension.java +++ b/legend-engine-xts-mastery/legend-engine-xt-mastery-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/mastery/grammar/to/MasteryGrammarComposerExtension.java @@ -14,7 +14,6 @@ package org.finos.legend.engine.language.pure.dsl.mastery.grammar.to; -import org.eclipse.collections.api.block.function.Function; import org.eclipse.collections.api.block.function.Function2; import org.eclipse.collections.api.block.function.Function3; import org.eclipse.collections.api.list.MutableList; @@ -38,6 +37,12 @@ public class MasteryGrammarComposerExtension implements IMasteryComposerExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("PackageableElement", "Mastery"); + } + private MutableList> renderers = Lists.mutable.with((element, context) -> { if (element instanceof MasterRecordDefinition) diff --git a/legend-engine-xts-mastery/legend-engine-xt-mastery-protocol/pom.xml b/legend-engine-xts-mastery/legend-engine-xt-mastery-protocol/pom.xml index 6fbe98d64f9..e69dadc12cf 100644 --- a/legend-engine-xts-mastery/legend-engine-xt-mastery-protocol/pom.xml +++ b/legend-engine-xts-mastery/legend-engine-xt-mastery-protocol/pom.xml @@ -62,6 +62,10 @@ org.eclipse.collections eclipse-collections-api + + org.eclipse.collections + eclipse-collections + diff --git a/legend-engine-xts-mastery/legend-engine-xt-mastery-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/MasteryProtocolExtension.java b/legend-engine-xts-mastery/legend-engine-xt-mastery-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/MasteryProtocolExtension.java index 4e5fc0afaa7..e2d801837ae 100644 --- a/legend-engine-xts-mastery/legend-engine-xt-mastery-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/MasteryProtocolExtension.java +++ b/legend-engine-xts-mastery/legend-engine-xt-mastery-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/MasteryProtocolExtension.java @@ -17,6 +17,7 @@ import org.eclipse.collections.api.block.function.Function0; import org.eclipse.collections.api.factory.Lists; import org.eclipse.collections.api.factory.Maps; +import org.eclipse.collections.api.list.MutableList; import org.eclipse.collections.api.map.MutableMap; import org.finos.legend.engine.protocol.pure.v1.extension.ProtocolSubTypeInfo; import org.finos.legend.engine.protocol.pure.v1.extension.PureProtocolExtension; @@ -47,6 +48,12 @@ public class MasteryProtocolExtension implements PureProtocolExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("PackageableElement", "Mastery"); + } + @Override public List>>> getExtraProtocolSubTypeInfoCollectors() { diff --git a/legend-engine-xts-mongodb/legend-engine-xt-nonrelationalStore-mongodb-executionPlan/src/main/java/org/finos/legend/engine/plan/execution/stores/mongodb/MongoDBStoreExecutionExtension.java b/legend-engine-xts-mongodb/legend-engine-xt-nonrelationalStore-mongodb-executionPlan/src/main/java/org/finos/legend/engine/plan/execution/stores/mongodb/MongoDBStoreExecutionExtension.java index 76177b9d8c7..7be1556a969 100644 --- a/legend-engine-xts-mongodb/legend-engine-xt-nonrelationalStore-mongodb-executionPlan/src/main/java/org/finos/legend/engine/plan/execution/stores/mongodb/MongoDBStoreExecutionExtension.java +++ b/legend-engine-xts-mongodb/legend-engine-xt-nonrelationalStore-mongodb-executionPlan/src/main/java/org/finos/legend/engine/plan/execution/stores/mongodb/MongoDBStoreExecutionExtension.java @@ -29,6 +29,12 @@ public class MongoDBStoreExecutionExtension implements IMongoDBStoreExecutionExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Mongo"); + } + public List, ExecutionState, Result>> getExtraNodeExecutors() { return Collections.singletonList(((executionNode, profiles, executionState) -> diff --git a/legend-engine-xts-mongodb/legend-engine-xt-nonrelationalStore-mongodb-executionPlan/src/main/java/org/finos/legend/engine/plan/execution/stores/mongodb/compiler/MongoDBDocumentFormatJavaCompilerExtension.java b/legend-engine-xts-mongodb/legend-engine-xt-nonrelationalStore-mongodb-executionPlan/src/main/java/org/finos/legend/engine/plan/execution/stores/mongodb/compiler/MongoDBDocumentFormatJavaCompilerExtension.java index 85657c884de..b8dbb3b48c1 100644 --- a/legend-engine-xts-mongodb/legend-engine-xt-nonrelationalStore-mongodb-executionPlan/src/main/java/org/finos/legend/engine/plan/execution/stores/mongodb/compiler/MongoDBDocumentFormatJavaCompilerExtension.java +++ b/legend-engine-xts-mongodb/legend-engine-xt-nonrelationalStore-mongodb-executionPlan/src/main/java/org/finos/legend/engine/plan/execution/stores/mongodb/compiler/MongoDBDocumentFormatJavaCompilerExtension.java @@ -17,6 +17,7 @@ import com.mongodb.client.MongoCursor; import org.bson.Document; import org.bson.conversions.Bson; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.plan.execution.nodes.helpers.platform.ExecutionPlanJavaCompilerExtension; import org.finos.legend.engine.plan.execution.result.Result; import org.finos.legend.engine.plan.execution.stores.mongodb.result.MongoDBResult; @@ -43,6 +44,12 @@ public class MongoDBDocumentFormatJavaCompilerExtension implements ExecutionPlan DEPENDENCIES.put(PURE_PACKAGE + "_IMongoDocumentDeserializeExecutionNodeSpecifics", IMongoDocumentDeserializeExecutionNodeSpecifics.class); } + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Mongo"); + } + @Override public ClassPathFilter getExtraClassPathFilter() { diff --git a/legend-engine-xts-mongodb/legend-engine-xt-nonrelationalStore-mongodb-executionPlan/src/main/java/org/finos/legend/engine/plan/execution/stores/mongodb/plugin/MongoDBStoreExecutorBuilder.java b/legend-engine-xts-mongodb/legend-engine-xt-nonrelationalStore-mongodb-executionPlan/src/main/java/org/finos/legend/engine/plan/execution/stores/mongodb/plugin/MongoDBStoreExecutorBuilder.java index 4d2b45e0bc2..aee8535ad8d 100644 --- a/legend-engine-xts-mongodb/legend-engine-xt-nonrelationalStore-mongodb-executionPlan/src/main/java/org/finos/legend/engine/plan/execution/stores/mongodb/plugin/MongoDBStoreExecutorBuilder.java +++ b/legend-engine-xts-mongodb/legend-engine-xt-nonrelationalStore-mongodb-executionPlan/src/main/java/org/finos/legend/engine/plan/execution/stores/mongodb/plugin/MongoDBStoreExecutorBuilder.java @@ -14,6 +14,7 @@ package org.finos.legend.engine.plan.execution.stores.mongodb.plugin; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.plan.execution.stores.StoreExecutor; import org.finos.legend.engine.plan.execution.stores.StoreExecutorBuilder; import org.finos.legend.engine.plan.execution.stores.StoreExecutorConfiguration; @@ -21,6 +22,12 @@ public class MongoDBStoreExecutorBuilder implements StoreExecutorBuilder { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Mongo"); + } + @Override public StoreType getStoreType() { diff --git a/legend-engine-xts-mongodb/legend-engine-xt-nonrelationalStore-mongodb-executionPlan/src/main/java/org/finos/legend/engine/plan/execution/stores/mongodb/testsupport/MongoDBStoreTestConnectionFactory.java b/legend-engine-xts-mongodb/legend-engine-xt-nonrelationalStore-mongodb-executionPlan/src/main/java/org/finos/legend/engine/plan/execution/stores/mongodb/testsupport/MongoDBStoreTestConnectionFactory.java index 93f1e922821..ea9411a0b85 100644 --- a/legend-engine-xts-mongodb/legend-engine-xt-nonrelationalStore-mongodb-executionPlan/src/main/java/org/finos/legend/engine/plan/execution/stores/mongodb/testsupport/MongoDBStoreTestConnectionFactory.java +++ b/legend-engine-xts-mongodb/legend-engine-xt-nonrelationalStore-mongodb-executionPlan/src/main/java/org/finos/legend/engine/plan/execution/stores/mongodb/testsupport/MongoDBStoreTestConnectionFactory.java @@ -14,6 +14,7 @@ package org.finos.legend.engine.plan.execution.stores.mongodb.testsupport; +import org.eclipse.collections.api.list.MutableList; import org.eclipse.collections.api.tuple.Pair; import org.eclipse.collections.impl.factory.Lists; import org.eclipse.collections.impl.tuple.Tuples; @@ -34,6 +35,12 @@ public class MongoDBStoreTestConnectionFactory implements ConnectionFactoryExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Mongo"); + } + @Override public Optional>> tryBuildTestConnection(Connection sourceConnection, List data) { diff --git a/legend-engine-xts-mongodb/legend-engine-xt-nonrelationalStore-mongodb-grammar-integration/src/main/java/org/finos/legend/engine/language/pure/grammar/integration/MongoDBCompilerExtension.java b/legend-engine-xts-mongodb/legend-engine-xt-nonrelationalStore-mongodb-grammar-integration/src/main/java/org/finos/legend/engine/language/pure/grammar/integration/MongoDBCompilerExtension.java index 9ea72a9a142..977accc0efb 100644 --- a/legend-engine-xts-mongodb/legend-engine-xt-nonrelationalStore-mongodb-grammar-integration/src/main/java/org/finos/legend/engine/language/pure/grammar/integration/MongoDBCompilerExtension.java +++ b/legend-engine-xts-mongodb/legend-engine-xt-nonrelationalStore-mongodb-grammar-integration/src/main/java/org/finos/legend/engine/language/pure/grammar/integration/MongoDBCompilerExtension.java @@ -53,6 +53,12 @@ public class MongoDBCompilerExtension implements IMongoDBStoreCompilerExtension { private static final org.slf4j.Logger LOGGER = org.slf4j.LoggerFactory.getLogger(MongoDBCompilerExtension.class); + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Mongo"); + } + @Override public CompilerExtension build() { diff --git a/legend-engine-xts-mongodb/legend-engine-xt-nonrelationalStore-mongodb-grammar-integration/src/main/java/org/finos/legend/engine/language/pure/grammar/integration/MongoDBGrammarComposerExtension.java b/legend-engine-xts-mongodb/legend-engine-xt-nonrelationalStore-mongodb-grammar-integration/src/main/java/org/finos/legend/engine/language/pure/grammar/integration/MongoDBGrammarComposerExtension.java index 4e630d58818..0ff51d63c26 100644 --- a/legend-engine-xts-mongodb/legend-engine-xt-nonrelationalStore-mongodb-grammar-integration/src/main/java/org/finos/legend/engine/language/pure/grammar/integration/MongoDBGrammarComposerExtension.java +++ b/legend-engine-xts-mongodb/legend-engine-xt-nonrelationalStore-mongodb-grammar-integration/src/main/java/org/finos/legend/engine/language/pure/grammar/integration/MongoDBGrammarComposerExtension.java @@ -14,7 +14,6 @@ package org.finos.legend.engine.language.pure.grammar.integration; -import org.eclipse.collections.api.block.function.Function; import org.eclipse.collections.api.block.function.Function2; import org.eclipse.collections.api.block.function.Function3; import org.eclipse.collections.api.list.MutableList; @@ -43,6 +42,12 @@ public class MongoDBGrammarComposerExtension implements IMongoDBGrammarComposerExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Mongo"); + } + private MutableList> renderers = Lists.mutable.with((element, context) -> { if (element instanceof MongoDatabase) diff --git a/legend-engine-xts-mongodb/legend-engine-xt-nonrelationalStore-mongodb-grammar-integration/src/main/java/org/finos/legend/engine/language/pure/grammar/integration/MongoDBGrammarParserExtension.java b/legend-engine-xts-mongodb/legend-engine-xt-nonrelationalStore-mongodb-grammar-integration/src/main/java/org/finos/legend/engine/language/pure/grammar/integration/MongoDBGrammarParserExtension.java index d8f75bc711b..3958d3e04f1 100644 --- a/legend-engine-xts-mongodb/legend-engine-xt-nonrelationalStore-mongodb-grammar-integration/src/main/java/org/finos/legend/engine/language/pure/grammar/integration/MongoDBGrammarParserExtension.java +++ b/legend-engine-xts-mongodb/legend-engine-xt-nonrelationalStore-mongodb-grammar-integration/src/main/java/org/finos/legend/engine/language/pure/grammar/integration/MongoDBGrammarParserExtension.java @@ -18,6 +18,7 @@ import org.antlr.v4.runtime.CharStreams; import org.antlr.v4.runtime.CommonTokenStream; import org.antlr.v4.runtime.ParserRuleContext; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.language.pure.grammar.from.ParserErrorListener; import org.finos.legend.engine.language.pure.grammar.from.PureGrammarParserUtility; import org.finos.legend.engine.language.pure.grammar.from.SectionSourceCode; @@ -50,6 +51,12 @@ public class MongoDBGrammarParserExtension implements IMongoDBGrammarParserExten public static final String MONGO_DB_MAPPING_ELEMENT_TYPE = "MongoDB"; public static final String MONGO_DB_CONNECTION_TYPE = "MongoDBConnection"; + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Mongo"); + } + private static SourceCodeParserInfo getMongoDBParserInfo(SectionSourceCode sectionSourceCode) { CharStream input = CharStreams.fromString(sectionSourceCode.code); diff --git a/legend-engine-xts-mongodb/legend-engine-xt-nonrelationalStore-mongodb-javaPlatformBinding-pure/src/main/java/org/finos/legend/pure/code/core/MongoDBLegendPureCoreExtension.java b/legend-engine-xts-mongodb/legend-engine-xt-nonrelationalStore-mongodb-javaPlatformBinding-pure/src/main/java/org/finos/legend/pure/code/core/MongoDBLegendPureCoreExtension.java index 1da04266560..ace8bef72c8 100644 --- a/legend-engine-xts-mongodb/legend-engine-xt-nonrelationalStore-mongodb-javaPlatformBinding-pure/src/main/java/org/finos/legend/pure/code/core/MongoDBLegendPureCoreExtension.java +++ b/legend-engine-xts-mongodb/legend-engine-xt-nonrelationalStore-mongodb-javaPlatformBinding-pure/src/main/java/org/finos/legend/pure/code/core/MongoDBLegendPureCoreExtension.java @@ -14,6 +14,7 @@ package org.finos.legend.pure.code.core; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.pure.code.core.StoreLegendPureCoreExtension; public class MongoDBLegendPureCoreExtension implements StoreLegendPureCoreExtension @@ -29,4 +30,10 @@ public String functionSignature() { return "meta::external::store::mongodb::executionPlan::platformBinding::legendJava::mongoDBOnlyLegendJavaPlatformBindingExtensions__Extension_MANY_"; } + + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Mongo"); + } } \ No newline at end of file diff --git a/legend-engine-xts-mongodb/legend-engine-xt-nonrelationalStore-mongodb-protocol/pom.xml b/legend-engine-xts-mongodb/legend-engine-xt-nonrelationalStore-mongodb-protocol/pom.xml index f5d6b944189..bcadc3d0e4b 100644 --- a/legend-engine-xts-mongodb/legend-engine-xt-nonrelationalStore-mongodb-protocol/pom.xml +++ b/legend-engine-xts-mongodb/legend-engine-xt-nonrelationalStore-mongodb-protocol/pom.xml @@ -145,6 +145,10 @@ org.eclipse.collections eclipse-collections-api + + org.eclipse.collections + eclipse-collections + diff --git a/legend-engine-xts-mongodb/legend-engine-xt-nonrelationalStore-mongodb-protocol/src/main/java/org/finos/legend/engine/protocol/mongodb/schema/metamodel/MongoDBPureProtocolExtension.java b/legend-engine-xts-mongodb/legend-engine-xt-nonrelationalStore-mongodb-protocol/src/main/java/org/finos/legend/engine/protocol/mongodb/schema/metamodel/MongoDBPureProtocolExtension.java index c64b8ebc719..9b41a883e4b 100644 --- a/legend-engine-xts-mongodb/legend-engine-xt-nonrelationalStore-mongodb-protocol/src/main/java/org/finos/legend/engine/protocol/mongodb/schema/metamodel/MongoDBPureProtocolExtension.java +++ b/legend-engine-xts-mongodb/legend-engine-xt-nonrelationalStore-mongodb-protocol/src/main/java/org/finos/legend/engine/protocol/mongodb/schema/metamodel/MongoDBPureProtocolExtension.java @@ -17,6 +17,7 @@ import org.eclipse.collections.api.block.function.Function0; import org.eclipse.collections.api.factory.Lists; import org.eclipse.collections.api.factory.Maps; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.protocol.mongodb.schema.metamodel.pure.MongoDBConnection; import org.finos.legend.engine.protocol.mongodb.schema.metamodel.pure.MongoDBDocumentInternalizeExecutionNode; import org.finos.legend.engine.protocol.mongodb.schema.metamodel.pure.MongoDBExecutionNode; @@ -34,6 +35,12 @@ public class MongoDBPureProtocolExtension implements PureProtocolExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Mongo"); + } + @Override public List>>> getExtraProtocolSubTypeInfoCollectors() { diff --git a/legend-engine-xts-morphir/legend-engine-xt-morphir/src/main/java/org/finos/legend/engine/external/language/morphir/extension/MorphirGenerationExtension.java b/legend-engine-xts-morphir/legend-engine-xt-morphir/src/main/java/org/finos/legend/engine/external/language/morphir/extension/MorphirGenerationExtension.java index b57f5a00040..dcf4bfe0730 100644 --- a/legend-engine-xts-morphir/legend-engine-xt-morphir/src/main/java/org/finos/legend/engine/external/language/morphir/extension/MorphirGenerationExtension.java +++ b/legend-engine-xts-morphir/legend-engine-xt-morphir/src/main/java/org/finos/legend/engine/external/language/morphir/extension/MorphirGenerationExtension.java @@ -15,6 +15,7 @@ package org.finos.legend.engine.external.language.morphir.extension; import org.eclipse.collections.api.RichIterable; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.external.language.morphir.MorphirGenerationService; import org.finos.legend.engine.external.language.morphir.model.MorphirGenerationConfig; import org.finos.legend.engine.external.shared.format.extension.GenerationExtension; @@ -37,6 +38,12 @@ public class MorphirGenerationExtension implements GenerationExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Generation", "!!MoveToArtifact!!", "Morphir"); + } + @Override public String getLabel() { diff --git a/legend-engine-xts-openapi/legend-engine-xt-openapi-generation/src/main/java/org/finos/legend/engine/generation/OpenApiArtifactGenerationExtension.java b/legend-engine-xts-openapi/legend-engine-xt-openapi-generation/src/main/java/org/finos/legend/engine/generation/OpenApiArtifactGenerationExtension.java index 4ff2b8dfc90..521f98db8b3 100644 --- a/legend-engine-xts-openapi/legend-engine-xt-openapi-generation/src/main/java/org/finos/legend/engine/generation/OpenApiArtifactGenerationExtension.java +++ b/legend-engine-xts-openapi/legend-engine-xt-openapi-generation/src/main/java/org/finos/legend/engine/generation/OpenApiArtifactGenerationExtension.java @@ -15,6 +15,7 @@ package org.finos.legend.engine.generation; import org.eclipse.collections.api.RichIterable; +import org.eclipse.collections.api.list.MutableList; import org.eclipse.collections.impl.factory.Lists; import org.finos.legend.engine.language.pure.compiler.toPureGraph.PureModel; import org.finos.legend.engine.language.pure.dsl.generation.extension.Artifact; @@ -39,6 +40,12 @@ public class OpenApiArtifactGenerationExtension implements ArtifactGenerationExt private static final Logger LOGGER = org.slf4j.LoggerFactory.getLogger(OpenApiArtifactGenerationExtension.class); + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Generation", "Artifact", "OpenAPI"); + } + @Override public String getKey() { diff --git a/legend-engine-xts-persistence/legend-engine-xt-persistence-cloud-grammar/pom.xml b/legend-engine-xts-persistence/legend-engine-xt-persistence-cloud-grammar/pom.xml index 5127b4458e7..b1852c936c1 100644 --- a/legend-engine-xts-persistence/legend-engine-xt-persistence-cloud-grammar/pom.xml +++ b/legend-engine-xts-persistence/legend-engine-xt-persistence-cloud-grammar/pom.xml @@ -154,6 +154,10 @@ org.eclipse.collections eclipse-collections-api + + org.eclipse.collections + eclipse-collections + diff --git a/legend-engine-xts-persistence/legend-engine-xt-persistence-cloud-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/persistence/cloud/compiler/toPureGraph/PersistenceCloudCompilerExtension.java b/legend-engine-xts-persistence/legend-engine-xt-persistence-cloud-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/persistence/cloud/compiler/toPureGraph/PersistenceCloudCompilerExtension.java index 8be12510194..b5803e646bb 100644 --- a/legend-engine-xts-persistence/legend-engine-xt-persistence-cloud-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/persistence/cloud/compiler/toPureGraph/PersistenceCloudCompilerExtension.java +++ b/legend-engine-xts-persistence/legend-engine-xt-persistence-cloud-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/persistence/cloud/compiler/toPureGraph/PersistenceCloudCompilerExtension.java @@ -15,11 +15,11 @@ package org.finos.legend.engine.language.pure.dsl.persistence.cloud.compiler.toPureGraph; import org.eclipse.collections.api.block.function.Function2; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.language.pure.compiler.toPureGraph.CompileContext; import org.finos.legend.engine.language.pure.compiler.toPureGraph.extension.CompilerExtension; import org.finos.legend.engine.language.pure.compiler.toPureGraph.extension.Processor; import org.finos.legend.engine.language.pure.dsl.persistence.compiler.toPureGraph.IPersistenceCompilerExtension; -import org.finos.legend.engine.language.pure.dsl.persistence.compiler.toPureGraph.PersistenceCompilerExtension; import org.finos.legend.engine.language.pure.dsl.persistence.compiler.toPureGraph.ValidationContext; import org.finos.legend.engine.language.pure.dsl.persistence.compiler.validation.ValidationResult; import org.finos.legend.engine.language.pure.dsl.persistence.compiler.validation.ValidationRuleSet; @@ -32,6 +32,12 @@ public class PersistenceCloudCompilerExtension implements IPersistenceCompilerExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("PackageableElement", "Persistence", "Cloud"); + } + @Override public CompilerExtension build() { diff --git a/legend-engine-xts-persistence/legend-engine-xt-persistence-cloud-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/persistence/cloud/grammar/from/PersistenceCloudParserExtension.java b/legend-engine-xts-persistence/legend-engine-xt-persistence-cloud-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/persistence/cloud/grammar/from/PersistenceCloudParserExtension.java index 54dec9cb68f..db0770dc93b 100644 --- a/legend-engine-xts-persistence/legend-engine-xt-persistence-cloud-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/persistence/cloud/grammar/from/PersistenceCloudParserExtension.java +++ b/legend-engine-xts-persistence/legend-engine-xt-persistence-cloud-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/persistence/cloud/grammar/from/PersistenceCloudParserExtension.java @@ -17,6 +17,7 @@ import org.antlr.v4.runtime.CharStream; import org.antlr.v4.runtime.CharStreams; import org.antlr.v4.runtime.CommonTokenStream; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.language.pure.dsl.persistence.grammar.from.IPersistenceParserExtension; import org.finos.legend.engine.language.pure.dsl.persistence.grammar.from.context.PersistencePlatformSourceCode; import org.finos.legend.engine.language.pure.grammar.from.ParserErrorListener; @@ -34,6 +35,12 @@ public class PersistenceCloudParserExtension implements IPersistenceParserExtens { private static final String PERSISTENCE_PLATFORM_AWS_GLUE = "AwsGlue"; + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("PackageableElement", "Persistence", "Cloud"); + } + @Override public List> getExtraPersistencePlatformParsers() { diff --git a/legend-engine-xts-persistence/legend-engine-xt-persistence-cloud-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/persistence/cloud/grammar/to/PersistenceCloudComposerExtension.java b/legend-engine-xts-persistence/legend-engine-xt-persistence-cloud-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/persistence/cloud/grammar/to/PersistenceCloudComposerExtension.java index 461bf914dee..09122215326 100644 --- a/legend-engine-xts-persistence/legend-engine-xt-persistence-cloud-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/persistence/cloud/grammar/to/PersistenceCloudComposerExtension.java +++ b/legend-engine-xts-persistence/legend-engine-xt-persistence-cloud-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/persistence/cloud/grammar/to/PersistenceCloudComposerExtension.java @@ -15,6 +15,7 @@ package org.finos.legend.engine.language.pure.dsl.persistence.cloud.grammar.to; import org.eclipse.collections.api.block.function.Function3; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.language.pure.dsl.persistence.grammar.to.IPersistenceComposerExtension; import org.finos.legend.engine.language.pure.grammar.to.PureGrammarComposerContext; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.persistence.cloud.context.AwsGluePersistencePlatform; @@ -25,6 +26,12 @@ public class PersistenceCloudComposerExtension implements IPersistenceComposerExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("PackageableElement", "Persistence", "Cloud"); + } + @Override public List> getExtraPersistencePlatformComposers() { diff --git a/legend-engine-xts-persistence/legend-engine-xt-persistence-cloud-protocol/pom.xml b/legend-engine-xts-persistence/legend-engine-xt-persistence-cloud-protocol/pom.xml index cffae00f1ad..099aaabb18c 100644 --- a/legend-engine-xts-persistence/legend-engine-xt-persistence-cloud-protocol/pom.xml +++ b/legend-engine-xts-persistence/legend-engine-xt-persistence-cloud-protocol/pom.xml @@ -43,6 +43,10 @@ org.eclipse.collections eclipse-collections-api + + org.eclipse.collections + eclipse-collections + diff --git a/legend-engine-xts-persistence/legend-engine-xt-persistence-cloud-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/PersistenceCloudProtocolExtension.java b/legend-engine-xts-persistence/legend-engine-xt-persistence-cloud-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/PersistenceCloudProtocolExtension.java index 7c1988d5506..f5ff375ec9a 100644 --- a/legend-engine-xts-persistence/legend-engine-xt-persistence-cloud-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/PersistenceCloudProtocolExtension.java +++ b/legend-engine-xts-persistence/legend-engine-xt-persistence-cloud-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/PersistenceCloudProtocolExtension.java @@ -16,6 +16,7 @@ import org.eclipse.collections.api.block.function.Function0; import org.eclipse.collections.api.factory.Lists; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.protocol.pure.v1.extension.ProtocolSubTypeInfo; import org.finos.legend.engine.protocol.pure.v1.extension.PureProtocolExtension; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.persistence.cloud.context.AwsGluePersistencePlatform; @@ -25,6 +26,12 @@ public class PersistenceCloudProtocolExtension implements PureProtocolExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("PackageableElement", "Persistence", "Cloud"); + } + @Override public List>>> getExtraProtocolSubTypeInfoCollectors() { diff --git a/legend-engine-xts-persistence/legend-engine-xt-persistence-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/persistence/compiler/toPureGraph/PersistenceCompilerExtension.java b/legend-engine-xts-persistence/legend-engine-xt-persistence-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/persistence/compiler/toPureGraph/PersistenceCompilerExtension.java index 7a8586c5515..5b71bb41fd5 100644 --- a/legend-engine-xts-persistence/legend-engine-xt-persistence-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/persistence/compiler/toPureGraph/PersistenceCompilerExtension.java +++ b/legend-engine-xts-persistence/legend-engine-xt-persistence-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/persistence/compiler/toPureGraph/PersistenceCompilerExtension.java @@ -18,6 +18,7 @@ import org.eclipse.collections.api.block.function.Function2; import org.eclipse.collections.api.factory.Lists; import org.eclipse.collections.api.list.ListIterable; +import org.eclipse.collections.api.list.MutableList; import org.eclipse.collections.impl.utility.ListIterate; import org.finos.legend.engine.language.pure.compiler.toPureGraph.CompileContext; import org.finos.legend.engine.language.pure.compiler.toPureGraph.ProcessingContext; @@ -68,6 +69,12 @@ public class PersistenceCompilerExtension implements IPersistenceCompilerExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("PackageableElement", "Persistence"); + } + @Override public CompilerExtension build() { diff --git a/legend-engine-xts-persistence/legend-engine-xt-persistence-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/persistence/grammar/from/PersistenceParserExtension.java b/legend-engine-xts-persistence/legend-engine-xt-persistence-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/persistence/grammar/from/PersistenceParserExtension.java index a5802979499..c59b1a92f1f 100644 --- a/legend-engine-xts-persistence/legend-engine-xt-persistence-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/persistence/grammar/from/PersistenceParserExtension.java +++ b/legend-engine-xts-persistence/legend-engine-xt-persistence-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/persistence/grammar/from/PersistenceParserExtension.java @@ -17,6 +17,7 @@ import org.antlr.v4.runtime.CharStream; import org.antlr.v4.runtime.CharStreams; import org.antlr.v4.runtime.CommonTokenStream; +import org.eclipse.collections.api.list.MutableList; import org.eclipse.collections.impl.factory.Lists; import org.eclipse.collections.impl.utility.ListIterate; import org.finos.legend.engine.language.pure.dsl.persistence.grammar.from.context.PersistenceContextParseTreeWalker; @@ -49,6 +50,12 @@ public class PersistenceParserExtension implements IPersistenceParserExtension public static final String TRIGGER_MANUAL = "Manual"; public static final String TRIGGER_CRON = "Cron"; + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("PackageableElement", "Persistence"); + } + @Override public Iterable getExtraSectionParsers() { diff --git a/legend-engine-xts-persistence/legend-engine-xt-persistence-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/persistence/grammar/to/PersistenceComposerExtension.java b/legend-engine-xts-persistence/legend-engine-xt-persistence-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/persistence/grammar/to/PersistenceComposerExtension.java index 88e48368f26..4b70cca144a 100644 --- a/legend-engine-xts-persistence/legend-engine-xt-persistence-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/persistence/grammar/to/PersistenceComposerExtension.java +++ b/legend-engine-xts-persistence/legend-engine-xt-persistence-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/persistence/grammar/to/PersistenceComposerExtension.java @@ -14,7 +14,6 @@ package org.finos.legend.engine.language.pure.dsl.persistence.grammar.to; -import org.eclipse.collections.api.block.function.Function; import org.eclipse.collections.api.block.function.Function2; import org.eclipse.collections.api.block.function.Function3; import org.eclipse.collections.api.list.MutableList; @@ -38,6 +37,12 @@ public class PersistenceComposerExtension implements IPersistenceComposerExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("PackageableElement", "Persistence"); + } + private MutableList> renderers = Lists.mutable.with((element, context) -> { if (element instanceof Persistence) diff --git a/legend-engine-xts-persistence/legend-engine-xt-persistence-protocol/pom.xml b/legend-engine-xts-persistence/legend-engine-xt-persistence-protocol/pom.xml index 67d0a473664..7fae9d8338c 100644 --- a/legend-engine-xts-persistence/legend-engine-xt-persistence-protocol/pom.xml +++ b/legend-engine-xts-persistence/legend-engine-xt-persistence-protocol/pom.xml @@ -50,6 +50,10 @@ org.eclipse.collections eclipse-collections-api + + org.eclipse.collections + eclipse-collections + diff --git a/legend-engine-xts-persistence/legend-engine-xt-persistence-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/PersistenceProtocolExtension.java b/legend-engine-xts-persistence/legend-engine-xt-persistence-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/PersistenceProtocolExtension.java index 6e6df2208a9..931c1ab0497 100644 --- a/legend-engine-xts-persistence/legend-engine-xt-persistence-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/PersistenceProtocolExtension.java +++ b/legend-engine-xts-persistence/legend-engine-xt-persistence-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/PersistenceProtocolExtension.java @@ -17,6 +17,7 @@ import org.eclipse.collections.api.block.function.Function0; import org.eclipse.collections.api.factory.Lists; import org.eclipse.collections.api.factory.Maps; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.protocol.pure.v1.extension.ProtocolSubTypeInfo; import org.finos.legend.engine.protocol.pure.v1.extension.PureProtocolExtension; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.PackageableElement; @@ -38,6 +39,12 @@ public class PersistenceProtocolExtension implements PureProtocolExtension public static final String PERSISTENCE_CLASSIFIER_PATH = "meta::pure::persistence::metamodel::Persistence"; public static final String PERSISTENCE_CONTEXT_CLASSIFIER_PATH = "meta::pure::persistence::metamodel::PersistenceContext"; + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("PackageableElement", "Persistence"); + } + @Override public List>>> getExtraProtocolSubTypeInfoCollectors() { diff --git a/legend-engine-xts-persistence/legend-engine-xt-persistence-target-relational-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/persistence/relational/compiler/toPureGraph/PersistenceRelationalCompilerExtension.java b/legend-engine-xts-persistence/legend-engine-xt-persistence-target-relational-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/persistence/relational/compiler/toPureGraph/PersistenceRelationalCompilerExtension.java index 176072dd569..d22110ca9d4 100644 --- a/legend-engine-xts-persistence/legend-engine-xt-persistence-target-relational-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/persistence/relational/compiler/toPureGraph/PersistenceRelationalCompilerExtension.java +++ b/legend-engine-xts-persistence/legend-engine-xt-persistence-target-relational-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/persistence/relational/compiler/toPureGraph/PersistenceRelationalCompilerExtension.java @@ -15,6 +15,7 @@ package org.finos.legend.engine.language.pure.dsl.persistence.relational.compiler.toPureGraph; import org.eclipse.collections.api.block.function.Function2; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.language.pure.compiler.toPureGraph.CompileContext; import org.finos.legend.engine.language.pure.compiler.toPureGraph.extension.CompilerExtension; import org.finos.legend.engine.language.pure.compiler.toPureGraph.extension.Processor; @@ -28,6 +29,12 @@ public class PersistenceRelationalCompilerExtension implements IPersistenceCompilerExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("PackageableElement", "Persistence", "Relational"); + } + @Override public CompilerExtension build() { diff --git a/legend-engine-xts-persistence/legend-engine-xt-persistence-target-relational-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/persistence/relational/grammar/from/PersistenceRelationalParserExtension.java b/legend-engine-xts-persistence/legend-engine-xt-persistence-target-relational-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/persistence/relational/grammar/from/PersistenceRelationalParserExtension.java index 678be4f2fe8..b7bd9257312 100644 --- a/legend-engine-xts-persistence/legend-engine-xt-persistence-target-relational-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/persistence/relational/grammar/from/PersistenceRelationalParserExtension.java +++ b/legend-engine-xts-persistence/legend-engine-xt-persistence-target-relational-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/persistence/relational/grammar/from/PersistenceRelationalParserExtension.java @@ -17,6 +17,7 @@ import org.antlr.v4.runtime.CharStream; import org.antlr.v4.runtime.CharStreams; import org.antlr.v4.runtime.CommonTokenStream; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.language.pure.dsl.persistence.grammar.from.IPersistenceParserExtension; import org.finos.legend.engine.language.pure.dsl.persistence.grammar.from.PersistenceTargetSourceCode; import org.finos.legend.engine.language.pure.grammar.from.ParserErrorListener; @@ -34,6 +35,12 @@ public class PersistenceRelationalParserExtension implements IPersistenceParserE { private static final String PERSISTENCE_TARGET_RELATIONAL = "Relational"; + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("PackageableElement", "Persistence", "Relational"); + } + @Override public List> getExtraPersistenceTargetParsers() { diff --git a/legend-engine-xts-persistence/legend-engine-xt-persistence-target-relational-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/persistence/relational/grammar/to/PersistenceRelationalComposerExtension.java b/legend-engine-xts-persistence/legend-engine-xt-persistence-target-relational-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/persistence/relational/grammar/to/PersistenceRelationalComposerExtension.java index 9010f3958df..4774aed559a 100644 --- a/legend-engine-xts-persistence/legend-engine-xt-persistence-target-relational-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/persistence/relational/grammar/to/PersistenceRelationalComposerExtension.java +++ b/legend-engine-xts-persistence/legend-engine-xt-persistence-target-relational-grammar/src/main/java/org/finos/legend/engine/language/pure/dsl/persistence/relational/grammar/to/PersistenceRelationalComposerExtension.java @@ -15,6 +15,7 @@ package org.finos.legend.engine.language.pure.dsl.persistence.relational.grammar.to; import org.eclipse.collections.api.block.function.Function3; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.language.pure.dsl.persistence.grammar.to.IPersistenceComposerExtension; import org.finos.legend.engine.language.pure.grammar.to.PureGrammarComposerContext; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.persistence.relational.sink.RelationalPersistenceTarget; @@ -25,6 +26,11 @@ public class PersistenceRelationalComposerExtension implements IPersistenceComposerExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("PackageableElement", "Persistence", "Relational"); + } @Override public List> getExtraPersistenceTargetComposers() diff --git a/legend-engine-xts-persistence/legend-engine-xt-persistence-target-relational-protocol/pom.xml b/legend-engine-xts-persistence/legend-engine-xt-persistence-target-relational-protocol/pom.xml index 513f0996791..5675623ab63 100644 --- a/legend-engine-xts-persistence/legend-engine-xt-persistence-target-relational-protocol/pom.xml +++ b/legend-engine-xts-persistence/legend-engine-xt-persistence-target-relational-protocol/pom.xml @@ -54,6 +54,10 @@ org.eclipse.collections eclipse-collections-api + + org.eclipse.collections + eclipse-collections + diff --git a/legend-engine-xts-persistence/legend-engine-xt-persistence-target-relational-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/PersistenceRelationalProtocolExtension.java b/legend-engine-xts-persistence/legend-engine-xt-persistence-target-relational-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/PersistenceRelationalProtocolExtension.java index be42f0f2528..c774d8e7e18 100644 --- a/legend-engine-xts-persistence/legend-engine-xt-persistence-target-relational-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/PersistenceRelationalProtocolExtension.java +++ b/legend-engine-xts-persistence/legend-engine-xt-persistence-target-relational-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/PersistenceRelationalProtocolExtension.java @@ -16,6 +16,7 @@ import org.eclipse.collections.api.block.function.Function0; import org.eclipse.collections.api.factory.Lists; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.protocol.pure.v1.extension.ProtocolSubTypeInfo; import org.finos.legend.engine.protocol.pure.v1.extension.PureProtocolExtension; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.persistence.relational.sink.RelationalPersistenceTarget; @@ -25,6 +26,12 @@ public class PersistenceRelationalProtocolExtension implements PureProtocolExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("PackageableElement", "Persistence", "Relational"); + } + @Override public List>>> getExtraProtocolSubTypeInfoCollectors() { diff --git a/legend-engine-xts-persistence/legend-engine-xt-persistence-test-runner/src/main/java/org/finos/legend/engine/testable/persistence/extension/PersistenceTestableRunnerExtension.java b/legend-engine-xts-persistence/legend-engine-xt-persistence-test-runner/src/main/java/org/finos/legend/engine/testable/persistence/extension/PersistenceTestableRunnerExtension.java index 7808dc14731..d6bf2d46711 100644 --- a/legend-engine-xts-persistence/legend-engine-xt-persistence-test-runner/src/main/java/org/finos/legend/engine/testable/persistence/extension/PersistenceTestableRunnerExtension.java +++ b/legend-engine-xts-persistence/legend-engine-xt-persistence-test-runner/src/main/java/org/finos/legend/engine/testable/persistence/extension/PersistenceTestableRunnerExtension.java @@ -14,6 +14,7 @@ package org.finos.legend.engine.testable.persistence.extension; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.language.pure.compiler.toPureGraph.PureModel; import org.finos.legend.engine.protocol.pure.PureClientVersions; import org.finos.legend.engine.protocol.pure.v1.PersistenceProtocolExtension; @@ -30,6 +31,12 @@ public class PersistenceTestableRunnerExtension implements TestableRunnerExtensi { private String pureVersion = PureClientVersions.production; + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("PackageableElement", "Persistence"); + } + @Override public String getSupportedClassifierPath() { diff --git a/legend-engine-xts-protobuf/legend-engine-xt-protobuf/src/main/java/org/finos/legend/engine/external/format/protobuf/ProtobufFormatExtension.java b/legend-engine-xts-protobuf/legend-engine-xt-protobuf/src/main/java/org/finos/legend/engine/external/format/protobuf/ProtobufFormatExtension.java index a33437d8740..bec1d974cb9 100644 --- a/legend-engine-xts-protobuf/legend-engine-xt-protobuf/src/main/java/org/finos/legend/engine/external/format/protobuf/ProtobufFormatExtension.java +++ b/legend-engine-xts-protobuf/legend-engine-xt-protobuf/src/main/java/org/finos/legend/engine/external/format/protobuf/ProtobufFormatExtension.java @@ -14,6 +14,7 @@ package org.finos.legend.engine.external.format.protobuf; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.external.format.protobuf.fromModel.ModelToProtobufConfiguration; import org.finos.legend.engine.external.shared.format.model.compile.ExternalSchemaCompileContext; import org.finos.legend.engine.external.shared.format.model.transformation.fromModel.ExternalFormatSchemaGenerationExtension; @@ -36,6 +37,12 @@ public class ProtobufFormatExtension implements ExternalFormatSchemaGenerationEx private static final Root_meta_external_format_shared_ExternalFormatContract protobufContract = (Root_meta_external_format_shared_ExternalFormatContract) core_external_format_protobuf_externalFormatContract.Root_meta_external_format_protobuf_contract_protobufFormatContract__ExternalFormatContract_1_(PureModel.CORE_PURE_MODEL.getExecutionSupport()); public static final String TYPE = protobufContract._id(); + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("External_Format", "Protobuf"); + } + @Override public Root_meta_external_format_shared_ExternalFormatContract getExternalFormatContract() { diff --git a/legend-engine-xts-protobuf/legend-engine-xt-protobuf/src/main/java/org/finos/legend/engine/external/format/protobuf/deprecated/generation/ProtobufGenerationExtension.java b/legend-engine-xts-protobuf/legend-engine-xt-protobuf/src/main/java/org/finos/legend/engine/external/format/protobuf/deprecated/generation/ProtobufGenerationExtension.java index 77d7e1eedb7..da54680d1d4 100644 --- a/legend-engine-xts-protobuf/legend-engine-xt-protobuf/src/main/java/org/finos/legend/engine/external/format/protobuf/deprecated/generation/ProtobufGenerationExtension.java +++ b/legend-engine-xts-protobuf/legend-engine-xt-protobuf/src/main/java/org/finos/legend/engine/external/format/protobuf/deprecated/generation/ProtobufGenerationExtension.java @@ -15,6 +15,7 @@ package org.finos.legend.engine.external.format.protobuf.deprecated.generation; import org.eclipse.collections.api.RichIterable; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.external.format.protobuf.deprecated.generation.configuration.ProtobufGenerationConfig; import org.finos.legend.engine.external.format.protobuf.deprecated.generation.configuration.ProtobufGenerationConfigFromFileGenerationSpecificationBuilder; import org.finos.legend.engine.external.shared.format.extension.GenerationExtension; @@ -38,6 +39,18 @@ @Deprecated public class ProtobufGenerationExtension implements GenerationExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("External_Format", "Protobuf"); + } + + @Override + public String type() + { + return "Generation - To Delete?"; + } + @Override public String getLabel() { diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-execution/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/AthenaConnectionExtension.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-execution/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/AthenaConnectionExtension.java index f7c3e691376..5aad89fc1c8 100644 --- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-execution/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/AthenaConnectionExtension.java +++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-execution/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/AthenaConnectionExtension.java @@ -38,6 +38,18 @@ public class AthenaConnectionExtension implements RelationalConnectionExtension, StrategicConnectionExtension { + @Override + public String type() + { + return "MIX_ConnectionExtension_&_Strategic_Connection_Extension"; + } + + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Relational", "Athena"); + } + @Override public MutableList getAdditionalDatabaseManager() { diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-grammar/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/AthenaCompilerExtension.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-grammar/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/AthenaCompilerExtension.java index b981a2ac83a..29ea97cf457 100644 --- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-grammar/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/AthenaCompilerExtension.java +++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-grammar/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/AthenaCompilerExtension.java @@ -16,6 +16,7 @@ import org.eclipse.collections.api.block.function.Function2; import org.eclipse.collections.api.factory.Lists; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.language.pure.compiler.toPureGraph.extension.CompilerExtension; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.connection.authentication.AuthenticationStrategy; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.connection.specification.DatasourceSpecification; @@ -28,6 +29,12 @@ public class AthenaCompilerExtension implements IRelationalCompilerExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Relational", "Athena"); + } + @Override public List> getExtraAuthenticationStrategyProcessors() { diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/from/AthenaGrammarParserExtension.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/from/AthenaGrammarParserExtension.java index d382fc86d23..f8c4cafa977 100644 --- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/from/AthenaGrammarParserExtension.java +++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/from/AthenaGrammarParserExtension.java @@ -14,6 +14,7 @@ package org.finos.legend.engine.language.pure.grammar.from; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.language.pure.grammar.from.antlr4.connection.AthenaLexerGrammar; import org.finos.legend.engine.language.pure.grammar.from.antlr4.connection.AthenaParserGrammar; import org.finos.legend.engine.language.pure.grammar.from.authentication.AuthenticationStrategySourceCode; @@ -28,6 +29,12 @@ public class AthenaGrammarParserExtension implements IRelationalGrammarParserExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Relational", "Athena"); + } + @Override public List> getExtraAuthenticationStrategyParsers() { diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/to/AthenaGrammarComposerExtension.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/to/AthenaGrammarComposerExtension.java index f6240a8f19c..740ab4d3729 100644 --- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/to/AthenaGrammarComposerExtension.java +++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/to/AthenaGrammarComposerExtension.java @@ -15,6 +15,7 @@ package org.finos.legend.engine.language.pure.grammar.to; import org.eclipse.collections.api.block.function.Function2; +import org.eclipse.collections.api.list.MutableList; import org.eclipse.collections.impl.factory.Lists; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.connection.authentication.AuthenticationStrategy; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.connection.specification.DatasourceSpecification; @@ -27,6 +28,12 @@ public class AthenaGrammarComposerExtension implements IRelationalGrammarComposerExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Relational", "Athena"); + } + @Override public List> getExtraAuthenticationStrategyComposers() { diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/AthenaProtocolExtension.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/AthenaProtocolExtension.java index 2f76cbd67ba..cda2639a2ab 100644 --- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/AthenaProtocolExtension.java +++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/AthenaProtocolExtension.java @@ -15,6 +15,7 @@ package org.finos.legend.engine.protocol.pure.v1; import org.eclipse.collections.api.block.function.Function0; +import org.eclipse.collections.api.list.MutableList; import org.eclipse.collections.impl.factory.Lists; import org.finos.legend.engine.protocol.pure.v1.extension.ProtocolSubTypeInfo; import org.finos.legend.engine.protocol.pure.v1.extension.PureProtocolExtension; @@ -26,6 +27,12 @@ public class AthenaProtocolExtension implements PureProtocolExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Relational", "Athena"); + } + @Override public List>>> getExtraProtocolSubTypeInfoCollectors() { diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-bigquery/legend-engine-xt-relationalStore-bigquery-execution/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/BigQueryConnectionExtension.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-bigquery/legend-engine-xt-relationalStore-bigquery-execution/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/BigQueryConnectionExtension.java index 6df4220c234..78507729124 100644 --- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-bigquery/legend-engine-xt-relationalStore-bigquery-execution/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/BigQueryConnectionExtension.java +++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-bigquery/legend-engine-xt-relationalStore-bigquery-execution/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/BigQueryConnectionExtension.java @@ -40,6 +40,18 @@ public class BigQueryConnectionExtension implements RelationalConnectionExtension, StrategicConnectionExtension { + @Override + public String type() + { + return "MIX_ConnectionExtension_&_Strategic_Connection_Extension"; + } + + @Override + public MutableList group() + { + return Lists.mutable.with("Store", "Relational", "BigQuery"); + } + @Override public MutableList getAdditionalDatabaseManager() { diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-bigquery/legend-engine-xt-relationalStore-bigquery-grammar/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/BigQueryCompilerExtension.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-bigquery/legend-engine-xt-relationalStore-bigquery-grammar/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/BigQueryCompilerExtension.java index a78c59c9649..0da8ca7419b 100644 --- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-bigquery/legend-engine-xt-relationalStore-bigquery-grammar/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/BigQueryCompilerExtension.java +++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-bigquery/legend-engine-xt-relationalStore-bigquery-grammar/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/BigQueryCompilerExtension.java @@ -16,6 +16,7 @@ import org.eclipse.collections.api.block.function.Function2; import org.eclipse.collections.api.factory.Lists; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.language.pure.compiler.toPureGraph.extension.CompilerExtension; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.connection.DatabaseType; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.connection.authentication.GCPApplicationDefaultCredentialsAuthenticationStrategy; @@ -31,6 +32,12 @@ public class BigQueryCompilerExtension implements IRelationalCompilerExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Relational", "BigQuery"); + } + @Override public List> getExtraDataSourceSpecificationProcessors() { diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-bigquery/legend-engine-xt-relationalStore-bigquery-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/from/BigQueryGrammarParserExtension.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-bigquery/legend-engine-xt-relationalStore-bigquery-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/from/BigQueryGrammarParserExtension.java index cc2539c00f8..2cf3d95587e 100644 --- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-bigquery/legend-engine-xt-relationalStore-bigquery-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/from/BigQueryGrammarParserExtension.java +++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-bigquery/legend-engine-xt-relationalStore-bigquery-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/from/BigQueryGrammarParserExtension.java @@ -14,6 +14,7 @@ package org.finos.legend.engine.language.pure.grammar.from; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.language.pure.grammar.from.antlr4.connection.BigQueryLexerGrammar; import org.finos.legend.engine.language.pure.grammar.from.antlr4.connection.BigQueryParserGrammar; import org.finos.legend.engine.language.pure.grammar.from.datasource.DataSourceSpecificationSourceCode; @@ -27,6 +28,12 @@ public class BigQueryGrammarParserExtension implements IRelationalGrammarParserExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Relational", "BigQuery"); + } + @Override public List> getExtraDataSourceSpecificationParsers() { diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-bigquery/legend-engine-xt-relationalStore-bigquery-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/to/BigQueryGrammarComposerExtension.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-bigquery/legend-engine-xt-relationalStore-bigquery-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/to/BigQueryGrammarComposerExtension.java index a3c74a76cd7..5f88940804b 100644 --- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-bigquery/legend-engine-xt-relationalStore-bigquery-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/to/BigQueryGrammarComposerExtension.java +++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-bigquery/legend-engine-xt-relationalStore-bigquery-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/to/BigQueryGrammarComposerExtension.java @@ -15,6 +15,7 @@ package org.finos.legend.engine.language.pure.grammar.to; import org.eclipse.collections.api.block.function.Function2; +import org.eclipse.collections.api.list.MutableList; import org.eclipse.collections.impl.factory.Lists; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.connection.specification.BigQueryDatasourceSpecification; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.connection.specification.DatasourceSpecification; @@ -26,6 +27,12 @@ public class BigQueryGrammarComposerExtension implements IRelationalGrammarComposerExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Relational", "BigQuery"); + } + @Override public List> getExtraDataSourceSpecificationComposers() { diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-bigquery/legend-engine-xt-relationalStore-bigquery-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/BigQueryProtocolExtension.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-bigquery/legend-engine-xt-relationalStore-bigquery-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/BigQueryProtocolExtension.java index 65de7a3d803..c098625daf0 100644 --- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-bigquery/legend-engine-xt-relationalStore-bigquery-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/BigQueryProtocolExtension.java +++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-bigquery/legend-engine-xt-relationalStore-bigquery-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/BigQueryProtocolExtension.java @@ -15,6 +15,7 @@ package org.finos.legend.engine.protocol.pure.v1; import org.eclipse.collections.api.block.function.Function0; +import org.eclipse.collections.api.list.MutableList; import org.eclipse.collections.impl.factory.Lists; import org.finos.legend.engine.protocol.pure.v1.extension.ProtocolSubTypeInfo; import org.finos.legend.engine.protocol.pure.v1.extension.PureProtocolExtension; @@ -25,6 +26,12 @@ public class BigQueryProtocolExtension implements PureProtocolExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Relational", "BigQuery"); + } + @Override public List>>> getExtraProtocolSubTypeInfoCollectors() { diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-databricks/legend-engine-xt-relationalStore-databricks-execution/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/DatabricksConnectionExtension.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-databricks/legend-engine-xt-relationalStore-databricks-execution/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/DatabricksConnectionExtension.java index cbd36255d95..c1e2c92db99 100644 --- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-databricks/legend-engine-xt-relationalStore-databricks-execution/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/DatabricksConnectionExtension.java +++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-databricks/legend-engine-xt-relationalStore-databricks-execution/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/DatabricksConnectionExtension.java @@ -40,6 +40,18 @@ public class DatabricksConnectionExtension implements RelationalConnectionExtension, StrategicConnectionExtension { + @Override + public String type() + { + return "MIX_ConnectionExtension_&_Strategic_Connection_Extension"; + } + + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Relational", "Databricks"); + } + @Override public MutableList getAdditionalDatabaseManager() { diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-databricks/legend-engine-xt-relationalStore-databricks-grammar/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/DatabricksCompilerExtension.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-databricks/legend-engine-xt-relationalStore-databricks-grammar/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/DatabricksCompilerExtension.java index 116aa64f637..5568793757b 100644 --- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-databricks/legend-engine-xt-relationalStore-databricks-grammar/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/DatabricksCompilerExtension.java +++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-databricks/legend-engine-xt-relationalStore-databricks-grammar/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/DatabricksCompilerExtension.java @@ -16,6 +16,7 @@ import org.eclipse.collections.api.block.function.Function2; import org.eclipse.collections.api.factory.Lists; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.language.pure.compiler.toPureGraph.extension.CompilerExtension; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.connection.DatabaseType; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.connection.authentication.ApiTokenAuthenticationStrategy; @@ -32,6 +33,12 @@ public class DatabricksCompilerExtension implements IRelationalCompilerExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Relational", "Databricks"); + } + @Override public List> getExtraAuthenticationStrategyProcessors() { diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-databricks/legend-engine-xt-relationalStore-databricks-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/from/DatabricksGrammarParserExtension.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-databricks/legend-engine-xt-relationalStore-databricks-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/from/DatabricksGrammarParserExtension.java index 46e545631e9..e1d6d21e40f 100644 --- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-databricks/legend-engine-xt-relationalStore-databricks-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/from/DatabricksGrammarParserExtension.java +++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-databricks/legend-engine-xt-relationalStore-databricks-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/from/DatabricksGrammarParserExtension.java @@ -14,6 +14,7 @@ package org.finos.legend.engine.language.pure.grammar.from; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.language.pure.grammar.from.antlr4.connection.DatabricksLexerGrammar; import org.finos.legend.engine.language.pure.grammar.from.antlr4.connection.DatabricksParserGrammar; import org.finos.legend.engine.language.pure.grammar.from.authentication.AuthenticationStrategySourceCode; @@ -28,6 +29,12 @@ public class DatabricksGrammarParserExtension implements IRelationalGrammarParserExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Relational", "Databricks"); + } + @Override public List> getExtraAuthenticationStrategyParsers() { diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-databricks/legend-engine-xt-relationalStore-databricks-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/to/DatabricksGrammarComposerExtension.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-databricks/legend-engine-xt-relationalStore-databricks-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/to/DatabricksGrammarComposerExtension.java index d6b388926e1..e6215ed18b5 100644 --- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-databricks/legend-engine-xt-relationalStore-databricks-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/to/DatabricksGrammarComposerExtension.java +++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-databricks/legend-engine-xt-relationalStore-databricks-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/to/DatabricksGrammarComposerExtension.java @@ -15,6 +15,7 @@ package org.finos.legend.engine.language.pure.grammar.to; import org.eclipse.collections.api.block.function.Function2; +import org.eclipse.collections.api.list.MutableList; import org.eclipse.collections.impl.factory.Lists; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.connection.authentication.AuthenticationStrategy; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.connection.specification.DatabricksDatasourceSpecification; @@ -27,6 +28,12 @@ public class DatabricksGrammarComposerExtension implements IRelationalGrammarComposerExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Relational", "Databricks"); + } + @Override public List> getExtraAuthenticationStrategyComposers() { diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-databricks/legend-engine-xt-relationalStore-databricks-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/DatabricksProtocolExtension.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-databricks/legend-engine-xt-relationalStore-databricks-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/DatabricksProtocolExtension.java index 19ab4c02d78..c17776de034 100644 --- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-databricks/legend-engine-xt-relationalStore-databricks-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/DatabricksProtocolExtension.java +++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-databricks/legend-engine-xt-relationalStore-databricks-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/DatabricksProtocolExtension.java @@ -15,6 +15,7 @@ package org.finos.legend.engine.protocol.pure.v1; import org.eclipse.collections.api.block.function.Function0; +import org.eclipse.collections.api.list.MutableList; import org.eclipse.collections.impl.factory.Lists; import org.finos.legend.engine.protocol.pure.v1.extension.ProtocolSubTypeInfo; import org.finos.legend.engine.protocol.pure.v1.extension.PureProtocolExtension; @@ -25,6 +26,12 @@ public class DatabricksProtocolExtension implements PureProtocolExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Relational", "Databricks"); + } + @Override public List>>> getExtraProtocolSubTypeInfoCollectors() { diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-memsql/legend-engine-xt-relationalStore-memsql-execution-tests/pom.xml b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-memsql/legend-engine-xt-relationalStore-memsql-execution-tests/pom.xml index 62b4b855e19..a10adbf5e62 100644 --- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-memsql/legend-engine-xt-relationalStore-memsql-execution-tests/pom.xml +++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-memsql/legend-engine-xt-relationalStore-memsql-execution-tests/pom.xml @@ -75,10 +75,6 @@ org.testcontainers jdbc - - org.eclipse.collections - eclipse-collections-api - junit junit @@ -88,6 +84,16 @@ jackson-databind + + org.eclipse.collections + eclipse-collections + + + org.eclipse.collections + eclipse-collections-api + + + org.finos.legend.pure diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-memsql/legend-engine-xt-relationalStore-memsql-execution-tests/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/connection/tests/api/dynamicTestConnections/MemSQLTestContainer.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-memsql/legend-engine-xt-relationalStore-memsql-execution-tests/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/connection/tests/api/dynamicTestConnections/MemSQLTestContainer.java index a5b0c09f0c6..73d46b97635 100644 --- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-memsql/legend-engine-xt-relationalStore-memsql-execution-tests/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/connection/tests/api/dynamicTestConnections/MemSQLTestContainer.java +++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-memsql/legend-engine-xt-relationalStore-memsql-execution-tests/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/connection/tests/api/dynamicTestConnections/MemSQLTestContainer.java @@ -14,6 +14,7 @@ package org.finos.legend.engine.plan.execution.stores.relational.connection.tests.api.dynamicTestConnections; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.plan.execution.stores.relational.connection.memsql.test.MemSQLContainerWrapper; import org.finos.legend.engine.plan.execution.stores.relational.connection.tests.api.DynamicTestConnection; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.connection.DatabaseType; @@ -37,6 +38,12 @@ public class MemSQLTestContainer implements DynamicTestConnection private final MemSQLContainerWrapper memSQLContainerWrapper = MemSQLContainerWrapper.build("SINGLESTORE_INTEGRATION_LICENSE_KEY"); private TestVaultImplementation vault; + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Relational", "MemSQL"); + } + @Override public DatabaseType getDatabaseType() { @@ -59,8 +66,8 @@ public void setup() } this.vault = new TestVaultImplementation() - .withValue(USERNAME_REFERENCE, this.memSQLContainerWrapper.getUser()) - .withValue(PASSWORD_REFERENCE, this.memSQLContainerWrapper.getPassword()); + .withValue(USERNAME_REFERENCE, this.memSQLContainerWrapper.getUser()) + .withValue(PASSWORD_REFERENCE, this.memSQLContainerWrapper.getPassword()); Vault.INSTANCE.registerImplementation(this.vault); } diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-memsql/legend-engine-xt-relationalStore-memsql-execution/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/MemSQLConnectionExtension.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-memsql/legend-engine-xt-relationalStore-memsql-execution/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/MemSQLConnectionExtension.java index 79b394a3764..a6d64088ce5 100644 --- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-memsql/legend-engine-xt-relationalStore-memsql-execution/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/MemSQLConnectionExtension.java +++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-memsql/legend-engine-xt-relationalStore-memsql-execution/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/MemSQLConnectionExtension.java @@ -23,6 +23,18 @@ public class MemSQLConnectionExtension implements RelationalConnectionExtension { + @Override + public String type() + { + return "(Connection)ConnectionExtension"; + } + + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Relational", "MemSQL"); + } + @Override public MutableList getAdditionalDatabaseManager() { diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-postgres/legend-engine-xt-relationalStore-postgres-execution-tests/src/test/java/org/finos/legend/engine/plan/execution/stores/relational/connection/tests/api/dynamicTestConnections/PostgresTestContainers.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-postgres/legend-engine-xt-relationalStore-postgres-execution-tests/src/test/java/org/finos/legend/engine/plan/execution/stores/relational/connection/tests/api/dynamicTestConnections/PostgresTestContainers.java index c10216b732b..4e13b150da1 100644 --- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-postgres/legend-engine-xt-relationalStore-postgres-execution-tests/src/test/java/org/finos/legend/engine/plan/execution/stores/relational/connection/tests/api/dynamicTestConnections/PostgresTestContainers.java +++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-postgres/legend-engine-xt-relationalStore-postgres-execution-tests/src/test/java/org/finos/legend/engine/plan/execution/stores/relational/connection/tests/api/dynamicTestConnections/PostgresTestContainers.java @@ -14,6 +14,7 @@ package org.finos.legend.engine.plan.execution.stores.relational.connection.tests.api.dynamicTestConnections; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.plan.execution.stores.relational.connection.tests.api.DynamicTestConnection; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.connection.DatabaseType; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.connection.RelationalDatabaseConnection; @@ -28,6 +29,12 @@ public class PostgresTestContainers implements DynamicTestConnection { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Relational", "Postgres"); + } + @Override public DatabaseType getDatabaseType() { diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-postgres/legend-engine-xt-relationalStore-postgres-execution/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/PostgresConnectionExtension.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-postgres/legend-engine-xt-relationalStore-postgres-execution/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/PostgresConnectionExtension.java index 7a74f1c6bf4..b98c4ee15e0 100644 --- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-postgres/legend-engine-xt-relationalStore-postgres-execution/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/PostgresConnectionExtension.java +++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-postgres/legend-engine-xt-relationalStore-postgres-execution/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/PostgresConnectionExtension.java @@ -23,6 +23,18 @@ public class PostgresConnectionExtension implements RelationalConnectionExtension { + @Override + public String type() + { + return "(Connection)ConnectionExtension"; + } + + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Relational", "Postgres"); + } + @Override public MutableList getAdditionalDatabaseManager() { diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-redshift/legend-engine-xt-relationalStore-redshift-execution/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/RedshiftConnectionExtension.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-redshift/legend-engine-xt-relationalStore-redshift-execution/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/RedshiftConnectionExtension.java index 86e3026cd12..7e4178c339e 100644 --- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-redshift/legend-engine-xt-relationalStore-redshift-execution/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/RedshiftConnectionExtension.java +++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-redshift/legend-engine-xt-relationalStore-redshift-execution/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/RedshiftConnectionExtension.java @@ -40,6 +40,18 @@ public class RedshiftConnectionExtension implements RelationalConnectionExtension, StrategicConnectionExtension { + @Override + public String type() + { + return "MIX_ConnectionExtension_&_Strategic_Connection_Extension"; + } + + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Relational", "Redshift"); + } + @Override public MutableList getAdditionalDatabaseManager() { diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-redshift/legend-engine-xt-relationalStore-redshift-grammar/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/RedshiftCompilerExtension.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-redshift/legend-engine-xt-relationalStore-redshift-grammar/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/RedshiftCompilerExtension.java index 011062c8e02..e0366765971 100644 --- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-redshift/legend-engine-xt-relationalStore-redshift-grammar/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/RedshiftCompilerExtension.java +++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-redshift/legend-engine-xt-relationalStore-redshift-grammar/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/RedshiftCompilerExtension.java @@ -16,6 +16,7 @@ import org.eclipse.collections.api.block.function.Function2; import org.eclipse.collections.api.factory.Lists; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.language.pure.compiler.toPureGraph.extension.CompilerExtension; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.connection.DatabaseType; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.connection.authentication.AuthenticationStrategy; @@ -32,6 +33,12 @@ public class RedshiftCompilerExtension implements IRelationalCompilerExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Relational", "Redshift"); + } + @Override public List> getExtraAuthenticationStrategyProcessors() { diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-redshift/legend-engine-xt-relationalStore-redshift-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/from/RedshiftGrammarParserExtension.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-redshift/legend-engine-xt-relationalStore-redshift-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/from/RedshiftGrammarParserExtension.java index ff1dbc56e7c..7d1276e9aa8 100644 --- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-redshift/legend-engine-xt-relationalStore-redshift-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/from/RedshiftGrammarParserExtension.java +++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-redshift/legend-engine-xt-relationalStore-redshift-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/from/RedshiftGrammarParserExtension.java @@ -14,6 +14,7 @@ package org.finos.legend.engine.language.pure.grammar.from; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.language.pure.grammar.from.antlr4.connection.RedshiftLexerGrammar; import org.finos.legend.engine.language.pure.grammar.from.antlr4.connection.RedshiftParserGrammar; import org.finos.legend.engine.language.pure.grammar.from.authentication.AuthenticationStrategySourceCode; @@ -28,6 +29,12 @@ public class RedshiftGrammarParserExtension implements IRelationalGrammarParserExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Relational", "Redshift"); + } + @Override public List> getExtraAuthenticationStrategyParsers() { diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-redshift/legend-engine-xt-relationalStore-redshift-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/to/RedshiftGrammarComposerExtension.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-redshift/legend-engine-xt-relationalStore-redshift-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/to/RedshiftGrammarComposerExtension.java index 40aa20ada62..3c863367741 100644 --- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-redshift/legend-engine-xt-relationalStore-redshift-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/to/RedshiftGrammarComposerExtension.java +++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-redshift/legend-engine-xt-relationalStore-redshift-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/to/RedshiftGrammarComposerExtension.java @@ -15,6 +15,7 @@ package org.finos.legend.engine.language.pure.grammar.to; import org.eclipse.collections.api.block.function.Function2; +import org.eclipse.collections.api.list.MutableList; import org.eclipse.collections.impl.factory.Lists; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.connection.authentication.AuthenticationStrategy; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.connection.specification.DatasourceSpecification; @@ -27,6 +28,12 @@ public class RedshiftGrammarComposerExtension implements IRelationalGrammarComposerExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Relational", "Redshift"); + } + @Override public List> getExtraAuthenticationStrategyComposers() { diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-redshift/legend-engine-xt-relationalStore-redshift-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/RedshiftProtocolExtension.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-redshift/legend-engine-xt-relationalStore-redshift-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/RedshiftProtocolExtension.java index b9d64ec8a30..94b429cb6de 100644 --- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-redshift/legend-engine-xt-relationalStore-redshift-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/RedshiftProtocolExtension.java +++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-redshift/legend-engine-xt-relationalStore-redshift-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/RedshiftProtocolExtension.java @@ -15,6 +15,7 @@ package org.finos.legend.engine.protocol.pure.v1; import org.eclipse.collections.api.block.function.Function0; +import org.eclipse.collections.api.list.MutableList; import org.eclipse.collections.impl.factory.Lists; import org.finos.legend.engine.protocol.pure.v1.extension.ProtocolSubTypeInfo; import org.finos.legend.engine.protocol.pure.v1.extension.PureProtocolExtension; @@ -25,6 +26,12 @@ public class RedshiftProtocolExtension implements PureProtocolExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Relational", "Redshift"); + } + @Override public List>>> getExtraProtocolSubTypeInfoCollectors() { diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-snowflake/legend-engine-xt-relationalStore-snowflake-execution/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/SnowflakeConnectionExtension.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-snowflake/legend-engine-xt-relationalStore-snowflake-execution/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/SnowflakeConnectionExtension.java index 25c0d595fc9..fc7e25a8619 100644 --- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-snowflake/legend-engine-xt-relationalStore-snowflake-execution/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/SnowflakeConnectionExtension.java +++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-snowflake/legend-engine-xt-relationalStore-snowflake-execution/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/SnowflakeConnectionExtension.java @@ -59,6 +59,18 @@ public class SnowflakeConnectionExtension implements RelationalConnectionExtension, StrategicConnectionExtension { + @Override + public String type() + { + return "MIX_ConnectionExtension_&_Strategic_Connection_Extension"; + } + + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Relational", "Snowflake"); + } + @Override public MutableList getAdditionalDatabaseManager() { diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-snowflake/legend-engine-xt-relationalStore-snowflake-grammar/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/SnowflakeCompilerExtension.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-snowflake/legend-engine-xt-relationalStore-snowflake-grammar/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/SnowflakeCompilerExtension.java index 097b8520902..f3becb4cb38 100644 --- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-snowflake/legend-engine-xt-relationalStore-snowflake-grammar/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/SnowflakeCompilerExtension.java +++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-snowflake/legend-engine-xt-relationalStore-snowflake-grammar/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/SnowflakeCompilerExtension.java @@ -18,6 +18,7 @@ import org.eclipse.collections.api.block.function.Function2; import org.eclipse.collections.api.factory.Lists; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.language.pure.compiler.toPureGraph.extension.CompilerExtension; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.connection.DatabaseType; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.connection.authentication.AuthenticationStrategy; @@ -35,6 +36,12 @@ public class SnowflakeCompilerExtension implements IRelationalCompilerExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Relational", "Snowflake"); + } + @Override public List> getExtraAuthenticationStrategyProcessors() { diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-snowflake/legend-engine-xt-relationalStore-snowflake-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/from/SnowflakeGrammarParserExtension.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-snowflake/legend-engine-xt-relationalStore-snowflake-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/from/SnowflakeGrammarParserExtension.java index 9e4569cd2ef..b863a5aaa6f 100644 --- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-snowflake/legend-engine-xt-relationalStore-snowflake-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/from/SnowflakeGrammarParserExtension.java +++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-snowflake/legend-engine-xt-relationalStore-snowflake-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/from/SnowflakeGrammarParserExtension.java @@ -14,6 +14,7 @@ package org.finos.legend.engine.language.pure.grammar.from; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.language.pure.grammar.from.antlr4.connection.SnowflakeLexerGrammar; import org.finos.legend.engine.language.pure.grammar.from.antlr4.connection.SnowflakeParserGrammar; import org.finos.legend.engine.language.pure.grammar.from.authentication.AuthenticationStrategySourceCode; @@ -32,6 +33,12 @@ public class SnowflakeGrammarParserExtension implements IRelationalGrammarParserExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Relational", "Snowflake"); + } + private String normalizeName(String elementName, String localPrefix) { String normalized = elementName.replaceAll("::", "-"); diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-snowflake/legend-engine-xt-relationalStore-snowflake-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/to/SnowflakeGrammarComposerExtension.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-snowflake/legend-engine-xt-relationalStore-snowflake-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/to/SnowflakeGrammarComposerExtension.java index 18519fecc7a..d7cc5a0612e 100644 --- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-snowflake/legend-engine-xt-relationalStore-snowflake-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/to/SnowflakeGrammarComposerExtension.java +++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-snowflake/legend-engine-xt-relationalStore-snowflake-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/to/SnowflakeGrammarComposerExtension.java @@ -15,6 +15,7 @@ package org.finos.legend.engine.language.pure.grammar.to; import org.eclipse.collections.api.block.function.Function2; +import org.eclipse.collections.api.list.MutableList; import org.eclipse.collections.impl.factory.Lists; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.connection.authentication.AuthenticationStrategy; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.connection.authentication.SnowflakePublicAuthenticationStrategy; @@ -28,6 +29,11 @@ public class SnowflakeGrammarComposerExtension implements IRelationalGrammarComposerExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Relational", "Snowflake"); + } @Override public List> getExtraAuthenticationStrategyComposers() diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-snowflake/legend-engine-xt-relationalStore-snowflake-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/SnowflakeProtocolExtension.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-snowflake/legend-engine-xt-relationalStore-snowflake-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/SnowflakeProtocolExtension.java index efea2531c61..2b869f4ba76 100644 --- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-snowflake/legend-engine-xt-relationalStore-snowflake-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/SnowflakeProtocolExtension.java +++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-snowflake/legend-engine-xt-relationalStore-snowflake-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/SnowflakeProtocolExtension.java @@ -15,6 +15,7 @@ package org.finos.legend.engine.protocol.pure.v1; import org.eclipse.collections.api.block.function.Function0; +import org.eclipse.collections.api.list.MutableList; import org.eclipse.collections.impl.factory.Lists; import org.finos.legend.engine.protocol.pure.v1.extension.ProtocolSubTypeInfo; import org.finos.legend.engine.protocol.pure.v1.extension.PureProtocolExtension; @@ -27,6 +28,12 @@ public class SnowflakeProtocolExtension implements PureProtocolExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Relational", "Snowflake"); + } + @Override public List>>> getExtraProtocolSubTypeInfoCollectors() { diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-spanner/legend-engine-xt-relationalStore-spanner-execution/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/connection/spanner/extensions/SpannerConnectionExtension.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-spanner/legend-engine-xt-relationalStore-spanner-execution/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/connection/spanner/extensions/SpannerConnectionExtension.java index 4aa2131e2e7..688547520b2 100644 --- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-spanner/legend-engine-xt-relationalStore-spanner-execution/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/connection/spanner/extensions/SpannerConnectionExtension.java +++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-spanner/legend-engine-xt-relationalStore-spanner-execution/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/connection/spanner/extensions/SpannerConnectionExtension.java @@ -25,6 +25,18 @@ public class SpannerConnectionExtension implements RelationalConnectionExtension { + @Override + public String type() + { + return "(Connection)ConnectionExtension"; + } + + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Relational", "Spanner"); + } + @Override public MutableList getAdditionalDatabaseManager() { diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-spanner/legend-engine-xt-relationalStore-spanner-execution/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/connection/spanner/extensions/SpannerStrategicConnectionExtension.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-spanner/legend-engine-xt-relationalStore-spanner-execution/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/connection/spanner/extensions/SpannerStrategicConnectionExtension.java index 44812fc63ba..04d005435b0 100644 --- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-spanner/legend-engine-xt-relationalStore-spanner-execution/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/connection/spanner/extensions/SpannerStrategicConnectionExtension.java +++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-spanner/legend-engine-xt-relationalStore-spanner-execution/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/connection/spanner/extensions/SpannerStrategicConnectionExtension.java @@ -16,7 +16,9 @@ import java.util.List; import java.util.function.Function; + import org.eclipse.collections.api.block.function.Function2; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.plan.execution.stores.relational.connection.ConnectionKey; import org.finos.legend.engine.plan.execution.stores.relational.connection.authentication.AuthenticationStrategy; import org.finos.legend.engine.plan.execution.stores.relational.connection.authentication.strategy.OAuthProfile; @@ -34,6 +36,18 @@ public class SpannerStrategicConnectionExtension implements StrategicConnectionExtension { + @Override + public String type() + { + return "Strategic_Connection_Extension"; + } + + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Relational", "Spanner"); + } + @Override public AuthenticationStrategyVisitor getExtraAuthenticationKeyGenerators() { @@ -42,27 +56,27 @@ public AuthenticationStrategyVisitor getExtraAuthenti @Override public AuthenticationStrategyVisitor getExtraAuthenticationStrategyTransformGenerators( - List oauthProfiles) + List oauthProfiles) { return authenticationStrategy -> null; } @Override public Function> getExtraDataSourceSpecificationKeyGenerators( - int testDbPort) + int testDbPort) { return relationalDatabaseConnection -> (DatasourceSpecificationVisitor) datasourceSpecification -> { if (datasourceSpecification instanceof SpannerDatasourceSpecification) { SpannerDatasourceSpecification spannerSpec = - (SpannerDatasourceSpecification) datasourceSpecification; + (SpannerDatasourceSpecification) datasourceSpecification; return new SpannerDataSourceSpecificationKey( - spannerSpec.projectId, - spannerSpec.instanceId, - spannerSpec.databaseId, - spannerSpec.proxyHost, - spannerSpec.proxyPort + spannerSpec.projectId, + spannerSpec.instanceId, + spannerSpec.databaseId, + spannerSpec.proxyHost, + spannerSpec.proxyPort ); } return null; @@ -71,8 +85,8 @@ public Function> getExtraDataSourceSpecificationTransformerGenerators( - Function authenticationStrategyProvider) + DatasourceSpecificationVisitor> getExtraDataSourceSpecificationTransformerGenerators( + Function authenticationStrategyProvider) { return (relationalDatabaseConnection, connectionKey) -> (DatasourceSpecificationVisitor) datasourceSpecification -> { @@ -81,9 +95,9 @@ DatasourceSpecificationVisitor> getExtraDataSourceSpeci AuthenticationStrategy authenticationStrategy = authenticationStrategyProvider.apply(relationalDatabaseConnection); return new SpannerDataSourceSpecification( - (SpannerDataSourceSpecificationKey) connectionKey.getDataSourceSpecificationKey(), - new SpannerManager(), - authenticationStrategy + (SpannerDataSourceSpecificationKey) connectionKey.getDataSourceSpecificationKey(), + new SpannerManager(), + authenticationStrategy ); } return null; diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-spanner/legend-engine-xt-relationalStore-spanner-grammar/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/SpannerCompilerExtension.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-spanner/legend-engine-xt-relationalStore-spanner-grammar/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/SpannerCompilerExtension.java index b0f18d0e719..1a189fc837c 100644 --- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-spanner/legend-engine-xt-relationalStore-spanner-grammar/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/SpannerCompilerExtension.java +++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-spanner/legend-engine-xt-relationalStore-spanner-grammar/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/SpannerCompilerExtension.java @@ -16,6 +16,7 @@ import org.eclipse.collections.api.block.function.Function2; import org.eclipse.collections.api.factory.Lists; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.language.pure.compiler.toPureGraph.extension.CompilerExtension; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.connection.DatabaseType; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.connection.authentication.GCPApplicationDefaultCredentialsAuthenticationStrategy; @@ -31,6 +32,12 @@ public class SpannerCompilerExtension implements IRelationalCompilerExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Relational", "Spanner"); + } + @Override public List> getExtraDataSourceSpecificationProcessors() { diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-spanner/legend-engine-xt-relationalStore-spanner-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/from/SpannerGrammarParserExtension.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-spanner/legend-engine-xt-relationalStore-spanner-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/from/SpannerGrammarParserExtension.java index a375e1670cf..e1d220d864f 100644 --- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-spanner/legend-engine-xt-relationalStore-spanner-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/from/SpannerGrammarParserExtension.java +++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-spanner/legend-engine-xt-relationalStore-spanner-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/from/SpannerGrammarParserExtension.java @@ -18,6 +18,8 @@ import java.util.List; import java.util.Optional; import java.util.function.Function; + +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.language.pure.grammar.from.antlr4.connection.SpannerLexerGrammar; import org.finos.legend.engine.language.pure.grammar.from.antlr4.connection.SpannerParserGrammar; import org.finos.legend.engine.language.pure.grammar.from.datasource.DataSourceSpecificationSourceCode; @@ -26,6 +28,12 @@ public class SpannerGrammarParserExtension implements IRelationalGrammarParserExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Relational", "Spanner"); + } + @Override public List> getExtraDataSourceSpecificationParsers() { diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-spanner/legend-engine-xt-relationalStore-spanner-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/to/SpannerGrammarComposerExtension.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-spanner/legend-engine-xt-relationalStore-spanner-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/to/SpannerGrammarComposerExtension.java index 264bb412679..74f5b6f43f6 100644 --- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-spanner/legend-engine-xt-relationalStore-spanner-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/to/SpannerGrammarComposerExtension.java +++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-spanner/legend-engine-xt-relationalStore-spanner-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/to/SpannerGrammarComposerExtension.java @@ -16,6 +16,7 @@ import java.util.List; import org.eclipse.collections.api.block.function.Function2; +import org.eclipse.collections.api.list.MutableList; import org.eclipse.collections.impl.factory.Lists; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.connection.specification.DatasourceSpecification; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.connection.specification.SpannerDatasourceSpecification; @@ -25,6 +26,12 @@ public class SpannerGrammarComposerExtension implements IRelationalGrammarComposerExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Relational", "Spanner"); + } + @Override public List> getExtraDataSourceSpecificationComposers() { diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-spanner/legend-engine-xt-relationalStore-spanner-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/SpannerProtocolExtension.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-spanner/legend-engine-xt-relationalStore-spanner-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/SpannerProtocolExtension.java index 16851f525fa..5eb36ec9df6 100644 --- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-spanner/legend-engine-xt-relationalStore-spanner-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/SpannerProtocolExtension.java +++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-spanner/legend-engine-xt-relationalStore-spanner-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/SpannerProtocolExtension.java @@ -16,6 +16,7 @@ import java.util.List; import org.eclipse.collections.api.block.function.Function0; +import org.eclipse.collections.api.list.MutableList; import org.eclipse.collections.impl.factory.Lists; import org.finos.legend.engine.protocol.pure.v1.extension.ProtocolSubTypeInfo; import org.finos.legend.engine.protocol.pure.v1.extension.PureProtocolExtension; @@ -24,6 +25,12 @@ public class SpannerProtocolExtension implements PureProtocolExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Relational", "Spanner"); + } + @Override public List>>> getExtraProtocolSubTypeInfoCollectors() { diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-sqlserver/legend-engine-xt-relationalStore-sqlserver-execution-tests/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/connection/tests/api/dynamicTestConnections/SqlServerTestContainers.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-sqlserver/legend-engine-xt-relationalStore-sqlserver-execution-tests/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/connection/tests/api/dynamicTestConnections/SqlServerTestContainers.java index 90dec2dc0a6..994425067e1 100644 --- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-sqlserver/legend-engine-xt-relationalStore-sqlserver-execution-tests/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/connection/tests/api/dynamicTestConnections/SqlServerTestContainers.java +++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-sqlserver/legend-engine-xt-relationalStore-sqlserver-execution-tests/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/connection/tests/api/dynamicTestConnections/SqlServerTestContainers.java @@ -14,6 +14,7 @@ package org.finos.legend.engine.plan.execution.stores.relational.connection.tests.api.dynamicTestConnections; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.plan.execution.stores.relational.connection.tests.api.DynamicTestConnection; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.connection.DatabaseType; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.connection.RelationalDatabaseConnection; @@ -34,6 +35,11 @@ public DatabaseType getDatabaseType() return DatabaseType.SqlServer; } + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Relational", "SqlServer"); + } public MSSQLServerContainer mssqlserver = new MSSQLServerContainer("mcr.microsoft.com/mssql/server:2019-latest") .acceptLicense(); diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-sqlserver/legend-engine-xt-relationalStore-sqlserver-execution/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/SqlServerConnectionExtension.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-sqlserver/legend-engine-xt-relationalStore-sqlserver-execution/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/SqlServerConnectionExtension.java index 3a8774f1fca..d0ffdf850e0 100644 --- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-sqlserver/legend-engine-xt-relationalStore-sqlserver-execution/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/SqlServerConnectionExtension.java +++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-sqlserver/legend-engine-xt-relationalStore-sqlserver-execution/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/SqlServerConnectionExtension.java @@ -23,6 +23,18 @@ public class SqlServerConnectionExtension implements RelationalConnectionExtension { + @Override + public String type() + { + return "(Connection)ConnectionExtension"; + } + + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Relational", "SqlServer"); + } + @Override public MutableList getAdditionalDatabaseManager() { diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-test-server/src/test/java/org/finos/legend/engine/plan/execution/stores/relational/connection/tests/api/dynamicTestConnections/H2AlloyServer.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-test-server/src/test/java/org/finos/legend/engine/plan/execution/stores/relational/connection/tests/api/dynamicTestConnections/H2AlloyServer.java index 439376b0671..395010b449b 100644 --- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-test-server/src/test/java/org/finos/legend/engine/plan/execution/stores/relational/connection/tests/api/dynamicTestConnections/H2AlloyServer.java +++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-test-server/src/test/java/org/finos/legend/engine/plan/execution/stores/relational/connection/tests/api/dynamicTestConnections/H2AlloyServer.java @@ -14,6 +14,7 @@ package org.finos.legend.engine.plan.execution.stores.relational.connection.tests.api.dynamicTestConnections; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.plan.execution.stores.relational.AlloyH2Server; import org.finos.legend.engine.plan.execution.stores.relational.connection.tests.api.DynamicTestConnection; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.connection.DatabaseType; @@ -32,6 +33,12 @@ public DatabaseType getDatabaseType() private org.h2.tools.Server h2Server; + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Relational", "H2"); + } + @Override public void setup() { diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-trino/legend-engine-xt-relationalStore-trino-execution-tests/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/connection/tests/api/dynamicTestConnections/TrinoTestContainersWithDelegatedKerberosAuth.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-trino/legend-engine-xt-relationalStore-trino-execution-tests/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/connection/tests/api/dynamicTestConnections/TrinoTestContainersWithDelegatedKerberosAuth.java index 8f80a5c40e3..cedadbb1a52 100644 --- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-trino/legend-engine-xt-relationalStore-trino-execution-tests/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/connection/tests/api/dynamicTestConnections/TrinoTestContainersWithDelegatedKerberosAuth.java +++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-trino/legend-engine-xt-relationalStore-trino-execution-tests/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/connection/tests/api/dynamicTestConnections/TrinoTestContainersWithDelegatedKerberosAuth.java @@ -14,6 +14,7 @@ package org.finos.legend.engine.plan.execution.stores.relational.connection.tests.api.dynamicTestConnections; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.plan.execution.stores.relational.connection.tests.api.DynamicTestConnection; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.connection.DatabaseType; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.connection.RelationalDatabaseConnection; @@ -28,6 +29,18 @@ public class TrinoTestContainersWithDelegatedKerberosAuth implements DynamicTestConnection { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Relational", "Trino"); + } + + @Override + public String type() + { + return "Test_Connection_Delegated_Kerberos"; + } + @Override public DatabaseType getDatabaseType() { diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-trino/legend-engine-xt-relationalStore-trino-execution-tests/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/connection/tests/api/dynamicTestConnections/TrinoTestContainersWithUserAndPasswordAuth.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-trino/legend-engine-xt-relationalStore-trino-execution-tests/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/connection/tests/api/dynamicTestConnections/TrinoTestContainersWithUserAndPasswordAuth.java index 0d3f0d2604a..affb9a376af 100644 --- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-trino/legend-engine-xt-relationalStore-trino-execution-tests/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/connection/tests/api/dynamicTestConnections/TrinoTestContainersWithUserAndPasswordAuth.java +++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-trino/legend-engine-xt-relationalStore-trino-execution-tests/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/connection/tests/api/dynamicTestConnections/TrinoTestContainersWithUserAndPasswordAuth.java @@ -14,6 +14,7 @@ package org.finos.legend.engine.plan.execution.stores.relational.connection.tests.api.dynamicTestConnections; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.plan.execution.stores.relational.connection.tests.api.DynamicTestConnection; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.connection.DatabaseType; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.connection.RelationalDatabaseConnection; @@ -32,6 +33,18 @@ public class TrinoTestContainersWithUserAndPasswordAuth implements DynamicTestConnection { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Relational", "Trino"); + } + + @Override + public String type() + { + return "Test_Connection_User_Password"; + } + @Override public DatabaseType getDatabaseType() { diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-trino/legend-engine-xt-relationalStore-trino-execution/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/TrinoConnectionExtension.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-trino/legend-engine-xt-relationalStore-trino-execution/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/TrinoConnectionExtension.java index 5c8d373dedc..7b0e929afc6 100644 --- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-trino/legend-engine-xt-relationalStore-trino-execution/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/TrinoConnectionExtension.java +++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-trino/legend-engine-xt-relationalStore-trino-execution/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/TrinoConnectionExtension.java @@ -44,6 +44,18 @@ public class TrinoConnectionExtension implements RelationalConnectionExtension, StrategicConnectionExtension { + @Override + public String type() + { + return "MIX_ConnectionExtension_&_Strategic_Connection_Extension"; + } + + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Relational", "Trino"); + } + @Override public MutableList getAdditionalDatabaseManager() { diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-trino/legend-engine-xt-relationalStore-trino-grammar/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/TrinoCompilerExtension.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-trino/legend-engine-xt-relationalStore-trino-grammar/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/TrinoCompilerExtension.java index 4a5b834fb78..4aa6142ff51 100644 --- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-trino/legend-engine-xt-relationalStore-trino-grammar/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/TrinoCompilerExtension.java +++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-trino/legend-engine-xt-relationalStore-trino-grammar/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/TrinoCompilerExtension.java @@ -18,6 +18,7 @@ import org.eclipse.collections.api.block.function.Function2; import org.eclipse.collections.api.factory.Lists; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.language.pure.compiler.toPureGraph.extension.CompilerExtension; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.connection.DatabaseType; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.connection.authentication.AuthenticationStrategy; @@ -36,6 +37,12 @@ public class TrinoCompilerExtension implements IRelationalCompilerExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Relational", "Trino"); + } + @Override public List> getExtraAuthenticationStrategyProcessors() { diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-trino/legend-engine-xt-relationalStore-trino-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/from/TrinoGrammarParserExtension.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-trino/legend-engine-xt-relationalStore-trino-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/from/TrinoGrammarParserExtension.java index 028fbf1f7b8..1f8e12b6d42 100644 --- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-trino/legend-engine-xt-relationalStore-trino-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/from/TrinoGrammarParserExtension.java +++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-trino/legend-engine-xt-relationalStore-trino-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/from/TrinoGrammarParserExtension.java @@ -14,6 +14,7 @@ package org.finos.legend.engine.language.pure.grammar.from; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.language.pure.grammar.from.antlr4.connection.TrinoLexerGrammar; import org.finos.legend.engine.language.pure.grammar.from.antlr4.connection.TrinoParserGrammar; import org.finos.legend.engine.language.pure.grammar.from.authentication.AuthenticationStrategySourceCode; @@ -30,6 +31,12 @@ public class TrinoGrammarParserExtension implements IRelationalGrammarParserExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Relational", "Trino"); + } + @Override public List> getExtraAuthenticationStrategyParsers() { diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-trino/legend-engine-xt-relationalStore-trino-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/to/TrinoGrammarComposerExtension.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-trino/legend-engine-xt-relationalStore-trino-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/to/TrinoGrammarComposerExtension.java index 86e0412959b..36d0c5def28 100644 --- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-trino/legend-engine-xt-relationalStore-trino-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/to/TrinoGrammarComposerExtension.java +++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-trino/legend-engine-xt-relationalStore-trino-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/to/TrinoGrammarComposerExtension.java @@ -15,6 +15,7 @@ package org.finos.legend.engine.language.pure.grammar.to; import org.eclipse.collections.api.block.function.Function2; +import org.eclipse.collections.api.list.MutableList; import org.eclipse.collections.impl.factory.Lists; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.connection.authentication.AuthenticationStrategy; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.connection.authentication.TrinoDelegatedKerberosAuthenticationStrategy; @@ -29,6 +30,11 @@ public class TrinoGrammarComposerExtension implements IRelationalGrammarComposerExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Relational", "Trino"); + } @Override public List> getExtraAuthenticationStrategyComposers() diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-trino/legend-engine-xt-relationalStore-trino-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/TrinoProtocolExtension.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-trino/legend-engine-xt-relationalStore-trino-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/TrinoProtocolExtension.java index e0fdd30f897..0d9f1fff6e7 100644 --- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-trino/legend-engine-xt-relationalStore-trino-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/TrinoProtocolExtension.java +++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-trino/legend-engine-xt-relationalStore-trino-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/TrinoProtocolExtension.java @@ -15,6 +15,7 @@ package org.finos.legend.engine.protocol.pure.v1; import org.eclipse.collections.api.block.function.Function0; +import org.eclipse.collections.api.list.MutableList; import org.eclipse.collections.impl.factory.Lists; import org.finos.legend.engine.protocol.pure.v1.extension.ProtocolSubTypeInfo; import org.finos.legend.engine.protocol.pure.v1.extension.PureProtocolExtension; @@ -27,6 +28,12 @@ public class TrinoProtocolExtension implements PureProtocolExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Relational", "Trino"); + } + @Override public List>>> getExtraProtocolSubTypeInfoCollectors() { diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-execution/legend-engine-xt-relationalStore-executionPlan-connection/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/connection/ConnectionExtension.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-execution/legend-engine-xt-relationalStore-executionPlan-connection/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/connection/ConnectionExtension.java index 0a3a2bc890a..71be684474d 100644 --- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-execution/legend-engine-xt-relationalStore-executionPlan-connection/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/connection/ConnectionExtension.java +++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-execution/legend-engine-xt-relationalStore-executionPlan-connection/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/connection/ConnectionExtension.java @@ -20,5 +20,11 @@ public interface ConnectionExtension extends LegendConnectionExtension { + @Override + default String type() + { + return "Connection_Extension"; + } + MutableList getAdditionalDatabaseManager(); } diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-execution/legend-engine-xt-relationalStore-executionPlan-connection/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/connection/tests/api/DynamicTestConnection.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-execution/legend-engine-xt-relationalStore-executionPlan-connection/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/connection/tests/api/DynamicTestConnection.java index 065c9465ea6..95905622ff7 100644 --- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-execution/legend-engine-xt-relationalStore-executionPlan-connection/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/connection/tests/api/DynamicTestConnection.java +++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-execution/legend-engine-xt-relationalStore-executionPlan-connection/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/connection/tests/api/DynamicTestConnection.java @@ -22,6 +22,12 @@ //Connections that are started on the fly by legend test server public interface DynamicTestConnection extends LegendConnectionExtension { + @Override + default String type() + { + return "Test_Connection"; + } + DatabaseType getDatabaseType(); void setup(); //start connection db instance , register vaults etc diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-execution/legend-engine-xt-relationalStore-executionPlan/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/RelationalExecutionExtension.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-execution/legend-engine-xt-relationalStore-executionPlan/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/RelationalExecutionExtension.java index 42329db7c5a..a22ea922d71 100644 --- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-execution/legend-engine-xt-relationalStore-executionPlan/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/RelationalExecutionExtension.java +++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-execution/legend-engine-xt-relationalStore-executionPlan/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/RelationalExecutionExtension.java @@ -35,6 +35,12 @@ public class RelationalExecutionExtension implements ExecutionExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Relational", "-Core"); + } + @Override public List, ExecutionState, Result>> getExtraNodeExecutors() { diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-execution/legend-engine-xt-relationalStore-executionPlan/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/plugin/RelationalStoreExecutorBuilder.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-execution/legend-engine-xt-relationalStore-executionPlan/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/plugin/RelationalStoreExecutorBuilder.java index a9843e2b2d8..b32a8c0534c 100644 --- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-execution/legend-engine-xt-relationalStore-executionPlan/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/plugin/RelationalStoreExecutorBuilder.java +++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-execution/legend-engine-xt-relationalStore-executionPlan/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/plugin/RelationalStoreExecutorBuilder.java @@ -14,6 +14,7 @@ package org.finos.legend.engine.plan.execution.stores.relational.plugin; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.authentication.provider.DatabaseAuthenticationFlowProvider; import org.finos.legend.engine.authentication.provider.DatabaseAuthenticationFlowProviderConfiguration; import org.finos.legend.engine.authentication.provider.DatabaseAuthenticationFlowProviderSelector; @@ -31,6 +32,13 @@ public class RelationalStoreExecutorBuilder implements StoreExecutorBuilder private static final int DEFAULT_PORT = Integer.parseInt(System.getProperty("legend.test.h2.port", "-1")); public static final String DEFAULT_TEMP_PATH = "/tmp/"; + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Relational", "-Core"); + } + + @Override public StoreType getStoreType() { diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-execution/legend-engine-xt-relationalStore-executionPlan/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/test/RelationalConnectionFactory.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-execution/legend-engine-xt-relationalStore-executionPlan/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/test/RelationalConnectionFactory.java index c2e879dc9be..cac2dfdf9d5 100644 --- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-execution/legend-engine-xt-relationalStore-executionPlan/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/test/RelationalConnectionFactory.java +++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-execution/legend-engine-xt-relationalStore-executionPlan/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/test/RelationalConnectionFactory.java @@ -15,6 +15,7 @@ package org.finos.legend.engine.plan.execution.stores.relational.test; import org.eclipse.collections.api.factory.Lists; +import org.eclipse.collections.api.list.MutableList; import org.eclipse.collections.api.tuple.Pair; import org.eclipse.collections.impl.tuple.Tuples; import org.eclipse.collections.impl.utility.ListIterate; @@ -42,6 +43,12 @@ public class RelationalConnectionFactory implements ConnectionFactoryExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Relational", "-Core"); + } + @Override public Optional tryBuildFromInputData(InputData inputData) { diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-generation/legend-engine-xt-relationalStore-grammar/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/RelationalCompilerExtension.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-generation/legend-engine-xt-relationalStore-grammar/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/RelationalCompilerExtension.java index f6d01b222c3..a047e48a599 100644 --- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-generation/legend-engine-xt-relationalStore-grammar/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/RelationalCompilerExtension.java +++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-generation/legend-engine-xt-relationalStore-grammar/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/RelationalCompilerExtension.java @@ -18,7 +18,6 @@ import org.eclipse.collections.api.block.function.Function; import org.eclipse.collections.api.block.function.Function2; import org.eclipse.collections.api.block.function.Function3; -import org.eclipse.collections.api.block.function.primitive.IntObjectToIntFunction; import org.eclipse.collections.api.block.procedure.Procedure; import org.eclipse.collections.api.block.procedure.Procedure2; import org.eclipse.collections.api.factory.Lists; @@ -64,7 +63,6 @@ import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.mapping.RootRelationalClassMapping; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.mapping.mappingTest.RelationalInputData; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.model.Database; -import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.model.Schema; import org.finos.legend.engine.protocol.pure.v1.model.valueSpecification.DatabaseInstance; import org.finos.legend.engine.protocol.pure.v1.model.valueSpecification.executionContext.RelationalExecutionContext; import org.finos.legend.engine.protocol.pure.v1.model.valueSpecification.raw.classInstance.relation.RelationStoreAccessor; @@ -112,6 +110,12 @@ public class RelationalCompilerExtension implements IRelationalCompilerExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Relational", "-Core"); + } + @Override public CompilerExtension build() { diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-generation/legend-engine-xt-relationalStore-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/from/RelationalGrammarParserExtension.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-generation/legend-engine-xt-relationalStore-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/from/RelationalGrammarParserExtension.java index fa9c070ba6a..d8a1494ea34 100644 --- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-generation/legend-engine-xt-relationalStore-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/from/RelationalGrammarParserExtension.java +++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-generation/legend-engine-xt-relationalStore-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/from/RelationalGrammarParserExtension.java @@ -19,6 +19,7 @@ import org.antlr.v4.runtime.CommonTokenStream; import org.antlr.v4.runtime.ParserRuleContext; import org.eclipse.collections.api.factory.Lists; +import org.eclipse.collections.api.list.MutableList; import org.eclipse.collections.impl.utility.ArrayIterate; import org.eclipse.collections.impl.utility.ListIterate; import org.finos.legend.engine.language.pure.grammar.from.antlr4.RelationalLexerGrammar; @@ -41,7 +42,6 @@ import org.finos.legend.engine.language.pure.grammar.from.extension.MappingTestInputDataParser; import org.finos.legend.engine.language.pure.grammar.from.extension.SectionParser; import org.finos.legend.engine.language.pure.grammar.from.extension.data.EmbeddedDataParser; -import org.finos.legend.engine.language.pure.grammar.from.extension.test.assertion.TestAssertionParser; import org.finos.legend.engine.language.pure.grammar.from.mapping.MappingElementSourceCode; import org.finos.legend.engine.language.pure.grammar.from.milestoning.MilestoningParseTreeWalker; import org.finos.legend.engine.language.pure.grammar.from.milestoning.MilestoningSpecificationSourceCode; @@ -76,6 +76,12 @@ public class RelationalGrammarParserExtension implements IRelationalGrammarParse public static final String RELATIONAL_MAPPING_ELEMENT_TYPE = "Relational"; public static final String RELATIONAL_DATABASE_CONNECTION_TYPE = "RelationalDatabaseConnection"; + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Relational", "-Core"); + } + @Override public Iterable getExtraSectionParsers() { diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-generation/legend-engine-xt-relationalStore-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/to/RelationalGrammarComposerExtension.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-generation/legend-engine-xt-relationalStore-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/to/RelationalGrammarComposerExtension.java index e42044830f3..a4af69f28bc 100644 --- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-generation/legend-engine-xt-relationalStore-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/to/RelationalGrammarComposerExtension.java +++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-generation/legend-engine-xt-relationalStore-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/to/RelationalGrammarComposerExtension.java @@ -14,7 +14,6 @@ package org.finos.legend.engine.language.pure.grammar.to; -import org.eclipse.collections.api.block.function.Function; import org.eclipse.collections.api.block.function.Function2; import org.eclipse.collections.api.block.function.Function3; import org.eclipse.collections.api.list.MutableList; @@ -48,7 +47,6 @@ import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.model.Schema; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.model.milestoning.Milestoning; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.model.operation.RelationalOperationElement; -import org.finos.legend.engine.shared.core.api.grammar.RenderStyle; import java.util.Collections; import java.util.List; @@ -58,6 +56,12 @@ public class RelationalGrammarComposerExtension implements IRelationalGrammarComposerExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Relational", "-Core"); + } + private MutableList> renderers = Lists.mutable.with((element, context) -> { if (element instanceof Database) diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-generation/legend-engine-xt-relationalStore-javaPlatformBinding-pure/src/main/java/org/finos/legend/pure/code/core/RelationalJavaBindingLegendPureCoreExtension.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-generation/legend-engine-xt-relationalStore-javaPlatformBinding-pure/src/main/java/org/finos/legend/pure/code/core/RelationalJavaBindingLegendPureCoreExtension.java index 60cdbc3c5d4..49a10bf1ba9 100644 --- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-generation/legend-engine-xt-relationalStore-javaPlatformBinding-pure/src/main/java/org/finos/legend/pure/code/core/RelationalJavaBindingLegendPureCoreExtension.java +++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-generation/legend-engine-xt-relationalStore-javaPlatformBinding-pure/src/main/java/org/finos/legend/pure/code/core/RelationalJavaBindingLegendPureCoreExtension.java @@ -14,10 +14,17 @@ package org.finos.legend.pure.code.core; -import org.finos.legend.engine.pure.code.core.BindingLegendPureCoreExtension; +import org.eclipse.collections.api.list.MutableList; +import org.finos.legend.engine.pure.code.core.JavaBindingLegendPureCoreExtension; -public class RelationalJavaBindingLegendPureCoreExtension implements BindingLegendPureCoreExtension +public class RelationalJavaBindingLegendPureCoreExtension implements JavaBindingLegendPureCoreExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Relational", "-Core"); + } + @Override public String functionFile() { diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-generation/legend-engine-xt-relationalStore-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/RelationalProtocolExtension.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-generation/legend-engine-xt-relationalStore-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/RelationalProtocolExtension.java index 7a796348f56..4d1235338f6 100644 --- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-generation/legend-engine-xt-relationalStore-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/RelationalProtocolExtension.java +++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-generation/legend-engine-xt-relationalStore-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/RelationalProtocolExtension.java @@ -17,6 +17,7 @@ import org.eclipse.collections.api.block.function.Function0; import org.eclipse.collections.api.factory.Lists; import org.eclipse.collections.api.factory.Maps; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.protocol.pure.v1.extension.ProtocolSubTypeInfo; import org.finos.legend.engine.protocol.pure.v1.extension.PureProtocolExtension; import org.finos.legend.engine.protocol.pure.v1.model.data.EmbeddedData; @@ -86,6 +87,12 @@ public class RelationalProtocolExtension implements PureProtocolExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Relational", "-Core"); + } + @Override public List>>> getExtraProtocolSubTypeInfoCollectors() { diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-generation/legend-engine-xt-relationalStore-pure/src/main/java/org/finos/legend/pure/code/core/RelationalLegendPureCoreExtension.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-generation/legend-engine-xt-relationalStore-pure/src/main/java/org/finos/legend/pure/code/core/RelationalLegendPureCoreExtension.java index 9d9c1067903..447ca287d14 100644 --- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-generation/legend-engine-xt-relationalStore-pure/src/main/java/org/finos/legend/pure/code/core/RelationalLegendPureCoreExtension.java +++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-generation/legend-engine-xt-relationalStore-pure/src/main/java/org/finos/legend/pure/code/core/RelationalLegendPureCoreExtension.java @@ -14,6 +14,7 @@ package org.finos.legend.pure.code.core; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.pure.code.core.StoreLegendPureCoreExtension; public class RelationalLegendPureCoreExtension implements StoreLegendPureCoreExtension @@ -29,5 +30,11 @@ public String functionSignature() { return "meta::relational::extension::relationalExtension__Extension_1_"; } + + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Relational", "-Core"); + } } diff --git a/legend-engine-xts-rosetta/legend-engine-xt-rosetta/src/main/java/org/finos/legend/engine/external/format/rosetta/extension/RosettaGenerationExtension.java b/legend-engine-xts-rosetta/legend-engine-xt-rosetta/src/main/java/org/finos/legend/engine/external/format/rosetta/extension/RosettaGenerationExtension.java index 3f055d8e9e3..03b6f25023c 100644 --- a/legend-engine-xts-rosetta/legend-engine-xt-rosetta/src/main/java/org/finos/legend/engine/external/format/rosetta/extension/RosettaGenerationExtension.java +++ b/legend-engine-xts-rosetta/legend-engine-xt-rosetta/src/main/java/org/finos/legend/engine/external/format/rosetta/extension/RosettaGenerationExtension.java @@ -15,6 +15,7 @@ package org.finos.legend.engine.external.format.rosetta.extension; import org.eclipse.collections.api.RichIterable; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.external.format.rosetta.RosettaGenerationService; import org.finos.legend.engine.external.format.rosetta.model.RosettaGenerationConfig; import org.finos.legend.engine.external.shared.format.extension.GenerationExtension; @@ -38,6 +39,12 @@ public class RosettaGenerationExtension implements GenerationExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Generation", "!!MoveToArtifact!!", "Rosetta"); + } + @Override public String getLabel() { diff --git a/legend-engine-xts-service/legend-engine-language-pure-dsl-service-pure/src/main/java/org/finos/legend/engine/pure/code/core/ServiceLegendPureCoreExtension.java b/legend-engine-xts-service/legend-engine-language-pure-dsl-service-pure/src/main/java/org/finos/legend/engine/pure/code/core/ServiceLegendPureCoreExtension.java index 6a1bf5225c1..639e520c837 100644 --- a/legend-engine-xts-service/legend-engine-language-pure-dsl-service-pure/src/main/java/org/finos/legend/engine/pure/code/core/ServiceLegendPureCoreExtension.java +++ b/legend-engine-xts-service/legend-engine-language-pure-dsl-service-pure/src/main/java/org/finos/legend/engine/pure/code/core/ServiceLegendPureCoreExtension.java @@ -14,6 +14,8 @@ package org.finos.legend.engine.pure.code.core; +import org.eclipse.collections.api.list.MutableList; + public class ServiceLegendPureCoreExtension implements FeatureLegendPureCoreExtension { @Override @@ -27,4 +29,10 @@ public String functionSignature() { return "meta::legend::service::serviceExtension__Extension_1_"; } + + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("PackageableElement", "Service"); + } } diff --git a/legend-engine-xts-service/legend-engine-language-pure-dsl-service/src/main/java/org/finos/legend/engine/language/pure/dsl/service/compiler/toPureGraph/ServiceCompilerExtensionImpl.java b/legend-engine-xts-service/legend-engine-language-pure-dsl-service/src/main/java/org/finos/legend/engine/language/pure/dsl/service/compiler/toPureGraph/ServiceCompilerExtensionImpl.java index 8050a6fb75f..00640de29d2 100644 --- a/legend-engine-xts-service/legend-engine-language-pure-dsl-service/src/main/java/org/finos/legend/engine/language/pure/dsl/service/compiler/toPureGraph/ServiceCompilerExtensionImpl.java +++ b/legend-engine-xts-service/legend-engine-language-pure-dsl-service/src/main/java/org/finos/legend/engine/language/pure/dsl/service/compiler/toPureGraph/ServiceCompilerExtensionImpl.java @@ -17,6 +17,7 @@ import org.eclipse.collections.api.RichIterable; import org.eclipse.collections.api.block.function.Function; import org.eclipse.collections.api.block.function.Function3; +import org.eclipse.collections.api.list.MutableList; import org.eclipse.collections.impl.factory.Lists; import org.eclipse.collections.impl.factory.Maps; import org.eclipse.collections.impl.list.mutable.FastList; @@ -61,6 +62,12 @@ public class ServiceCompilerExtensionImpl implements ServiceCompilerExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("PackageableElement", "Service"); + } + @Override public CompilerExtension build() { diff --git a/legend-engine-xts-service/legend-engine-language-pure-dsl-service/src/main/java/org/finos/legend/engine/language/pure/dsl/service/grammar/from/ServiceParserExtension.java b/legend-engine-xts-service/legend-engine-language-pure-dsl-service/src/main/java/org/finos/legend/engine/language/pure/dsl/service/grammar/from/ServiceParserExtension.java index 204439d4938..8e489947e9f 100644 --- a/legend-engine-xts-service/legend-engine-language-pure-dsl-service/src/main/java/org/finos/legend/engine/language/pure/dsl/service/grammar/from/ServiceParserExtension.java +++ b/legend-engine-xts-service/legend-engine-language-pure-dsl-service/src/main/java/org/finos/legend/engine/language/pure/dsl/service/grammar/from/ServiceParserExtension.java @@ -17,6 +17,7 @@ import org.antlr.v4.runtime.CharStream; import org.antlr.v4.runtime.CharStreams; import org.antlr.v4.runtime.CommonTokenStream; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.language.pure.grammar.from.ParserErrorListener; import org.finos.legend.engine.language.pure.grammar.from.SectionSourceCode; import org.finos.legend.engine.language.pure.grammar.from.SourceCodeParserInfo; @@ -32,6 +33,12 @@ public class ServiceParserExtension implements PureGrammarParserExtension { public static final String NAME = "Service"; + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("PackageableElement", "Service"); + } + @Override public Iterable getExtraSectionParsers() { diff --git a/legend-engine-xts-service/legend-engine-language-pure-dsl-service/src/main/java/org/finos/legend/engine/language/pure/dsl/service/grammar/to/ServiceGrammarComposerExtension.java b/legend-engine-xts-service/legend-engine-language-pure-dsl-service/src/main/java/org/finos/legend/engine/language/pure/dsl/service/grammar/to/ServiceGrammarComposerExtension.java index 3e4ac99b253..5e5d9172c7b 100644 --- a/legend-engine-xts-service/legend-engine-language-pure-dsl-service/src/main/java/org/finos/legend/engine/language/pure/dsl/service/grammar/to/ServiceGrammarComposerExtension.java +++ b/legend-engine-xts-service/legend-engine-language-pure-dsl-service/src/main/java/org/finos/legend/engine/language/pure/dsl/service/grammar/to/ServiceGrammarComposerExtension.java @@ -14,7 +14,6 @@ package org.finos.legend.engine.language.pure.dsl.service.grammar.to; -import org.eclipse.collections.api.block.function.Function; import org.eclipse.collections.api.block.function.Function2; import org.eclipse.collections.api.block.function.Function3; import org.eclipse.collections.api.list.MutableList; @@ -44,6 +43,12 @@ public class ServiceGrammarComposerExtension implements PureGrammarComposerExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("PackageableElement", "Service"); + } + private MutableList> renderers = Lists.mutable.with((element, context) -> { if (element instanceof Service) diff --git a/legend-engine-xts-service/legend-engine-language-pure-dsl-service/src/main/java/org/finos/legend/engine/protocol/pure/v1/ServiceProtocolExtension.java b/legend-engine-xts-service/legend-engine-language-pure-dsl-service/src/main/java/org/finos/legend/engine/protocol/pure/v1/ServiceProtocolExtension.java index a1940c2cbcf..ebf8f48c169 100644 --- a/legend-engine-xts-service/legend-engine-language-pure-dsl-service/src/main/java/org/finos/legend/engine/protocol/pure/v1/ServiceProtocolExtension.java +++ b/legend-engine-xts-service/legend-engine-language-pure-dsl-service/src/main/java/org/finos/legend/engine/protocol/pure/v1/ServiceProtocolExtension.java @@ -17,6 +17,7 @@ import org.eclipse.collections.api.block.function.Function0; import org.eclipse.collections.api.factory.Lists; import org.eclipse.collections.api.factory.Maps; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.protocol.pure.v1.extension.ProtocolSubTypeInfo; import org.finos.legend.engine.protocol.pure.v1.extension.PureProtocolExtension; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.PackageableElement; @@ -46,6 +47,12 @@ public class ServiceProtocolExtension implements PureProtocolExtension { public static final String SERVICE_CLASSIFIER_PATH = "meta::legend::service::metamodel::Service"; + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("PackageableElement", "Service"); + } + @Override public List>>> getExtraProtocolSubTypeInfoCollectors() { diff --git a/legend-engine-xts-service/legend-engine-test-runner-service/src/main/java/org/finos/legend/engine/testable/service/extension/ServiceTestableRunnerExtension.java b/legend-engine-xts-service/legend-engine-test-runner-service/src/main/java/org/finos/legend/engine/testable/service/extension/ServiceTestableRunnerExtension.java index 1a2b8a2fdb1..6981b495fbb 100644 --- a/legend-engine-xts-service/legend-engine-test-runner-service/src/main/java/org/finos/legend/engine/testable/service/extension/ServiceTestableRunnerExtension.java +++ b/legend-engine-xts-service/legend-engine-test-runner-service/src/main/java/org/finos/legend/engine/testable/service/extension/ServiceTestableRunnerExtension.java @@ -14,6 +14,7 @@ package org.finos.legend.engine.testable.service.extension; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.language.pure.compiler.toPureGraph.PureModel; import org.finos.legend.engine.protocol.pure.PureClientVersions; import org.finos.legend.engine.protocol.pure.v1.ServiceProtocolExtension; @@ -32,6 +33,12 @@ public class ServiceTestableRunnerExtension implements TestableRunnerExtension { private String pureVersion = PureClientVersions.production; + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("PackageableElement", "Service"); + } + @Override public String getSupportedClassifierPath() { diff --git a/legend-engine-xts-serviceStore/legend-engine-xt-serviceStore-executionPlan/src/main/java/org/finos/legend/engine/plan/execution/stores/service/ServiceStoreExecutionExtension.java b/legend-engine-xts-serviceStore/legend-engine-xt-serviceStore-executionPlan/src/main/java/org/finos/legend/engine/plan/execution/stores/service/ServiceStoreExecutionExtension.java index 30c0e795f84..51986f9e39e 100644 --- a/legend-engine-xts-serviceStore/legend-engine-xt-serviceStore-executionPlan/src/main/java/org/finos/legend/engine/plan/execution/stores/service/ServiceStoreExecutionExtension.java +++ b/legend-engine-xts-serviceStore/legend-engine-xt-serviceStore-executionPlan/src/main/java/org/finos/legend/engine/plan/execution/stores/service/ServiceStoreExecutionExtension.java @@ -43,6 +43,12 @@ public class ServiceStoreExecutionExtension implements IServiceStoreExecutionExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Service"); + } + @Override public List, ExecutionState, Result>> getExtraNodeExecutors() { diff --git a/legend-engine-xts-serviceStore/legend-engine-xt-serviceStore-executionPlan/src/main/java/org/finos/legend/engine/plan/execution/stores/service/plugin/ServiceStoreExecutorBuilder.java b/legend-engine-xts-serviceStore/legend-engine-xt-serviceStore-executionPlan/src/main/java/org/finos/legend/engine/plan/execution/stores/service/plugin/ServiceStoreExecutorBuilder.java index 04eaa825771..d002eb75b65 100644 --- a/legend-engine-xts-serviceStore/legend-engine-xt-serviceStore-executionPlan/src/main/java/org/finos/legend/engine/plan/execution/stores/service/plugin/ServiceStoreExecutorBuilder.java +++ b/legend-engine-xts-serviceStore/legend-engine-xt-serviceStore-executionPlan/src/main/java/org/finos/legend/engine/plan/execution/stores/service/plugin/ServiceStoreExecutorBuilder.java @@ -14,14 +14,20 @@ package org.finos.legend.engine.plan.execution.stores.service.plugin; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.plan.execution.stores.StoreExecutor; import org.finos.legend.engine.plan.execution.stores.StoreExecutorBuilder; import org.finos.legend.engine.plan.execution.stores.StoreExecutorConfiguration; import org.finos.legend.engine.plan.execution.stores.StoreType; -import org.finos.legend.engine.plan.execution.stores.service.auth.ServiceStoreConnectionSpecification; public class ServiceStoreExecutorBuilder implements StoreExecutorBuilder { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Service"); + } + @Override public StoreType getStoreType() { diff --git a/legend-engine-xts-serviceStore/legend-engine-xt-serviceStore-executionPlan/src/main/java/org/finos/legend/engine/plan/execution/stores/service/test/ServiceStoreTestConnectionFactory.java b/legend-engine-xts-serviceStore/legend-engine-xt-serviceStore-executionPlan/src/main/java/org/finos/legend/engine/plan/execution/stores/service/test/ServiceStoreTestConnectionFactory.java index 5391bbdfd44..2e19d4c24e5 100644 --- a/legend-engine-xts-serviceStore/legend-engine-xt-serviceStore-executionPlan/src/main/java/org/finos/legend/engine/plan/execution/stores/service/test/ServiceStoreTestConnectionFactory.java +++ b/legend-engine-xts-serviceStore/legend-engine-xt-serviceStore-executionPlan/src/main/java/org/finos/legend/engine/plan/execution/stores/service/test/ServiceStoreTestConnectionFactory.java @@ -15,6 +15,7 @@ package org.finos.legend.engine.plan.execution.stores.service.test; import com.github.tomakehurst.wiremock.WireMockServer; +import org.eclipse.collections.api.list.MutableList; import org.eclipse.collections.api.tuple.Pair; import org.eclipse.collections.impl.factory.Lists; import org.eclipse.collections.impl.tuple.Tuples; @@ -38,6 +39,12 @@ public class ServiceStoreTestConnectionFactory implements ConnectionFactoryExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Service"); + } + @Override public Optional>> tryBuildTestConnection(Connection sourceConnection, List data) { diff --git a/legend-engine-xts-serviceStore/legend-engine-xt-serviceStore-grammar/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/ServiceStoreCompilerExtension.java b/legend-engine-xts-serviceStore/legend-engine-xt-serviceStore-grammar/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/ServiceStoreCompilerExtension.java index a06e2ec528c..e54a743853c 100644 --- a/legend-engine-xts-serviceStore/legend-engine-xt-serviceStore-grammar/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/ServiceStoreCompilerExtension.java +++ b/legend-engine-xts-serviceStore/legend-engine-xt-serviceStore-grammar/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/ServiceStoreCompilerExtension.java @@ -21,6 +21,7 @@ import org.eclipse.collections.api.block.procedure.Procedure2; import org.eclipse.collections.api.factory.Lists; import org.eclipse.collections.api.list.ImmutableList; +import org.eclipse.collections.api.list.MutableList; import org.eclipse.collections.api.tuple.Pair; import org.finos.legend.engine.language.pure.compiler.toPureGraph.data.ServiceStoreEmbeddedDataCompiler; import org.finos.legend.engine.language.pure.compiler.toPureGraph.extension.CompilerExtension; @@ -43,6 +44,12 @@ public class ServiceStoreCompilerExtension implements IServiceStoreCompilerExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Service"); + } + @Override public CompilerExtension build() { diff --git a/legend-engine-xts-serviceStore/legend-engine-xt-serviceStore-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/from/ServiceStoreGrammarParserExtension.java b/legend-engine-xts-serviceStore/legend-engine-xt-serviceStore-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/from/ServiceStoreGrammarParserExtension.java index aff4164460c..3d818a6bb5c 100644 --- a/legend-engine-xts-serviceStore/legend-engine-xt-serviceStore-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/from/ServiceStoreGrammarParserExtension.java +++ b/legend-engine-xts-serviceStore/legend-engine-xt-serviceStore-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/from/ServiceStoreGrammarParserExtension.java @@ -19,6 +19,7 @@ import org.antlr.v4.runtime.CommonTokenStream; import org.antlr.v4.runtime.ParserRuleContext; import org.eclipse.collections.api.factory.Lists; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.language.pure.grammar.from.antlr4.ServiceStoreLexerGrammar; import org.finos.legend.engine.language.pure.grammar.from.antlr4.ServiceStoreParserGrammar; import org.finos.legend.engine.language.pure.grammar.from.antlr4.connection.ServiceStoreConnectionLexerGrammar; @@ -47,6 +48,12 @@ public class ServiceStoreGrammarParserExtension implements IServiceStoreGrammarP public static final String SERVICE_STORE_MAPPING_ELEMENT_TYPE = "ServiceStore"; public static final String SERVICE_STORE_CONNECTION_TYPE = "ServiceStoreConnection"; + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Service"); + } + @Override public Iterable getExtraSectionParsers() { diff --git a/legend-engine-xts-serviceStore/legend-engine-xt-serviceStore-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/to/ServiceStoreGrammarComposerExtension.java b/legend-engine-xts-serviceStore/legend-engine-xt-serviceStore-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/to/ServiceStoreGrammarComposerExtension.java index f3b010390ed..6b5a9ea35e9 100644 --- a/legend-engine-xts-serviceStore/legend-engine-xt-serviceStore-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/to/ServiceStoreGrammarComposerExtension.java +++ b/legend-engine-xts-serviceStore/legend-engine-xt-serviceStore-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/to/ServiceStoreGrammarComposerExtension.java @@ -14,7 +14,6 @@ package org.finos.legend.engine.language.pure.grammar.to; -import org.eclipse.collections.api.block.function.Function; import org.eclipse.collections.api.block.function.Function2; import org.eclipse.collections.api.block.function.Function3; import org.eclipse.collections.api.list.MutableList; @@ -43,6 +42,12 @@ public class ServiceStoreGrammarComposerExtension implements IServiceStoreGrammarComposerExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Service"); + } + private MutableList> renderers = Lists.mutable.with((element, context) -> { if (element instanceof ServiceStore) diff --git a/legend-engine-xts-serviceStore/legend-engine-xt-serviceStore-javaPlatformBinding-pure/src/main/java/org/finos/legend/pure/code/core/ServiceStoreJavaBindingLegendPureCoreExtension.java b/legend-engine-xts-serviceStore/legend-engine-xt-serviceStore-javaPlatformBinding-pure/src/main/java/org/finos/legend/pure/code/core/ServiceStoreJavaBindingLegendPureCoreExtension.java index 1c80d876a0d..81ff37f1349 100644 --- a/legend-engine-xts-serviceStore/legend-engine-xt-serviceStore-javaPlatformBinding-pure/src/main/java/org/finos/legend/pure/code/core/ServiceStoreJavaBindingLegendPureCoreExtension.java +++ b/legend-engine-xts-serviceStore/legend-engine-xt-serviceStore-javaPlatformBinding-pure/src/main/java/org/finos/legend/pure/code/core/ServiceStoreJavaBindingLegendPureCoreExtension.java @@ -14,10 +14,17 @@ package org.finos.legend.pure.code.core; -import org.finos.legend.engine.pure.code.core.BindingLegendPureCoreExtension; +import org.eclipse.collections.api.list.MutableList; +import org.finos.legend.engine.pure.code.core.JavaBindingLegendPureCoreExtension; -public class ServiceStoreJavaBindingLegendPureCoreExtension implements BindingLegendPureCoreExtension +public class ServiceStoreJavaBindingLegendPureCoreExtension implements JavaBindingLegendPureCoreExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Service"); + } + @Override public String functionFile() { diff --git a/legend-engine-xts-serviceStore/legend-engine-xt-serviceStore-protocol/pom.xml b/legend-engine-xts-serviceStore/legend-engine-xt-serviceStore-protocol/pom.xml index bd4fc931cc6..aa6e46bbb64 100644 --- a/legend-engine-xts-serviceStore/legend-engine-xt-serviceStore-protocol/pom.xml +++ b/legend-engine-xts-serviceStore/legend-engine-xt-serviceStore-protocol/pom.xml @@ -55,6 +55,10 @@ org.eclipse.collections eclipse-collections-api + + org.eclipse.collections + eclipse-collections + diff --git a/legend-engine-xts-serviceStore/legend-engine-xt-serviceStore-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/ServiceStoreProtocolExtension.java b/legend-engine-xts-serviceStore/legend-engine-xt-serviceStore-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/ServiceStoreProtocolExtension.java index 6386251622d..d8d6eee300f 100644 --- a/legend-engine-xts-serviceStore/legend-engine-xt-serviceStore-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/ServiceStoreProtocolExtension.java +++ b/legend-engine-xts-serviceStore/legend-engine-xt-serviceStore-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/ServiceStoreProtocolExtension.java @@ -17,6 +17,7 @@ import org.eclipse.collections.api.block.function.Function0; import org.eclipse.collections.api.factory.Lists; import org.eclipse.collections.api.factory.Maps; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.protocol.pure.v1.extension.ProtocolSubTypeInfo; import org.finos.legend.engine.protocol.pure.v1.extension.PureProtocolExtension; import org.finos.legend.engine.protocol.pure.v1.model.data.EmbeddedData; @@ -47,6 +48,12 @@ public class ServiceStoreProtocolExtension implements PureProtocolExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Service"); + } + @Override public List>>> getExtraProtocolSubTypeInfoCollectors() { diff --git a/legend-engine-xts-serviceStore/legend-engine-xt-serviceStore-pure/src/main/java/org/finos/legend/pure/code/core/ServiceStoreLegendPureCoreExtension.java b/legend-engine-xts-serviceStore/legend-engine-xt-serviceStore-pure/src/main/java/org/finos/legend/pure/code/core/ServiceStoreLegendPureCoreExtension.java index ad989ce6734..3ca51eba815 100644 --- a/legend-engine-xts-serviceStore/legend-engine-xt-serviceStore-pure/src/main/java/org/finos/legend/pure/code/core/ServiceStoreLegendPureCoreExtension.java +++ b/legend-engine-xts-serviceStore/legend-engine-xt-serviceStore-pure/src/main/java/org/finos/legend/pure/code/core/ServiceStoreLegendPureCoreExtension.java @@ -14,6 +14,7 @@ package org.finos.legend.pure.code.core; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.pure.code.core.StoreLegendPureCoreExtension; public class ServiceStoreLegendPureCoreExtension implements StoreLegendPureCoreExtension @@ -29,5 +30,11 @@ public String functionSignature() { return "meta::external::store::service::extension::serviceStoreExtension__Extension_1_"; } + + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Service"); + } } diff --git a/legend-engine-xts-snowflakeApp/legend-engine-xt-snowflakeApp-api/src/main/java/org/finos/legend/engine/language/snowflakeApp/api/SnowflakeAppService.java b/legend-engine-xts-snowflakeApp/legend-engine-xt-snowflakeApp-api/src/main/java/org/finos/legend/engine/language/snowflakeApp/api/SnowflakeAppService.java index eb47cf58e50..b17f0eaf876 100644 --- a/legend-engine-xts-snowflakeApp/legend-engine-xt-snowflakeApp-api/src/main/java/org/finos/legend/engine/language/snowflakeApp/api/SnowflakeAppService.java +++ b/legend-engine-xts-snowflakeApp/legend-engine-xt-snowflakeApp-api/src/main/java/org/finos/legend/engine/language/snowflakeApp/api/SnowflakeAppService.java @@ -14,7 +14,6 @@ package org.finos.legend.engine.language.snowflakeApp.api; -import com.fasterxml.jackson.databind.jsontype.NamedType; import org.eclipse.collections.api.RichIterable; import org.eclipse.collections.api.block.function.Function; import org.eclipse.collections.api.list.MutableList; @@ -48,6 +47,12 @@ public class SnowflakeAppService implements FunctionActivatorService group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Function_Activator", "Snowflake"); + } + public SnowflakeAppService() { TemporaryTestDbConfiguration conf = new TemporaryTestDbConfiguration(); diff --git a/legend-engine-xts-snowflakeApp/legend-engine-xt-snowflakeApp-compiler/src/main/java/org/finos/legend/engine/language/snowflakeApp/compiler/toPureGraph/SnowflakeAppCompilerExtension.java b/legend-engine-xts-snowflakeApp/legend-engine-xt-snowflakeApp-compiler/src/main/java/org/finos/legend/engine/language/snowflakeApp/compiler/toPureGraph/SnowflakeAppCompilerExtension.java index 64b32776461..3b47ef6b500 100644 --- a/legend-engine-xts-snowflakeApp/legend-engine-xt-snowflakeApp-compiler/src/main/java/org/finos/legend/engine/language/snowflakeApp/compiler/toPureGraph/SnowflakeAppCompilerExtension.java +++ b/legend-engine-xts-snowflakeApp/legend-engine-xt-snowflakeApp-compiler/src/main/java/org/finos/legend/engine/language/snowflakeApp/compiler/toPureGraph/SnowflakeAppCompilerExtension.java @@ -15,6 +15,7 @@ package org.finos.legend.engine.language.snowflakeApp.compiler.toPureGraph; import org.eclipse.collections.api.factory.Lists; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.code.core.CoreFunctionActivatorCodeRepositoryProvider; import org.finos.legend.engine.language.pure.compiler.toPureGraph.CompileContext; import org.finos.legend.engine.language.pure.compiler.toPureGraph.SourceInformationHelper; @@ -33,6 +34,12 @@ public class SnowflakeAppCompilerExtension implements CompilerExtension // Here only for dependency check error ... CoreFunctionActivatorCodeRepositoryProvider forDependencies; + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Function_Activator", "Snowflake"); + } + @Override public CompilerExtension build() { diff --git a/legend-engine-xts-snowflakeApp/legend-engine-xt-snowflakeApp-generator/src/main/java/org/finos/legend/engine/language/snowflakeApp/generator/SnowflakeAppArtifactGenerationExtension.java b/legend-engine-xts-snowflakeApp/legend-engine-xt-snowflakeApp-generator/src/main/java/org/finos/legend/engine/language/snowflakeApp/generator/SnowflakeAppArtifactGenerationExtension.java index 82a89baa5e8..d15597f3f7f 100644 --- a/legend-engine-xts-snowflakeApp/legend-engine-xt-snowflakeApp-generator/src/main/java/org/finos/legend/engine/language/snowflakeApp/generator/SnowflakeAppArtifactGenerationExtension.java +++ b/legend-engine-xts-snowflakeApp/legend-engine-xt-snowflakeApp-generator/src/main/java/org/finos/legend/engine/language/snowflakeApp/generator/SnowflakeAppArtifactGenerationExtension.java @@ -18,6 +18,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; import org.eclipse.collections.api.RichIterable; import org.eclipse.collections.api.block.function.Function; +import org.eclipse.collections.api.list.MutableList; import org.eclipse.collections.impl.factory.Lists; import org.finos.legend.engine.language.pure.compiler.toPureGraph.PureModel; import org.finos.legend.engine.language.pure.dsl.generation.extension.Artifact; @@ -40,6 +41,12 @@ public class SnowflakeAppArtifactGenerationExtension implements ArtifactGenerati private static final String ROOT_PATH = "snowflakeApp"; private static final String FILE_NAME = "snowflakeAppArtifact.json"; + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Function_Activator", "Snowflake"); + } + @Override public String getKey() { diff --git a/legend-engine-xts-snowflakeApp/legend-engine-xt-snowflakeApp-grammar/src/main/java/org/finos/legend/engine/language/snowflakeApp/grammar/from/SnowflakeAppGrammarParserExtension.java b/legend-engine-xts-snowflakeApp/legend-engine-xt-snowflakeApp-grammar/src/main/java/org/finos/legend/engine/language/snowflakeApp/grammar/from/SnowflakeAppGrammarParserExtension.java index cf19bcfc6a0..a6146fec38f 100644 --- a/legend-engine-xts-snowflakeApp/legend-engine-xt-snowflakeApp-grammar/src/main/java/org/finos/legend/engine/language/snowflakeApp/grammar/from/SnowflakeAppGrammarParserExtension.java +++ b/legend-engine-xts-snowflakeApp/legend-engine-xt-snowflakeApp-grammar/src/main/java/org/finos/legend/engine/language/snowflakeApp/grammar/from/SnowflakeAppGrammarParserExtension.java @@ -17,6 +17,7 @@ import org.antlr.v4.runtime.CharStream; import org.antlr.v4.runtime.CharStreams; import org.antlr.v4.runtime.CommonTokenStream; +import org.eclipse.collections.api.list.MutableList; import org.eclipse.collections.impl.factory.Lists; import org.finos.legend.engine.language.pure.grammar.from.ParserErrorListener; import org.finos.legend.engine.language.pure.grammar.from.PureGrammarParserContext; @@ -36,6 +37,12 @@ public class SnowflakeAppGrammarParserExtension implements PureGrammarParserExte { public static final String NAME = "Snowflake"; + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Function_Activator", "Snowflake"); + } + @Override public Iterable getExtraSectionParsers() { diff --git a/legend-engine-xts-snowflakeApp/legend-engine-xt-snowflakeApp-grammar/src/main/java/org/finos/legend/engine/language/snowflakeApp/grammar/to/SnowflakeAppGrammarComposer.java b/legend-engine-xts-snowflakeApp/legend-engine-xt-snowflakeApp-grammar/src/main/java/org/finos/legend/engine/language/snowflakeApp/grammar/to/SnowflakeAppGrammarComposer.java index cbd3f928bcc..54cd8d5ad65 100644 --- a/legend-engine-xts-snowflakeApp/legend-engine-xt-snowflakeApp-grammar/src/main/java/org/finos/legend/engine/language/snowflakeApp/grammar/to/SnowflakeAppGrammarComposer.java +++ b/legend-engine-xts-snowflakeApp/legend-engine-xt-snowflakeApp-grammar/src/main/java/org/finos/legend/engine/language/snowflakeApp/grammar/to/SnowflakeAppGrammarComposer.java @@ -24,8 +24,6 @@ import org.finos.legend.engine.language.snowflakeApp.grammar.from.SnowflakeAppGrammarParserExtension; import org.finos.legend.engine.protocol.functionActivator.metamodel.DeploymentOwner; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.PackageableElement; -import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.externalFormat.Binding; -import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.externalFormat.ExternalFormatSchemaSet; import org.finos.legend.engine.protocol.snowflakeApp.metamodel.SnowflakeApp; import org.finos.legend.engine.protocol.snowflakeApp.metamodel.SnowflakeAppDeploymentConfiguration; @@ -36,6 +34,12 @@ public class SnowflakeAppGrammarComposer implements PureGrammarComposerExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Function_Activator", "Snowflake"); + } + private static String renderElement(PackageableElement element) { if (element instanceof SnowflakeApp) diff --git a/legend-engine-xts-snowflakeApp/legend-engine-xt-snowflakeApp-protocol/pom.xml b/legend-engine-xts-snowflakeApp/legend-engine-xt-snowflakeApp-protocol/pom.xml index c0070b9b553..efe1ab1db56 100644 --- a/legend-engine-xts-snowflakeApp/legend-engine-xt-snowflakeApp-protocol/pom.xml +++ b/legend-engine-xts-snowflakeApp/legend-engine-xt-snowflakeApp-protocol/pom.xml @@ -35,13 +35,12 @@ org.finos.legend.engine - legend-engine-xt-functionActivator-protocol - ${project.version} + legend-engine-xt-relationalStore-protocol - org.eclipse.collections - eclipse-collections-api + org.finos.legend.engine + legend-engine-xt-functionActivator-protocol @@ -49,17 +48,21 @@ jackson-annotations + + org.eclipse.collections + eclipse-collections-api + + + org.eclipse.collections + eclipse-collections + + junit junit test - - org.finos.legend.engine - legend-engine-xt-relationalStore-protocol - - \ No newline at end of file diff --git a/legend-engine-xts-snowflakeApp/legend-engine-xt-snowflakeApp-protocol/src/main/java/org/finos/legend/engine/protocol/snowflakeApp/metamodel/SnowflakeAppProtocolExtension.java b/legend-engine-xts-snowflakeApp/legend-engine-xt-snowflakeApp-protocol/src/main/java/org/finos/legend/engine/protocol/snowflakeApp/metamodel/SnowflakeAppProtocolExtension.java index 4e0f3fd3e83..d0883e8d20f 100644 --- a/legend-engine-xts-snowflakeApp/legend-engine-xt-snowflakeApp-protocol/src/main/java/org/finos/legend/engine/protocol/snowflakeApp/metamodel/SnowflakeAppProtocolExtension.java +++ b/legend-engine-xts-snowflakeApp/legend-engine-xt-snowflakeApp-protocol/src/main/java/org/finos/legend/engine/protocol/snowflakeApp/metamodel/SnowflakeAppProtocolExtension.java @@ -17,6 +17,7 @@ import org.eclipse.collections.api.block.function.Function0; import org.eclipse.collections.api.factory.Lists; import org.eclipse.collections.api.factory.Maps; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.protocol.functionActivator.deployment.FunctionActivatorArtifact; import org.finos.legend.engine.protocol.functionActivator.deployment.FunctionActivatorDeploymentConfiguration; import org.finos.legend.engine.protocol.functionActivator.deployment.FunctionActivatorDeploymentContent; @@ -34,6 +35,12 @@ public class SnowflakeAppProtocolExtension implements PureProtocolExtension { public static String packageJSONType = "snowflakeApp"; + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Function_Activator", "Snowflake"); + } + @Override public List>>> getExtraProtocolSubTypeInfoCollectors() { diff --git a/legend-engine-xts-sql/legend-engine-xt-sql-grammar-integration/src/main/java/org/finos/legend/engine/language/sql/grammar/integration/SQLCompilerExtension.java b/legend-engine-xts-sql/legend-engine-xt-sql-grammar-integration/src/main/java/org/finos/legend/engine/language/sql/grammar/integration/SQLCompilerExtension.java index d43fe6381ab..8e0fedac194 100644 --- a/legend-engine-xts-sql/legend-engine-xt-sql-grammar-integration/src/main/java/org/finos/legend/engine/language/sql/grammar/integration/SQLCompilerExtension.java +++ b/legend-engine-xts-sql/legend-engine-xt-sql-grammar-integration/src/main/java/org/finos/legend/engine/language/sql/grammar/integration/SQLCompilerExtension.java @@ -15,6 +15,7 @@ package org.finos.legend.engine.language.sql.grammar.integration; import org.eclipse.collections.api.block.function.Function3; +import org.eclipse.collections.api.list.MutableList; import org.eclipse.collections.impl.factory.Lists; import org.eclipse.collections.impl.factory.Maps; import org.finos.legend.engine.language.pure.compiler.toPureGraph.CompileContext; @@ -35,6 +36,12 @@ public Iterable> getExtraProcessors() return Lists.mutable.empty(); } + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Query", "SQL"); + } + @Override public Map> getExtraClassInstanceProcessors() { diff --git a/legend-engine-xts-sql/legend-engine-xt-sql-grammar-integration/src/main/java/org/finos/legend/engine/language/sql/grammar/integration/SQLGrammarParserExtension.java b/legend-engine-xts-sql/legend-engine-xt-sql-grammar-integration/src/main/java/org/finos/legend/engine/language/sql/grammar/integration/SQLGrammarParserExtension.java index fca8c92cefc..7ebfe2bf818 100644 --- a/legend-engine-xts-sql/legend-engine-xt-sql-grammar-integration/src/main/java/org/finos/legend/engine/language/sql/grammar/integration/SQLGrammarParserExtension.java +++ b/legend-engine-xts-sql/legend-engine-xt-sql-grammar-integration/src/main/java/org/finos/legend/engine/language/sql/grammar/integration/SQLGrammarParserExtension.java @@ -15,11 +15,18 @@ package org.finos.legend.engine.language.sql.grammar.integration; import org.eclipse.collections.api.factory.Lists; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.language.pure.grammar.from.extension.EmbeddedPureParser; import org.finos.legend.engine.language.pure.grammar.from.extension.PureGrammarParserExtension; public class SQLGrammarParserExtension implements PureGrammarParserExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Query", "SQL"); + } + @Override public Iterable getExtraEmbeddedPureParsers() { diff --git a/legend-engine-xts-sql/legend-engine-xt-sql-grammar-integration/src/main/java/org/finos/legend/engine/language/sql/grammar/integration/SQLPureGrammarComposerExtension.java b/legend-engine-xts-sql/legend-engine-xt-sql-grammar-integration/src/main/java/org/finos/legend/engine/language/sql/grammar/integration/SQLPureGrammarComposerExtension.java index 43a66e255b7..3955b53845c 100644 --- a/legend-engine-xts-sql/legend-engine-xt-sql-grammar-integration/src/main/java/org/finos/legend/engine/language/sql/grammar/integration/SQLPureGrammarComposerExtension.java +++ b/legend-engine-xts-sql/legend-engine-xt-sql-grammar-integration/src/main/java/org/finos/legend/engine/language/sql/grammar/integration/SQLPureGrammarComposerExtension.java @@ -16,6 +16,7 @@ import org.eclipse.collections.api.block.function.Function2; import org.eclipse.collections.api.factory.Maps; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.language.pure.grammar.to.PureGrammarComposerContext; import org.finos.legend.engine.language.pure.grammar.to.extension.PureGrammarComposerExtension; import org.finos.legend.engine.language.sql.grammar.to.SQLGrammarComposer; @@ -25,6 +26,12 @@ public class SQLPureGrammarComposerExtension implements PureGrammarComposerExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Query", "SQL"); + } + @Override public Map> getExtraEmbeddedPureComposers() { diff --git a/legend-engine-xts-sql/legend-engine-xt-sql-grammar-integration/src/main/java/org/finos/legend/engine/language/sql/grammar/integration/SQLPureProtocolExtension.java b/legend-engine-xts-sql/legend-engine-xt-sql-grammar-integration/src/main/java/org/finos/legend/engine/language/sql/grammar/integration/SQLPureProtocolExtension.java index ece2769f322..3fc9a17eb02 100644 --- a/legend-engine-xts-sql/legend-engine-xt-sql-grammar-integration/src/main/java/org/finos/legend/engine/language/sql/grammar/integration/SQLPureProtocolExtension.java +++ b/legend-engine-xts-sql/legend-engine-xt-sql-grammar-integration/src/main/java/org/finos/legend/engine/language/sql/grammar/integration/SQLPureProtocolExtension.java @@ -14,6 +14,7 @@ package org.finos.legend.engine.language.sql.grammar.integration; +import org.eclipse.collections.api.list.MutableList; import org.eclipse.collections.impl.factory.Maps; import org.finos.legend.engine.protocol.pure.v1.extension.PureProtocolExtension; import org.finos.legend.engine.protocol.sql.metamodel.Node; @@ -22,6 +23,12 @@ public class SQLPureProtocolExtension implements PureProtocolExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("Query", "SQL"); + } + @Override public Map getExtraClassInstanceTypeMappings() { diff --git a/legend-engine-xts-text/legend-engine-xt-text-compiler/pom.xml b/legend-engine-xts-text/legend-engine-xt-text-compiler/pom.xml index 50addb0840a..3a7dcad4ff3 100644 --- a/legend-engine-xts-text/legend-engine-xt-text-compiler/pom.xml +++ b/legend-engine-xts-text/legend-engine-xt-text-compiler/pom.xml @@ -49,6 +49,15 @@ + + org.eclipse.collections + eclipse-collections + + + org.eclipse.collections + eclipse-collections-api + + junit diff --git a/legend-engine-xts-text/legend-engine-xt-text-compiler/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/TextCompilerExtension.java b/legend-engine-xts-text/legend-engine-xt-text-compiler/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/TextCompilerExtension.java index 920e0353efa..c166b1c34cf 100644 --- a/legend-engine-xts-text/legend-engine-xt-text-compiler/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/TextCompilerExtension.java +++ b/legend-engine-xts-text/legend-engine-xt-text-compiler/src/main/java/org/finos/legend/engine/language/pure/compiler/toPureGraph/TextCompilerExtension.java @@ -14,6 +14,7 @@ package org.finos.legend.engine.language.pure.compiler.toPureGraph; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.language.pure.compiler.toPureGraph.extension.CompilerExtension; import org.finos.legend.engine.language.pure.compiler.toPureGraph.extension.Processor; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.text.Text; @@ -23,6 +24,12 @@ public class TextCompilerExtension implements CompilerExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("PackageableElement", "Text"); + } + @Override public CompilerExtension build() { diff --git a/legend-engine-xts-text/legend-engine-xt-text-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/from/TextParserExtension.java b/legend-engine-xts-text/legend-engine-xt-text-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/from/TextParserExtension.java index 5a4c17aa9c5..107e8edea0c 100644 --- a/legend-engine-xts-text/legend-engine-xt-text-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/from/TextParserExtension.java +++ b/legend-engine-xts-text/legend-engine-xt-text-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/from/TextParserExtension.java @@ -17,6 +17,7 @@ import org.antlr.v4.runtime.CharStream; import org.antlr.v4.runtime.CharStreams; import org.antlr.v4.runtime.CommonTokenStream; +import org.eclipse.collections.api.list.MutableList; import org.eclipse.collections.impl.factory.Lists; import org.finos.legend.engine.language.pure.grammar.from.antlr4.TextLexerGrammar; import org.finos.legend.engine.language.pure.grammar.from.antlr4.TextParserGrammar; @@ -32,6 +33,12 @@ public class TextParserExtension implements PureGrammarParserExtension { public static final String NAME = "Text"; + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("PackageableElement", "Text"); + } + @Override public Iterable getExtraSectionParsers() { diff --git a/legend-engine-xts-text/legend-engine-xt-text-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/to/TextGrammarComposerExtension.java b/legend-engine-xts-text/legend-engine-xt-text-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/to/TextGrammarComposerExtension.java index da4794debc0..7df744c4c33 100644 --- a/legend-engine-xts-text/legend-engine-xt-text-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/to/TextGrammarComposerExtension.java +++ b/legend-engine-xts-text/legend-engine-xt-text-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/to/TextGrammarComposerExtension.java @@ -33,6 +33,12 @@ public class TextGrammarComposerExtension implements PureGrammarComposerExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("PackageableElement", "Text"); + } + private MutableList> renderers = Lists.mutable.with((element, context) -> { if (element instanceof Text) diff --git a/legend-engine-xts-text/legend-engine-xt-text-protocol/pom.xml b/legend-engine-xts-text/legend-engine-xt-text-protocol/pom.xml index 0520444b8f5..defed4c4f0e 100644 --- a/legend-engine-xts-text/legend-engine-xt-text-protocol/pom.xml +++ b/legend-engine-xts-text/legend-engine-xt-text-protocol/pom.xml @@ -50,6 +50,10 @@ org.eclipse.collections eclipse-collections-api + + org.eclipse.collections + eclipse-collections + diff --git a/legend-engine-xts-text/legend-engine-xt-text-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/TextProtocolExtension.java b/legend-engine-xts-text/legend-engine-xt-text-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/TextProtocolExtension.java index 08bd9aa891b..75a16ee7580 100644 --- a/legend-engine-xts-text/legend-engine-xt-text-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/TextProtocolExtension.java +++ b/legend-engine-xts-text/legend-engine-xt-text-protocol/src/main/java/org/finos/legend/engine/protocol/pure/v1/TextProtocolExtension.java @@ -17,6 +17,7 @@ import org.eclipse.collections.api.block.function.Function0; import org.eclipse.collections.api.factory.Lists; import org.eclipse.collections.api.factory.Maps; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.protocol.pure.v1.extension.ProtocolSubTypeInfo; import org.finos.legend.engine.protocol.pure.v1.extension.PureProtocolExtension; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.PackageableElement; @@ -27,6 +28,12 @@ public class TextProtocolExtension implements PureProtocolExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("PackageableElement", "Text"); + } + @Override public List>>> getExtraProtocolSubTypeInfoCollectors() { diff --git a/legend-engine-xts-xml/legend-engine-xt-xml-javaPlatformBinding-pure/src/main/java/org/finos/legend/pure/code/core/XMLJavaBindingLegendPureCoreExtension.java b/legend-engine-xts-xml/legend-engine-xt-xml-javaPlatformBinding-pure/src/main/java/org/finos/legend/pure/code/core/XMLJavaBindingLegendPureCoreExtension.java index a9c19bd78d6..52a13a94647 100644 --- a/legend-engine-xts-xml/legend-engine-xt-xml-javaPlatformBinding-pure/src/main/java/org/finos/legend/pure/code/core/XMLJavaBindingLegendPureCoreExtension.java +++ b/legend-engine-xts-xml/legend-engine-xt-xml-javaPlatformBinding-pure/src/main/java/org/finos/legend/pure/code/core/XMLJavaBindingLegendPureCoreExtension.java @@ -14,10 +14,17 @@ package org.finos.legend.pure.code.core; -import org.finos.legend.engine.pure.code.core.BindingLegendPureCoreExtension; +import org.eclipse.collections.api.list.MutableList; +import org.finos.legend.engine.pure.code.core.JavaBindingLegendPureCoreExtension; -public class XMLJavaBindingLegendPureCoreExtension implements BindingLegendPureCoreExtension +public class XMLJavaBindingLegendPureCoreExtension implements JavaBindingLegendPureCoreExtension { + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("External_Format", "XML"); + } + @Override public String functionFile() { diff --git a/legend-engine-xts-xml/legend-engine-xt-xml-model/src/main/java/org/finos/legend/engine/external/format/xsd/XsdExternalFormatExtension.java b/legend-engine-xts-xml/legend-engine-xt-xml-model/src/main/java/org/finos/legend/engine/external/format/xsd/XsdExternalFormatExtension.java index af0c3be61c6..c8b4fe77f8a 100644 --- a/legend-engine-xts-xml/legend-engine-xt-xml-model/src/main/java/org/finos/legend/engine/external/format/xsd/XsdExternalFormatExtension.java +++ b/legend-engine-xts-xml/legend-engine-xt-xml-model/src/main/java/org/finos/legend/engine/external/format/xsd/XsdExternalFormatExtension.java @@ -14,6 +14,7 @@ package org.finos.legend.engine.external.format.xsd; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.external.format.xsd.compile.XsdCompiler; import org.finos.legend.engine.external.format.xsd.toModel.XsdToModelConfiguration; import org.finos.legend.engine.external.shared.format.model.compile.ExternalSchemaCompileContext; @@ -33,6 +34,12 @@ public class XsdExternalFormatExtension implements ExternalFormatModelGeneration private static final Root_meta_external_format_shared_ExternalFormatContract xsdContract = (Root_meta_external_format_shared_ExternalFormatContract) core_external_format_xml_externalFormatContract.Root_meta_external_format_xml_contract_xsdFormatContract__ExternalFormatContract_1_(PureModel.CORE_PURE_MODEL.getExecutionSupport()); public static final String TYPE = xsdContract._id(); + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("External_Format", "XML"); + } + @Override public Root_meta_external_format_shared_ExternalFormatContract getExternalFormatContract() { diff --git a/legend-engine-xts-xml/legend-engine-xt-xml-pure/src/main/java/org/finos/legend/pure/code/core/XMLLegendPureCoreExtension.java b/legend-engine-xts-xml/legend-engine-xt-xml-pure/src/main/java/org/finos/legend/pure/code/core/XMLLegendPureCoreExtension.java index 1d0439a82f6..7ae56a8a504 100644 --- a/legend-engine-xts-xml/legend-engine-xt-xml-pure/src/main/java/org/finos/legend/pure/code/core/XMLLegendPureCoreExtension.java +++ b/legend-engine-xts-xml/legend-engine-xt-xml-pure/src/main/java/org/finos/legend/pure/code/core/XMLLegendPureCoreExtension.java @@ -14,6 +14,7 @@ package org.finos.legend.pure.code.core; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.pure.code.core.ExternalFormatLegendPureCoreExtension; public class XMLLegendPureCoreExtension implements ExternalFormatLegendPureCoreExtension @@ -29,4 +30,10 @@ public String functionSignature() { return "meta::external::format::xml::extension::xsdFormatExtension__Extension_1_"; } + + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("External_Format", "XML"); + } } diff --git a/legend-engine-xts-xml/legend-engine-xt-xml-runtime/src/main/java/org/finos/legend/engine/external/format/xml/XmlJavaCompilerExtension.java b/legend-engine-xts-xml/legend-engine-xt-xml-runtime/src/main/java/org/finos/legend/engine/external/format/xml/XmlJavaCompilerExtension.java index 9a96c232fcc..9cccdde8397 100644 --- a/legend-engine-xts-xml/legend-engine-xt-xml-runtime/src/main/java/org/finos/legend/engine/external/format/xml/XmlJavaCompilerExtension.java +++ b/legend-engine-xts-xml/legend-engine-xt-xml-runtime/src/main/java/org/finos/legend/engine/external/format/xml/XmlJavaCompilerExtension.java @@ -14,6 +14,7 @@ package org.finos.legend.engine.external.format.xml; +import org.eclipse.collections.api.list.MutableList; import org.finos.legend.engine.external.format.xml.read.DeserializeContext; import org.finos.legend.engine.external.format.xml.read.IXmlDeserializeExecutionNodeSpecifics; import org.finos.legend.engine.external.format.xml.read.ReadHandler; @@ -82,6 +83,12 @@ public class XmlJavaCompilerExtension implements ExecutionPlanJavaCompilerExtens DEPENDENCIES.put(PURE_PACKAGE + "h_TextContent", TextContent.class); } + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("External_Format", "XML"); + } + @Override public ClassPathFilter getExtraClassPathFilter() { diff --git a/legend-engine-xts-xml/legend-engine-xt-xml-runtime/src/main/java/org/finos/legend/engine/external/format/xml/XsdRuntimeExtension.java b/legend-engine-xts-xml/legend-engine-xt-xml-runtime/src/main/java/org/finos/legend/engine/external/format/xml/XsdRuntimeExtension.java index f55fe708c2c..e0ab8a96372 100644 --- a/legend-engine-xts-xml/legend-engine-xt-xml-runtime/src/main/java/org/finos/legend/engine/external/format/xml/XsdRuntimeExtension.java +++ b/legend-engine-xts-xml/legend-engine-xt-xml-runtime/src/main/java/org/finos/legend/engine/external/format/xml/XsdRuntimeExtension.java @@ -43,6 +43,12 @@ public List getContentTypes() return Collections.singletonList(CONTENT_TYPE); } + @Override + public MutableList group() + { + return org.eclipse.collections.impl.factory.Lists.mutable.with("External_Format", "XML"); + } + @Override public StreamingObjectResult executeInternalizeExecutionNode(ExternalFormatInternalizeExecutionNode node, InputStream inputStream, MutableList profiles, ExecutionState executionState) { diff --git a/pom.xml b/pom.xml index b97e14f38dd..09ab8ebb67a 100644 --- a/pom.xml +++ b/pom.xml @@ -3368,6 +3368,12 @@ + + org.jline + jline + 3.25.0 + +