From e9c5379f6b29a4ccb699652fb6ca4c03cbd4d7fb Mon Sep 17 00:00:00 2001 From: Mauricio Uyaguari Date: Mon, 18 Nov 2024 13:24:50 -0500 Subject: [PATCH] partition dataspace analytics results (#3252) --- .../pom.xml | 4 + ...eAnalyticsArtifactGenerationExtension.java | 83 ++++++- .../analytics/DataSpaceAnalyticsHelper.java | 14 +- .../MappingAnalysisCoveragePartition.java | 25 ++ .../MappingModelCoveragePartition.java | 25 ++ ...eAnalyticsArtifactGenerationExtension.java | 220 ++++++++++++++++-- .../core_data_space/analytics/analytics.pure | 16 +- 7 files changed, 352 insertions(+), 35 deletions(-) create mode 100644 legend-engine-xts-data-space/legend-engine-xt-data-space-generation/src/main/java/org/finos/legend/engine/generation/analytics/partition/MappingAnalysisCoveragePartition.java create mode 100644 legend-engine-xts-data-space/legend-engine-xt-data-space-generation/src/main/java/org/finos/legend/engine/generation/analytics/partition/MappingModelCoveragePartition.java diff --git a/legend-engine-xts-data-space/legend-engine-xt-data-space-generation/pom.xml b/legend-engine-xts-data-space/legend-engine-xt-data-space-generation/pom.xml index 5239245784a..bdda05cbae1 100644 --- a/legend-engine-xts-data-space/legend-engine-xt-data-space-generation/pom.xml +++ b/legend-engine-xts-data-space/legend-engine-xt-data-space-generation/pom.xml @@ -131,6 +131,10 @@ + + com.fasterxml.jackson.core + jackson-core + com.fasterxml.jackson.core jackson-annotations 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 230b9b6a608..89bf13d52e2 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 @@ -17,15 +17,22 @@ import static org.finos.legend.engine.language.pure.compiler.toPureGraph.HelperModelBuilder.getElementFullPath; import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.Collections; + +import java.util.HashSet; import java.util.List; +import java.util.Map; +import java.util.Set; +import org.eclipse.collections.api.factory.Lists; 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.generation.analytics.partition.MappingAnalysisCoveragePartition; +import org.finos.legend.engine.generation.analytics.partition.MappingModelCoveragePartition; 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.protocol.analytics.model.MappingModelCoverageAnalysisResult; import org.finos.legend.engine.protocol.pure.v1.model.context.PureModelContextData; import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.dataSpace.DataSpace; import org.finos.legend.engine.shared.core.operational.Assert; @@ -36,6 +43,11 @@ public class DataSpaceAnalyticsArtifactGenerationExtension implements ArtifactGenerationExtension { public final String ROOT_PATH = "dataSpace-analytics"; + private boolean returnLightGraph = false; + private final String MAIN_ANALYTICS_FILE = "AnalyticsResult.json"; + private final String MAPPING_MODEL_PREFIX = "MappingModel_"; + private final String MAPPING_ANALYSIS_FILE_PREFIX = "MappingAnalysis_"; + private final String ANALYTICS_FORMAT = "json"; public static ObjectMapper objectMapper = DataSpaceAnalyticsHelper.getNewObjectMapper(); @@ -51,6 +63,11 @@ public String getKey() return ROOT_PATH; } + public void setReturnLightGraph(boolean returnLightGraph) + { + this.returnLightGraph = returnLightGraph; + } + @Override public boolean canGenerate(PackageableElement element) { @@ -60,22 +77,78 @@ public boolean canGenerate(PackageableElement element) @Override public List generate(PackageableElement element, PureModel pureModel, PureModelContextData data, String clientVersion) { - String fileName = "AnalyticsResult.json"; + String dataSpacePath = getElementFullPath(element, pureModel.getExecutionSupport()); Assert.assertTrue(this.canGenerate(element), () -> "DataSpace analytics only supports dataSpace elements"); Root_meta_pure_metamodel_dataSpace_DataSpace dataSpace = (Root_meta_pure_metamodel_dataSpace_DataSpace) element; org.finos.legend.engine.protocol.pure.v1.model.packageableElement.PackageableElement dataSpaceProtocol = data.getElements().stream().filter(el -> dataSpacePath.equals(el.getPath())).findFirst().orElse(null); Assert.assertTrue(dataSpaceProtocol instanceof DataSpace, () -> "Can't find data space '" + dataSpacePath + "'"); - DataSpaceAnalysisResult result = DataSpaceAnalyticsHelper.analyzeDataSpace(dataSpace, pureModel, (DataSpace) dataSpaceProtocol, data, clientVersion); + DataSpaceAnalysisResult result = DataSpaceAnalyticsHelper.analyzeDataSpace(dataSpace, pureModel, (DataSpace) dataSpaceProtocol, data, clientVersion, this.returnLightGraph); + + // Partition + List mappingModelPartitions = Lists.mutable.empty(); + List mappingAnalysisPartitions = Lists.mutable.empty(); + partitionDataSpaceAnalyticsResult(result,mappingModelPartitions, mappingAnalysisPartitions); try { + List artifacts = Lists.mutable.empty(); String stringResult = objectMapper.writeValueAsString(result); - Artifact output = new Artifact(stringResult, fileName, "json"); - return Collections.singletonList(output); + artifacts.add(new Artifact(stringResult, MAIN_ANALYTICS_FILE, ANALYTICS_FORMAT)); + if (mappingModelPartitions != null && !mappingModelPartitions.isEmpty()) + { + for (int i = 0; i < mappingModelPartitions.size(); i++) + { + MappingModelCoveragePartition modelPartition = mappingModelPartitions.get(i); + String fileName = MAPPING_MODEL_PREFIX + i + "." + ANALYTICS_FORMAT; + artifacts.add(new Artifact(objectMapper.writeValueAsString(modelPartition), fileName, "json")); + } + } + if (mappingAnalysisPartitions != null && !mappingAnalysisPartitions.isEmpty()) + { + for (int i = 0; i < mappingAnalysisPartitions.size(); i++) + { + MappingAnalysisCoveragePartition analysisPartition = mappingAnalysisPartitions.get(i); + String fileName = MAPPING_ANALYSIS_FILE_PREFIX + i + "." + ANALYTICS_FORMAT; + artifacts.add(new Artifact(objectMapper.writeValueAsString(analysisPartition), fileName, ANALYTICS_FORMAT)); + } + } + return artifacts; } catch (Exception exception) { throw new EngineException("Can't serialize data space analysis result", exception); } } + + + private void partitionDataSpaceAnalyticsResult(DataSpaceAnalysisResult result, List mappingModelPartitions, List mappingAnalysisPartitions) + { + Map mappingToMappingCoverageResult = result.mappingToMappingCoverageResult; + if (mappingToMappingCoverageResult != null && !mappingToMappingCoverageResult.isEmpty()) + { + Set mappingsToRemove = new HashSet<>(); + mappingToMappingCoverageResult.forEach((mapping, mappingCoverageResult) -> + { + if (mappingCoverageResult.model != null) + { + MappingModelCoveragePartition modelPartition = new MappingModelCoveragePartition(); + modelPartition.mapping = mapping; + modelPartition.model = mappingCoverageResult.model; + mappingModelPartitions.add(modelPartition); + // remove model from coverage result + mappingCoverageResult.model = null; + } + MappingAnalysisCoveragePartition mappingCoverageModelPartition = new MappingAnalysisCoveragePartition(); + mappingCoverageModelPartition.mapping = mapping; + mappingCoverageModelPartition.analysisResult = mappingCoverageResult; + mappingAnalysisPartitions.add(mappingCoverageModelPartition); + mappingsToRemove.add(mapping); + }); + mappingsToRemove.forEach(mappingToMappingCoverageResult::remove); + } + } + + + + } diff --git a/legend-engine-xts-data-space/legend-engine-xt-data-space-generation/src/main/java/org/finos/legend/engine/generation/analytics/DataSpaceAnalyticsHelper.java b/legend-engine-xts-data-space/legend-engine-xt-data-space-generation/src/main/java/org/finos/legend/engine/generation/analytics/DataSpaceAnalyticsHelper.java index 08645b97aab..86636eee69b 100644 --- a/legend-engine-xts-data-space/legend-engine-xt-data-space-generation/src/main/java/org/finos/legend/engine/generation/analytics/DataSpaceAnalyticsHelper.java +++ b/legend-engine-xts-data-space/legend-engine-xt-data-space-generation/src/main/java/org/finos/legend/engine/generation/analytics/DataSpaceAnalyticsHelper.java @@ -301,12 +301,6 @@ private static MappingModelCoverageAnalysisResult buildMappingModelCoverageAnaly return null; } - public static DataSpaceAnalysisResult analyzeDataSpace(Root_meta_pure_metamodel_dataSpace_DataSpace dataSpace, PureModel pureModel, DataSpace dataSpaceProtocol, PureModelContextData pureModelContextData, String clientVersion) - { - boolean forDisableLightGraph = false; - boolean isDataspaceInDev = dataSpace._stereotypes().anySatisfy(stereotype -> stereotype._profile()._name().equals("devStatus") && stereotype._profile()._p_stereotypes().anySatisfy(s -> s._value().equals("inProgress"))); - return analyzeDataSpace(dataSpace, pureModel, dataSpaceProtocol, pureModelContextData, clientVersion, Lists.mutable.withAll(ServiceLoader.load(PlanGeneratorExtension.class)), EntitlementServiceExtensionLoader.extensions(), forDisableLightGraph && !isDataspaceInDev); - } public static DataSpaceAnalysisResult analyzeDataSpaceCoverage(Root_meta_pure_metamodel_dataSpace_DataSpace dataSpace, PureModel pureModel, DataSpace dataSpaceProtocol, PureModelContextData pureModelContextData, String clientVersion, MutableList generatorExtensions, List entitlementServiceExtensions, boolean returnLightGraph) { @@ -404,6 +398,13 @@ else if (!result.mappingToMappingCoverageResult.containsKey(excResult.mapping)) return result; } + + public static DataSpaceAnalysisResult analyzeDataSpace(Root_meta_pure_metamodel_dataSpace_DataSpace dataSpace, PureModel pureModel, DataSpace dataSpaceProtocol, PureModelContextData pureModelContextData, String clientVersion, boolean returnLightGraph) + { + boolean isDataSpaceInDev = dataSpace._stereotypes().anySatisfy(stereotype -> stereotype._profile()._name().equals("devStatus") && stereotype._profile()._p_stereotypes().anySatisfy(s -> s._value().equals("inProgress"))); + return analyzeDataSpace(dataSpace, pureModel, dataSpaceProtocol, pureModelContextData, clientVersion, Lists.mutable.withAll(ServiceLoader.load(PlanGeneratorExtension.class)), EntitlementServiceExtensionLoader.extensions(), returnLightGraph && !isDataSpaceInDev); + } + public static DataSpaceAnalysisResult analyzeDataSpace(Root_meta_pure_metamodel_dataSpace_DataSpace dataSpace, PureModel pureModel, DataSpace dataSpaceProtocol, PureModelContextData pureModelContextData, String clientVersion, MutableList generatorExtensions, List entitlementServiceExtensions, boolean returnLightGraph) { Root_meta_pure_metamodel_dataSpace_analytics_DataSpaceAnalysisResult analysisResult = core_data_space_analytics_analytics.Root_meta_pure_metamodel_dataSpace_analytics_analyzeDataSpace_DataSpace_1__PackageableRuntime_MANY__Boolean_1__DataSpaceAnalysisResult_1_( @@ -566,4 +567,5 @@ else if (elementDoc instanceof Root_meta_pure_metamodel_dataSpace_analytics_Data return result; } + } diff --git a/legend-engine-xts-data-space/legend-engine-xt-data-space-generation/src/main/java/org/finos/legend/engine/generation/analytics/partition/MappingAnalysisCoveragePartition.java b/legend-engine-xts-data-space/legend-engine-xt-data-space-generation/src/main/java/org/finos/legend/engine/generation/analytics/partition/MappingAnalysisCoveragePartition.java new file mode 100644 index 00000000000..4ac106e6ff6 --- /dev/null +++ b/legend-engine-xts-data-space/legend-engine-xt-data-space-generation/src/main/java/org/finos/legend/engine/generation/analytics/partition/MappingAnalysisCoveragePartition.java @@ -0,0 +1,25 @@ +// Copyright 2022 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.generation.analytics.partition; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import org.finos.legend.engine.protocol.analytics.model.MappingModelCoverageAnalysisResult; + +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "_type") +public class MappingAnalysisCoveragePartition +{ + public String mapping; + public MappingModelCoverageAnalysisResult analysisResult; +} diff --git a/legend-engine-xts-data-space/legend-engine-xt-data-space-generation/src/main/java/org/finos/legend/engine/generation/analytics/partition/MappingModelCoveragePartition.java b/legend-engine-xts-data-space/legend-engine-xt-data-space-generation/src/main/java/org/finos/legend/engine/generation/analytics/partition/MappingModelCoveragePartition.java new file mode 100644 index 00000000000..4802b6acc04 --- /dev/null +++ b/legend-engine-xts-data-space/legend-engine-xt-data-space-generation/src/main/java/org/finos/legend/engine/generation/analytics/partition/MappingModelCoveragePartition.java @@ -0,0 +1,25 @@ +// Copyright 2022 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.generation.analytics.partition; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import org.finos.legend.engine.protocol.pure.v1.model.context.PureModelContextData; + +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "_type") +public class MappingModelCoveragePartition +{ + public String mapping; + public PureModelContextData model; +} diff --git a/legend-engine-xts-data-space/legend-engine-xt-data-space-generation/src/test/java/org/finos/legend/engine/generation/TestDataSpaceAnalyticsArtifactGenerationExtension.java b/legend-engine-xts-data-space/legend-engine-xt-data-space-generation/src/test/java/org/finos/legend/engine/generation/TestDataSpaceAnalyticsArtifactGenerationExtension.java index 8baf4323094..915b28df5d5 100644 --- a/legend-engine-xts-data-space/legend-engine-xt-data-space-generation/src/test/java/org/finos/legend/engine/generation/TestDataSpaceAnalyticsArtifactGenerationExtension.java +++ b/legend-engine-xts-data-space/legend-engine-xt-data-space-generation/src/test/java/org/finos/legend/engine/generation/TestDataSpaceAnalyticsArtifactGenerationExtension.java @@ -14,16 +14,22 @@ package org.finos.legend.engine.generation; +import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; +import org.eclipse.collections.api.factory.Maps; import org.eclipse.collections.api.list.ImmutableList; +import org.eclipse.collections.api.map.MutableMap; import org.finos.legend.engine.generation.analytics.DataSpaceAnalyticsHelper; import org.finos.legend.engine.generation.analytics.model.DataSpaceAnalysisResult; +import org.finos.legend.engine.generation.analytics.partition.MappingAnalysisCoveragePartition; +import org.finos.legend.engine.generation.analytics.partition.MappingModelCoveragePartition; import org.finos.legend.engine.language.pure.compiler.Compiler; 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.grammar.from.PureGrammarParser; import org.finos.legend.engine.protocol.pure.PureClientVersions; import org.finos.legend.engine.protocol.pure.v1.model.context.PureModelContextData; +import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.dataSpace.DataSpace; import org.finos.legend.engine.shared.core.deployment.DeploymentMode; import org.finos.legend.engine.shared.core.deployment.DeploymentStateAndVersions; import org.finos.legend.engine.shared.core.identity.Identity; @@ -33,6 +39,8 @@ import java.net.URL; import java.util.List; +import java.util.Set; +import java.util.stream.Collectors; public class TestDataSpaceAnalyticsArtifactGenerationExtension { @@ -58,87 +66,261 @@ private String getResourceAsString(String path) } } - private void testDataSpaceAnalyticsArtifactGenerationExtension(String modelFilePath, String dataSpacePath, String expectedAnalysisResult) throws Exception + private void testDataSpaceAnalyticsArtifactGenerationExtension(String modelFilePath, String dataSpacePath, String expectedAnalysisResult, MutableMap mappingAnalysisResult, MutableMap mappingModelResult, boolean enableLightGraph) throws Exception { String pureModelString = getResourceAsString(modelFilePath); PureModelContextData pureModelContextData = PureGrammarParser.newInstance().parseModel(pureModelString, false); PureModel pureModel = Compiler.compile(pureModelContextData, DeploymentMode.TEST, Identity.getAnonymousIdentity().getName()); DataSpaceAnalyticsArtifactGenerationExtension extension = new DataSpaceAnalyticsArtifactGenerationExtension(); + extension.setReturnLightGraph(enableLightGraph); org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.PackageableElement packageableElement = pureModel.getPackageableElement(dataSpacePath); Assert.assertTrue(packageableElement instanceof Root_meta_pure_metamodel_dataSpace_DataSpace); Root_meta_pure_metamodel_dataSpace_DataSpace metamodelDataSpace = (Root_meta_pure_metamodel_dataSpace_DataSpace) packageableElement; + DataSpace dataSpaceProtocol = pureModelContextData.getElementsOfType(DataSpace.class).stream().filter(e -> e.getPath().equals(dataSpacePath)).findFirst().get(); + Set mappings = dataSpaceProtocol.executionContexts.stream().map(e -> e.mapping.path).collect(Collectors.toSet()); Assert.assertTrue(extension.canGenerate(metamodelDataSpace)); for (String pureClient : testVersions) { List outputs = extension.generate(packageableElement, pureModel, pureModelContextData, pureClient); - Assert.assertEquals(1, outputs.size()); - Artifact dataSpaceAnalyticsResult = outputs.get(0); - Assert.assertEquals(dataSpaceAnalyticsResult.format, "json"); - Assert.assertEquals(dataSpaceAnalyticsResult.path, "AnalyticsResult.json"); - Assert.assertEquals(expectedAnalysisResult, dataSpaceAnalyticsResult.content); - objectMapper.readValue(dataSpaceAnalyticsResult.content, DataSpaceAnalysisResult.class); + int expectedFiles = 1 + mappings.size() + (enableLightGraph ? mappings.size() : 0); + Assert.assertEquals(expectedFiles, outputs.size()); + for (Artifact output : outputs) + { + testArtifact(output, expectedAnalysisResult, mappingAnalysisResult, mappingModelResult); + } + } + } + + void testArtifact(Artifact artifact, String expectedAnalysisResult, MutableMap mappingAnalysisResult, MutableMap mappingModelResult) throws JsonProcessingException + { + String path = artifact.path; + if (path.equals("AnalyticsResult.json")) + { + Assert.assertEquals(artifact.format, "json"); + Assert.assertEquals(artifact.path, "AnalyticsResult.json"); + Assert.assertEquals(expectedAnalysisResult, artifact.content); + DataSpaceAnalysisResult analysisResult = objectMapper.readValue(artifact.content, DataSpaceAnalysisResult.class); + Assert.assertEquals(analysisResult.mappingToMappingCoverageResult.size(),0); + } + else if (path.startsWith("MappingAnalysis_")) + { + MappingAnalysisCoveragePartition mappingAnalysisCoveragePartition = objectMapper.readValue(artifact.content, MappingAnalysisCoveragePartition.class); + String expectedContext = mappingAnalysisResult.get(mappingAnalysisCoveragePartition.mapping); + Assert.assertEquals(expectedContext, artifact.content); + } + else if (path.startsWith("MappingModel_")) + { + MappingModelCoveragePartition mappingModelCoveragePartition = objectMapper.readValue(artifact.content, MappingModelCoveragePartition.class); + String expectedContext = mappingModelResult.get(mappingModelCoveragePartition.mapping); + Assert.assertEquals(expectedContext, artifact.content); + } + else + { + Assert.fail("Unsupported dataSpace path" + artifact.path); } } @Test public void testAnalyticsForBasicDataSpace() throws Exception { - testDataSpaceAnalyticsArtifactGenerationExtension("models/dataSpaceBasic.pure", "model::animal::AnimalDS_Old", "{\"defaultExecutionContext\":\"dummyContext\",\"description\":\"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\",\"diagrams\":[{\"diagram\":\"model::animal::AnimalDiagram\",\"title\":\"\"},{\"diagram\":\"model::GeneralDiagram\",\"title\":\"\"}],\"elementDocs\":[],\"elements\":[],\"executables\":[],\"executionContexts\":[{\"compatibleRuntimes\":[\"model::dummyRuntime\"],\"datasets\":[],\"defaultRuntime\":\"model::dummyRuntime\",\"description\":\"An important execution context\",\"mapping\":\"model::dummyMapping\",\"name\":\"dummyContext\"},{\"compatibleRuntimes\":[\"model::dummyRuntime\",\"model::dummyRuntime2\"],\"datasets\":[],\"defaultRuntime\":\"model::dummyRuntime\",\"mapping\":\"model::dummyMapping2\",\"name\":\"dummyContext2\"},{\"compatibleRuntimes\":[\"model::dummyRuntime\",\"model::dummyRuntime2\"],\"defaultRuntime\":\"model::dummyRuntime2\",\"mapping\":\"model::dummyMapping2\",\"name\":\"dummyContext3\"}],\"mappingToMappingCoverageResult\":{\"model::dummyMapping\":{\"mappedEntities\":[]},\"model::dummyMapping2\":{\"mappedEntities\":[]}},\"model\":{\"_type\":\"data\",\"elements\":[{\"_type\":\"profile\",\"name\":\"doc\",\"package\":\"meta::pure::profiles\",\"stereotypes\":[\"deprecated\"],\"tags\":[\"doc\",\"todo\"]},{\"_type\":\"diagram\",\"classViews\":[{\"class\":\"model::animal::reptile::Reptile\",\"id\":\"4cec85f9-9b66-450a-bdcb-c855aa0314e1\",\"position\":{\"x\":568.0,\"y\":404.0},\"rectangle\":{\"height\":58.0,\"width\":120.84765625}},{\"class\":\"model::animal::Animal\",\"id\":\"902bf14e-e7ff-40e7-92e4-8780f91bfa29\",\"position\":{\"x\":809.0,\"y\":187.0},\"rectangle\":{\"height\":44.0,\"width\":108.64453125}}],\"generalizationViews\":[{\"line\":{\"points\":[{\"x\":628.423828125,\"y\":433.0},{\"x\":863.322265625,\"y\":209.0}]},\"sourceView\":\"4cec85f9-9b66-450a-bdcb-c855aa0314e1\",\"targetView\":\"902bf14e-e7ff-40e7-92e4-8780f91bfa29\"}],\"name\":\"GeneralDiagram\",\"package\":\"model\",\"propertyViews\":[]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"Animal\",\"originalMilestonedProperties\":[],\"package\":\"model::animal\",\"properties\":[{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"model::animal::Family\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"family\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"Number\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"noOfLegs\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"model::animal::GenericAnimal2\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0},\"name\":\"children\",\"stereotypes\":[],\"taggedValues\":[]}],\"qualifiedProperties\":[{\"body\":[{\"_type\":\"func\",\"fControl\":\"greaterThan_Number_1__Number_1__Boolean_1_\",\"function\":\"greaterThan\",\"parameters\":[{\"_type\":\"property\",\"parameters\":[{\"_type\":\"var\",\"name\":\"this\"}],\"property\":\"noOfLegs\"},{\"_type\":\"integer\",\"value\":4}]}],\"name\":\"something\",\"parameters\":[],\"returnGenericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"Boolean\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"returnMultiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"stereotypes\":[],\"taggedValues\":[]},{\"body\":[{\"_type\":\"collection\",\"multiplicity\":{\"lowerBound\":0,\"upperBound\":0},\"values\":[]}],\"name\":\"something2\",\"parameters\":[],\"returnGenericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"model::animal::GenericAnimal\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"returnMultiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"stereotypes\":[],\"taggedValues\":[]}],\"stereotypes\":[],\"superTypes\":[],\"taggedValues\":[]},{\"_type\":\"diagram\",\"classViews\":[{\"class\":\"model::animal::mammal::Mammal\",\"id\":\"641a0336-d4b5-418c-b656-2f52461264e2\",\"position\":{\"x\":427.0,\"y\":210.0},\"rectangle\":{\"height\":44.0,\"width\":125.1123046875}},{\"class\":\"model::animal::reptile::Reptile\",\"id\":\"b92253d8-0389-4c7d-b5d2-3cdc3bb1ad98\",\"position\":{\"x\":787.0,\"y\":216.0},\"rectangle\":{\"height\":58.0,\"width\":120.84765625}},{\"class\":\"model::animal::Animal\",\"id\":\"7a992cfc-c888-4091-aa00-ab430915aced\",\"position\":{\"x\":515.423828125,\"y\":-7.5},\"rectangle\":{\"height\":100.0,\"width\":199.716796875}}],\"generalizationViews\":[{\"line\":{\"points\":[{\"x\":847.423828125,\"y\":245.0},{\"x\":615.2822265625,\"y\":42.5}]},\"sourceView\":\"b92253d8-0389-4c7d-b5d2-3cdc3bb1ad98\",\"targetView\":\"7a992cfc-c888-4091-aa00-ab430915aced\"}],\"name\":\"AnimalDiagram\",\"package\":\"model::animal\",\"propertyViews\":[]},{\"_type\":\"Enumeration\",\"name\":\"Family\",\"package\":\"model::animal\",\"stereotypes\":[],\"taggedValues\":[],\"values\":[{\"stereotypes\":[],\"taggedValues\":[],\"value\":\"UO\"},{\"stereotypes\":[],\"taggedValues\":[],\"value\":\"OP\"}]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"GenericAnimal\",\"originalMilestonedProperties\":[],\"package\":\"model::animal\",\"properties\":[],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[],\"taggedValues\":[]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"GenericAnimal2\",\"originalMilestonedProperties\":[],\"package\":\"model::animal\",\"properties\":[],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[],\"taggedValues\":[]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"Mammal\",\"originalMilestonedProperties\":[],\"package\":\"model::animal::mammal\",\"properties\":[{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"String\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"noOfLegs\",\"stereotypes\":[],\"taggedValues\":[]}],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[],\"taggedValues\":[]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"Reptile\",\"originalMilestonedProperties\":[],\"package\":\"model::animal::reptile\",\"properties\":[{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"Boolean\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"hasFin\",\"stereotypes\":[],\"taggedValues\":[]}],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[\"model::animal::Animal\"],\"taggedValues\":[{\"tag\":{\"profile\":\"meta::pure::profiles::doc\",\"value\":\"doc\"},\"value\":\"\"}]}]},\"name\":\"AnimalDS_Old\",\"package\":\"model::animal\",\"path\":\"model::animal::AnimalDS_Old\",\"stereotypes\":[{\"profile\":\"meta::pure::profiles::doc\",\"value\":\"deprecated\"}],\"supportInfo\":{\"_type\":\"email\",\"address\":\"someEmail@test.org\"},\"taggedValues\":[{\"profile\":\"meta::pure::profiles::enterprise\",\"tag\":\"taxonomyNodes\",\"value\":\"abcdxyz005\"},{\"profile\":\"meta::pure::profiles::doc\",\"tag\":\"doc\",\"value\":\"Lorem ipsum\"},{\"profile\":\"meta::pure::profiles::doc\",\"tag\":\"doc\",\"value\":\"Lorem ipsum2\"},{\"profile\":\"meta::pure::metamodel::dataSpace::profiles::DataSpaceInfo\",\"tag\":\"deprecationNotice\",\"value\":\"Please use AnimalDS dataspace instead - link provided\"}]}"); - testDataSpaceAnalyticsArtifactGenerationExtension("models/dataSpaceBasic.pure", "model::animal::AnimalDS", "{\"defaultExecutionContext\":\"dummyContext\",\"description\":\"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\",\"diagrams\":[{\"description\":\"Some diagram description\",\"diagram\":\"model::animal::AnimalDiagram\",\"title\":\"Diag 1\"},{\"description\":\"Some more diagram description\",\"diagram\":\"model::GeneralDiagram\",\"title\":\"Diag 2\"}],\"elementDocs\":[],\"elements\":[],\"executables\":[],\"executionContexts\":[{\"compatibleRuntimes\":[\"model::dummyRuntime\"],\"datasets\":[],\"defaultRuntime\":\"model::dummyRuntime\",\"description\":\"An important execution context\",\"mapping\":\"model::dummyMapping\",\"name\":\"dummyContext\",\"title\":\"Haha Nice\"},{\"compatibleRuntimes\":[\"model::dummyRuntime\",\"model::dummyRuntime2\"],\"datasets\":[],\"defaultRuntime\":\"model::dummyRuntime\",\"mapping\":\"model::dummyMapping2\",\"name\":\"dummyContext2\"},{\"compatibleRuntimes\":[\"model::dummyRuntime\",\"model::dummyRuntime2\"],\"defaultRuntime\":\"model::dummyRuntime2\",\"mapping\":\"model::dummyMapping2\",\"name\":\"dummyContext3\"}],\"mappingToMappingCoverageResult\":{\"model::dummyMapping\":{\"mappedEntities\":[]},\"model::dummyMapping2\":{\"mappedEntities\":[]}},\"model\":{\"_type\":\"data\",\"elements\":[{\"_type\":\"profile\",\"name\":\"doc\",\"package\":\"meta::pure::profiles\",\"stereotypes\":[\"deprecated\"],\"tags\":[\"doc\",\"todo\"]},{\"_type\":\"diagram\",\"classViews\":[{\"class\":\"model::animal::reptile::Reptile\",\"id\":\"4cec85f9-9b66-450a-bdcb-c855aa0314e1\",\"position\":{\"x\":568.0,\"y\":404.0},\"rectangle\":{\"height\":58.0,\"width\":120.84765625}},{\"class\":\"model::animal::Animal\",\"id\":\"902bf14e-e7ff-40e7-92e4-8780f91bfa29\",\"position\":{\"x\":809.0,\"y\":187.0},\"rectangle\":{\"height\":44.0,\"width\":108.64453125}}],\"generalizationViews\":[{\"line\":{\"points\":[{\"x\":628.423828125,\"y\":433.0},{\"x\":863.322265625,\"y\":209.0}]},\"sourceView\":\"4cec85f9-9b66-450a-bdcb-c855aa0314e1\",\"targetView\":\"902bf14e-e7ff-40e7-92e4-8780f91bfa29\"}],\"name\":\"GeneralDiagram\",\"package\":\"model\",\"propertyViews\":[]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"Animal\",\"originalMilestonedProperties\":[],\"package\":\"model::animal\",\"properties\":[{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"model::animal::Family\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"family\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"Number\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"noOfLegs\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"model::animal::GenericAnimal2\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0},\"name\":\"children\",\"stereotypes\":[],\"taggedValues\":[]}],\"qualifiedProperties\":[{\"body\":[{\"_type\":\"func\",\"fControl\":\"greaterThan_Number_1__Number_1__Boolean_1_\",\"function\":\"greaterThan\",\"parameters\":[{\"_type\":\"property\",\"parameters\":[{\"_type\":\"var\",\"name\":\"this\"}],\"property\":\"noOfLegs\"},{\"_type\":\"integer\",\"value\":4}]}],\"name\":\"something\",\"parameters\":[],\"returnGenericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"Boolean\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"returnMultiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"stereotypes\":[],\"taggedValues\":[]},{\"body\":[{\"_type\":\"collection\",\"multiplicity\":{\"lowerBound\":0,\"upperBound\":0},\"values\":[]}],\"name\":\"something2\",\"parameters\":[],\"returnGenericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"model::animal::GenericAnimal\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"returnMultiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"stereotypes\":[],\"taggedValues\":[]}],\"stereotypes\":[],\"superTypes\":[],\"taggedValues\":[]},{\"_type\":\"diagram\",\"classViews\":[{\"class\":\"model::animal::mammal::Mammal\",\"id\":\"641a0336-d4b5-418c-b656-2f52461264e2\",\"position\":{\"x\":427.0,\"y\":210.0},\"rectangle\":{\"height\":44.0,\"width\":125.1123046875}},{\"class\":\"model::animal::reptile::Reptile\",\"id\":\"b92253d8-0389-4c7d-b5d2-3cdc3bb1ad98\",\"position\":{\"x\":787.0,\"y\":216.0},\"rectangle\":{\"height\":58.0,\"width\":120.84765625}},{\"class\":\"model::animal::Animal\",\"id\":\"7a992cfc-c888-4091-aa00-ab430915aced\",\"position\":{\"x\":515.423828125,\"y\":-7.5},\"rectangle\":{\"height\":100.0,\"width\":199.716796875}}],\"generalizationViews\":[{\"line\":{\"points\":[{\"x\":847.423828125,\"y\":245.0},{\"x\":615.2822265625,\"y\":42.5}]},\"sourceView\":\"b92253d8-0389-4c7d-b5d2-3cdc3bb1ad98\",\"targetView\":\"7a992cfc-c888-4091-aa00-ab430915aced\"}],\"name\":\"AnimalDiagram\",\"package\":\"model::animal\",\"propertyViews\":[]},{\"_type\":\"Enumeration\",\"name\":\"Family\",\"package\":\"model::animal\",\"stereotypes\":[],\"taggedValues\":[],\"values\":[{\"stereotypes\":[],\"taggedValues\":[],\"value\":\"UO\"},{\"stereotypes\":[],\"taggedValues\":[],\"value\":\"OP\"}]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"GenericAnimal\",\"originalMilestonedProperties\":[],\"package\":\"model::animal\",\"properties\":[],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[],\"taggedValues\":[]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"GenericAnimal2\",\"originalMilestonedProperties\":[],\"package\":\"model::animal\",\"properties\":[],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[],\"taggedValues\":[]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"Mammal\",\"originalMilestonedProperties\":[],\"package\":\"model::animal::mammal\",\"properties\":[{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"String\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"noOfLegs\",\"stereotypes\":[],\"taggedValues\":[]}],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[],\"taggedValues\":[]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"Reptile\",\"originalMilestonedProperties\":[],\"package\":\"model::animal::reptile\",\"properties\":[{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"Boolean\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"hasFin\",\"stereotypes\":[],\"taggedValues\":[]}],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[\"model::animal::Animal\"],\"taggedValues\":[{\"tag\":{\"profile\":\"meta::pure::profiles::doc\",\"value\":\"doc\"},\"value\":\"\"}]}]},\"name\":\"AnimalDS\",\"package\":\"model::animal\",\"path\":\"model::animal::AnimalDS\",\"stereotypes\":[{\"profile\":\"meta::pure::metamodel::dataSpace::profiles::DataSpaceInfo\",\"value\":\"Verified\"}],\"supportInfo\":{\"_type\":\"email\",\"address\":\"someEmail@test.org\"},\"taggedValues\":[]}"); - testDataSpaceAnalyticsArtifactGenerationExtension("models/dataSpaceBasic.pure", "model::animal::AnimalDS2", "{\"defaultExecutionContext\":\"dummyContext\",\"description\":\"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\",\"diagrams\":[{\"diagram\":\"model::animal::AnimalDiagram\",\"title\":\"\"},{\"diagram\":\"model::GeneralDiagram\",\"title\":\"\"}],\"elementDocs\":[],\"elements\":[],\"executables\":[],\"executionContexts\":[{\"compatibleRuntimes\":[\"model::dummyRuntime\"],\"datasets\":[],\"defaultRuntime\":\"model::dummyRuntime\",\"description\":\"An important execution context\",\"mapping\":\"model::dummyMapping\",\"name\":\"dummyContext\"},{\"compatibleRuntimes\":[\"model::dummyRuntime\",\"model::dummyRuntime2\"],\"datasets\":[],\"defaultRuntime\":\"model::dummyRuntime\",\"mapping\":\"model::dummyMapping2\",\"name\":\"dummyContext2\"},{\"compatibleRuntimes\":[\"model::dummyRuntime\",\"model::dummyRuntime2\"],\"defaultRuntime\":\"model::dummyRuntime2\",\"mapping\":\"model::dummyMapping2\",\"name\":\"dummyContext3\"}],\"mappingToMappingCoverageResult\":{\"model::dummyMapping\":{\"mappedEntities\":[]},\"model::dummyMapping2\":{\"mappedEntities\":[]}},\"model\":{\"_type\":\"data\",\"elements\":[{\"_type\":\"profile\",\"name\":\"doc\",\"package\":\"meta::pure::profiles\",\"stereotypes\":[\"deprecated\"],\"tags\":[\"doc\",\"todo\"]},{\"_type\":\"diagram\",\"classViews\":[{\"class\":\"model::animal::reptile::Reptile\",\"id\":\"4cec85f9-9b66-450a-bdcb-c855aa0314e1\",\"position\":{\"x\":568.0,\"y\":404.0},\"rectangle\":{\"height\":58.0,\"width\":120.84765625}},{\"class\":\"model::animal::Animal\",\"id\":\"902bf14e-e7ff-40e7-92e4-8780f91bfa29\",\"position\":{\"x\":809.0,\"y\":187.0},\"rectangle\":{\"height\":44.0,\"width\":108.64453125}}],\"generalizationViews\":[{\"line\":{\"points\":[{\"x\":628.423828125,\"y\":433.0},{\"x\":863.322265625,\"y\":209.0}]},\"sourceView\":\"4cec85f9-9b66-450a-bdcb-c855aa0314e1\",\"targetView\":\"902bf14e-e7ff-40e7-92e4-8780f91bfa29\"}],\"name\":\"GeneralDiagram\",\"package\":\"model\",\"propertyViews\":[]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"Animal\",\"originalMilestonedProperties\":[],\"package\":\"model::animal\",\"properties\":[{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"model::animal::Family\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"family\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"Number\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"noOfLegs\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"model::animal::GenericAnimal2\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0},\"name\":\"children\",\"stereotypes\":[],\"taggedValues\":[]}],\"qualifiedProperties\":[{\"body\":[{\"_type\":\"func\",\"fControl\":\"greaterThan_Number_1__Number_1__Boolean_1_\",\"function\":\"greaterThan\",\"parameters\":[{\"_type\":\"property\",\"parameters\":[{\"_type\":\"var\",\"name\":\"this\"}],\"property\":\"noOfLegs\"},{\"_type\":\"integer\",\"value\":4}]}],\"name\":\"something\",\"parameters\":[],\"returnGenericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"Boolean\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"returnMultiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"stereotypes\":[],\"taggedValues\":[]},{\"body\":[{\"_type\":\"collection\",\"multiplicity\":{\"lowerBound\":0,\"upperBound\":0},\"values\":[]}],\"name\":\"something2\",\"parameters\":[],\"returnGenericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"model::animal::GenericAnimal\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"returnMultiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"stereotypes\":[],\"taggedValues\":[]}],\"stereotypes\":[],\"superTypes\":[],\"taggedValues\":[]},{\"_type\":\"diagram\",\"classViews\":[{\"class\":\"model::animal::mammal::Mammal\",\"id\":\"641a0336-d4b5-418c-b656-2f52461264e2\",\"position\":{\"x\":427.0,\"y\":210.0},\"rectangle\":{\"height\":44.0,\"width\":125.1123046875}},{\"class\":\"model::animal::reptile::Reptile\",\"id\":\"b92253d8-0389-4c7d-b5d2-3cdc3bb1ad98\",\"position\":{\"x\":787.0,\"y\":216.0},\"rectangle\":{\"height\":58.0,\"width\":120.84765625}},{\"class\":\"model::animal::Animal\",\"id\":\"7a992cfc-c888-4091-aa00-ab430915aced\",\"position\":{\"x\":515.423828125,\"y\":-7.5},\"rectangle\":{\"height\":100.0,\"width\":199.716796875}}],\"generalizationViews\":[{\"line\":{\"points\":[{\"x\":847.423828125,\"y\":245.0},{\"x\":615.2822265625,\"y\":42.5}]},\"sourceView\":\"b92253d8-0389-4c7d-b5d2-3cdc3bb1ad98\",\"targetView\":\"7a992cfc-c888-4091-aa00-ab430915aced\"}],\"name\":\"AnimalDiagram\",\"package\":\"model::animal\",\"propertyViews\":[]},{\"_type\":\"Enumeration\",\"name\":\"Family\",\"package\":\"model::animal\",\"stereotypes\":[],\"taggedValues\":[],\"values\":[{\"stereotypes\":[],\"taggedValues\":[],\"value\":\"UO\"},{\"stereotypes\":[],\"taggedValues\":[],\"value\":\"OP\"}]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"GenericAnimal\",\"originalMilestonedProperties\":[],\"package\":\"model::animal\",\"properties\":[],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[],\"taggedValues\":[]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"GenericAnimal2\",\"originalMilestonedProperties\":[],\"package\":\"model::animal\",\"properties\":[],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[],\"taggedValues\":[]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"Mammal\",\"originalMilestonedProperties\":[],\"package\":\"model::animal::mammal\",\"properties\":[{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"String\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"noOfLegs\",\"stereotypes\":[],\"taggedValues\":[]}],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[],\"taggedValues\":[]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"Reptile\",\"originalMilestonedProperties\":[],\"package\":\"model::animal::reptile\",\"properties\":[{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"Boolean\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"hasFin\",\"stereotypes\":[],\"taggedValues\":[]}],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[\"model::animal::Animal\"],\"taggedValues\":[{\"tag\":{\"profile\":\"meta::pure::profiles::doc\",\"value\":\"doc\"},\"value\":\"\"}]}]},\"name\":\"AnimalDS2\",\"package\":\"model::animal\",\"path\":\"model::animal::AnimalDS2\",\"stereotypes\":[{\"profile\":\"meta::pure::metamodel::dataSpace::profiles::DataSpaceInfo\",\"value\":\"Verified\"}],\"supportInfo\":{\"_type\":\"email\",\"address\":\"someEmail@test.org\"},\"taggedValues\":[]}"); + MutableMap mappingAnalysisMap = Maps.mutable.with("model::dummyMapping2", "{\"_type\":\"MappingAnalysisCoveragePartition\",\"analysisResult\":{\"mappedEntities\":[]},\"mapping\":\"model::dummyMapping2\"}", + "model::dummyMapping", "{\"_type\":\"MappingAnalysisCoveragePartition\",\"analysisResult\":{\"mappedEntities\":[]},\"mapping\":\"model::dummyMapping\"}" + ); + + MutableMap mappingModelMap = Maps.mutable.with( + "model::dummyMapping2", "{\"_type\":\"MappingModelCoveragePartition\",\"mapping\":\"model::dummyMapping2\",\"model\":{\"_type\":\"data\",\"elements\":[]}}", + "model::dummyMapping", "{\"_type\":\"MappingModelCoveragePartition\",\"mapping\":\"model::dummyMapping\",\"model\":{\"_type\":\"data\",\"elements\":[]}}" + ); + String expectedContent = "{\"defaultExecutionContext\":\"dummyContext\",\"description\":\"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\",\"diagrams\":[{\"diagram\":\"model::animal::AnimalDiagram\",\"title\":\"\"},{\"diagram\":\"model::GeneralDiagram\",\"title\":\"\"}],\"elementDocs\":[],\"elements\":[],\"executables\":[],\"executionContexts\":[{\"compatibleRuntimes\":[\"model::dummyRuntime\"],\"datasets\":[],\"defaultRuntime\":\"model::dummyRuntime\",\"description\":\"An important execution context\",\"mapping\":\"model::dummyMapping\",\"name\":\"dummyContext\"},{\"compatibleRuntimes\":[\"model::dummyRuntime\",\"model::dummyRuntime2\"],\"datasets\":[],\"defaultRuntime\":\"model::dummyRuntime\",\"mapping\":\"model::dummyMapping2\",\"name\":\"dummyContext2\"},{\"compatibleRuntimes\":[\"model::dummyRuntime\",\"model::dummyRuntime2\"],\"defaultRuntime\":\"model::dummyRuntime2\",\"mapping\":\"model::dummyMapping2\",\"name\":\"dummyContext3\"}],\"mappingToMappingCoverageResult\":{},\"model\":{\"_type\":\"data\",\"elements\":[{\"_type\":\"profile\",\"name\":\"doc\",\"package\":\"meta::pure::profiles\",\"stereotypes\":[\"deprecated\"],\"tags\":[\"doc\",\"todo\"]},{\"_type\":\"diagram\",\"classViews\":[{\"class\":\"model::animal::reptile::Reptile\",\"id\":\"4cec85f9-9b66-450a-bdcb-c855aa0314e1\",\"position\":{\"x\":568.0,\"y\":404.0},\"rectangle\":{\"height\":58.0,\"width\":120.84765625}},{\"class\":\"model::animal::Animal\",\"id\":\"902bf14e-e7ff-40e7-92e4-8780f91bfa29\",\"position\":{\"x\":809.0,\"y\":187.0},\"rectangle\":{\"height\":44.0,\"width\":108.64453125}}],\"generalizationViews\":[{\"line\":{\"points\":[{\"x\":628.423828125,\"y\":433.0},{\"x\":863.322265625,\"y\":209.0}]},\"sourceView\":\"4cec85f9-9b66-450a-bdcb-c855aa0314e1\",\"targetView\":\"902bf14e-e7ff-40e7-92e4-8780f91bfa29\"}],\"name\":\"GeneralDiagram\",\"package\":\"model\",\"propertyViews\":[]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"Animal\",\"originalMilestonedProperties\":[],\"package\":\"model::animal\",\"properties\":[{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"model::animal::Family\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"family\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"Number\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"noOfLegs\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"model::animal::GenericAnimal2\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0},\"name\":\"children\",\"stereotypes\":[],\"taggedValues\":[]}],\"qualifiedProperties\":[{\"body\":[{\"_type\":\"func\",\"fControl\":\"greaterThan_Number_1__Number_1__Boolean_1_\",\"function\":\"greaterThan\",\"parameters\":[{\"_type\":\"property\",\"parameters\":[{\"_type\":\"var\",\"name\":\"this\"}],\"property\":\"noOfLegs\"},{\"_type\":\"integer\",\"value\":4}]}],\"name\":\"something\",\"parameters\":[],\"returnGenericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"Boolean\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"returnMultiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"stereotypes\":[],\"taggedValues\":[]},{\"body\":[{\"_type\":\"collection\",\"multiplicity\":{\"lowerBound\":0,\"upperBound\":0},\"values\":[]}],\"name\":\"something2\",\"parameters\":[],\"returnGenericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"model::animal::GenericAnimal\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"returnMultiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"stereotypes\":[],\"taggedValues\":[]}],\"stereotypes\":[],\"superTypes\":[],\"taggedValues\":[]},{\"_type\":\"diagram\",\"classViews\":[{\"class\":\"model::animal::mammal::Mammal\",\"id\":\"641a0336-d4b5-418c-b656-2f52461264e2\",\"position\":{\"x\":427.0,\"y\":210.0},\"rectangle\":{\"height\":44.0,\"width\":125.1123046875}},{\"class\":\"model::animal::reptile::Reptile\",\"id\":\"b92253d8-0389-4c7d-b5d2-3cdc3bb1ad98\",\"position\":{\"x\":787.0,\"y\":216.0},\"rectangle\":{\"height\":58.0,\"width\":120.84765625}},{\"class\":\"model::animal::Animal\",\"id\":\"7a992cfc-c888-4091-aa00-ab430915aced\",\"position\":{\"x\":515.423828125,\"y\":-7.5},\"rectangle\":{\"height\":100.0,\"width\":199.716796875}}],\"generalizationViews\":[{\"line\":{\"points\":[{\"x\":847.423828125,\"y\":245.0},{\"x\":615.2822265625,\"y\":42.5}]},\"sourceView\":\"b92253d8-0389-4c7d-b5d2-3cdc3bb1ad98\",\"targetView\":\"7a992cfc-c888-4091-aa00-ab430915aced\"}],\"name\":\"AnimalDiagram\",\"package\":\"model::animal\",\"propertyViews\":[]},{\"_type\":\"Enumeration\",\"name\":\"Family\",\"package\":\"model::animal\",\"stereotypes\":[],\"taggedValues\":[],\"values\":[{\"stereotypes\":[],\"taggedValues\":[],\"value\":\"UO\"},{\"stereotypes\":[],\"taggedValues\":[],\"value\":\"OP\"}]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"GenericAnimal\",\"originalMilestonedProperties\":[],\"package\":\"model::animal\",\"properties\":[],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[],\"taggedValues\":[]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"GenericAnimal2\",\"originalMilestonedProperties\":[],\"package\":\"model::animal\",\"properties\":[],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[],\"taggedValues\":[]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"Mammal\",\"originalMilestonedProperties\":[],\"package\":\"model::animal::mammal\",\"properties\":[{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"String\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"noOfLegs\",\"stereotypes\":[],\"taggedValues\":[]}],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[],\"taggedValues\":[]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"Reptile\",\"originalMilestonedProperties\":[],\"package\":\"model::animal::reptile\",\"properties\":[{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"Boolean\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"hasFin\",\"stereotypes\":[],\"taggedValues\":[]}],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[\"model::animal::Animal\"],\"taggedValues\":[{\"tag\":{\"profile\":\"meta::pure::profiles::doc\",\"value\":\"doc\"},\"value\":\"\"}]}]},\"name\":\"AnimalDS_Old\",\"package\":\"model::animal\",\"path\":\"model::animal::AnimalDS_Old\",\"stereotypes\":[{\"profile\":\"meta::pure::profiles::doc\",\"value\":\"deprecated\"}],\"supportInfo\":{\"_type\":\"email\",\"address\":\"someEmail@test.org\"},\"taggedValues\":[{\"profile\":\"meta::pure::profiles::enterprise\",\"tag\":\"taxonomyNodes\",\"value\":\"abcdxyz005\"},{\"profile\":\"meta::pure::profiles::doc\",\"tag\":\"doc\",\"value\":\"Lorem ipsum\"},{\"profile\":\"meta::pure::profiles::doc\",\"tag\":\"doc\",\"value\":\"Lorem ipsum2\"},{\"profile\":\"meta::pure::metamodel::dataSpace::profiles::DataSpaceInfo\",\"tag\":\"deprecationNotice\",\"value\":\"Please use AnimalDS dataspace instead - link provided\"}]}"; + testDataSpaceAnalyticsArtifactGenerationExtension("models/dataSpaceBasic.pure", "model::animal::AnimalDS_Old", + expectedContent, + mappingAnalysisMap, + Maps.mutable.empty(), + false); + testDataSpaceAnalyticsArtifactGenerationExtension("models/dataSpaceBasic.pure", "model::animal::AnimalDS_Old", + expectedContent, + mappingAnalysisMap, + mappingModelMap, + true); + + testDataSpaceAnalyticsArtifactGenerationExtension("models/dataSpaceBasic.pure", + "model::animal::AnimalDS", + "{\"defaultExecutionContext\":\"dummyContext\",\"description\":\"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\",\"diagrams\":[{\"description\":\"Some diagram description\",\"diagram\":\"model::animal::AnimalDiagram\",\"title\":\"Diag 1\"},{\"description\":\"Some more diagram description\",\"diagram\":\"model::GeneralDiagram\",\"title\":\"Diag 2\"}],\"elementDocs\":[],\"elements\":[],\"executables\":[],\"executionContexts\":[{\"compatibleRuntimes\":[\"model::dummyRuntime\"],\"datasets\":[],\"defaultRuntime\":\"model::dummyRuntime\",\"description\":\"An important execution context\",\"mapping\":\"model::dummyMapping\",\"name\":\"dummyContext\",\"title\":\"Haha Nice\"},{\"compatibleRuntimes\":[\"model::dummyRuntime\",\"model::dummyRuntime2\"],\"datasets\":[],\"defaultRuntime\":\"model::dummyRuntime\",\"mapping\":\"model::dummyMapping2\",\"name\":\"dummyContext2\"},{\"compatibleRuntimes\":[\"model::dummyRuntime\",\"model::dummyRuntime2\"],\"defaultRuntime\":\"model::dummyRuntime2\",\"mapping\":\"model::dummyMapping2\",\"name\":\"dummyContext3\"}],\"mappingToMappingCoverageResult\":{},\"model\":{\"_type\":\"data\",\"elements\":[{\"_type\":\"profile\",\"name\":\"doc\",\"package\":\"meta::pure::profiles\",\"stereotypes\":[\"deprecated\"],\"tags\":[\"doc\",\"todo\"]},{\"_type\":\"diagram\",\"classViews\":[{\"class\":\"model::animal::reptile::Reptile\",\"id\":\"4cec85f9-9b66-450a-bdcb-c855aa0314e1\",\"position\":{\"x\":568.0,\"y\":404.0},\"rectangle\":{\"height\":58.0,\"width\":120.84765625}},{\"class\":\"model::animal::Animal\",\"id\":\"902bf14e-e7ff-40e7-92e4-8780f91bfa29\",\"position\":{\"x\":809.0,\"y\":187.0},\"rectangle\":{\"height\":44.0,\"width\":108.64453125}}],\"generalizationViews\":[{\"line\":{\"points\":[{\"x\":628.423828125,\"y\":433.0},{\"x\":863.322265625,\"y\":209.0}]},\"sourceView\":\"4cec85f9-9b66-450a-bdcb-c855aa0314e1\",\"targetView\":\"902bf14e-e7ff-40e7-92e4-8780f91bfa29\"}],\"name\":\"GeneralDiagram\",\"package\":\"model\",\"propertyViews\":[]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"Animal\",\"originalMilestonedProperties\":[],\"package\":\"model::animal\",\"properties\":[{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"model::animal::Family\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"family\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"Number\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"noOfLegs\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"model::animal::GenericAnimal2\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0},\"name\":\"children\",\"stereotypes\":[],\"taggedValues\":[]}],\"qualifiedProperties\":[{\"body\":[{\"_type\":\"func\",\"fControl\":\"greaterThan_Number_1__Number_1__Boolean_1_\",\"function\":\"greaterThan\",\"parameters\":[{\"_type\":\"property\",\"parameters\":[{\"_type\":\"var\",\"name\":\"this\"}],\"property\":\"noOfLegs\"},{\"_type\":\"integer\",\"value\":4}]}],\"name\":\"something\",\"parameters\":[],\"returnGenericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"Boolean\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"returnMultiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"stereotypes\":[],\"taggedValues\":[]},{\"body\":[{\"_type\":\"collection\",\"multiplicity\":{\"lowerBound\":0,\"upperBound\":0},\"values\":[]}],\"name\":\"something2\",\"parameters\":[],\"returnGenericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"model::animal::GenericAnimal\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"returnMultiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"stereotypes\":[],\"taggedValues\":[]}],\"stereotypes\":[],\"superTypes\":[],\"taggedValues\":[]},{\"_type\":\"diagram\",\"classViews\":[{\"class\":\"model::animal::mammal::Mammal\",\"id\":\"641a0336-d4b5-418c-b656-2f52461264e2\",\"position\":{\"x\":427.0,\"y\":210.0},\"rectangle\":{\"height\":44.0,\"width\":125.1123046875}},{\"class\":\"model::animal::reptile::Reptile\",\"id\":\"b92253d8-0389-4c7d-b5d2-3cdc3bb1ad98\",\"position\":{\"x\":787.0,\"y\":216.0},\"rectangle\":{\"height\":58.0,\"width\":120.84765625}},{\"class\":\"model::animal::Animal\",\"id\":\"7a992cfc-c888-4091-aa00-ab430915aced\",\"position\":{\"x\":515.423828125,\"y\":-7.5},\"rectangle\":{\"height\":100.0,\"width\":199.716796875}}],\"generalizationViews\":[{\"line\":{\"points\":[{\"x\":847.423828125,\"y\":245.0},{\"x\":615.2822265625,\"y\":42.5}]},\"sourceView\":\"b92253d8-0389-4c7d-b5d2-3cdc3bb1ad98\",\"targetView\":\"7a992cfc-c888-4091-aa00-ab430915aced\"}],\"name\":\"AnimalDiagram\",\"package\":\"model::animal\",\"propertyViews\":[]},{\"_type\":\"Enumeration\",\"name\":\"Family\",\"package\":\"model::animal\",\"stereotypes\":[],\"taggedValues\":[],\"values\":[{\"stereotypes\":[],\"taggedValues\":[],\"value\":\"UO\"},{\"stereotypes\":[],\"taggedValues\":[],\"value\":\"OP\"}]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"GenericAnimal\",\"originalMilestonedProperties\":[],\"package\":\"model::animal\",\"properties\":[],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[],\"taggedValues\":[]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"GenericAnimal2\",\"originalMilestonedProperties\":[],\"package\":\"model::animal\",\"properties\":[],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[],\"taggedValues\":[]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"Mammal\",\"originalMilestonedProperties\":[],\"package\":\"model::animal::mammal\",\"properties\":[{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"String\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"noOfLegs\",\"stereotypes\":[],\"taggedValues\":[]}],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[],\"taggedValues\":[]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"Reptile\",\"originalMilestonedProperties\":[],\"package\":\"model::animal::reptile\",\"properties\":[{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"Boolean\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"hasFin\",\"stereotypes\":[],\"taggedValues\":[]}],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[\"model::animal::Animal\"],\"taggedValues\":[{\"tag\":{\"profile\":\"meta::pure::profiles::doc\",\"value\":\"doc\"},\"value\":\"\"}]}]},\"name\":\"AnimalDS\",\"package\":\"model::animal\",\"path\":\"model::animal::AnimalDS\",\"stereotypes\":[{\"profile\":\"meta::pure::metamodel::dataSpace::profiles::DataSpaceInfo\",\"value\":\"Verified\"}],\"supportInfo\":{\"_type\":\"email\",\"address\":\"someEmail@test.org\"},\"taggedValues\":[]}", + mappingAnalysisMap, + Maps.mutable.empty(), + false + ); + testDataSpaceAnalyticsArtifactGenerationExtension("models/dataSpaceBasic.pure", "model::animal::AnimalDS2", + "{\"defaultExecutionContext\":\"dummyContext\",\"description\":\"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\",\"diagrams\":[{\"diagram\":\"model::animal::AnimalDiagram\",\"title\":\"\"},{\"diagram\":\"model::GeneralDiagram\",\"title\":\"\"}],\"elementDocs\":[],\"elements\":[],\"executables\":[],\"executionContexts\":[{\"compatibleRuntimes\":[\"model::dummyRuntime\"],\"datasets\":[],\"defaultRuntime\":\"model::dummyRuntime\",\"description\":\"An important execution context\",\"mapping\":\"model::dummyMapping\",\"name\":\"dummyContext\"},{\"compatibleRuntimes\":[\"model::dummyRuntime\",\"model::dummyRuntime2\"],\"datasets\":[],\"defaultRuntime\":\"model::dummyRuntime\",\"mapping\":\"model::dummyMapping2\",\"name\":\"dummyContext2\"},{\"compatibleRuntimes\":[\"model::dummyRuntime\",\"model::dummyRuntime2\"],\"defaultRuntime\":\"model::dummyRuntime2\",\"mapping\":\"model::dummyMapping2\",\"name\":\"dummyContext3\"}],\"mappingToMappingCoverageResult\":{},\"model\":{\"_type\":\"data\",\"elements\":[{\"_type\":\"profile\",\"name\":\"doc\",\"package\":\"meta::pure::profiles\",\"stereotypes\":[\"deprecated\"],\"tags\":[\"doc\",\"todo\"]},{\"_type\":\"diagram\",\"classViews\":[{\"class\":\"model::animal::reptile::Reptile\",\"id\":\"4cec85f9-9b66-450a-bdcb-c855aa0314e1\",\"position\":{\"x\":568.0,\"y\":404.0},\"rectangle\":{\"height\":58.0,\"width\":120.84765625}},{\"class\":\"model::animal::Animal\",\"id\":\"902bf14e-e7ff-40e7-92e4-8780f91bfa29\",\"position\":{\"x\":809.0,\"y\":187.0},\"rectangle\":{\"height\":44.0,\"width\":108.64453125}}],\"generalizationViews\":[{\"line\":{\"points\":[{\"x\":628.423828125,\"y\":433.0},{\"x\":863.322265625,\"y\":209.0}]},\"sourceView\":\"4cec85f9-9b66-450a-bdcb-c855aa0314e1\",\"targetView\":\"902bf14e-e7ff-40e7-92e4-8780f91bfa29\"}],\"name\":\"GeneralDiagram\",\"package\":\"model\",\"propertyViews\":[]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"Animal\",\"originalMilestonedProperties\":[],\"package\":\"model::animal\",\"properties\":[{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"model::animal::Family\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"family\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"Number\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"noOfLegs\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"model::animal::GenericAnimal2\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0},\"name\":\"children\",\"stereotypes\":[],\"taggedValues\":[]}],\"qualifiedProperties\":[{\"body\":[{\"_type\":\"func\",\"fControl\":\"greaterThan_Number_1__Number_1__Boolean_1_\",\"function\":\"greaterThan\",\"parameters\":[{\"_type\":\"property\",\"parameters\":[{\"_type\":\"var\",\"name\":\"this\"}],\"property\":\"noOfLegs\"},{\"_type\":\"integer\",\"value\":4}]}],\"name\":\"something\",\"parameters\":[],\"returnGenericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"Boolean\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"returnMultiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"stereotypes\":[],\"taggedValues\":[]},{\"body\":[{\"_type\":\"collection\",\"multiplicity\":{\"lowerBound\":0,\"upperBound\":0},\"values\":[]}],\"name\":\"something2\",\"parameters\":[],\"returnGenericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"model::animal::GenericAnimal\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"returnMultiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"stereotypes\":[],\"taggedValues\":[]}],\"stereotypes\":[],\"superTypes\":[],\"taggedValues\":[]},{\"_type\":\"diagram\",\"classViews\":[{\"class\":\"model::animal::mammal::Mammal\",\"id\":\"641a0336-d4b5-418c-b656-2f52461264e2\",\"position\":{\"x\":427.0,\"y\":210.0},\"rectangle\":{\"height\":44.0,\"width\":125.1123046875}},{\"class\":\"model::animal::reptile::Reptile\",\"id\":\"b92253d8-0389-4c7d-b5d2-3cdc3bb1ad98\",\"position\":{\"x\":787.0,\"y\":216.0},\"rectangle\":{\"height\":58.0,\"width\":120.84765625}},{\"class\":\"model::animal::Animal\",\"id\":\"7a992cfc-c888-4091-aa00-ab430915aced\",\"position\":{\"x\":515.423828125,\"y\":-7.5},\"rectangle\":{\"height\":100.0,\"width\":199.716796875}}],\"generalizationViews\":[{\"line\":{\"points\":[{\"x\":847.423828125,\"y\":245.0},{\"x\":615.2822265625,\"y\":42.5}]},\"sourceView\":\"b92253d8-0389-4c7d-b5d2-3cdc3bb1ad98\",\"targetView\":\"7a992cfc-c888-4091-aa00-ab430915aced\"}],\"name\":\"AnimalDiagram\",\"package\":\"model::animal\",\"propertyViews\":[]},{\"_type\":\"Enumeration\",\"name\":\"Family\",\"package\":\"model::animal\",\"stereotypes\":[],\"taggedValues\":[],\"values\":[{\"stereotypes\":[],\"taggedValues\":[],\"value\":\"UO\"},{\"stereotypes\":[],\"taggedValues\":[],\"value\":\"OP\"}]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"GenericAnimal\",\"originalMilestonedProperties\":[],\"package\":\"model::animal\",\"properties\":[],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[],\"taggedValues\":[]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"GenericAnimal2\",\"originalMilestonedProperties\":[],\"package\":\"model::animal\",\"properties\":[],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[],\"taggedValues\":[]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"Mammal\",\"originalMilestonedProperties\":[],\"package\":\"model::animal::mammal\",\"properties\":[{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"String\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"noOfLegs\",\"stereotypes\":[],\"taggedValues\":[]}],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[],\"taggedValues\":[]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"Reptile\",\"originalMilestonedProperties\":[],\"package\":\"model::animal::reptile\",\"properties\":[{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"Boolean\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"hasFin\",\"stereotypes\":[],\"taggedValues\":[]}],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[\"model::animal::Animal\"],\"taggedValues\":[{\"tag\":{\"profile\":\"meta::pure::profiles::doc\",\"value\":\"doc\"},\"value\":\"\"}]}]},\"name\":\"AnimalDS2\",\"package\":\"model::animal\",\"path\":\"model::animal::AnimalDS2\",\"stereotypes\":[{\"profile\":\"meta::pure::metamodel::dataSpace::profiles::DataSpaceInfo\",\"value\":\"Verified\"}],\"supportInfo\":{\"_type\":\"email\",\"address\":\"someEmail@test.org\"},\"taggedValues\":[]}", + mappingAnalysisMap, + Maps.mutable.empty(), + false + ); } @Test public void testAnalyticsForDataSpaceWithAssociation() throws Exception { - testDataSpaceAnalyticsArtifactGenerationExtension("models/dataSpaceWithAssociation.pure", "domain::COVIDDatapace", "{\"defaultExecutionContext\":\"dummyContext\",\"description\":\"Not over yet?\",\"diagrams\":[{\"diagram\":\"domain::COVIDDataDiagram\",\"title\":\"\"}],\"elementDocs\":[],\"elements\":[],\"executables\":[],\"executionContexts\":[{\"compatibleRuntimes\":[\"runtime::MyRuntime\"],\"datasets\":[],\"defaultRuntime\":\"runtime::MyRuntime\",\"mapping\":\"mapping::CovidDataMapping\",\"name\":\"dummyContext\",\"runtimeMetadata\":{\"connectionPath\":\"runtime::connection::MyConnection\",\"storePath\":\"ModelStore\"}},{\"compatibleRuntimes\":[\"runtime::MyRuntime\"],\"defaultRuntime\":\"runtime::MyRuntime\",\"mapping\":\"mapping::CovidDataMapping\",\"name\":\"dummyContext2\",\"runtimeMetadata\":{\"connectionPath\":\"runtime::connection::MyConnection\",\"storePath\":\"ModelStore\"}}],\"mappingToMappingCoverageResult\":{\"mapping::CovidDataMapping\":{\"mappedEntities\":[]}},\"model\":{\"_type\":\"data\",\"elements\":[{\"_type\":\"class\",\"constraints\":[],\"name\":\"COVIDData\",\"originalMilestonedProperties\":[],\"package\":\"domain\",\"properties\":[{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"Integer\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"id\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"String\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"fips\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"StrictDate\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"date\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"String\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"caseType\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"Float\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"cases\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"Boolean\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"lastReportedFlag\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"domain::Demographics\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"demographics\",\"stereotypes\":[],\"taggedValues\":[]}],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[],\"taggedValues\":[]},{\"_type\":\"diagram\",\"classViews\":[{\"class\":\"domain::COVIDData\",\"id\":\"6b69f44b-f729-46aa-b244-ec5ee8164142\",\"position\":{\"x\":280.0,\"y\":159.0},\"rectangle\":{\"height\":128.0,\"width\":205.8291015625}},{\"class\":\"domain::Demographics\",\"id\":\"159e797e-ae75-437d-ba9c-253f99a48826\",\"position\":{\"x\":698.0,\"y\":238.0},\"rectangle\":{\"height\":58.0,\"width\":111.68994140625}},{\"class\":\"domain::Class1\",\"id\":\"f6bd8a50-8d18-4bd9-9a8d-7fad88d02b07\",\"position\":{\"x\":360.844970703125,\"y\":49.0},\"rectangle\":{\"height\":58.0,\"width\":137.390625}},{\"class\":\"domain::Class2\",\"id\":\"690e89d4-23e9-46e8-8543-c89c22cc9e15\",\"position\":{\"x\":696.844970703125,\"y\":95.0},\"rectangle\":{\"height\":44.0,\"width\":133.68994140625}}],\"generalizationViews\":[],\"name\":\"COVIDDataDiagram\",\"package\":\"domain\",\"propertyViews\":[{\"line\":{\"points\":[{\"x\":382.91455078125,\"y\":223.0},{\"x\":753.844970703125,\"y\":267.0}]},\"property\":{\"class\":\"domain::COVIDData\",\"property\":\"demographics\"},\"sourceView\":\"6b69f44b-f729-46aa-b244-ec5ee8164142\",\"targetView\":\"159e797e-ae75-437d-ba9c-253f99a48826\"},{\"line\":{\"points\":[{\"x\":763.68994140625,\"y\":117.0},{\"x\":429.540283203125,\"y\":78.0}]},\"property\":{\"class\":\"domain::Class2\",\"property\":\"fromClass1\"},\"sourceView\":\"690e89d4-23e9-46e8-8543-c89c22cc9e15\",\"targetView\":\"f6bd8a50-8d18-4bd9-9a8d-7fad88d02b07\"},{\"line\":{\"points\":[{\"x\":429.540283203125,\"y\":78.0},{\"x\":763.68994140625,\"y\":117.0}]},\"property\":{\"class\":\"domain::Class1\",\"property\":\"fromClass2\"},\"sourceView\":\"f6bd8a50-8d18-4bd9-9a8d-7fad88d02b07\",\"targetView\":\"690e89d4-23e9-46e8-8543-c89c22cc9e15\"}]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"Class1\",\"originalMilestonedProperties\":[{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"domain::Class2\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"fromClass2\",\"stereotypes\":[],\"taggedValues\":[]}],\"package\":\"domain\",\"properties\":[{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"String\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"propClass1\",\"stereotypes\":[],\"taggedValues\":[]}],\"qualifiedProperties\":[],\"stereotypes\":[{\"profile\":\"meta::pure::profiles::temporal\",\"value\":\"businesstemporal\"}],\"superTypes\":[],\"taggedValues\":[]},{\"_type\":\"association\",\"name\":\"Class12Assoc\",\"originalMilestonedProperties\":[{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"domain::Class1\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"fromClass1\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"domain::Class2\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"fromClass2\",\"stereotypes\":[],\"taggedValues\":[]}],\"package\":\"domain\",\"properties\":[{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"domain::Class1\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"fromClass1\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"domain::Class2\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"fromClass2\",\"stereotypes\":[],\"taggedValues\":[]}],\"qualifiedProperties\":[],\"stereotypes\":[],\"taggedValues\":[]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"Class2\",\"originalMilestonedProperties\":[{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"domain::Class1\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"fromClass1\",\"stereotypes\":[],\"taggedValues\":[]}],\"package\":\"domain\",\"properties\":[{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"String\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"propClass2\",\"stereotypes\":[],\"taggedValues\":[]}],\"qualifiedProperties\":[],\"stereotypes\":[{\"profile\":\"meta::pure::profiles::temporal\",\"value\":\"processingtemporal\"}],\"superTypes\":[],\"taggedValues\":[]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"Demographics\",\"originalMilestonedProperties\":[],\"package\":\"domain\",\"properties\":[{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"String\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"fips\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"String\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"state\",\"stereotypes\":[],\"taggedValues\":[]}],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[],\"taggedValues\":[]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"BusinessDateMilestoning\",\"originalMilestonedProperties\":[],\"package\":\"meta::pure::milestoning\",\"properties\":[],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[],\"taggedValues\":[]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"ProcessingDateMilestoning\",\"originalMilestonedProperties\":[],\"package\":\"meta::pure::milestoning\",\"properties\":[],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[],\"taggedValues\":[]},{\"_type\":\"profile\",\"name\":\"temporal\",\"package\":\"meta::pure::profiles\",\"stereotypes\":[\"bitemporal\",\"businesstemporal\",\"processingtemporal\"],\"tags\":[]}]},\"name\":\"COVIDDatapace\",\"package\":\"domain\",\"path\":\"domain::COVIDDatapace\",\"stereotypes\":[],\"taggedValues\":[],\"title\":\"COVID Sample Data\"}"); + + MutableMap mappingAnalysisMap = Maps.mutable.with( + "mapping::CovidDataMapping", "{\"_type\":\"MappingAnalysisCoveragePartition\",\"analysisResult\":{\"mappedEntities\":[]},\"mapping\":\"mapping::CovidDataMapping\"}" + ); + MutableMap mappingModelMap = Maps.mutable.with( + "mapping::CovidDataMapping", "{\"_type\":\"MappingModelCoveragePartition\",\"mapping\":\"mapping::CovidDataMapping\",\"model\":{\"_type\":\"data\",\"elements\":[]}}" + ); + testDataSpaceAnalyticsArtifactGenerationExtension( + "models/dataSpaceWithAssociation.pure", + "domain::COVIDDatapace", + "{\"defaultExecutionContext\":\"dummyContext\",\"description\":\"Not over yet?\",\"diagrams\":[{\"diagram\":\"domain::COVIDDataDiagram\",\"title\":\"\"}],\"elementDocs\":[],\"elements\":[],\"executables\":[],\"executionContexts\":[{\"compatibleRuntimes\":[\"runtime::MyRuntime\"],\"datasets\":[],\"defaultRuntime\":\"runtime::MyRuntime\",\"mapping\":\"mapping::CovidDataMapping\",\"name\":\"dummyContext\",\"runtimeMetadata\":{\"connectionPath\":\"runtime::connection::MyConnection\",\"storePath\":\"ModelStore\"}},{\"compatibleRuntimes\":[\"runtime::MyRuntime\"],\"defaultRuntime\":\"runtime::MyRuntime\",\"mapping\":\"mapping::CovidDataMapping\",\"name\":\"dummyContext2\",\"runtimeMetadata\":{\"connectionPath\":\"runtime::connection::MyConnection\",\"storePath\":\"ModelStore\"}}],\"mappingToMappingCoverageResult\":{},\"model\":{\"_type\":\"data\",\"elements\":[{\"_type\":\"class\",\"constraints\":[],\"name\":\"COVIDData\",\"originalMilestonedProperties\":[],\"package\":\"domain\",\"properties\":[{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"Integer\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"id\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"String\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"fips\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"StrictDate\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"date\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"String\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"caseType\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"Float\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"cases\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"Boolean\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"lastReportedFlag\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"domain::Demographics\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"demographics\",\"stereotypes\":[],\"taggedValues\":[]}],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[],\"taggedValues\":[]},{\"_type\":\"diagram\",\"classViews\":[{\"class\":\"domain::COVIDData\",\"id\":\"6b69f44b-f729-46aa-b244-ec5ee8164142\",\"position\":{\"x\":280.0,\"y\":159.0},\"rectangle\":{\"height\":128.0,\"width\":205.8291015625}},{\"class\":\"domain::Demographics\",\"id\":\"159e797e-ae75-437d-ba9c-253f99a48826\",\"position\":{\"x\":698.0,\"y\":238.0},\"rectangle\":{\"height\":58.0,\"width\":111.68994140625}},{\"class\":\"domain::Class1\",\"id\":\"f6bd8a50-8d18-4bd9-9a8d-7fad88d02b07\",\"position\":{\"x\":360.844970703125,\"y\":49.0},\"rectangle\":{\"height\":58.0,\"width\":137.390625}},{\"class\":\"domain::Class2\",\"id\":\"690e89d4-23e9-46e8-8543-c89c22cc9e15\",\"position\":{\"x\":696.844970703125,\"y\":95.0},\"rectangle\":{\"height\":44.0,\"width\":133.68994140625}}],\"generalizationViews\":[],\"name\":\"COVIDDataDiagram\",\"package\":\"domain\",\"propertyViews\":[{\"line\":{\"points\":[{\"x\":382.91455078125,\"y\":223.0},{\"x\":753.844970703125,\"y\":267.0}]},\"property\":{\"class\":\"domain::COVIDData\",\"property\":\"demographics\"},\"sourceView\":\"6b69f44b-f729-46aa-b244-ec5ee8164142\",\"targetView\":\"159e797e-ae75-437d-ba9c-253f99a48826\"},{\"line\":{\"points\":[{\"x\":763.68994140625,\"y\":117.0},{\"x\":429.540283203125,\"y\":78.0}]},\"property\":{\"class\":\"domain::Class2\",\"property\":\"fromClass1\"},\"sourceView\":\"690e89d4-23e9-46e8-8543-c89c22cc9e15\",\"targetView\":\"f6bd8a50-8d18-4bd9-9a8d-7fad88d02b07\"},{\"line\":{\"points\":[{\"x\":429.540283203125,\"y\":78.0},{\"x\":763.68994140625,\"y\":117.0}]},\"property\":{\"class\":\"domain::Class1\",\"property\":\"fromClass2\"},\"sourceView\":\"f6bd8a50-8d18-4bd9-9a8d-7fad88d02b07\",\"targetView\":\"690e89d4-23e9-46e8-8543-c89c22cc9e15\"}]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"Class1\",\"originalMilestonedProperties\":[{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"domain::Class2\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"fromClass2\",\"stereotypes\":[],\"taggedValues\":[]}],\"package\":\"domain\",\"properties\":[{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"String\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"propClass1\",\"stereotypes\":[],\"taggedValues\":[]}],\"qualifiedProperties\":[],\"stereotypes\":[{\"profile\":\"meta::pure::profiles::temporal\",\"value\":\"businesstemporal\"}],\"superTypes\":[],\"taggedValues\":[]},{\"_type\":\"association\",\"name\":\"Class12Assoc\",\"originalMilestonedProperties\":[{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"domain::Class1\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"fromClass1\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"domain::Class2\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"fromClass2\",\"stereotypes\":[],\"taggedValues\":[]}],\"package\":\"domain\",\"properties\":[{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"domain::Class1\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"fromClass1\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"domain::Class2\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"fromClass2\",\"stereotypes\":[],\"taggedValues\":[]}],\"qualifiedProperties\":[],\"stereotypes\":[],\"taggedValues\":[]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"Class2\",\"originalMilestonedProperties\":[{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"domain::Class1\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"fromClass1\",\"stereotypes\":[],\"taggedValues\":[]}],\"package\":\"domain\",\"properties\":[{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"String\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"propClass2\",\"stereotypes\":[],\"taggedValues\":[]}],\"qualifiedProperties\":[],\"stereotypes\":[{\"profile\":\"meta::pure::profiles::temporal\",\"value\":\"processingtemporal\"}],\"superTypes\":[],\"taggedValues\":[]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"Demographics\",\"originalMilestonedProperties\":[],\"package\":\"domain\",\"properties\":[{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"String\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"fips\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"String\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"state\",\"stereotypes\":[],\"taggedValues\":[]}],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[],\"taggedValues\":[]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"BusinessDateMilestoning\",\"originalMilestonedProperties\":[],\"package\":\"meta::pure::milestoning\",\"properties\":[],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[],\"taggedValues\":[]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"ProcessingDateMilestoning\",\"originalMilestonedProperties\":[],\"package\":\"meta::pure::milestoning\",\"properties\":[],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[],\"taggedValues\":[]},{\"_type\":\"profile\",\"name\":\"temporal\",\"package\":\"meta::pure::profiles\",\"stereotypes\":[\"bitemporal\",\"businesstemporal\",\"processingtemporal\"],\"tags\":[]}]},\"name\":\"COVIDDatapace\",\"package\":\"domain\",\"path\":\"domain::COVIDDatapace\",\"stereotypes\":[],\"taggedValues\":[],\"title\":\"COVID Sample Data\"}", + mappingAnalysisMap, + mappingModelMap, + true); } @Test public void testAnalyticsForDataSpaceWithSubstantialMapping() throws Exception { - testDataSpaceAnalyticsArtifactGenerationExtension("models/dataSpaceWithSubstantialMapping.pure", "model::animal::AnimalDS", "{\"defaultExecutionContext\":\"dummyContext\",\"description\":\"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\",\"diagrams\":[{\"diagram\":\"model::animal::AnimalDiagram\",\"title\":\"\"},{\"diagram\":\"model::GeneralDiagram\",\"title\":\"\"}],\"elementDocs\":[],\"elements\":[],\"executables\":[],\"executionContexts\":[{\"compatibleRuntimes\":[\"model::dummyRuntime\"],\"datasets\":[],\"defaultRuntime\":\"model::dummyRuntime\",\"description\":\"An important execution context\",\"mapping\":\"model::dummyMapping\",\"name\":\"dummyContext\"},{\"compatibleRuntimes\":[\"model::dummyRuntime\",\"model::dummyRuntime2\"],\"datasets\":[],\"defaultRuntime\":\"model::dummyRuntime\",\"mapping\":\"model::dummyMapping2\",\"name\":\"dummyContext2\"},{\"compatibleRuntimes\":[\"model::dummyRuntime\",\"model::dummyRuntime2\"],\"defaultRuntime\":\"model::dummyRuntime2\",\"mapping\":\"model::dummyMapping2\",\"name\":\"dummyContext3\"}],\"mappingToMappingCoverageResult\":{\"model::dummyMapping\":{\"mappedEntities\":[{\"path\":\"model::animal::Animal\",\"properties\":[{\"_type\":\"MappedProperty\",\"name\":\"noOfLegs\"},{\"_type\":\"MappedProperty\",\"name\":\"something\"},{\"_type\":\"entity\",\"entityPath\":\"model::animal::GenericAnimal\",\"name\":\"something2\"}]},{\"path\":\"model::animal::Animal2\",\"properties\":[{\"_type\":\"MappedProperty\",\"name\":\"name\"},{\"_type\":\"MappedProperty\",\"name\":\"name2\"}]},{\"path\":\"model::animal::GenericAnimal\",\"properties\":[]},{\"path\":\"model::animal::GenericAnimal2\",\"properties\":[]}]},\"model::dummyMapping2\":{\"mappedEntities\":[{\"path\":\"model::animal::mammal::Mammal\",\"properties\":[{\"_type\":\"MappedProperty\",\"name\":\"noOfLegs\"}]},{\"path\":\"model::animal::reptile::Reptile\",\"properties\":[{\"_type\":\"enum\",\"enumPath\":\"model::animal::Family\",\"name\":\"family\"},{\"_type\":\"MappedProperty\",\"name\":\"name2\"},{\"_type\":\"MappedProperty\",\"name\":\"something\"},{\"_type\":\"MappedProperty\",\"name\":\"hasFin\"}]}]}},\"model\":{\"_type\":\"data\",\"elements\":[{\"_type\":\"profile\",\"name\":\"doc\",\"package\":\"meta::pure::profiles\",\"stereotypes\":[\"deprecated\"],\"tags\":[\"doc\",\"todo\"]},{\"_type\":\"diagram\",\"classViews\":[{\"class\":\"model::animal::reptile::Reptile\",\"id\":\"4cec85f9-9b66-450a-bdcb-c855aa0314e1\",\"position\":{\"x\":568.0,\"y\":404.0},\"rectangle\":{\"height\":58.0,\"width\":120.84765625}},{\"class\":\"model::animal::Animal\",\"id\":\"902bf14e-e7ff-40e7-92e4-8780f91bfa29\",\"position\":{\"x\":809.0,\"y\":187.0},\"rectangle\":{\"height\":44.0,\"width\":108.64453125}}],\"generalizationViews\":[{\"line\":{\"points\":[{\"x\":628.423828125,\"y\":433.0},{\"x\":863.322265625,\"y\":209.0}]},\"sourceView\":\"4cec85f9-9b66-450a-bdcb-c855aa0314e1\",\"targetView\":\"902bf14e-e7ff-40e7-92e4-8780f91bfa29\"}],\"name\":\"GeneralDiagram\",\"package\":\"model\",\"propertyViews\":[]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"Animal\",\"originalMilestonedProperties\":[],\"package\":\"model::animal\",\"properties\":[{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"model::animal::Family\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"family\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"Number\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"noOfLegs\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"model::animal::GenericAnimal2\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0},\"name\":\"children\",\"stereotypes\":[],\"taggedValues\":[]}],\"qualifiedProperties\":[{\"body\":[{\"_type\":\"func\",\"fControl\":\"greaterThan_Number_1__Number_1__Boolean_1_\",\"function\":\"greaterThan\",\"parameters\":[{\"_type\":\"property\",\"parameters\":[{\"_type\":\"var\",\"name\":\"this\"}],\"property\":\"noOfLegs\"},{\"_type\":\"integer\",\"value\":4}]}],\"name\":\"something\",\"parameters\":[],\"returnGenericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"Boolean\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"returnMultiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"stereotypes\":[],\"taggedValues\":[]},{\"body\":[{\"_type\":\"collection\",\"multiplicity\":{\"lowerBound\":0,\"upperBound\":0},\"values\":[]}],\"name\":\"something2\",\"parameters\":[],\"returnGenericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"model::animal::GenericAnimal\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"returnMultiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"stereotypes\":[],\"taggedValues\":[]}],\"stereotypes\":[],\"superTypes\":[],\"taggedValues\":[]},{\"_type\":\"diagram\",\"classViews\":[{\"class\":\"model::animal::mammal::Mammal\",\"id\":\"641a0336-d4b5-418c-b656-2f52461264e2\",\"position\":{\"x\":427.0,\"y\":210.0},\"rectangle\":{\"height\":44.0,\"width\":125.1123046875}},{\"class\":\"model::animal::reptile::Reptile\",\"id\":\"b92253d8-0389-4c7d-b5d2-3cdc3bb1ad98\",\"position\":{\"x\":787.0,\"y\":216.0},\"rectangle\":{\"height\":58.0,\"width\":120.84765625}},{\"class\":\"model::animal::Animal\",\"id\":\"7a992cfc-c888-4091-aa00-ab430915aced\",\"position\":{\"x\":515.423828125,\"y\":-7.5},\"rectangle\":{\"height\":100.0,\"width\":199.716796875}}],\"generalizationViews\":[{\"line\":{\"points\":[{\"x\":847.423828125,\"y\":245.0},{\"x\":615.2822265625,\"y\":42.5}]},\"sourceView\":\"b92253d8-0389-4c7d-b5d2-3cdc3bb1ad98\",\"targetView\":\"7a992cfc-c888-4091-aa00-ab430915aced\"}],\"name\":\"AnimalDiagram\",\"package\":\"model::animal\",\"propertyViews\":[]},{\"_type\":\"Enumeration\",\"name\":\"Family\",\"package\":\"model::animal\",\"stereotypes\":[],\"taggedValues\":[],\"values\":[{\"stereotypes\":[],\"taggedValues\":[],\"value\":\"UO\"},{\"stereotypes\":[],\"taggedValues\":[],\"value\":\"OP\"}]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"GenericAnimal\",\"originalMilestonedProperties\":[],\"package\":\"model::animal\",\"properties\":[],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[],\"taggedValues\":[]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"GenericAnimal2\",\"originalMilestonedProperties\":[],\"package\":\"model::animal\",\"properties\":[],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[],\"taggedValues\":[]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"Mammal\",\"originalMilestonedProperties\":[],\"package\":\"model::animal::mammal\",\"properties\":[{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"String\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"noOfLegs\",\"stereotypes\":[],\"taggedValues\":[]}],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[],\"taggedValues\":[]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"Reptile\",\"originalMilestonedProperties\":[],\"package\":\"model::animal::reptile\",\"properties\":[{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"Boolean\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"hasFin\",\"stereotypes\":[],\"taggedValues\":[]}],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[\"model::animal::Animal\"],\"taggedValues\":[{\"tag\":{\"profile\":\"meta::pure::profiles::doc\",\"value\":\"doc\"},\"value\":\"\"}]}]},\"name\":\"AnimalDS\",\"package\":\"model::animal\",\"path\":\"model::animal::AnimalDS\",\"stereotypes\":[{\"profile\":\"meta::pure::profiles::doc\",\"value\":\"deprecated\"}],\"supportInfo\":{\"_type\":\"email\",\"address\":\"someEmail@test.org\"},\"taggedValues\":[{\"profile\":\"meta::pure::profiles::enterprise\",\"tag\":\"taxonomyNodes\",\"value\":\"abcdxyz005\"},{\"profile\":\"meta::pure::profiles::doc\",\"tag\":\"doc\",\"value\":\"Lorem ipsum\"},{\"profile\":\"meta::pure::profiles::doc\",\"tag\":\"doc\",\"value\":\"Lorem ipsum2\"}]}"); + MutableMap mappingAnalysisMap = Maps.mutable.with( + "model::dummyMapping", "{\"_type\":\"MappingAnalysisCoveragePartition\",\"analysisResult\":{\"mappedEntities\":[{\"info\":{\"classPath\":\"model::animal::Animal\",\"isRootEntity\":true,\"subClasses\":[]},\"path\":\"model::animal::Animal\",\"properties\":[{\"_type\":\"MappedProperty\",\"name\":\"noOfLegs\"},{\"_type\":\"MappedProperty\",\"name\":\"something\"},{\"_type\":\"entity\",\"entityPath\":\"model::animal::GenericAnimal\",\"name\":\"something2\"}]},{\"info\":{\"classPath\":\"model::animal::Animal2\",\"isRootEntity\":true,\"subClasses\":[]},\"path\":\"model::animal::Animal2\",\"properties\":[{\"_type\":\"MappedProperty\",\"name\":\"name\"},{\"_type\":\"MappedProperty\",\"name\":\"name2\"}]},{\"info\":{\"classPath\":\"model::animal::GenericAnimal\",\"isRootEntity\":true,\"subClasses\":[]},\"path\":\"model::animal::GenericAnimal\",\"properties\":[]},{\"info\":{\"classPath\":\"model::animal::GenericAnimal2\",\"isRootEntity\":true,\"subClasses\":[]},\"path\":\"model::animal::GenericAnimal2\",\"properties\":[]}]},\"mapping\":\"model::dummyMapping\"}", + "model::dummyMapping2", "{\"_type\":\"MappingAnalysisCoveragePartition\",\"analysisResult\":{\"mappedEntities\":[{\"info\":{\"classPath\":\"model::animal::mammal::Mammal\",\"isRootEntity\":true,\"subClasses\":[]},\"path\":\"model::animal::mammal::Mammal\",\"properties\":[{\"_type\":\"MappedProperty\",\"name\":\"noOfLegs\"}]},{\"info\":{\"classPath\":\"model::animal::reptile::Reptile\",\"isRootEntity\":true,\"subClasses\":[]},\"path\":\"model::animal::reptile::Reptile\",\"properties\":[{\"_type\":\"enum\",\"enumPath\":\"model::animal::Family\",\"name\":\"family\"},{\"_type\":\"MappedProperty\",\"name\":\"name2\"},{\"_type\":\"MappedProperty\",\"name\":\"something\"},{\"_type\":\"MappedProperty\",\"name\":\"hasFin\"}]}]},\"mapping\":\"model::dummyMapping2\"}" + + ); + + MutableMap mappingModelMap = Maps.mutable.with( + "model::dummyMapping", "{\"_type\":\"MappingModelCoveragePartition\",\"mapping\":\"model::dummyMapping\",\"model\":{\"_type\":\"data\",\"elements\":[{\"_type\":\"class\",\"constraints\":[],\"name\":\"Animal\",\"originalMilestonedProperties\":[],\"package\":\"model::animal\",\"properties\":[{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"model::animal::Family\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"family\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"Number\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"noOfLegs\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"model::animal::GenericAnimal2\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0},\"name\":\"children\",\"stereotypes\":[],\"taggedValues\":[]}],\"qualifiedProperties\":[{\"body\":[{\"_type\":\"func\",\"fControl\":\"greaterThan_Number_1__Number_1__Boolean_1_\",\"function\":\"greaterThan\",\"parameters\":[{\"_type\":\"property\",\"parameters\":[{\"_type\":\"var\",\"name\":\"this\"}],\"property\":\"noOfLegs\"},{\"_type\":\"integer\",\"value\":4}]}],\"name\":\"something\",\"parameters\":[],\"returnGenericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"Boolean\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"returnMultiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"stereotypes\":[],\"taggedValues\":[]},{\"body\":[{\"_type\":\"collection\",\"multiplicity\":{\"lowerBound\":0,\"upperBound\":0},\"values\":[]}],\"name\":\"something2\",\"parameters\":[],\"returnGenericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"model::animal::GenericAnimal\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"returnMultiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"stereotypes\":[],\"taggedValues\":[]}],\"stereotypes\":[],\"superTypes\":[\"meta::pure::metamodel::type::Any\"],\"taggedValues\":[]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"Animal2\",\"originalMilestonedProperties\":[],\"package\":\"model::animal\",\"properties\":[{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"String\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"name\",\"stereotypes\":[],\"taggedValues\":[]}],\"qualifiedProperties\":[{\"body\":[{\"_type\":\"string\",\"value\":\"\"}],\"name\":\"name2\",\"parameters\":[],\"returnGenericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"String\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"returnMultiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"stereotypes\":[],\"taggedValues\":[]}],\"stereotypes\":[],\"superTypes\":[\"meta::pure::metamodel::type::Any\"],\"taggedValues\":[]},{\"_type\":\"Enumeration\",\"name\":\"Family\",\"package\":\"model::animal\",\"stereotypes\":[],\"taggedValues\":[],\"values\":[{\"stereotypes\":[],\"taggedValues\":[],\"value\":\"UO\"},{\"stereotypes\":[],\"taggedValues\":[],\"value\":\"OP\"}]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"GenericAnimal\",\"originalMilestonedProperties\":[],\"package\":\"model::animal\",\"properties\":[],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[\"meta::pure::metamodel::type::Any\"],\"taggedValues\":[]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"GenericAnimal2\",\"originalMilestonedProperties\":[],\"package\":\"model::animal\",\"properties\":[],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[\"meta::pure::metamodel::type::Any\"],\"taggedValues\":[]}]}}", + "model::dummyMapping2", "{\"_type\":\"MappingModelCoveragePartition\",\"mapping\":\"model::dummyMapping2\",\"model\":{\"_type\":\"data\",\"elements\":[{\"_type\":\"profile\",\"name\":\"doc\",\"package\":\"meta::pure::profiles\",\"stereotypes\":[\"deprecated\"],\"tags\":[\"doc\",\"todo\"]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"Animal\",\"originalMilestonedProperties\":[],\"package\":\"model::animal\",\"properties\":[{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"model::animal::Family\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"family\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"Number\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"noOfLegs\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"model::animal::GenericAnimal2\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0},\"name\":\"children\",\"stereotypes\":[],\"taggedValues\":[]}],\"qualifiedProperties\":[{\"body\":[{\"_type\":\"func\",\"fControl\":\"greaterThan_Number_1__Number_1__Boolean_1_\",\"function\":\"greaterThan\",\"parameters\":[{\"_type\":\"property\",\"parameters\":[{\"_type\":\"var\",\"name\":\"this\"}],\"property\":\"noOfLegs\"},{\"_type\":\"integer\",\"value\":4}]}],\"name\":\"something\",\"parameters\":[],\"returnGenericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"Boolean\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"returnMultiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"stereotypes\":[],\"taggedValues\":[]},{\"body\":[{\"_type\":\"collection\",\"multiplicity\":{\"lowerBound\":0,\"upperBound\":0},\"values\":[]}],\"name\":\"something2\",\"parameters\":[],\"returnGenericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"model::animal::GenericAnimal\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"returnMultiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"stereotypes\":[],\"taggedValues\":[]}],\"stereotypes\":[],\"superTypes\":[\"meta::pure::metamodel::type::Any\"],\"taggedValues\":[]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"Animal2\",\"originalMilestonedProperties\":[],\"package\":\"model::animal\",\"properties\":[{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"String\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"name\",\"stereotypes\":[],\"taggedValues\":[]}],\"qualifiedProperties\":[{\"body\":[{\"_type\":\"string\",\"value\":\"\"}],\"name\":\"name2\",\"parameters\":[],\"returnGenericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"String\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"returnMultiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"stereotypes\":[],\"taggedValues\":[]}],\"stereotypes\":[],\"superTypes\":[\"meta::pure::metamodel::type::Any\"],\"taggedValues\":[]},{\"_type\":\"Enumeration\",\"name\":\"Family\",\"package\":\"model::animal\",\"stereotypes\":[],\"taggedValues\":[],\"values\":[{\"stereotypes\":[],\"taggedValues\":[],\"value\":\"UO\"},{\"stereotypes\":[],\"taggedValues\":[],\"value\":\"OP\"}]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"GenericAnimal\",\"originalMilestonedProperties\":[],\"package\":\"model::animal\",\"properties\":[],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[],\"taggedValues\":[]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"GenericAnimal2\",\"originalMilestonedProperties\":[],\"package\":\"model::animal\",\"properties\":[],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[],\"taggedValues\":[]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"Mammal\",\"originalMilestonedProperties\":[],\"package\":\"model::animal::mammal\",\"properties\":[{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"String\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"noOfLegs\",\"stereotypes\":[],\"taggedValues\":[]}],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[\"meta::pure::metamodel::type::Any\"],\"taggedValues\":[]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"Reptile\",\"originalMilestonedProperties\":[],\"package\":\"model::animal::reptile\",\"properties\":[{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"Boolean\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"hasFin\",\"stereotypes\":[],\"taggedValues\":[]}],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[\"model::animal::Animal2\",\"model::animal::Animal\"],\"taggedValues\":[{\"tag\":{\"profile\":\"meta::pure::profiles::doc\",\"value\":\"doc\"},\"value\":\"\"}]}]}}" + + ); + testDataSpaceAnalyticsArtifactGenerationExtension( + "models/dataSpaceWithSubstantialMapping.pure", "model::animal::AnimalDS", + "{\"defaultExecutionContext\":\"dummyContext\",\"description\":\"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\",\"diagrams\":[{\"diagram\":\"model::animal::AnimalDiagram\",\"title\":\"\"},{\"diagram\":\"model::GeneralDiagram\",\"title\":\"\"}],\"elementDocs\":[],\"elements\":[],\"executables\":[],\"executionContexts\":[{\"compatibleRuntimes\":[\"model::dummyRuntime\"],\"datasets\":[],\"defaultRuntime\":\"model::dummyRuntime\",\"description\":\"An important execution context\",\"mapping\":\"model::dummyMapping\",\"name\":\"dummyContext\"},{\"compatibleRuntimes\":[\"model::dummyRuntime\",\"model::dummyRuntime2\"],\"datasets\":[],\"defaultRuntime\":\"model::dummyRuntime\",\"mapping\":\"model::dummyMapping2\",\"name\":\"dummyContext2\"},{\"compatibleRuntimes\":[\"model::dummyRuntime\",\"model::dummyRuntime2\"],\"defaultRuntime\":\"model::dummyRuntime2\",\"mapping\":\"model::dummyMapping2\",\"name\":\"dummyContext3\"}],\"mappingToMappingCoverageResult\":{},\"model\":{\"_type\":\"data\",\"elements\":[{\"_type\":\"profile\",\"name\":\"doc\",\"package\":\"meta::pure::profiles\",\"stereotypes\":[\"deprecated\"],\"tags\":[\"doc\",\"todo\"]},{\"_type\":\"diagram\",\"classViews\":[{\"class\":\"model::animal::reptile::Reptile\",\"id\":\"4cec85f9-9b66-450a-bdcb-c855aa0314e1\",\"position\":{\"x\":568.0,\"y\":404.0},\"rectangle\":{\"height\":58.0,\"width\":120.84765625}},{\"class\":\"model::animal::Animal\",\"id\":\"902bf14e-e7ff-40e7-92e4-8780f91bfa29\",\"position\":{\"x\":809.0,\"y\":187.0},\"rectangle\":{\"height\":44.0,\"width\":108.64453125}}],\"generalizationViews\":[{\"line\":{\"points\":[{\"x\":628.423828125,\"y\":433.0},{\"x\":863.322265625,\"y\":209.0}]},\"sourceView\":\"4cec85f9-9b66-450a-bdcb-c855aa0314e1\",\"targetView\":\"902bf14e-e7ff-40e7-92e4-8780f91bfa29\"}],\"name\":\"GeneralDiagram\",\"package\":\"model\",\"propertyViews\":[]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"Animal\",\"originalMilestonedProperties\":[],\"package\":\"model::animal\",\"properties\":[{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"model::animal::Family\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"family\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"Number\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"noOfLegs\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"model::animal::GenericAnimal2\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0},\"name\":\"children\",\"stereotypes\":[],\"taggedValues\":[]}],\"qualifiedProperties\":[{\"body\":[{\"_type\":\"func\",\"fControl\":\"greaterThan_Number_1__Number_1__Boolean_1_\",\"function\":\"greaterThan\",\"parameters\":[{\"_type\":\"property\",\"parameters\":[{\"_type\":\"var\",\"name\":\"this\"}],\"property\":\"noOfLegs\"},{\"_type\":\"integer\",\"value\":4}]}],\"name\":\"something\",\"parameters\":[],\"returnGenericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"Boolean\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"returnMultiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"stereotypes\":[],\"taggedValues\":[]},{\"body\":[{\"_type\":\"collection\",\"multiplicity\":{\"lowerBound\":0,\"upperBound\":0},\"values\":[]}],\"name\":\"something2\",\"parameters\":[],\"returnGenericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"model::animal::GenericAnimal\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"returnMultiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"stereotypes\":[],\"taggedValues\":[]}],\"stereotypes\":[],\"superTypes\":[],\"taggedValues\":[]},{\"_type\":\"diagram\",\"classViews\":[{\"class\":\"model::animal::mammal::Mammal\",\"id\":\"641a0336-d4b5-418c-b656-2f52461264e2\",\"position\":{\"x\":427.0,\"y\":210.0},\"rectangle\":{\"height\":44.0,\"width\":125.1123046875}},{\"class\":\"model::animal::reptile::Reptile\",\"id\":\"b92253d8-0389-4c7d-b5d2-3cdc3bb1ad98\",\"position\":{\"x\":787.0,\"y\":216.0},\"rectangle\":{\"height\":58.0,\"width\":120.84765625}},{\"class\":\"model::animal::Animal\",\"id\":\"7a992cfc-c888-4091-aa00-ab430915aced\",\"position\":{\"x\":515.423828125,\"y\":-7.5},\"rectangle\":{\"height\":100.0,\"width\":199.716796875}}],\"generalizationViews\":[{\"line\":{\"points\":[{\"x\":847.423828125,\"y\":245.0},{\"x\":615.2822265625,\"y\":42.5}]},\"sourceView\":\"b92253d8-0389-4c7d-b5d2-3cdc3bb1ad98\",\"targetView\":\"7a992cfc-c888-4091-aa00-ab430915aced\"}],\"name\":\"AnimalDiagram\",\"package\":\"model::animal\",\"propertyViews\":[]},{\"_type\":\"Enumeration\",\"name\":\"Family\",\"package\":\"model::animal\",\"stereotypes\":[],\"taggedValues\":[],\"values\":[{\"stereotypes\":[],\"taggedValues\":[],\"value\":\"UO\"},{\"stereotypes\":[],\"taggedValues\":[],\"value\":\"OP\"}]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"GenericAnimal\",\"originalMilestonedProperties\":[],\"package\":\"model::animal\",\"properties\":[],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[],\"taggedValues\":[]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"GenericAnimal2\",\"originalMilestonedProperties\":[],\"package\":\"model::animal\",\"properties\":[],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[],\"taggedValues\":[]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"Mammal\",\"originalMilestonedProperties\":[],\"package\":\"model::animal::mammal\",\"properties\":[{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"String\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"noOfLegs\",\"stereotypes\":[],\"taggedValues\":[]}],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[],\"taggedValues\":[]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"Reptile\",\"originalMilestonedProperties\":[],\"package\":\"model::animal::reptile\",\"properties\":[{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"Boolean\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"hasFin\",\"stereotypes\":[],\"taggedValues\":[]}],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[\"model::animal::Animal\"],\"taggedValues\":[{\"tag\":{\"profile\":\"meta::pure::profiles::doc\",\"value\":\"doc\"},\"value\":\"\"}]}]},\"name\":\"AnimalDS\",\"package\":\"model::animal\",\"path\":\"model::animal::AnimalDS\",\"stereotypes\":[{\"profile\":\"meta::pure::profiles::doc\",\"value\":\"deprecated\"}],\"supportInfo\":{\"_type\":\"email\",\"address\":\"someEmail@test.org\"},\"taggedValues\":[{\"profile\":\"meta::pure::profiles::enterprise\",\"tag\":\"taxonomyNodes\",\"value\":\"abcdxyz005\"},{\"profile\":\"meta::pure::profiles::doc\",\"tag\":\"doc\",\"value\":\"Lorem ipsum\"},{\"profile\":\"meta::pure::profiles::doc\",\"tag\":\"doc\",\"value\":\"Lorem ipsum2\"}]}", + mappingAnalysisMap, + mappingModelMap, + true); } @Test public void testAnalyticsForDataSpaceWithElements() throws Exception { - testDataSpaceAnalyticsArtifactGenerationExtension("models/dataSpaceWithElements.pure", "dataSpace::_FirmDataSpace", "{\"defaultExecutionContext\":\"dummyContext\",\"diagrams\":[],\"elementDocs\":[{\"_type\":\"class\",\"docs\":[\"Animal class\"],\"name\":\"Animal\",\"path\":\"model::Animal\",\"properties\":[{\"docs\":[\"age\"],\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"age\",\"type\":\"Integer\"}]},{\"_type\":\"class\",\"docs\":[\"The Firm concept\"],\"name\":\"Firm\",\"path\":\"model::Firm\",\"properties\":[{\"docs\":[\"type of firm: e.g. CORP, LTD\"],\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"type\",\"type\":\"String\"},{\"docs\":[\"some doc for employees\"],\"multiplicity\":{\"lowerBound\":1},\"name\":\"employees\",\"type\":\"model::Person\"}]},{\"_type\":\"association\",\"docs\":[],\"name\":\"Firm_Person\",\"path\":\"model::Firm_Person\",\"properties\":[{\"docs\":[],\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"firm\",\"type\":\"model::Firm\"},{\"docs\":[\"some doc for employees\"],\"multiplicity\":{\"lowerBound\":1},\"name\":\"employees\",\"type\":\"model::Person\"}]},{\"_type\":\"class\",\"docs\":[],\"name\":\"LegalEntity\",\"path\":\"model::LegalEntity\",\"properties\":[{\"docs\":[\"name of the entity\"],\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"legalName\",\"type\":\"String\"}]},{\"_type\":\"class\",\"docs\":[\"Homo Sapien\"],\"name\":\"Person\",\"path\":\"model::Person\",\"properties\":[{\"docs\":[],\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"firstName\",\"type\":\"String\"},{\"docs\":[],\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"lastName\",\"type\":\"String\"},{\"docs\":[],\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"firm\",\"type\":\"model::Firm\"}]},{\"_type\":\"enumeration\",\"docs\":[\"Types of company\"],\"enumValues\":[{\"docs\":[\"Limited\"],\"name\":\"LLC\"},{\"docs\":[],\"name\":\"CORP\"}],\"name\":\"IncType\",\"path\":\"model::target::IncType\"},{\"_type\":\"class\",\"docs\":[],\"name\":\"_Person\",\"path\":\"model::target::_Person\",\"properties\":[{\"docs\":[],\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"fullName\",\"type\":\"String\"}]}],\"elements\":[\"model::Animal\",\"model::Firm\",\"model::Firm_Person\",\"model::LegalEntity\",\"model::Person\",\"model::target::IncType\",\"model::target::_Person\"],\"executables\":[],\"executionContexts\":[{\"compatibleRuntimes\":[\"mapping::ModelToModelRuntime\"],\"datasets\":[],\"defaultRuntime\":\"mapping::ModelToModelRuntime\",\"mapping\":\"mapping::ModelToModelMapping\",\"name\":\"dummyContext\"}],\"mappingToMappingCoverageResult\":{\"mapping::ModelToModelMapping\":{\"mappedEntities\":[{\"path\":\"model::target::_Firm\",\"properties\":[{\"_type\":\"entity\",\"entityPath\":\"model::target::_Person\",\"name\":\"employees\"},{\"_type\":\"MappedProperty\",\"name\":\"name\"},{\"_type\":\"enum\",\"enumPath\":\"model::target::IncType\",\"name\":\"type\"}]},{\"path\":\"model::target::_Person\",\"properties\":[{\"_type\":\"MappedProperty\",\"name\":\"fullName\"}]}]}},\"model\":{\"_type\":\"data\",\"elements\":[]},\"name\":\"_FirmDataSpace\",\"package\":\"dataSpace\",\"path\":\"dataSpace::_FirmDataSpace\",\"stereotypes\":[],\"taggedValues\":[],\"title\":\"Firm Dataspace\"}"); + MutableMap mappingAnalysisMap = Maps.mutable.with( + "mapping::ModelToModelMapping", "{\"_type\":\"MappingAnalysisCoveragePartition\",\"analysisResult\":{\"mappedEntities\":[{\"info\":{\"classPath\":\"model::target::_Firm\",\"isRootEntity\":true,\"subClasses\":[]},\"path\":\"model::target::_Firm\",\"properties\":[{\"_type\":\"entity\",\"entityPath\":\"model::target::_Person\",\"name\":\"employees\"},{\"_type\":\"MappedProperty\",\"name\":\"name\"},{\"_type\":\"enum\",\"enumPath\":\"model::target::IncType\",\"name\":\"type\"}]},{\"info\":{\"classPath\":\"model::target::_Person\",\"isRootEntity\":true,\"subClasses\":[]},\"path\":\"model::target::_Person\",\"properties\":[{\"_type\":\"MappedProperty\",\"name\":\"fullName\"}]}]},\"mapping\":\"mapping::ModelToModelMapping\"}" + ); + MutableMap mappingModelMap = Maps.mutable.with( + "mapping::ModelToModelMapping", + "{\"_type\":\"MappingModelCoveragePartition\",\"mapping\":\"mapping::ModelToModelMapping\",\"model\":{\"_type\":\"data\",\"elements\":[{\"_type\":\"Enumeration\",\"name\":\"IncType\",\"package\":\"model::target\",\"stereotypes\":[],\"taggedValues\":[],\"values\":[{\"stereotypes\":[],\"taggedValues\":[],\"value\":\"LLC\"},{\"stereotypes\":[],\"taggedValues\":[],\"value\":\"CORP\"}]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"_Firm\",\"originalMilestonedProperties\":[],\"package\":\"model::target\",\"properties\":[{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"model::target::_Person\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1},\"name\":\"employees\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"model::target::IncType\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"type\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"String\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"name\",\"stereotypes\":[],\"taggedValues\":[]}],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[\"meta::pure::metamodel::type::Any\"],\"taggedValues\":[]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"_Person\",\"originalMilestonedProperties\":[],\"package\":\"model::target\",\"properties\":[{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"String\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"fullName\",\"stereotypes\":[],\"taggedValues\":[]}],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[\"meta::pure::metamodel::type::Any\"],\"taggedValues\":[]}]}}" + ); + testDataSpaceAnalyticsArtifactGenerationExtension("models/dataSpaceWithElements.pure", + "dataSpace::_FirmDataSpace", + "{\"defaultExecutionContext\":\"dummyContext\",\"diagrams\":[],\"elementDocs\":[{\"_type\":\"class\",\"docs\":[\"Animal class\"],\"name\":\"Animal\",\"path\":\"model::Animal\",\"properties\":[{\"docs\":[\"age\"],\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"age\",\"type\":\"Integer\"}]},{\"_type\":\"class\",\"docs\":[\"The Firm concept\"],\"name\":\"Firm\",\"path\":\"model::Firm\",\"properties\":[{\"docs\":[\"type of firm: e.g. CORP, LTD\"],\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"type\",\"type\":\"String\"},{\"docs\":[\"some doc for employees\"],\"multiplicity\":{\"lowerBound\":1},\"name\":\"employees\",\"type\":\"model::Person\"}]},{\"_type\":\"association\",\"docs\":[],\"name\":\"Firm_Person\",\"path\":\"model::Firm_Person\",\"properties\":[{\"docs\":[],\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"firm\",\"type\":\"model::Firm\"},{\"docs\":[\"some doc for employees\"],\"multiplicity\":{\"lowerBound\":1},\"name\":\"employees\",\"type\":\"model::Person\"}]},{\"_type\":\"class\",\"docs\":[],\"name\":\"LegalEntity\",\"path\":\"model::LegalEntity\",\"properties\":[{\"docs\":[\"name of the entity\"],\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"legalName\",\"type\":\"String\"}]},{\"_type\":\"class\",\"docs\":[\"Homo Sapien\"],\"name\":\"Person\",\"path\":\"model::Person\",\"properties\":[{\"docs\":[],\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"firstName\",\"type\":\"String\"},{\"docs\":[],\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"lastName\",\"type\":\"String\"},{\"docs\":[],\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"firm\",\"type\":\"model::Firm\"}]},{\"_type\":\"enumeration\",\"docs\":[\"Types of company\"],\"enumValues\":[{\"docs\":[\"Limited\"],\"name\":\"LLC\"},{\"docs\":[],\"name\":\"CORP\"}],\"name\":\"IncType\",\"path\":\"model::target::IncType\"},{\"_type\":\"class\",\"docs\":[],\"name\":\"_Person\",\"path\":\"model::target::_Person\",\"properties\":[{\"docs\":[],\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"fullName\",\"type\":\"String\"}]}],\"elements\":[\"model::Animal\",\"model::Firm\",\"model::Firm_Person\",\"model::LegalEntity\",\"model::Person\",\"model::target::IncType\",\"model::target::_Person\"],\"executables\":[],\"executionContexts\":[{\"compatibleRuntimes\":[\"mapping::ModelToModelRuntime\"],\"datasets\":[],\"defaultRuntime\":\"mapping::ModelToModelRuntime\",\"mapping\":\"mapping::ModelToModelMapping\",\"name\":\"dummyContext\"}],\"mappingToMappingCoverageResult\":{},\"model\":{\"_type\":\"data\",\"elements\":[]},\"name\":\"_FirmDataSpace\",\"package\":\"dataSpace\",\"path\":\"dataSpace::_FirmDataSpace\",\"stereotypes\":[],\"taggedValues\":[],\"title\":\"Firm Dataspace\"}", + mappingAnalysisMap, + mappingModelMap, + true); + } @Test public void testAnalyticsForDataSpaceWithMilestoningElements() throws Exception { - testDataSpaceAnalyticsArtifactGenerationExtension("models/dataSpaceWithMilestoningElements.pure", "dataSpace::_FirmDataSpace", "{\"defaultExecutionContext\":\"dummyContext\",\"diagrams\":[],\"elementDocs\":[{\"_type\":\"class\",\"docs\":[\"Animal class\"],\"name\":\"Animal\",\"path\":\"model::Animal\",\"properties\":[{\"docs\":[\"age\"],\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"age\",\"type\":\"Integer\"}]},{\"_type\":\"class\",\"docs\":[\"The Firm concept\"],\"milestoning\":\"processingtemporal\",\"name\":\"Firm\",\"path\":\"model::Firm\",\"properties\":[{\"docs\":[\"type of firm: e.g. CORP, LTD\"],\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"type\",\"type\":\"String\"},{\"docs\":[\"some doc for employees\"],\"multiplicity\":{\"lowerBound\":1},\"name\":\"employees\",\"type\":\"model::Person\"}]},{\"_type\":\"association\",\"docs\":[],\"name\":\"Firm_Person\",\"path\":\"model::Firm_Person\",\"properties\":[{\"docs\":[\"some doc for employees\"],\"multiplicity\":{\"lowerBound\":1},\"name\":\"employees\",\"type\":\"model::Person\"},{\"docs\":[],\"milestoning\":\"processingtemporal\",\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"firm\",\"type\":\"model::Firm\"}]},{\"_type\":\"class\",\"docs\":[],\"name\":\"LegalEntity\",\"path\":\"model::LegalEntity\",\"properties\":[{\"docs\":[\"name of the entity\"],\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"legalName\",\"type\":\"String\"}]},{\"_type\":\"class\",\"docs\":[],\"name\":\"NotRelevant\",\"path\":\"model::NotRelevant\",\"properties\":[]},{\"_type\":\"class\",\"docs\":[\"Homo Sapien\"],\"name\":\"Person\",\"path\":\"model::Person\",\"properties\":[{\"docs\":[],\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"firstName\",\"type\":\"String\"},{\"docs\":[],\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"lastName\",\"type\":\"String\"},{\"docs\":[],\"milestoning\":\"processingtemporal\",\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"firm\",\"type\":\"model::Firm\"}]},{\"_type\":\"class\",\"docs\":[],\"milestoning\":\"businesstemporal\",\"name\":\"Animal\",\"path\":\"model::experiment::Animal\",\"properties\":[]},{\"_type\":\"class\",\"docs\":[],\"milestoning\":\"businesstemporal\",\"name\":\"Human\",\"path\":\"model::experiment::Human\",\"properties\":[]},{\"_type\":\"enumeration\",\"docs\":[\"Types of company\"],\"enumValues\":[{\"docs\":[\"Limited\"],\"name\":\"LLC\"},{\"docs\":[],\"name\":\"CORP\"}],\"name\":\"IncType\",\"path\":\"model::target::IncType\"},{\"_type\":\"class\",\"docs\":[],\"name\":\"_Firm\",\"path\":\"model::target::_Firm\",\"properties\":[{\"docs\":[],\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"type\",\"type\":\"model::target::IncType\"},{\"docs\":[],\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"name\",\"type\":\"String\"},{\"docs\":[],\"milestoning\":\"bitemporal\",\"multiplicity\":{\"lowerBound\":1},\"name\":\"employees\",\"type\":\"model::target::_Person\"}]},{\"_type\":\"class\",\"docs\":[],\"milestoning\":\"bitemporal\",\"name\":\"_Person\",\"path\":\"model::target::_Person\",\"properties\":[{\"docs\":[],\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"fullName\",\"type\":\"String\"}]}],\"elements\":[\"model::Animal\",\"model::Firm\",\"model::Firm_Person\",\"model::LegalEntity\",\"model::NotRelevant\",\"model::Person\",\"model::experiment::Animal\",\"model::experiment::Human\",\"model::target::IncType\",\"model::target::_Firm\",\"model::target::_Person\"],\"executables\":[],\"executionContexts\":[{\"compatibleRuntimes\":[\"mapping::ModelToModelRuntime\"],\"datasets\":[],\"defaultRuntime\":\"mapping::ModelToModelRuntime\",\"mapping\":\"mapping::ModelToModelMapping\",\"name\":\"dummyContext\"}],\"mappingToMappingCoverageResult\":{\"mapping::ModelToModelMapping\":{\"mappedEntities\":[{\"path\":\"model::target::_Firm\",\"properties\":[{\"_type\":\"entity\",\"entityPath\":\"model::target::_Person\",\"name\":\"employees\"},{\"_type\":\"MappedProperty\",\"name\":\"name\"},{\"_type\":\"enum\",\"enumPath\":\"model::target::IncType\",\"name\":\"type\"}]},{\"path\":\"model::target::_Person\",\"properties\":[{\"_type\":\"MappedProperty\",\"name\":\"fullName\"}]}]}},\"model\":{\"_type\":\"data\",\"elements\":[]},\"name\":\"_FirmDataSpace\",\"package\":\"dataSpace\",\"path\":\"dataSpace::_FirmDataSpace\",\"stereotypes\":[],\"taggedValues\":[],\"title\":\"Firm Dataspace\"}"); + MutableMap mappingAnalysisMap = Maps.mutable.with( + "mapping::ModelToModelMapping", "{\"_type\":\"MappingAnalysisCoveragePartition\",\"analysisResult\":{\"mappedEntities\":[{\"info\":{\"classPath\":\"model::target::_Firm\",\"isRootEntity\":true,\"subClasses\":[]},\"path\":\"model::target::_Firm\",\"properties\":[{\"_type\":\"entity\",\"entityPath\":\"model::target::_Person\",\"name\":\"employees\"},{\"_type\":\"MappedProperty\",\"name\":\"name\"},{\"_type\":\"enum\",\"enumPath\":\"model::target::IncType\",\"name\":\"type\"}]},{\"info\":{\"classPath\":\"model::target::_Person\",\"isRootEntity\":true,\"subClasses\":[]},\"path\":\"model::target::_Person\",\"properties\":[{\"_type\":\"MappedProperty\",\"name\":\"fullName\"}]}]},\"mapping\":\"mapping::ModelToModelMapping\"}" + ); + MutableMap mappingModelMap = Maps.mutable.with( + "mapping::ModelToModelMapping", + "{\"_type\":\"MappingModelCoveragePartition\",\"mapping\":\"mapping::ModelToModelMapping\",\"model\":{\"_type\":\"data\",\"elements\":[{\"_type\":\"class\",\"constraints\":[],\"name\":\"BiTemporalMilestoning\",\"originalMilestonedProperties\":[],\"package\":\"meta::pure::milestoning\",\"properties\":[],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[],\"taggedValues\":[]},{\"_type\":\"profile\",\"name\":\"temporal\",\"package\":\"meta::pure::profiles\",\"stereotypes\":[\"bitemporal\",\"businesstemporal\",\"processingtemporal\"],\"tags\":[]},{\"_type\":\"Enumeration\",\"name\":\"IncType\",\"package\":\"model::target\",\"stereotypes\":[],\"taggedValues\":[],\"values\":[{\"stereotypes\":[],\"taggedValues\":[],\"value\":\"LLC\"},{\"stereotypes\":[],\"taggedValues\":[],\"value\":\"CORP\"}]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"_Firm\",\"originalMilestonedProperties\":[{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"model::target::_Person\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1},\"name\":\"employees\",\"stereotypes\":[],\"taggedValues\":[]}],\"package\":\"model::target\",\"properties\":[{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"model::target::IncType\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"type\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"String\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"name\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"model::target::_Person\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1},\"name\":\"employees\",\"stereotypes\":[],\"taggedValues\":[]}],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[\"meta::pure::metamodel::type::Any\"],\"taggedValues\":[]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"_Person\",\"originalMilestonedProperties\":[],\"package\":\"model::target\",\"properties\":[{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"String\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"fullName\",\"stereotypes\":[],\"taggedValues\":[]}],\"qualifiedProperties\":[],\"stereotypes\":[{\"profile\":\"meta::pure::profiles::temporal\",\"value\":\"bitemporal\"}],\"superTypes\":[\"meta::pure::metamodel::type::Any\"],\"taggedValues\":[]}]}}" + ); + testDataSpaceAnalyticsArtifactGenerationExtension("models/dataSpaceWithMilestoningElements.pure", "dataSpace::_FirmDataSpace", + "{\"defaultExecutionContext\":\"dummyContext\",\"diagrams\":[],\"elementDocs\":[{\"_type\":\"class\",\"docs\":[\"Animal class\"],\"name\":\"Animal\",\"path\":\"model::Animal\",\"properties\":[{\"docs\":[\"age\"],\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"age\",\"type\":\"Integer\"}]},{\"_type\":\"class\",\"docs\":[\"The Firm concept\"],\"milestoning\":\"processingtemporal\",\"name\":\"Firm\",\"path\":\"model::Firm\",\"properties\":[{\"docs\":[\"type of firm: e.g. CORP, LTD\"],\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"type\",\"type\":\"String\"},{\"docs\":[\"some doc for employees\"],\"multiplicity\":{\"lowerBound\":1},\"name\":\"employees\",\"type\":\"model::Person\"}]},{\"_type\":\"association\",\"docs\":[],\"name\":\"Firm_Person\",\"path\":\"model::Firm_Person\",\"properties\":[{\"docs\":[\"some doc for employees\"],\"multiplicity\":{\"lowerBound\":1},\"name\":\"employees\",\"type\":\"model::Person\"},{\"docs\":[],\"milestoning\":\"processingtemporal\",\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"firm\",\"type\":\"model::Firm\"}]},{\"_type\":\"class\",\"docs\":[],\"name\":\"LegalEntity\",\"path\":\"model::LegalEntity\",\"properties\":[{\"docs\":[\"name of the entity\"],\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"legalName\",\"type\":\"String\"}]},{\"_type\":\"class\",\"docs\":[],\"name\":\"NotRelevant\",\"path\":\"model::NotRelevant\",\"properties\":[]},{\"_type\":\"class\",\"docs\":[\"Homo Sapien\"],\"name\":\"Person\",\"path\":\"model::Person\",\"properties\":[{\"docs\":[],\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"firstName\",\"type\":\"String\"},{\"docs\":[],\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"lastName\",\"type\":\"String\"},{\"docs\":[],\"milestoning\":\"processingtemporal\",\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"firm\",\"type\":\"model::Firm\"}]},{\"_type\":\"class\",\"docs\":[],\"milestoning\":\"businesstemporal\",\"name\":\"Animal\",\"path\":\"model::experiment::Animal\",\"properties\":[]},{\"_type\":\"class\",\"docs\":[],\"milestoning\":\"businesstemporal\",\"name\":\"Human\",\"path\":\"model::experiment::Human\",\"properties\":[]},{\"_type\":\"enumeration\",\"docs\":[\"Types of company\"],\"enumValues\":[{\"docs\":[\"Limited\"],\"name\":\"LLC\"},{\"docs\":[],\"name\":\"CORP\"}],\"name\":\"IncType\",\"path\":\"model::target::IncType\"},{\"_type\":\"class\",\"docs\":[],\"name\":\"_Firm\",\"path\":\"model::target::_Firm\",\"properties\":[{\"docs\":[],\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"type\",\"type\":\"model::target::IncType\"},{\"docs\":[],\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"name\",\"type\":\"String\"},{\"docs\":[],\"milestoning\":\"bitemporal\",\"multiplicity\":{\"lowerBound\":1},\"name\":\"employees\",\"type\":\"model::target::_Person\"}]},{\"_type\":\"class\",\"docs\":[],\"milestoning\":\"bitemporal\",\"name\":\"_Person\",\"path\":\"model::target::_Person\",\"properties\":[{\"docs\":[],\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"fullName\",\"type\":\"String\"}]}],\"elements\":[\"model::Animal\",\"model::Firm\",\"model::Firm_Person\",\"model::LegalEntity\",\"model::NotRelevant\",\"model::Person\",\"model::experiment::Animal\",\"model::experiment::Human\",\"model::target::IncType\",\"model::target::_Firm\",\"model::target::_Person\"],\"executables\":[],\"executionContexts\":[{\"compatibleRuntimes\":[\"mapping::ModelToModelRuntime\"],\"datasets\":[],\"defaultRuntime\":\"mapping::ModelToModelRuntime\",\"mapping\":\"mapping::ModelToModelMapping\",\"name\":\"dummyContext\"}],\"mappingToMappingCoverageResult\":{},\"model\":{\"_type\":\"data\",\"elements\":[]},\"name\":\"_FirmDataSpace\",\"package\":\"dataSpace\",\"path\":\"dataSpace::_FirmDataSpace\",\"stereotypes\":[],\"taggedValues\":[],\"title\":\"Firm Dataspace\"}", + mappingAnalysisMap, + mappingModelMap, + true); + } @Test public void testAnalyticsForDataSpaceWithExecutables() throws Exception { - testDataSpaceAnalyticsArtifactGenerationExtension("models/dataSpaceWithExecutables.pure", "domain::COVIDDataspace", "{\"defaultExecutionContext\":\"dummyContext\",\"description\":\"# Peleus rupit\\n\\n## Sum super gerens paterque\\n\\nLorem markdownum presso, et tamen cogitis, Taenarius lactantia fluxerunt\\nterrita, vota. Tempore flumina ferrumque bella.\\n\\n- Per dixit\\n- Truces tellusque indignata ducem\\n- Cervice venitis cavernis minus\\n\\n## Tum ausus fovebam incursus magis dici extemplo\\n\\nPiscator degenerat desertaque quid scelus tyranni feror ipsa mortis nec silva\\nsparsus neci cum? Est patulas meam decorem, dat demit corpora exuritque Ulixes,\\ngenitore. Captare certa amore pressos, Diamque\\n[traxit](http://istecondar.net/ministropudoris) devorat duritia ecce, capillos\\nfuerint progenitore curva relictas. Iubae pectus et quateret, non vires tibi\\ncacumina figuram Antigonen rursus verti.\\n\\n## Dicta nec Thestiadae tristi exempla sed suoque\\n\\nFlumina quae loricaeque meruique defensae *me terram* tamen attollere totum\\nneque nullos. Quem plus, stratum.\\n\\n## Quaeque si reddite summoque vultu Teleboasque vincere\\n\\nIsmariae me munus umbram. Usum pedem multis quotiensque mirantum Cephenum et\\namori Procne locutum auctor Volturnus pavent virgineas.\\n\\n if (edi + sidebarTooltip < aiffDisk) {\\n drive_key_firewire += bank(searchHardBoot(bus, packet_click));\\n }\\n var adRow = dlc_rootkit(rdramMegabit) - hertzBanner * 2 +\\n memory_adc.horizontal(class_box_rte, disk, lte_grep);\\n if (grayscale) {\\n spool_windows_metal.zif_firewire *= 3;\\n emoticon_mp = user.thunderboltIcqBus.installer_remote(4, searchCable) *\\n kibibyteYoutubeRaster.simm(-3, nosqlCharacter, sip);\\n }\\n var blob = -2;\\n\\n## Est magis interdum in luctus\\n\\nPrimus illa sub bis infregit saepe agrestem Cyllare lumen cultrosque **Cnosia**.\\nSuis est fero durisque satis.\\n\\n- Nos quas est maesta aliquis se unum\\n- Tu ossa Cupido sagitta hanc inflati profuso\\n- Modo est proles pavor\\n- Stillabant pallada invitaque et tantum dictaque in\\n- Generum coegi tum edaci\\n\\nSuo nec cerae me omnem Famemque, passi si auditque ullo, praebita. Gravi annos\\npudore formidabilis erat pectora perpetuo qua oscula cum ad sed Nabataeus\\nRomethiumque deum Erectheus? O Victoria rostro utque terras vitisque classe.\\nTibi [miserrima hirta](http://decentia-qui.net/docta-petentem), eratis saepius\\ntuus.\",\"diagrams\":[],\"elementDocs\":[],\"elements\":[],\"executables\":[{\"description\":\"Some exec description\",\"executable\":\"service::CovidDataMulti\",\"result\":{\"_type\":\"tds\",\"columns\":[{\"name\":\"Cases\",\"relationalType\":\"INTEGER\",\"type\":\"Float\"}]},\"title\":\"Exec 1\"},{\"description\":\"Some more exec description\",\"executable\":\"service::CovidDataSingle\",\"info\":{\"_type\":\"service\",\"datasets\":[{\"_type\":\"relationalDatabaseTable\",\"database\":\"CovidDataStore\",\"name\":\"default.DEMOGRAPHICS\",\"schema\":\"default\",\"table\":\"DEMOGRAPHICS\",\"type\":\"H2\"},{\"_type\":\"relationalDatabaseTable\",\"database\":\"CovidDataStore\",\"name\":\"default.COVID_DATA\",\"schema\":\"default\",\"table\":\"COVID_DATA\",\"type\":\"H2\"}],\"mapping\":\"mapping::CovidDataMapping\",\"pattern\":\"/9566f101-2108-408f-863f-6d7e154dc17b\",\"query\":\"|domain::COVIDData.all()->project(\\n [\\n x: domain::COVIDData[1]|$x.cases\\n ],\\n ['Cases']\\n)\",\"runtime\":\"runtime::H2Runtime\"},\"result\":{\"_type\":\"tds\",\"columns\":[{\"name\":\"Cases\",\"relationalType\":\"INTEGER\",\"type\":\"Float\"}]},\"title\":\"Exec 2\"}],\"executionContexts\":[{\"compatibleRuntimes\":[\"runtime::H2Runtime\"],\"datasets\":[{\"_type\":\"relationalDatabaseTable\",\"database\":\"CovidDataStore\",\"name\":\"default.DEMOGRAPHICS\",\"schema\":\"default\",\"table\":\"DEMOGRAPHICS\",\"type\":\"H2\"},{\"_type\":\"relationalDatabaseTable\",\"database\":\"CovidDataStore\",\"name\":\"default.COVID_DATA\",\"schema\":\"default\",\"table\":\"COVID_DATA\",\"type\":\"H2\"}],\"defaultRuntime\":\"runtime::H2Runtime\",\"mapping\":\"mapping::CovidDataMapping\",\"name\":\"dummyContext\",\"runtimeMetadata\":{\"connectionPath\":\"runtime::connection::H2Connection\",\"connectionType\":\"H2\",\"storePath\":\"store::CovidDataStore\"}}],\"mappingToMappingCoverageResult\":{\"mapping::CovidDataMapping\":{\"mappedEntities\":[{\"path\":\"domain::COVIDData\",\"properties\":[{\"_type\":\"MappedProperty\",\"name\":\"caseType\"},{\"_type\":\"MappedProperty\",\"name\":\"cases\"},{\"_type\":\"MappedProperty\",\"name\":\"date\"},{\"_type\":\"entity\",\"entityPath\":\"domain::Demographics\",\"name\":\"demographics\"},{\"_type\":\"MappedProperty\",\"name\":\"fips\"},{\"_type\":\"MappedProperty\",\"name\":\"id\"},{\"_type\":\"MappedProperty\",\"name\":\"lastReportedFlag\"}]},{\"path\":\"domain::Demographics\",\"properties\":[{\"_type\":\"MappedProperty\",\"name\":\"fips\"},{\"_type\":\"MappedProperty\",\"name\":\"state\"}]}]}},\"model\":{\"_type\":\"data\",\"elements\":[]},\"name\":\"COVIDDataspace\",\"package\":\"domain\",\"path\":\"domain::COVIDDataspace\",\"stereotypes\":[],\"taggedValues\":[],\"title\":\"COVID Sample Data\"}"); + MutableMap mappingAnalysisMap = Maps.mutable.with( + "mapping::CovidDataMapping", "{\"_type\":\"MappingAnalysisCoveragePartition\",\"analysisResult\":{\"mappedEntities\":[{\"info\":{\"classPath\":\"domain::COVIDData\",\"isRootEntity\":true,\"subClasses\":[]},\"path\":\"domain::COVIDData\",\"properties\":[{\"_type\":\"MappedProperty\",\"name\":\"caseType\"},{\"_type\":\"MappedProperty\",\"name\":\"cases\"},{\"_type\":\"MappedProperty\",\"name\":\"date\"},{\"_type\":\"entity\",\"entityPath\":\"domain::Demographics\",\"name\":\"demographics\"},{\"_type\":\"MappedProperty\",\"name\":\"fips\"},{\"_type\":\"MappedProperty\",\"name\":\"id\"},{\"_type\":\"MappedProperty\",\"name\":\"lastReportedFlag\"}]},{\"info\":{\"classPath\":\"domain::Demographics\",\"isRootEntity\":true,\"subClasses\":[]},\"path\":\"domain::Demographics\",\"properties\":[{\"_type\":\"MappedProperty\",\"name\":\"fips\"},{\"_type\":\"MappedProperty\",\"name\":\"state\"}]}]},\"mapping\":\"mapping::CovidDataMapping\"}" + ); + MutableMap mappingModelMap = Maps.mutable.with( + "mapping::CovidDataMapping", + "{\"_type\":\"MappingModelCoveragePartition\",\"mapping\":\"mapping::CovidDataMapping\",\"model\":{\"_type\":\"data\",\"elements\":[{\"_type\":\"class\",\"constraints\":[],\"name\":\"COVIDData\",\"originalMilestonedProperties\":[],\"package\":\"domain\",\"properties\":[{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"Integer\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"id\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"String\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"fips\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"StrictDate\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"date\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"String\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"caseType\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"Float\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"cases\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"Boolean\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"lastReportedFlag\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"domain::Demographics\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"demographics\",\"stereotypes\":[],\"taggedValues\":[]}],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[\"meta::pure::metamodel::type::Any\"],\"taggedValues\":[{\"tag\":{\"profile\":\"meta::pure::profiles::doc\",\"value\":\"doc\"},\"value\":\"COVID-19 data report consisting of case statistics details and basic information on demographics\"}]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"Demographics\",\"originalMilestonedProperties\":[],\"package\":\"domain\",\"properties\":[{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"String\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"fips\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"String\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"state\",\"stereotypes\":[],\"taggedValues\":[]}],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[\"meta::pure::metamodel::type::Any\"],\"taggedValues\":[{\"tag\":{\"profile\":\"meta::pure::profiles::doc\",\"value\":\"doc\"},\"value\":\"COVID-19 data demographics consisting of geolocation information\"}]},{\"_type\":\"profile\",\"name\":\"doc\",\"package\":\"meta::pure::profiles\",\"stereotypes\":[\"deprecated\"],\"tags\":[\"doc\",\"todo\"]}]}}" + ); + testDataSpaceAnalyticsArtifactGenerationExtension("models/dataSpaceWithExecutables.pure", "domain::COVIDDataspace", + "{\"defaultExecutionContext\":\"dummyContext\",\"description\":\"# Peleus rupit\\n\\n## Sum super gerens paterque\\n\\nLorem markdownum presso, et tamen cogitis, Taenarius lactantia fluxerunt\\nterrita, vota. Tempore flumina ferrumque bella.\\n\\n- Per dixit\\n- Truces tellusque indignata ducem\\n- Cervice venitis cavernis minus\\n\\n## Tum ausus fovebam incursus magis dici extemplo\\n\\nPiscator degenerat desertaque quid scelus tyranni feror ipsa mortis nec silva\\nsparsus neci cum? Est patulas meam decorem, dat demit corpora exuritque Ulixes,\\ngenitore. Captare certa amore pressos, Diamque\\n[traxit](http://istecondar.net/ministropudoris) devorat duritia ecce, capillos\\nfuerint progenitore curva relictas. Iubae pectus et quateret, non vires tibi\\ncacumina figuram Antigonen rursus verti.\\n\\n## Dicta nec Thestiadae tristi exempla sed suoque\\n\\nFlumina quae loricaeque meruique defensae *me terram* tamen attollere totum\\nneque nullos. Quem plus, stratum.\\n\\n## Quaeque si reddite summoque vultu Teleboasque vincere\\n\\nIsmariae me munus umbram. Usum pedem multis quotiensque mirantum Cephenum et\\namori Procne locutum auctor Volturnus pavent virgineas.\\n\\n if (edi + sidebarTooltip < aiffDisk) {\\n drive_key_firewire += bank(searchHardBoot(bus, packet_click));\\n }\\n var adRow = dlc_rootkit(rdramMegabit) - hertzBanner * 2 +\\n memory_adc.horizontal(class_box_rte, disk, lte_grep);\\n if (grayscale) {\\n spool_windows_metal.zif_firewire *= 3;\\n emoticon_mp = user.thunderboltIcqBus.installer_remote(4, searchCable) *\\n kibibyteYoutubeRaster.simm(-3, nosqlCharacter, sip);\\n }\\n var blob = -2;\\n\\n## Est magis interdum in luctus\\n\\nPrimus illa sub bis infregit saepe agrestem Cyllare lumen cultrosque **Cnosia**.\\nSuis est fero durisque satis.\\n\\n- Nos quas est maesta aliquis se unum\\n- Tu ossa Cupido sagitta hanc inflati profuso\\n- Modo est proles pavor\\n- Stillabant pallada invitaque et tantum dictaque in\\n- Generum coegi tum edaci\\n\\nSuo nec cerae me omnem Famemque, passi si auditque ullo, praebita. Gravi annos\\npudore formidabilis erat pectora perpetuo qua oscula cum ad sed Nabataeus\\nRomethiumque deum Erectheus? O Victoria rostro utque terras vitisque classe.\\nTibi [miserrima hirta](http://decentia-qui.net/docta-petentem), eratis saepius\\ntuus.\",\"diagrams\":[],\"elementDocs\":[],\"elements\":[],\"executables\":[{\"description\":\"Some exec description\",\"executable\":\"service::CovidDataMulti\",\"result\":{\"_type\":\"tds\",\"columns\":[{\"name\":\"Cases\",\"relationalType\":\"INTEGER\",\"type\":\"Float\"}]},\"title\":\"Exec 1\"},{\"description\":\"Some more exec description\",\"executable\":\"service::CovidDataSingle\",\"info\":{\"_type\":\"service\",\"datasets\":[{\"_type\":\"relationalDatabaseTable\",\"database\":\"CovidDataStore\",\"name\":\"default.DEMOGRAPHICS\",\"schema\":\"default\",\"table\":\"DEMOGRAPHICS\",\"type\":\"H2\"},{\"_type\":\"relationalDatabaseTable\",\"database\":\"CovidDataStore\",\"name\":\"default.COVID_DATA\",\"schema\":\"default\",\"table\":\"COVID_DATA\",\"type\":\"H2\"}],\"mapping\":\"mapping::CovidDataMapping\",\"pattern\":\"/9566f101-2108-408f-863f-6d7e154dc17b\",\"query\":\"|domain::COVIDData.all()->project(\\n [\\n x: domain::COVIDData[1]|$x.cases\\n ],\\n ['Cases']\\n)\",\"runtime\":\"runtime::H2Runtime\"},\"result\":{\"_type\":\"tds\",\"columns\":[{\"name\":\"Cases\",\"relationalType\":\"INTEGER\",\"type\":\"Float\"}]},\"title\":\"Exec 2\"}],\"executionContexts\":[{\"compatibleRuntimes\":[\"runtime::H2Runtime\"],\"datasets\":[{\"_type\":\"relationalDatabaseTable\",\"database\":\"CovidDataStore\",\"name\":\"default.DEMOGRAPHICS\",\"schema\":\"default\",\"table\":\"DEMOGRAPHICS\",\"type\":\"H2\"},{\"_type\":\"relationalDatabaseTable\",\"database\":\"CovidDataStore\",\"name\":\"default.COVID_DATA\",\"schema\":\"default\",\"table\":\"COVID_DATA\",\"type\":\"H2\"}],\"defaultRuntime\":\"runtime::H2Runtime\",\"mapping\":\"mapping::CovidDataMapping\",\"name\":\"dummyContext\",\"runtimeMetadata\":{\"connectionPath\":\"runtime::connection::H2Connection\",\"connectionType\":\"H2\",\"storePath\":\"store::CovidDataStore\"}}],\"mappingToMappingCoverageResult\":{},\"model\":{\"_type\":\"data\",\"elements\":[]},\"name\":\"COVIDDataspace\",\"package\":\"domain\",\"path\":\"domain::COVIDDataspace\",\"stereotypes\":[],\"taggedValues\":[],\"title\":\"COVID Sample Data\"}", + mappingAnalysisMap, + mappingModelMap, + true); + } @Test public void testAnalyticsForDataSpaceTemplateWithExecutablesWithInlineQuery() throws Exception { - testDataSpaceAnalyticsArtifactGenerationExtension("models/dataSpaceWithTemplateExecutablesWithInlineQuery.pure", "domain::COVIDDataspace", "{\"defaultExecutionContext\":\"dummyContext\",\"description\":\"this is description of this COVIDDataspace\",\"diagrams\":[],\"elementDocs\":[],\"elements\":[],\"executables\":[{\"description\":\"Some more exec description\",\"info\":{\"_type\":\"templateExecutableInfo\",\"executionContextKey\":\"dummyContext\",\"id\":\"1\",\"query\":\"|domain::COVIDData.all()->project([x: domain::COVIDData[1]|$x.cases], ['Cases'])\"},\"result\":{\"_type\":\"tds\",\"columns\":[{\"name\":\"Cases\",\"relationalType\":\"INTEGER\",\"type\":\"Float\"}]},\"title\":\"this is template\"},{\"info\":{\"_type\":\"templateExecutableInfo\",\"executionContextKey\":\"dummyContext\",\"id\":\"2\",\"query\":\"|domain::COVIDData.all()->project([x: domain::COVIDData[1]|$x.fips], ['Fips'])\"},\"result\":{\"_type\":\"tds\",\"columns\":[{\"name\":\"Fips\",\"relationalType\":\"VARCHAR(200)\",\"type\":\"String\"}]},\"title\":\"this is template2\"}],\"executionContexts\":[{\"compatibleRuntimes\":[\"runtime::H2Runtime\"],\"datasets\":[{\"_type\":\"relationalDatabaseTable\",\"database\":\"CovidDataStore\",\"name\":\"default.DEMOGRAPHICS\",\"schema\":\"default\",\"table\":\"DEMOGRAPHICS\",\"type\":\"H2\"},{\"_type\":\"relationalDatabaseTable\",\"database\":\"CovidDataStore\",\"name\":\"default.COVID_DATA\",\"schema\":\"default\",\"table\":\"COVID_DATA\",\"type\":\"H2\"}],\"defaultRuntime\":\"runtime::H2Runtime\",\"mapping\":\"mapping::CovidDataMapping\",\"name\":\"dummyContext\",\"runtimeMetadata\":{\"connectionPath\":\"runtime::connection::H2Connection\",\"connectionType\":\"H2\",\"storePath\":\"store::CovidDataStore\"}}],\"mappingToMappingCoverageResult\":{\"mapping::CovidDataMapping\":{\"mappedEntities\":[{\"path\":\"domain::COVIDData\",\"properties\":[{\"_type\":\"MappedProperty\",\"name\":\"caseType\"},{\"_type\":\"MappedProperty\",\"name\":\"cases\"},{\"_type\":\"MappedProperty\",\"name\":\"date\"},{\"_type\":\"entity\",\"entityPath\":\"domain::Demographics\",\"name\":\"demographics\"},{\"_type\":\"MappedProperty\",\"name\":\"fips\"},{\"_type\":\"MappedProperty\",\"name\":\"id\"},{\"_type\":\"MappedProperty\",\"name\":\"lastReportedFlag\"}]},{\"path\":\"domain::Demographics\",\"properties\":[{\"_type\":\"MappedProperty\",\"name\":\"fips\"},{\"_type\":\"MappedProperty\",\"name\":\"state\"}]}]}},\"model\":{\"_type\":\"data\",\"elements\":[]},\"name\":\"COVIDDataspace\",\"package\":\"domain\",\"path\":\"domain::COVIDDataspace\",\"stereotypes\":[],\"taggedValues\":[],\"title\":\"COVID Sample Data\"}"); + MutableMap mappingAnalysisMap = Maps.mutable.with( + "mapping::CovidDataMapping", "{\"_type\":\"MappingAnalysisCoveragePartition\",\"analysisResult\":{\"mappedEntities\":[{\"info\":{\"classPath\":\"domain::COVIDData\",\"isRootEntity\":true,\"subClasses\":[]},\"path\":\"domain::COVIDData\",\"properties\":[{\"_type\":\"MappedProperty\",\"name\":\"caseType\"},{\"_type\":\"MappedProperty\",\"name\":\"cases\"},{\"_type\":\"MappedProperty\",\"name\":\"date\"},{\"_type\":\"entity\",\"entityPath\":\"domain::Demographics\",\"name\":\"demographics\"},{\"_type\":\"MappedProperty\",\"name\":\"fips\"},{\"_type\":\"MappedProperty\",\"name\":\"id\"},{\"_type\":\"MappedProperty\",\"name\":\"lastReportedFlag\"}]},{\"info\":{\"classPath\":\"domain::Demographics\",\"isRootEntity\":true,\"subClasses\":[]},\"path\":\"domain::Demographics\",\"properties\":[{\"_type\":\"MappedProperty\",\"name\":\"fips\"},{\"_type\":\"MappedProperty\",\"name\":\"state\"}]}]},\"mapping\":\"mapping::CovidDataMapping\"}" + ); + MutableMap mappingModelMap = Maps.mutable.with( + "mapping::CovidDataMapping", + "{\"_type\":\"MappingModelCoveragePartition\",\"mapping\":\"mapping::CovidDataMapping\",\"model\":{\"_type\":\"data\",\"elements\":[{\"_type\":\"class\",\"constraints\":[],\"name\":\"COVIDData\",\"originalMilestonedProperties\":[],\"package\":\"domain\",\"properties\":[{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"Integer\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"id\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"String\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"fips\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"StrictDate\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"date\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"String\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"caseType\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"Float\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"cases\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"Boolean\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"lastReportedFlag\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"domain::Demographics\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"demographics\",\"stereotypes\":[],\"taggedValues\":[]}],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[\"meta::pure::metamodel::type::Any\"],\"taggedValues\":[{\"tag\":{\"profile\":\"meta::pure::profiles::doc\",\"value\":\"doc\"},\"value\":\"COVID-19 data report consisting of case statistics details and basic information on demographics\"}]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"Demographics\",\"originalMilestonedProperties\":[],\"package\":\"domain\",\"properties\":[{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"String\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"fips\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"String\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"state\",\"stereotypes\":[],\"taggedValues\":[]}],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[\"meta::pure::metamodel::type::Any\"],\"taggedValues\":[{\"tag\":{\"profile\":\"meta::pure::profiles::doc\",\"value\":\"doc\"},\"value\":\"COVID-19 data demographics consisting of geolocation information\"}]},{\"_type\":\"profile\",\"name\":\"doc\",\"package\":\"meta::pure::profiles\",\"stereotypes\":[\"deprecated\"],\"tags\":[\"doc\",\"todo\"]}]}}" + ); + testDataSpaceAnalyticsArtifactGenerationExtension("models/dataSpaceWithTemplateExecutablesWithInlineQuery.pure", "domain::COVIDDataspace", + "{\"defaultExecutionContext\":\"dummyContext\",\"description\":\"this is description of this COVIDDataspace\",\"diagrams\":[],\"elementDocs\":[],\"elements\":[],\"executables\":[{\"description\":\"Some more exec description\",\"info\":{\"_type\":\"templateExecutableInfo\",\"executionContextKey\":\"dummyContext\",\"id\":\"1\",\"query\":\"|domain::COVIDData.all()->project([x: domain::COVIDData[1]|$x.cases], ['Cases'])\"},\"result\":{\"_type\":\"tds\",\"columns\":[{\"name\":\"Cases\",\"relationalType\":\"INTEGER\",\"type\":\"Float\"}]},\"title\":\"this is template\"},{\"info\":{\"_type\":\"templateExecutableInfo\",\"executionContextKey\":\"dummyContext\",\"id\":\"2\",\"query\":\"|domain::COVIDData.all()->project([x: domain::COVIDData[1]|$x.fips], ['Fips'])\"},\"result\":{\"_type\":\"tds\",\"columns\":[{\"name\":\"Fips\",\"relationalType\":\"VARCHAR(200)\",\"type\":\"String\"}]},\"title\":\"this is template2\"}],\"executionContexts\":[{\"compatibleRuntimes\":[\"runtime::H2Runtime\"],\"datasets\":[{\"_type\":\"relationalDatabaseTable\",\"database\":\"CovidDataStore\",\"name\":\"default.DEMOGRAPHICS\",\"schema\":\"default\",\"table\":\"DEMOGRAPHICS\",\"type\":\"H2\"},{\"_type\":\"relationalDatabaseTable\",\"database\":\"CovidDataStore\",\"name\":\"default.COVID_DATA\",\"schema\":\"default\",\"table\":\"COVID_DATA\",\"type\":\"H2\"}],\"defaultRuntime\":\"runtime::H2Runtime\",\"mapping\":\"mapping::CovidDataMapping\",\"name\":\"dummyContext\",\"runtimeMetadata\":{\"connectionPath\":\"runtime::connection::H2Connection\",\"connectionType\":\"H2\",\"storePath\":\"store::CovidDataStore\"}}],\"mappingToMappingCoverageResult\":{},\"model\":{\"_type\":\"data\",\"elements\":[]},\"name\":\"COVIDDataspace\",\"package\":\"domain\",\"path\":\"domain::COVIDDataspace\",\"stereotypes\":[],\"taggedValues\":[],\"title\":\"COVID Sample Data\"}", + mappingAnalysisMap, + mappingModelMap, + true); + } @Test public void testAnalyticsForDataSpaceWithExecutableWithFunctionPointer() throws Exception { - testDataSpaceAnalyticsArtifactGenerationExtension("models/dataSpaceWithExecutablesWithFunctionPointer.pure", "domain::COVIDDataspace", "{\"defaultExecutionContext\":\"dummyContext\",\"description\":\"this is description of this COVIDDataspace\",\"diagrams\":[],\"elementDocs\":[],\"elements\":[],\"executables\":[{\"description\":\"Some more exec description\",\"executable\":\"domain::COVIDData_QueryFunction__TabularDataSet_1_\",\"info\":{\"_type\":\"functionPointerExecutableInfo\",\"executionContextKey\":\"dummyContext\",\"function\":\"domain::COVIDData_QueryFunction__TabularDataSet_1_\",\"id\":\"1\",\"query\":\"|domain::COVIDData.all()->project([x: domain::COVIDData[1]|$x.cases], ['Cases'])->from(mapping::CovidDataMapping, runtime::H2Runtime)\"},\"result\":{\"_type\":\"tds\",\"columns\":[{\"name\":\"Cases\",\"relationalType\":\"INTEGER\",\"type\":\"Float\"}]},\"title\":\"this is template\"},{\"executable\":\"domain::COVIDData_QueryFunction__TabularDataSet_1_\",\"info\":{\"_type\":\"functionPointerExecutableInfo\",\"executionContextKey\":\"dummyContext\",\"function\":\"domain::COVIDData_QueryFunction__TabularDataSet_1_\",\"id\":\"2\",\"query\":\"|domain::COVIDData.all()->project([x: domain::COVIDData[1]|$x.cases], ['Cases'])->from(mapping::CovidDataMapping, runtime::H2Runtime)\"},\"result\":{\"_type\":\"tds\",\"columns\":[{\"name\":\"Cases\",\"relationalType\":\"INTEGER\",\"type\":\"Float\"}]},\"title\":\"this is template2\"}],\"executionContexts\":[{\"compatibleRuntimes\":[\"runtime::H2Runtime\"],\"datasets\":[{\"_type\":\"relationalDatabaseTable\",\"database\":\"CovidDataStore\",\"name\":\"default.DEMOGRAPHICS\",\"schema\":\"default\",\"table\":\"DEMOGRAPHICS\",\"type\":\"H2\"},{\"_type\":\"relationalDatabaseTable\",\"database\":\"CovidDataStore\",\"name\":\"default.COVID_DATA\",\"schema\":\"default\",\"table\":\"COVID_DATA\",\"type\":\"H2\"}],\"defaultRuntime\":\"runtime::H2Runtime\",\"mapping\":\"mapping::CovidDataMapping\",\"name\":\"dummyContext\",\"runtimeMetadata\":{\"connectionPath\":\"runtime::connection::H2Connection\",\"connectionType\":\"H2\",\"storePath\":\"store::CovidDataStore\"}}],\"mappingToMappingCoverageResult\":{\"mapping::CovidDataMapping\":{\"mappedEntities\":[{\"path\":\"domain::COVIDData\",\"properties\":[{\"_type\":\"MappedProperty\",\"name\":\"caseType\"},{\"_type\":\"MappedProperty\",\"name\":\"cases\"},{\"_type\":\"MappedProperty\",\"name\":\"date\"},{\"_type\":\"entity\",\"entityPath\":\"domain::Demographics\",\"name\":\"demographics\"},{\"_type\":\"MappedProperty\",\"name\":\"fips\"},{\"_type\":\"MappedProperty\",\"name\":\"id\"},{\"_type\":\"MappedProperty\",\"name\":\"lastReportedFlag\"}]},{\"path\":\"domain::Demographics\",\"properties\":[{\"_type\":\"MappedProperty\",\"name\":\"fips\"},{\"_type\":\"MappedProperty\",\"name\":\"state\"}]}]}},\"model\":{\"_type\":\"data\",\"elements\":[]},\"name\":\"COVIDDataspace\",\"package\":\"domain\",\"path\":\"domain::COVIDDataspace\",\"stereotypes\":[],\"taggedValues\":[],\"title\":\"COVID Sample Data\"}"); + MutableMap mappingAnalysisMap = Maps.mutable.with( + "mapping::CovidDataMapping", "{\"_type\":\"MappingAnalysisCoveragePartition\",\"analysisResult\":{\"mappedEntities\":[{\"info\":{\"classPath\":\"domain::COVIDData\",\"isRootEntity\":true,\"subClasses\":[]},\"path\":\"domain::COVIDData\",\"properties\":[{\"_type\":\"MappedProperty\",\"name\":\"caseType\"},{\"_type\":\"MappedProperty\",\"name\":\"cases\"},{\"_type\":\"MappedProperty\",\"name\":\"date\"},{\"_type\":\"entity\",\"entityPath\":\"domain::Demographics\",\"name\":\"demographics\"},{\"_type\":\"MappedProperty\",\"name\":\"fips\"},{\"_type\":\"MappedProperty\",\"name\":\"id\"},{\"_type\":\"MappedProperty\",\"name\":\"lastReportedFlag\"}]},{\"info\":{\"classPath\":\"domain::Demographics\",\"isRootEntity\":true,\"subClasses\":[]},\"path\":\"domain::Demographics\",\"properties\":[{\"_type\":\"MappedProperty\",\"name\":\"fips\"},{\"_type\":\"MappedProperty\",\"name\":\"state\"}]}]},\"mapping\":\"mapping::CovidDataMapping\"}" + ); + MutableMap mappingModelMap = Maps.mutable.with( + "mapping::CovidDataMapping", + "{\"_type\":\"MappingModelCoveragePartition\",\"mapping\":\"mapping::CovidDataMapping\",\"model\":{\"_type\":\"data\",\"elements\":[{\"_type\":\"class\",\"constraints\":[],\"name\":\"COVIDData\",\"originalMilestonedProperties\":[],\"package\":\"domain\",\"properties\":[{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"Integer\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"id\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"String\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"fips\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"StrictDate\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"date\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"String\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"caseType\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"Float\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"cases\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"Boolean\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"lastReportedFlag\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"domain::Demographics\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"demographics\",\"stereotypes\":[],\"taggedValues\":[]}],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[\"meta::pure::metamodel::type::Any\"],\"taggedValues\":[{\"tag\":{\"profile\":\"meta::pure::profiles::doc\",\"value\":\"doc\"},\"value\":\"COVID-19 data report consisting of case statistics details and basic information on demographics\"}]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"Demographics\",\"originalMilestonedProperties\":[],\"package\":\"domain\",\"properties\":[{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"String\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"fips\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"String\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"state\",\"stereotypes\":[],\"taggedValues\":[]}],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[\"meta::pure::metamodel::type::Any\"],\"taggedValues\":[{\"tag\":{\"profile\":\"meta::pure::profiles::doc\",\"value\":\"doc\"},\"value\":\"COVID-19 data demographics consisting of geolocation information\"}]},{\"_type\":\"profile\",\"name\":\"doc\",\"package\":\"meta::pure::profiles\",\"stereotypes\":[\"deprecated\"],\"tags\":[\"doc\",\"todo\"]}]}}" + ); + testDataSpaceAnalyticsArtifactGenerationExtension("models/dataSpaceWithExecutablesWithFunctionPointer.pure", "domain::COVIDDataspace", + "{\"defaultExecutionContext\":\"dummyContext\",\"description\":\"this is description of this COVIDDataspace\",\"diagrams\":[],\"elementDocs\":[],\"elements\":[],\"executables\":[{\"description\":\"Some more exec description\",\"executable\":\"domain::COVIDData_QueryFunction__TabularDataSet_1_\",\"info\":{\"_type\":\"functionPointerExecutableInfo\",\"executionContextKey\":\"dummyContext\",\"function\":\"domain::COVIDData_QueryFunction__TabularDataSet_1_\",\"id\":\"1\",\"query\":\"|domain::COVIDData.all()->project([x: domain::COVIDData[1]|$x.cases], ['Cases'])->from(mapping::CovidDataMapping, runtime::H2Runtime)\"},\"result\":{\"_type\":\"tds\",\"columns\":[{\"name\":\"Cases\",\"relationalType\":\"INTEGER\",\"type\":\"Float\"}]},\"title\":\"this is template\"},{\"executable\":\"domain::COVIDData_QueryFunction__TabularDataSet_1_\",\"info\":{\"_type\":\"functionPointerExecutableInfo\",\"executionContextKey\":\"dummyContext\",\"function\":\"domain::COVIDData_QueryFunction__TabularDataSet_1_\",\"id\":\"2\",\"query\":\"|domain::COVIDData.all()->project([x: domain::COVIDData[1]|$x.cases], ['Cases'])->from(mapping::CovidDataMapping, runtime::H2Runtime)\"},\"result\":{\"_type\":\"tds\",\"columns\":[{\"name\":\"Cases\",\"relationalType\":\"INTEGER\",\"type\":\"Float\"}]},\"title\":\"this is template2\"}],\"executionContexts\":[{\"compatibleRuntimes\":[\"runtime::H2Runtime\"],\"datasets\":[{\"_type\":\"relationalDatabaseTable\",\"database\":\"CovidDataStore\",\"name\":\"default.DEMOGRAPHICS\",\"schema\":\"default\",\"table\":\"DEMOGRAPHICS\",\"type\":\"H2\"},{\"_type\":\"relationalDatabaseTable\",\"database\":\"CovidDataStore\",\"name\":\"default.COVID_DATA\",\"schema\":\"default\",\"table\":\"COVID_DATA\",\"type\":\"H2\"}],\"defaultRuntime\":\"runtime::H2Runtime\",\"mapping\":\"mapping::CovidDataMapping\",\"name\":\"dummyContext\",\"runtimeMetadata\":{\"connectionPath\":\"runtime::connection::H2Connection\",\"connectionType\":\"H2\",\"storePath\":\"store::CovidDataStore\"}}],\"mappingToMappingCoverageResult\":{},\"model\":{\"_type\":\"data\",\"elements\":[]},\"name\":\"COVIDDataspace\",\"package\":\"domain\",\"path\":\"domain::COVIDDataspace\",\"stereotypes\":[],\"taggedValues\":[],\"title\":\"COVID Sample Data\"}", + mappingAnalysisMap, + mappingModelMap, + true); } @Test public void testAnalyticsForDataSpaceWithAccessEntitlementsToH2() throws Exception { - testDataSpaceAnalyticsArtifactGenerationExtension("models/dataspaceAccessAnalytics.pure", "domain::COVIDDataspace", "{\"defaultExecutionContext\":\"dummyContext\",\"description\":\"# Peleus rupit\\n\\n## Sum super gerens paterque\\n\\nLorem markdownum presso, et tamen cogitis, Taenarius lactantia fluxerunt\\nterrita, vota. Tempore flumina ferrumque bella.\\n\\n- Per dixit\\n- Truces tellusque indignata ducem\\n- Cervice venitis cavernis minus\\n\\n## Tum ausus fovebam incursus magis dici extemplo\\n\\nPiscator degenerat desertaque quid scelus tyranni feror ipsa mortis nec silva\\nsparsus neci cum? Est patulas meam decorem, dat demit corpora exuritque Ulixes,\\ngenitore. Captare certa amore pressos, Diamque\\n[traxit](http://istecondar.net/ministropudoris) devorat duritia ecce, capillos\\nfuerint progenitore curva relictas. Iubae pectus et quateret, non vires tibi\\ncacumina figuram Antigonen rursus verti.\\n\\n## Dicta nec Thestiadae tristi exempla sed suoque\\n\\nFlumina quae loricaeque meruique defensae *me terram* tamen attollere totum\\nneque nullos. Quem plus, stratum.\\n\\n## Quaeque si reddite summoque vultu Teleboasque vincere\\n\\nIsmariae me munus umbram. Usum pedem multis quotiensque mirantum Cephenum et\\namori Procne locutum auctor Volturnus pavent virgineas.\\n\\n if (edi + sidebarTooltip < aiffDisk) {\\n drive_key_firewire += bank(searchHardBoot(bus, packet_click));\\n }\\n var adRow = dlc_rootkit(rdramMegabit) - hertzBanner * 2 +\\n memory_adc.horizontal(class_box_rte, disk, lte_grep);\\n if (grayscale) {\\n spool_windows_metal.zif_firewire *= 3;\\n emoticon_mp = user.thunderboltIcqBus.installer_remote(4, searchCable) *\\n kibibyteYoutubeRaster.simm(-3, nosqlCharacter, sip);\\n }\\n var blob = -2;\\n\\n## Est magis interdum in luctus\\n\\nPrimus illa sub bis infregit saepe agrestem Cyllare lumen cultrosque **Cnosia**.\\nSuis est fero durisque satis.\\n\\n- Nos quas est maesta aliquis se unum\\n- Tu ossa Cupido sagitta hanc inflati profuso\\n- Modo est proles pavor\\n- Stillabant pallada invitaque et tantum dictaque in\\n- Generum coegi tum edaci\\n\\nSuo nec cerae me omnem Famemque, passi si auditque ullo, praebita. Gravi annos\\npudore formidabilis erat pectora perpetuo qua oscula cum ad sed Nabataeus\\nRomethiumque deum Erectheus? O Victoria rostro utque terras vitisque classe.\\nTibi [miserrima hirta](http://decentia-qui.net/docta-petentem), eratis saepius\\ntuus.\",\"diagrams\":[],\"elementDocs\":[],\"elements\":[],\"executables\":[{\"description\":\"Some exec description\",\"executable\":\"service::CovidDataMulti\",\"result\":{\"_type\":\"tds\",\"columns\":[{\"name\":\"Cases\",\"relationalType\":\"INTEGER\",\"type\":\"Float\"}]},\"title\":\"Exec 1\"},{\"description\":\"Some more exec description\",\"executable\":\"service::CovidDataSingle\",\"info\":{\"_type\":\"service\",\"datasets\":[{\"_type\":\"relationalDatabaseTable\",\"database\":\"CovidDataStore\",\"name\":\"default.DEMOGRAPHICS\",\"schema\":\"default\",\"table\":\"DEMOGRAPHICS\",\"type\":\"H2\"},{\"_type\":\"relationalDatabaseTable\",\"database\":\"CovidDataStore\",\"name\":\"default.COVID_DATA\",\"schema\":\"default\",\"table\":\"COVID_DATA\",\"type\":\"H2\"}],\"mapping\":\"mapping::CovidDataMapping\",\"pattern\":\"/9566f101-2108-408f-863f-6d7e154dc17b\",\"query\":\"|domain::COVIDData.all()->project(\\n [\\n x: domain::COVIDData[1]|$x.cases\\n ],\\n ['Cases']\\n)\",\"runtime\":\"runtime::H2Runtime\"},\"result\":{\"_type\":\"tds\",\"columns\":[{\"name\":\"Cases\",\"relationalType\":\"INTEGER\",\"type\":\"Float\"}]},\"title\":\"Exec 2\"}],\"executionContexts\":[{\"compatibleRuntimes\":[\"runtime::H2Runtime\",\"runtime::SnowflakeRuntime\"],\"datasets\":[{\"_type\":\"relationalDatabaseTable\",\"database\":\"CovidDataStore\",\"name\":\"default.DEMOGRAPHICS\",\"schema\":\"default\",\"table\":\"DEMOGRAPHICS\",\"type\":\"H2\"},{\"_type\":\"relationalDatabaseTable\",\"database\":\"CovidDataStore\",\"name\":\"default.COVID_DATA\",\"schema\":\"default\",\"table\":\"COVID_DATA\",\"type\":\"H2\"}],\"defaultRuntime\":\"runtime::H2Runtime\",\"mapping\":\"mapping::CovidDataMapping\",\"name\":\"dummyContext\",\"runtimeMetadata\":{\"connectionPath\":\"runtime::connection::H2Connection\",\"connectionType\":\"H2\",\"storePath\":\"store::CovidDataStore\"}}],\"mappingToMappingCoverageResult\":{\"mapping::CovidDataMapping\":{\"mappedEntities\":[{\"path\":\"domain::COVIDData\",\"properties\":[{\"_type\":\"MappedProperty\",\"name\":\"caseType\"},{\"_type\":\"MappedProperty\",\"name\":\"cases\"},{\"_type\":\"MappedProperty\",\"name\":\"date\"},{\"_type\":\"entity\",\"entityPath\":\"domain::Demographics\",\"name\":\"demographics\"},{\"_type\":\"MappedProperty\",\"name\":\"fips\"},{\"_type\":\"MappedProperty\",\"name\":\"id\"},{\"_type\":\"MappedProperty\",\"name\":\"lastReportedFlag\"}]},{\"path\":\"domain::Demographics\",\"properties\":[{\"_type\":\"MappedProperty\",\"name\":\"fips\"},{\"_type\":\"MappedProperty\",\"name\":\"state\"}]}]}},\"model\":{\"_type\":\"data\",\"elements\":[]},\"name\":\"COVIDDataspace\",\"package\":\"domain\",\"path\":\"domain::COVIDDataspace\",\"stereotypes\":[],\"taggedValues\":[],\"title\":\"COVID Sample Data\"}"); + MutableMap mappingAnalysisMap = Maps.mutable.with( + "mapping::CovidDataMapping", "{\"_type\":\"MappingAnalysisCoveragePartition\",\"analysisResult\":{\"mappedEntities\":[{\"info\":{\"classPath\":\"domain::COVIDData\",\"isRootEntity\":true,\"subClasses\":[]},\"path\":\"domain::COVIDData\",\"properties\":[{\"_type\":\"MappedProperty\",\"name\":\"caseType\"},{\"_type\":\"MappedProperty\",\"name\":\"cases\"},{\"_type\":\"MappedProperty\",\"name\":\"date\"},{\"_type\":\"entity\",\"entityPath\":\"domain::Demographics\",\"name\":\"demographics\"},{\"_type\":\"MappedProperty\",\"name\":\"fips\"},{\"_type\":\"MappedProperty\",\"name\":\"id\"},{\"_type\":\"MappedProperty\",\"name\":\"lastReportedFlag\"}]},{\"info\":{\"classPath\":\"domain::Demographics\",\"isRootEntity\":true,\"subClasses\":[]},\"path\":\"domain::Demographics\",\"properties\":[{\"_type\":\"MappedProperty\",\"name\":\"fips\"},{\"_type\":\"MappedProperty\",\"name\":\"state\"}]}]},\"mapping\":\"mapping::CovidDataMapping\"}" + ); + MutableMap mappingModelMap = Maps.mutable.with( + "mapping::CovidDataMapping", + "{\"_type\":\"MappingModelCoveragePartition\",\"mapping\":\"mapping::CovidDataMapping\",\"model\":{\"_type\":\"data\",\"elements\":[{\"_type\":\"class\",\"constraints\":[],\"name\":\"COVIDData\",\"originalMilestonedProperties\":[],\"package\":\"domain\",\"properties\":[{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"Integer\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"id\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"String\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"fips\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"StrictDate\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"date\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"String\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"caseType\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"Float\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"cases\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"Boolean\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"lastReportedFlag\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"domain::Demographics\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"demographics\",\"stereotypes\":[],\"taggedValues\":[]}],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[\"meta::pure::metamodel::type::Any\"],\"taggedValues\":[{\"tag\":{\"profile\":\"meta::pure::profiles::doc\",\"value\":\"doc\"},\"value\":\"COVID-19 data report consisting of case statistics details and basic information on demographics\"}]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"Demographics\",\"originalMilestonedProperties\":[],\"package\":\"domain\",\"properties\":[{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"String\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"fips\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"String\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"state\",\"stereotypes\":[],\"taggedValues\":[]}],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[\"meta::pure::metamodel::type::Any\"],\"taggedValues\":[{\"tag\":{\"profile\":\"meta::pure::profiles::doc\",\"value\":\"doc\"},\"value\":\"COVID-19 data demographics consisting of geolocation information\"}]},{\"_type\":\"profile\",\"name\":\"doc\",\"package\":\"meta::pure::profiles\",\"stereotypes\":[\"deprecated\"],\"tags\":[\"doc\",\"todo\"]}]}}" + ); + testDataSpaceAnalyticsArtifactGenerationExtension("models/dataspaceAccessAnalytics.pure", "domain::COVIDDataspace", + "{\"defaultExecutionContext\":\"dummyContext\",\"description\":\"# Peleus rupit\\n\\n## Sum super gerens paterque\\n\\nLorem markdownum presso, et tamen cogitis, Taenarius lactantia fluxerunt\\nterrita, vota. Tempore flumina ferrumque bella.\\n\\n- Per dixit\\n- Truces tellusque indignata ducem\\n- Cervice venitis cavernis minus\\n\\n## Tum ausus fovebam incursus magis dici extemplo\\n\\nPiscator degenerat desertaque quid scelus tyranni feror ipsa mortis nec silva\\nsparsus neci cum? Est patulas meam decorem, dat demit corpora exuritque Ulixes,\\ngenitore. Captare certa amore pressos, Diamque\\n[traxit](http://istecondar.net/ministropudoris) devorat duritia ecce, capillos\\nfuerint progenitore curva relictas. Iubae pectus et quateret, non vires tibi\\ncacumina figuram Antigonen rursus verti.\\n\\n## Dicta nec Thestiadae tristi exempla sed suoque\\n\\nFlumina quae loricaeque meruique defensae *me terram* tamen attollere totum\\nneque nullos. Quem plus, stratum.\\n\\n## Quaeque si reddite summoque vultu Teleboasque vincere\\n\\nIsmariae me munus umbram. Usum pedem multis quotiensque mirantum Cephenum et\\namori Procne locutum auctor Volturnus pavent virgineas.\\n\\n if (edi + sidebarTooltip < aiffDisk) {\\n drive_key_firewire += bank(searchHardBoot(bus, packet_click));\\n }\\n var adRow = dlc_rootkit(rdramMegabit) - hertzBanner * 2 +\\n memory_adc.horizontal(class_box_rte, disk, lte_grep);\\n if (grayscale) {\\n spool_windows_metal.zif_firewire *= 3;\\n emoticon_mp = user.thunderboltIcqBus.installer_remote(4, searchCable) *\\n kibibyteYoutubeRaster.simm(-3, nosqlCharacter, sip);\\n }\\n var blob = -2;\\n\\n## Est magis interdum in luctus\\n\\nPrimus illa sub bis infregit saepe agrestem Cyllare lumen cultrosque **Cnosia**.\\nSuis est fero durisque satis.\\n\\n- Nos quas est maesta aliquis se unum\\n- Tu ossa Cupido sagitta hanc inflati profuso\\n- Modo est proles pavor\\n- Stillabant pallada invitaque et tantum dictaque in\\n- Generum coegi tum edaci\\n\\nSuo nec cerae me omnem Famemque, passi si auditque ullo, praebita. Gravi annos\\npudore formidabilis erat pectora perpetuo qua oscula cum ad sed Nabataeus\\nRomethiumque deum Erectheus? O Victoria rostro utque terras vitisque classe.\\nTibi [miserrima hirta](http://decentia-qui.net/docta-petentem), eratis saepius\\ntuus.\",\"diagrams\":[],\"elementDocs\":[],\"elements\":[],\"executables\":[{\"description\":\"Some exec description\",\"executable\":\"service::CovidDataMulti\",\"result\":{\"_type\":\"tds\",\"columns\":[{\"name\":\"Cases\",\"relationalType\":\"INTEGER\",\"type\":\"Float\"}]},\"title\":\"Exec 1\"},{\"description\":\"Some more exec description\",\"executable\":\"service::CovidDataSingle\",\"info\":{\"_type\":\"service\",\"datasets\":[{\"_type\":\"relationalDatabaseTable\",\"database\":\"CovidDataStore\",\"name\":\"default.DEMOGRAPHICS\",\"schema\":\"default\",\"table\":\"DEMOGRAPHICS\",\"type\":\"H2\"},{\"_type\":\"relationalDatabaseTable\",\"database\":\"CovidDataStore\",\"name\":\"default.COVID_DATA\",\"schema\":\"default\",\"table\":\"COVID_DATA\",\"type\":\"H2\"}],\"mapping\":\"mapping::CovidDataMapping\",\"pattern\":\"/9566f101-2108-408f-863f-6d7e154dc17b\",\"query\":\"|domain::COVIDData.all()->project(\\n [\\n x: domain::COVIDData[1]|$x.cases\\n ],\\n ['Cases']\\n)\",\"runtime\":\"runtime::H2Runtime\"},\"result\":{\"_type\":\"tds\",\"columns\":[{\"name\":\"Cases\",\"relationalType\":\"INTEGER\",\"type\":\"Float\"}]},\"title\":\"Exec 2\"}],\"executionContexts\":[{\"compatibleRuntimes\":[\"runtime::H2Runtime\",\"runtime::SnowflakeRuntime\"],\"datasets\":[{\"_type\":\"relationalDatabaseTable\",\"database\":\"CovidDataStore\",\"name\":\"default.DEMOGRAPHICS\",\"schema\":\"default\",\"table\":\"DEMOGRAPHICS\",\"type\":\"H2\"},{\"_type\":\"relationalDatabaseTable\",\"database\":\"CovidDataStore\",\"name\":\"default.COVID_DATA\",\"schema\":\"default\",\"table\":\"COVID_DATA\",\"type\":\"H2\"}],\"defaultRuntime\":\"runtime::H2Runtime\",\"mapping\":\"mapping::CovidDataMapping\",\"name\":\"dummyContext\",\"runtimeMetadata\":{\"connectionPath\":\"runtime::connection::H2Connection\",\"connectionType\":\"H2\",\"storePath\":\"store::CovidDataStore\"}}],\"mappingToMappingCoverageResult\":{},\"model\":{\"_type\":\"data\",\"elements\":[]},\"name\":\"COVIDDataspace\",\"package\":\"domain\",\"path\":\"domain::COVIDDataspace\",\"stereotypes\":[],\"taggedValues\":[],\"title\":\"COVID Sample Data\"}", + mappingAnalysisMap, + mappingModelMap, + true); + } @Test public void testAnalyticsForDataSpaceWithAccessEntitlementsToSnowflake() throws Exception { - testDataSpaceAnalyticsArtifactGenerationExtension("models/dataspaceAccessAnalytics.pure", "domain::COVIDDataspaceSnowflake", "{\"defaultExecutionContext\":\"dummyContext\",\"description\":\"# Peleus rupit\\n\\n## Sum super gerens paterque\\n\\nLorem markdownum presso, et tamen cogitis, Taenarius lactantia fluxerunt\\nterrita, vota. Tempore flumina ferrumque bella.\\n\\n- Per dixit\\n- Truces tellusque indignata ducem\\n- Cervice venitis cavernis minus\\n\\n## Tum ausus fovebam incursus magis dici extemplo\\n\\nPiscator degenerat desertaque quid scelus tyranni feror ipsa mortis nec silva\\nsparsus neci cum? Est patulas meam decorem, dat demit corpora exuritque Ulixes,\\ngenitore. Captare certa amore pressos, Diamque\\n[traxit](http://istecondar.net/ministropudoris) devorat duritia ecce, capillos\\nfuerint progenitore curva relictas. Iubae pectus et quateret, non vires tibi\\ncacumina figuram Antigonen rursus verti.\\n\\n## Dicta nec Thestiadae tristi exempla sed suoque\\n\\nFlumina quae loricaeque meruique defensae *me terram* tamen attollere totum\\nneque nullos. Quem plus, stratum.\\n\\n## Quaeque si reddite summoque vultu Teleboasque vincere\\n\\nIsmariae me munus umbram. Usum pedem multis quotiensque mirantum Cephenum et\\namori Procne locutum auctor Volturnus pavent virgineas.\\n\\n if (edi + sidebarTooltip < aiffDisk) {\\n drive_key_firewire += bank(searchHardBoot(bus, packet_click));\\n }\\n var adRow = dlc_rootkit(rdramMegabit) - hertzBanner * 2 +\\n memory_adc.horizontal(class_box_rte, disk, lte_grep);\\n if (grayscale) {\\n spool_windows_metal.zif_firewire *= 3;\\n emoticon_mp = user.thunderboltIcqBus.installer_remote(4, searchCable) *\\n kibibyteYoutubeRaster.simm(-3, nosqlCharacter, sip);\\n }\\n var blob = -2;\\n\\n## Est magis interdum in luctus\\n\\nPrimus illa sub bis infregit saepe agrestem Cyllare lumen cultrosque **Cnosia**.\\nSuis est fero durisque satis.\\n\\n- Nos quas est maesta aliquis se unum\\n- Tu ossa Cupido sagitta hanc inflati profuso\\n- Modo est proles pavor\\n- Stillabant pallada invitaque et tantum dictaque in\\n- Generum coegi tum edaci\\n\\nSuo nec cerae me omnem Famemque, passi si auditque ullo, praebita. Gravi annos\\npudore formidabilis erat pectora perpetuo qua oscula cum ad sed Nabataeus\\nRomethiumque deum Erectheus? O Victoria rostro utque terras vitisque classe.\\nTibi [miserrima hirta](http://decentia-qui.net/docta-petentem), eratis saepius\\ntuus.\",\"diagrams\":[],\"elementDocs\":[],\"elements\":[],\"executables\":[{\"description\":\"Some exec description\",\"executable\":\"service::CovidDataMulti\",\"result\":{\"_type\":\"tds\",\"columns\":[{\"name\":\"Cases\",\"relationalType\":\"INTEGER\",\"type\":\"Float\"}]},\"title\":\"Exec 1\"},{\"description\":\"Some more exec description\",\"executable\":\"service::CovidDataSingle\",\"info\":{\"_type\":\"service\",\"datasets\":[{\"_type\":\"relationalDatabaseTable\",\"database\":\"CovidDataStore\",\"name\":\"default.DEMOGRAPHICS\",\"schema\":\"default\",\"table\":\"DEMOGRAPHICS\",\"type\":\"H2\"},{\"_type\":\"relationalDatabaseTable\",\"database\":\"CovidDataStore\",\"name\":\"default.COVID_DATA\",\"schema\":\"default\",\"table\":\"COVID_DATA\",\"type\":\"H2\"}],\"mapping\":\"mapping::CovidDataMapping\",\"pattern\":\"/9566f101-2108-408f-863f-6d7e154dc17b\",\"query\":\"|domain::COVIDData.all()->project(\\n [\\n x: domain::COVIDData[1]|$x.cases\\n ],\\n ['Cases']\\n)\",\"runtime\":\"runtime::H2Runtime\"},\"result\":{\"_type\":\"tds\",\"columns\":[{\"name\":\"Cases\",\"relationalType\":\"INTEGER\",\"type\":\"Float\"}]},\"title\":\"Exec 2\"}],\"executionContexts\":[{\"compatibleRuntimes\":[\"runtime::H2Runtime\",\"runtime::SnowflakeRuntime\"],\"datasets\":[{\"_type\":\"relationalDatabaseTable\",\"database\":\"CovidDataStore\",\"name\":\"default.DEMOGRAPHICS\",\"schema\":\"default\",\"table\":\"DEMOGRAPHICS\",\"type\":\"Snowflake\"},{\"_type\":\"relationalDatabaseTable\",\"database\":\"CovidDataStore\",\"name\":\"default.COVID_DATA\",\"schema\":\"default\",\"table\":\"COVID_DATA\",\"type\":\"Snowflake\"}],\"defaultRuntime\":\"runtime::SnowflakeRuntime\",\"mapping\":\"mapping::CovidDataMapping\",\"name\":\"dummyContext\",\"runtimeMetadata\":{\"connectionPath\":\"runtime::connection::SnowflakeConnection\",\"connectionType\":\"Snowflake\",\"storePath\":\"store::CovidDataStore\"}}],\"mappingToMappingCoverageResult\":{\"mapping::CovidDataMapping\":{\"mappedEntities\":[{\"path\":\"domain::COVIDData\",\"properties\":[{\"_type\":\"MappedProperty\",\"name\":\"caseType\"},{\"_type\":\"MappedProperty\",\"name\":\"cases\"},{\"_type\":\"MappedProperty\",\"name\":\"date\"},{\"_type\":\"entity\",\"entityPath\":\"domain::Demographics\",\"name\":\"demographics\"},{\"_type\":\"MappedProperty\",\"name\":\"fips\"},{\"_type\":\"MappedProperty\",\"name\":\"id\"},{\"_type\":\"MappedProperty\",\"name\":\"lastReportedFlag\"}]},{\"path\":\"domain::Demographics\",\"properties\":[{\"_type\":\"MappedProperty\",\"name\":\"fips\"},{\"_type\":\"MappedProperty\",\"name\":\"state\"}]}]}},\"model\":{\"_type\":\"data\",\"elements\":[]},\"name\":\"COVIDDataspaceSnowflake\",\"package\":\"domain\",\"path\":\"domain::COVIDDataspaceSnowflake\",\"stereotypes\":[],\"taggedValues\":[],\"title\":\"COVID Sample Data\"}"); + MutableMap mappingAnalysisMap = Maps.mutable.with( + "mapping::CovidDataMapping", "{\"_type\":\"MappingAnalysisCoveragePartition\",\"analysisResult\":{\"mappedEntities\":[{\"info\":{\"classPath\":\"domain::COVIDData\",\"isRootEntity\":true,\"subClasses\":[]},\"path\":\"domain::COVIDData\",\"properties\":[{\"_type\":\"MappedProperty\",\"name\":\"caseType\"},{\"_type\":\"MappedProperty\",\"name\":\"cases\"},{\"_type\":\"MappedProperty\",\"name\":\"date\"},{\"_type\":\"entity\",\"entityPath\":\"domain::Demographics\",\"name\":\"demographics\"},{\"_type\":\"MappedProperty\",\"name\":\"fips\"},{\"_type\":\"MappedProperty\",\"name\":\"id\"},{\"_type\":\"MappedProperty\",\"name\":\"lastReportedFlag\"}]},{\"info\":{\"classPath\":\"domain::Demographics\",\"isRootEntity\":true,\"subClasses\":[]},\"path\":\"domain::Demographics\",\"properties\":[{\"_type\":\"MappedProperty\",\"name\":\"fips\"},{\"_type\":\"MappedProperty\",\"name\":\"state\"}]}]},\"mapping\":\"mapping::CovidDataMapping\"}" + ); + MutableMap mappingModelMap = Maps.mutable.with( + "mapping::CovidDataMapping", + "{\"_type\":\"MappingModelCoveragePartition\",\"mapping\":\"mapping::CovidDataMapping\",\"model\":{\"_type\":\"data\",\"elements\":[{\"_type\":\"class\",\"constraints\":[],\"name\":\"COVIDData\",\"originalMilestonedProperties\":[],\"package\":\"domain\",\"properties\":[{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"Integer\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"id\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"String\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"fips\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"StrictDate\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"date\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"String\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"caseType\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"Float\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"cases\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"Boolean\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"lastReportedFlag\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"domain::Demographics\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"demographics\",\"stereotypes\":[],\"taggedValues\":[]}],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[\"meta::pure::metamodel::type::Any\"],\"taggedValues\":[{\"tag\":{\"profile\":\"meta::pure::profiles::doc\",\"value\":\"doc\"},\"value\":\"COVID-19 data report consisting of case statistics details and basic information on demographics\"}]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"Demographics\",\"originalMilestonedProperties\":[],\"package\":\"domain\",\"properties\":[{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"String\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"fips\",\"stereotypes\":[],\"taggedValues\":[]},{\"genericType\":{\"multiplicityArguments\":[],\"rawType\":{\"_type\":\"packageableType\",\"fullPath\":\"String\"},\"typeArguments\":[],\"typeVariableValues\":[]},\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"state\",\"stereotypes\":[],\"taggedValues\":[]}],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[\"meta::pure::metamodel::type::Any\"],\"taggedValues\":[{\"tag\":{\"profile\":\"meta::pure::profiles::doc\",\"value\":\"doc\"},\"value\":\"COVID-19 data demographics consisting of geolocation information\"}]},{\"_type\":\"profile\",\"name\":\"doc\",\"package\":\"meta::pure::profiles\",\"stereotypes\":[\"deprecated\"],\"tags\":[\"doc\",\"todo\"]}]}}" + ); + testDataSpaceAnalyticsArtifactGenerationExtension("models/dataspaceAccessAnalytics.pure", "domain::COVIDDataspaceSnowflake", + "{\"defaultExecutionContext\":\"dummyContext\",\"description\":\"# Peleus rupit\\n\\n## Sum super gerens paterque\\n\\nLorem markdownum presso, et tamen cogitis, Taenarius lactantia fluxerunt\\nterrita, vota. Tempore flumina ferrumque bella.\\n\\n- Per dixit\\n- Truces tellusque indignata ducem\\n- Cervice venitis cavernis minus\\n\\n## Tum ausus fovebam incursus magis dici extemplo\\n\\nPiscator degenerat desertaque quid scelus tyranni feror ipsa mortis nec silva\\nsparsus neci cum? Est patulas meam decorem, dat demit corpora exuritque Ulixes,\\ngenitore. Captare certa amore pressos, Diamque\\n[traxit](http://istecondar.net/ministropudoris) devorat duritia ecce, capillos\\nfuerint progenitore curva relictas. Iubae pectus et quateret, non vires tibi\\ncacumina figuram Antigonen rursus verti.\\n\\n## Dicta nec Thestiadae tristi exempla sed suoque\\n\\nFlumina quae loricaeque meruique defensae *me terram* tamen attollere totum\\nneque nullos. Quem plus, stratum.\\n\\n## Quaeque si reddite summoque vultu Teleboasque vincere\\n\\nIsmariae me munus umbram. Usum pedem multis quotiensque mirantum Cephenum et\\namori Procne locutum auctor Volturnus pavent virgineas.\\n\\n if (edi + sidebarTooltip < aiffDisk) {\\n drive_key_firewire += bank(searchHardBoot(bus, packet_click));\\n }\\n var adRow = dlc_rootkit(rdramMegabit) - hertzBanner * 2 +\\n memory_adc.horizontal(class_box_rte, disk, lte_grep);\\n if (grayscale) {\\n spool_windows_metal.zif_firewire *= 3;\\n emoticon_mp = user.thunderboltIcqBus.installer_remote(4, searchCable) *\\n kibibyteYoutubeRaster.simm(-3, nosqlCharacter, sip);\\n }\\n var blob = -2;\\n\\n## Est magis interdum in luctus\\n\\nPrimus illa sub bis infregit saepe agrestem Cyllare lumen cultrosque **Cnosia**.\\nSuis est fero durisque satis.\\n\\n- Nos quas est maesta aliquis se unum\\n- Tu ossa Cupido sagitta hanc inflati profuso\\n- Modo est proles pavor\\n- Stillabant pallada invitaque et tantum dictaque in\\n- Generum coegi tum edaci\\n\\nSuo nec cerae me omnem Famemque, passi si auditque ullo, praebita. Gravi annos\\npudore formidabilis erat pectora perpetuo qua oscula cum ad sed Nabataeus\\nRomethiumque deum Erectheus? O Victoria rostro utque terras vitisque classe.\\nTibi [miserrima hirta](http://decentia-qui.net/docta-petentem), eratis saepius\\ntuus.\",\"diagrams\":[],\"elementDocs\":[],\"elements\":[],\"executables\":[{\"description\":\"Some exec description\",\"executable\":\"service::CovidDataMulti\",\"result\":{\"_type\":\"tds\",\"columns\":[{\"name\":\"Cases\",\"relationalType\":\"INTEGER\",\"type\":\"Float\"}]},\"title\":\"Exec 1\"},{\"description\":\"Some more exec description\",\"executable\":\"service::CovidDataSingle\",\"info\":{\"_type\":\"service\",\"datasets\":[{\"_type\":\"relationalDatabaseTable\",\"database\":\"CovidDataStore\",\"name\":\"default.DEMOGRAPHICS\",\"schema\":\"default\",\"table\":\"DEMOGRAPHICS\",\"type\":\"H2\"},{\"_type\":\"relationalDatabaseTable\",\"database\":\"CovidDataStore\",\"name\":\"default.COVID_DATA\",\"schema\":\"default\",\"table\":\"COVID_DATA\",\"type\":\"H2\"}],\"mapping\":\"mapping::CovidDataMapping\",\"pattern\":\"/9566f101-2108-408f-863f-6d7e154dc17b\",\"query\":\"|domain::COVIDData.all()->project(\\n [\\n x: domain::COVIDData[1]|$x.cases\\n ],\\n ['Cases']\\n)\",\"runtime\":\"runtime::H2Runtime\"},\"result\":{\"_type\":\"tds\",\"columns\":[{\"name\":\"Cases\",\"relationalType\":\"INTEGER\",\"type\":\"Float\"}]},\"title\":\"Exec 2\"}],\"executionContexts\":[{\"compatibleRuntimes\":[\"runtime::H2Runtime\",\"runtime::SnowflakeRuntime\"],\"datasets\":[{\"_type\":\"relationalDatabaseTable\",\"database\":\"CovidDataStore\",\"name\":\"default.DEMOGRAPHICS\",\"schema\":\"default\",\"table\":\"DEMOGRAPHICS\",\"type\":\"Snowflake\"},{\"_type\":\"relationalDatabaseTable\",\"database\":\"CovidDataStore\",\"name\":\"default.COVID_DATA\",\"schema\":\"default\",\"table\":\"COVID_DATA\",\"type\":\"Snowflake\"}],\"defaultRuntime\":\"runtime::SnowflakeRuntime\",\"mapping\":\"mapping::CovidDataMapping\",\"name\":\"dummyContext\",\"runtimeMetadata\":{\"connectionPath\":\"runtime::connection::SnowflakeConnection\",\"connectionType\":\"Snowflake\",\"storePath\":\"store::CovidDataStore\"}}],\"mappingToMappingCoverageResult\":{},\"model\":{\"_type\":\"data\",\"elements\":[]},\"name\":\"COVIDDataspaceSnowflake\",\"package\":\"domain\",\"path\":\"domain::COVIDDataspaceSnowflake\",\"stereotypes\":[],\"taggedValues\":[],\"title\":\"COVID Sample Data\"}", + mappingAnalysisMap, + mappingModelMap, + true); } } diff --git a/legend-engine-xts-data-space/legend-engine-xt-data-space-pure/src/main/resources/core_data_space/analytics/analytics.pure b/legend-engine-xts-data-space/legend-engine-xt-data-space-pure/src/main/resources/core_data_space/analytics/analytics.pure index a2cc14417fe..09b95156030 100644 --- a/legend-engine-xts-data-space/legend-engine-xt-data-space-pure/src/main/resources/core_data_space/analytics/analytics.pure +++ b/legend-engine-xts-data-space/legend-engine-xt-data-space-pure/src/main/resources/core_data_space/analytics/analytics.pure @@ -33,19 +33,21 @@ Class meta::pure::metamodel::dataSpace::analytics::DataSpaceCoverageAnalysisResu function meta::pure::metamodel::dataSpace::analytics::analyzeDataSpace(dataSpace: DataSpace[1], allAvailableRuntimes: meta::pure::runtime::PackageableRuntime[*], returnLightGraph: Boolean[1]): DataSpaceAnalysisResult[1] { + let mappingCoverage = $dataSpace.executionContexts.mapping->removeDuplicates()->map(mapping | pair($mapping, meta::analytics::mapping::modelCoverage::analyze($mapping, $returnLightGraph, false, $returnLightGraph)))->newMap(); ^DataSpaceAnalysisResult ( diagramModels = meta::pure::metamodel::diagram::analytics::modelCoverage::getDiagramModelCoverage($dataSpace.diagrams.diagram), - executionContexts = analyzeDataSpaceExecutionContexts($dataSpace, $allAvailableRuntimes, $returnLightGraph), + executionContexts = analyzeDataSpaceExecutionContexts($dataSpace, $allAvailableRuntimes, $returnLightGraph, $mappingCoverage), elementDocs = getModelsDoc($dataSpace) ); } function meta::pure::metamodel::dataSpace::analytics::analyzeDataSpaceCoverage(dataSpace: DataSpace[1], allAvailableRuntimes: meta::pure::runtime::PackageableRuntime[*], returnLightGraph: Boolean[1]): DataSpaceCoverageAnalysisResult[1] { + let mappingCoverage = $dataSpace.executionContexts.mapping->removeDuplicates()->map(mapping| pair($mapping, meta::analytics::mapping::modelCoverage::analyze($mapping, $returnLightGraph, false, $returnLightGraph)))->newMap(); ^DataSpaceCoverageAnalysisResult ( - executionContexts = analyzeDataSpaceExecutionContexts($dataSpace, $allAvailableRuntimes, $returnLightGraph) + executionContexts = analyzeDataSpaceExecutionContexts($dataSpace, $allAvailableRuntimes, $returnLightGraph, $mappingCoverage) ); } @@ -59,13 +61,17 @@ Class meta::pure::metamodel::dataSpace::analytics::DataSpaceExecutionContextAnal mappingCoverage: meta::analytics::mapping::modelCoverage::MappingModelCoverageAnalysisResult[1]; } -function <> meta::pure::metamodel::dataSpace::analytics::analyzeDataSpaceExecutionContexts(dataSpace: DataSpace[1], allAvailableRuntimes: meta::pure::runtime::PackageableRuntime[*], returnLightGraph: Boolean[1]): DataSpaceExecutionContextAnalysisResult[*] +function <> meta::pure::metamodel::dataSpace::analytics::analyzeDataSpaceExecutionContexts(dataSpace: DataSpace[1], allAvailableRuntimes: meta::pure::runtime::PackageableRuntime[*], returnLightGraph: Boolean[1], mappingCoverageMap: Map[1]): DataSpaceExecutionContextAnalysisResult[*] { $dataSpace.executionContexts->map(context|^DataSpaceExecutionContextAnalysisResult( name = $context.name, compatibleRuntimes = getMappingCompatibleRuntimes($context.mapping, $allAvailableRuntimes), - mappingCoverage = meta::analytics::mapping::modelCoverage::analyze($context.mapping, $returnLightGraph, false, $returnLightGraph) - )); + mappingCoverage = if($mappingCoverageMap->get($context.mapping)->isEmpty() + ,|meta::analytics::mapping::modelCoverage::analyze($context.mapping, $returnLightGraph, false, $returnLightGraph) + ,|$mappingCoverageMap->get($context.mapping)->toOne() + ) + ) + ); } // NOTE: this compatibility check is fairly simple and only do static analysis on the runtimes