Search in sources :

Example 1 with ReferenceUsage

use of org.finos.legend.pure.m3.compiler.ReferenceUsage in project legend-pure by finos.

the class PackageableElementUnloaderWalk method run.

@Override
public void run(CoreInstance element, MatcherState state, Matcher matcher, ModelRepository modelRepository, Context context) throws PureCompilationException {
    PackageableElement packageableElement = PackageableElementCoreInstanceWrapper.toPackageableElement(element);
    for (ReferenceUsage referenceUsage : packageableElement._referenceUsages()) {
        matcher.fullMatch(referenceUsage._ownerCoreInstance(), state);
    }
    Package pkg = packageableElement._package();
    if ((pkg != null) && (pkg.getSourceInformation() == null)) {
        matcher.fullMatch(pkg, state);
    }
}
Also used : PackageableElement(org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.PackageableElement) Package(org.finos.legend.pure.m3.coreinstance.Package) ReferenceUsage(org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.ReferenceUsage)

Example 2 with ReferenceUsage

use of org.finos.legend.pure.m3.compiler.ReferenceUsage in project legend-pure by finos.

the class TestPureRuntimeClass_FunctionExpressionParam method testPureRuntimeClassParameterUsageCleanUp.

@Test
public void testPureRuntimeClassParameterUsageCleanUp() throws Exception {
    RuntimeVerifier.verifyOperationIsStable(new RuntimeTestScriptBuilder().createInMemorySource("sourceId.pure", "function f(c:Class<Any>[1]):Any[1]{$c} function k():Nil[0]{f(A);[];}").createInMemorySource("userId.pure", "Class A{}").compile(), new RuntimeTestScriptBuilder().deleteSource("sourceId.pure").compile().createInMemorySource("sourceId.pure", "function f(c:Class<Any>[1]):Any[1]{$c} function k():Nil[0]{f(A);[];}").compile(), this.runtime, this.functionExecution, this.getAdditionalVerifiers());
    Assert.assertEquals("A instance Class\n" + "    classifierGenericType(Property):\n" + "        Anonymous_StripedId instance GenericType\n" + "            [... >0]\n" + "    generalizations(Property):\n" + "        Anonymous_StripedId instance Generalization\n" + "            [... >0]\n" + "    name(Property):\n" + "        A instance String\n" + "    package(Property):\n" + "        Root instance Package\n" + "    referenceUsages(Property):\n" + "        Anonymous_StripedId instance ReferenceUsage\n" + "            [... >0]", this.runtime.getCoreInstance("A").printWithoutDebug("", 0));
}
Also used : RuntimeTestScriptBuilder(org.finos.legend.pure.m3.RuntimeTestScriptBuilder) Test(org.junit.Test)

Example 3 with ReferenceUsage

use of org.finos.legend.pure.m3.compiler.ReferenceUsage in project legend-pure by finos.

the class TestReferenceUsagesForDatabase method assertDatabaseReferenceUsages.

private static void assertDatabaseReferenceUsages(PureRuntime runtime, String sourceCode, String dbName, int dbCount) {
    String[] lines = sourceCode.split("\n");
    Database database = (Database) runtime.getCoreInstance("my::" + dbName);
    MutableList<? extends ReferenceUsage> databaseReferenceUsageList = Lists.mutable.ofAll(database._referenceUsages()).reject(NULL_SOURCE_INFORMATION).distinct(COMPARE_SOURCE_ID_LINE_COLUMN);
    Assert.assertEquals(dbCount, databaseReferenceUsageList.size());
    for (ReferenceUsage referenceUsage : databaseReferenceUsageList) {
        SourceInformation sourceInformation = referenceUsage.getSourceInformation();
        Assert.assertEquals(dbName, lines[sourceInformation.getLine() - 1].substring(sourceInformation.getColumn() - 1, sourceInformation.getColumn() + dbName.length() - 1));
    }
}
Also used : Database(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.Database) SourceInformation(org.finos.legend.pure.m4.coreinstance.SourceInformation) ReferenceUsage(org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.ReferenceUsage)

Example 4 with ReferenceUsage

use of org.finos.legend.pure.m3.compiler.ReferenceUsage in project legend-pure by finos.

the class TestSimpleGrammar method testMappingScope.

@Test
public void testMappingScope() {
    Loader.parseM3("import other::*;\n" + "\n" + "Class other::Person\n" + "{\n" + "    name : String[1];\n" + "    id : Integer[1];" + "    other : String[1];" + "}\n" + "###Relational\n" + "Database mapping::pack::db" + "(" + "    Table employeeTable\n" + "    (\n" + "        id INT PRIMARY KEY,\n" + "        name VARCHAR(200),\n" + "        other VARCHAR(200),\n" + "        firmId INT\n" + "    )" + ")\n" + "###Mapping\n" + "import mapping::pack::*;\n" + "Mapping mappingPackage::myMapping\n" + "(\n" + " /* comment */\n" + "    other::Person: Relational\n" + "            {" + "                scope([db])" + "                (" + "                    name : employeeTable.name\n" + "                )," + "                scope([db]default.employeeTable)" + "                (" + "                    id : id" + "                )," + "                scope([db]employeeTable)" + "                (" + "                    other : other" + "                )" + "            }\n" + ")\n", this.repository, new ParserLibrary(Lists.immutable.with(new M3AntlrParser(), new MappingParser(), new RelationalParser())), ValidationType.DEEP, VoidM3M4StateListener.VOID_M3_M4_STATE_LISTENER, this.context);
    this.runtime.compile();
    CoreInstance mapping = this.runtime.getCoreInstance("mappingPackage::myMapping");
    CoreInstance personClassMappingImplementation = Instance.getValueForMetaPropertyToManyResolved(mapping, "classMappings", this.processorSupport).getFirst();
    ListIterable<? extends CoreInstance> personClassMappingImplementationPropertyMappings = Instance.getValueForMetaPropertyToManyResolved(personClassMappingImplementation, "propertyMappings", this.processorSupport);
    final StringBuilder sb = new StringBuilder("[\n");
    personClassMappingImplementationPropertyMappings.forEach(new Procedure<CoreInstance>() {

        @Override
        public void value(CoreInstance each) {
            CoreInstance relationalOperationElement = Instance.getValueForMetaPropertyToOneResolved(each, "relationalOperationElement", TestSimpleGrammar.this.processorSupport);
            Printer.print(sb, relationalOperationElement, 3);
            sb.append("\n");
        }
    });
    final String mappingGraphDump = sb.append("]").toString();
    Assert.assertEquals("[\n" + "Anonymous_StripedId instance TableAliasColumn\n" + "    alias(Property):\n" + "        Anonymous_StripedId instance TableAlias\n" + "            database(Property):\n" + "                [~>] db instance Database\n" + "            name(Property):\n" + "                employeeTable instance String\n" + "            relationalElement(Property):\n" + "                Anonymous_StripedId instance Table\n" + "                    columns(Property):\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] id instance String\n" + "                            nullable(Property):\n" + "                                [>3] false instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Integer\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] name instance String\n" + "                            nullable(Property):\n" + "                                [>3] true instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Varchar\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] other instance String\n" + "                            nullable(Property):\n" + "                                [>3] true instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Varchar\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] firmId instance String\n" + "                            nullable(Property):\n" + "                                [>3] true instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Integer\n" + "                    milestoning(Property):\n" + "                    name(Property):\n" + "                        employeeTable instance String\n" + "                    primaryKey(Property):\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] id instance String\n" + "                            nullable(Property):\n" + "                                [>3] false instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Integer\n" + "                    schema(Property):\n" + "                        Anonymous_StripedId instance Schema\n" + "                            database(Property):\n" + "                                [X] db instance Database\n" + "                            name(Property):\n" + "                                [>3] default instance String\n" + "                            relations(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            tables(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            views(Property):\n" + "                    setColumns(Property):\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] id instance String\n" + "                            nullable(Property):\n" + "                                [>3] false instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Integer\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] name instance String\n" + "                            nullable(Property):\n" + "                                [>3] true instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Varchar\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] other instance String\n" + "                            nullable(Property):\n" + "                                [>3] true instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Varchar\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] firmId instance String\n" + "                            nullable(Property):\n" + "                                [>3] true instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Integer\n" + "                    temporaryTable(Property):\n" + "                        false instance Boolean\n" + "    column(Property):\n" + "        Anonymous_StripedId instance Column\n" + "            name(Property):\n" + "                name instance String\n" + "            nullable(Property):\n" + "                true instance Boolean\n" + "            owner(Property):\n" + "                Anonymous_StripedId instance Table\n" + "                    columns(Property):\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] id instance String\n" + "                            nullable(Property):\n" + "                                [>3] false instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Integer\n" + "                        [_] Anonymous_StripedId instance Column\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] other instance String\n" + "                            nullable(Property):\n" + "                                [>3] true instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Varchar\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] firmId instance String\n" + "                            nullable(Property):\n" + "                                [>3] true instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Integer\n" + "                    milestoning(Property):\n" + "                    name(Property):\n" + "                        employeeTable instance String\n" + "                    primaryKey(Property):\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] id instance String\n" + "                            nullable(Property):\n" + "                                [>3] false instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Integer\n" + "                    schema(Property):\n" + "                        Anonymous_StripedId instance Schema\n" + "                            database(Property):\n" + "                                [X] db instance Database\n" + "                            name(Property):\n" + "                                [>3] default instance String\n" + "                            relations(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            tables(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            views(Property):\n" + "                    setColumns(Property):\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] id instance String\n" + "                            nullable(Property):\n" + "                                [>3] false instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Integer\n" + "                        [_] Anonymous_StripedId instance Column\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] other instance String\n" + "                            nullable(Property):\n" + "                                [>3] true instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Varchar\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] firmId instance String\n" + "                            nullable(Property):\n" + "                                [>3] true instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Integer\n" + "                    temporaryTable(Property):\n" + "                        false instance Boolean\n" + "            type(Property):\n" + "                Anonymous_StripedId instance Varchar\n" + "                    size(Property):\n" + "                        200 instance Integer\n" + "    columnName(Property):\n" + "        name instance String\n" + "    setMappingOwner(Property):\n" + "        Anonymous_StripedId instance RootRelationalInstanceSetImplementation\n" + "            class(Property):\n" + "                [~>] other::Person instance Class\n" + "            distinct(Property):\n" + "                false instance Boolean\n" + "            id(Property):\n" + "                other_Person instance String\n" + "            mainTableAlias(Property):\n" + "                Anonymous_StripedId instance TableAlias\n" + "                    database(Property):\n" + "                        [X] db instance Database\n" + "                    name(Property):\n" + "                         instance String\n" + "                    relationalElement(Property):\n" + "                        Anonymous_StripedId instance Table\n" + "                            columns(Property):\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                            milestoning(Property):\n" + "                            name(Property):\n" + "                                [>3] employeeTable instance String\n" + "                            primaryKey(Property):\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                            schema(Property):\n" + "                                [>3] Anonymous_StripedId instance Schema\n" + "                            setColumns(Property):\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                            temporaryTable(Property):\n" + "                                [>3] false instance Boolean\n" + "            parent(Property):\n" + "                [~>] mappingPackage::myMapping instance Mapping\n" + "            primaryKey(Property):\n" + "                Anonymous_StripedId instance TableAliasColumn\n" + "                    alias(Property):\n" + "                        Anonymous_StripedId instance TableAlias\n" + "                            database(Property):\n" + "                                [X] db instance Database\n" + "                            name(Property):\n" + "                                [>3]  instance String\n" + "                            relationalElement(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                    column(Property):\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] id instance String\n" + "                            nullable(Property):\n" + "                                [>3] false instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Integer\n" + "            propertyMappings(Property):\n" + "                Anonymous_StripedId instance RelationalPropertyMapping\n" + "                    localMappingProperty(Property):\n" + "                        false instance Boolean\n" + "                    owner(Property):\n" + "                        [_] Anonymous_StripedId instance RootRelationalInstanceSetImplementation\n" + "                    property(Property):\n" + "                        name instance Property\n" + "                            aggregation(Property):\n" + "                                [>3] None instance AggregationKind\n" + "                            classifierGenericType(Property):\n" + "                                [>3] Anonymous_StripedId instance GenericType\n" + "                            genericType(Property):\n" + "                                [>3] Anonymous_StripedId instance GenericType\n" + "                            multiplicity(Property):\n" + "                                [X] PureOne instance PackageableMultiplicity\n" + "                            name(Property):\n" + "                                [>3] name instance String\n" + "                            owner(Property):\n" + "                                [X] Person instance Class\n" + "                            referenceUsages(Property):\n" + "                                [>3] Anonymous_StripedId instance ReferenceUsage\n" + "                    relationalOperationElement(Property):\n" + "                        [_] Anonymous_StripedId instance TableAliasColumn\n" + "                    sourceSetImplementationId(Property):\n" + "                        other_Person instance String\n" + "                    targetSetImplementationId(Property):\n" + "                         instance String\n" + "                Anonymous_StripedId instance RelationalPropertyMapping\n" + "                    localMappingProperty(Property):\n" + "                        false instance Boolean\n" + "                    owner(Property):\n" + "                        [_] Anonymous_StripedId instance RootRelationalInstanceSetImplementation\n" + "                    property(Property):\n" + "                        id instance Property\n" + "                            aggregation(Property):\n" + "                                [>3] None instance AggregationKind\n" + "                            classifierGenericType(Property):\n" + "                                [>3] Anonymous_StripedId instance GenericType\n" + "                            genericType(Property):\n" + "                                [>3] Anonymous_StripedId instance GenericType\n" + "                            multiplicity(Property):\n" + "                                [X] PureOne instance PackageableMultiplicity\n" + "                            name(Property):\n" + "                                [>3] id instance String\n" + "                            owner(Property):\n" + "                                [X] Person instance Class\n" + "                            referenceUsages(Property):\n" + "                                [>3] Anonymous_StripedId instance ReferenceUsage\n" + "                    relationalOperationElement(Property):\n" + "                        Anonymous_StripedId instance TableAliasColumn\n" + "                            alias(Property):\n" + "                                [>3] Anonymous_StripedId instance TableAlias\n" + "                            column(Property):\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                            columnName(Property):\n" + "                                [>3] id instance String\n" + "                            setMappingOwner(Property):\n" + "                                [>3] Anonymous_StripedId instance RootRelationalInstanceSetImplementation\n" + "                    sourceSetImplementationId(Property):\n" + "                        other_Person instance String\n" + "                    targetSetImplementationId(Property):\n" + "                         instance String\n" + "                Anonymous_StripedId instance RelationalPropertyMapping\n" + "                    localMappingProperty(Property):\n" + "                        false instance Boolean\n" + "                    owner(Property):\n" + "                        [_] Anonymous_StripedId instance RootRelationalInstanceSetImplementation\n" + "                    property(Property):\n" + "                        other instance Property\n" + "                            aggregation(Property):\n" + "                                [>3] None instance AggregationKind\n" + "                            classifierGenericType(Property):\n" + "                                [>3] Anonymous_StripedId instance GenericType\n" + "                            genericType(Property):\n" + "                                [>3] Anonymous_StripedId instance GenericType\n" + "                            multiplicity(Property):\n" + "                                [X] PureOne instance PackageableMultiplicity\n" + "                            name(Property):\n" + "                                [>3] other instance String\n" + "                            owner(Property):\n" + "                                [X] Person instance Class\n" + "                            referenceUsages(Property):\n" + "                                [>3] Anonymous_StripedId instance ReferenceUsage\n" + "                    relationalOperationElement(Property):\n" + "                        Anonymous_StripedId instance TableAliasColumn\n" + "                            alias(Property):\n" + "                                [>3] Anonymous_StripedId instance TableAlias\n" + "                            column(Property):\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                            columnName(Property):\n" + "                                [>3] other instance String\n" + "                            setMappingOwner(Property):\n" + "                                [>3] Anonymous_StripedId instance RootRelationalInstanceSetImplementation\n" + "                    sourceSetImplementationId(Property):\n" + "                        other_Person instance String\n" + "                    targetSetImplementationId(Property):\n" + "                         instance String\n" + "            root(Property):\n" + "                true instance Boolean\n" + "            stores(Property):\n" + "                [X] db instance Database\n" + "            userDefinedPrimaryKey(Property):\n" + "                false instance Boolean\n" + "Anonymous_StripedId instance TableAliasColumn\n" + "    alias(Property):\n" + "        Anonymous_StripedId instance TableAlias\n" + "            database(Property):\n" + "                [~>] db instance Database\n" + "            name(Property):\n" + "                employeeTable instance String\n" + "            relationalElement(Property):\n" + "                Anonymous_StripedId instance Table\n" + "                    columns(Property):\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] id instance String\n" + "                            nullable(Property):\n" + "                                [>3] false instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Integer\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] name instance String\n" + "                            nullable(Property):\n" + "                                [>3] true instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Varchar\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] other instance String\n" + "                            nullable(Property):\n" + "                                [>3] true instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Varchar\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] firmId instance String\n" + "                            nullable(Property):\n" + "                                [>3] true instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Integer\n" + "                    milestoning(Property):\n" + "                    name(Property):\n" + "                        employeeTable instance String\n" + "                    primaryKey(Property):\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] id instance String\n" + "                            nullable(Property):\n" + "                                [>3] false instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Integer\n" + "                    schema(Property):\n" + "                        Anonymous_StripedId instance Schema\n" + "                            database(Property):\n" + "                                [X] db instance Database\n" + "                            name(Property):\n" + "                                [>3] default instance String\n" + "                            relations(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            tables(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            views(Property):\n" + "                    setColumns(Property):\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] id instance String\n" + "                            nullable(Property):\n" + "                                [>3] false instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Integer\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] name instance String\n" + "                            nullable(Property):\n" + "                                [>3] true instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Varchar\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] other instance String\n" + "                            nullable(Property):\n" + "                                [>3] true instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Varchar\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] firmId instance String\n" + "                            nullable(Property):\n" + "                                [>3] true instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Integer\n" + "                    temporaryTable(Property):\n" + "                        false instance Boolean\n" + "            schema(Property):\n" + "                default instance String\n" + "    column(Property):\n" + "        Anonymous_StripedId instance Column\n" + "            name(Property):\n" + "                id instance String\n" + "            nullable(Property):\n" + "                false instance Boolean\n" + "            owner(Property):\n" + "                Anonymous_StripedId instance Table\n" + "                    columns(Property):\n" + "                        [_] Anonymous_StripedId instance Column\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] name instance String\n" + "                            nullable(Property):\n" + "                                [>3] true instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Varchar\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] other instance String\n" + "                            nullable(Property):\n" + "                                [>3] true instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Varchar\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] firmId instance String\n" + "                            nullable(Property):\n" + "                                [>3] true instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Integer\n" + "                    milestoning(Property):\n" + "                    name(Property):\n" + "                        employeeTable instance String\n" + "                    primaryKey(Property):\n" + "                        [_] Anonymous_StripedId instance Column\n" + "                    schema(Property):\n" + "                        Anonymous_StripedId instance Schema\n" + "                            database(Property):\n" + "                                [X] db instance Database\n" + "                            name(Property):\n" + "                                [>3] default instance String\n" + "                            relations(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            tables(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            views(Property):\n" + "                    setColumns(Property):\n" + "                        [_] Anonymous_StripedId instance Column\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] name instance String\n" + "                            nullable(Property):\n" + "                                [>3] true instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Varchar\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] other instance String\n" + "                            nullable(Property):\n" + "                                [>3] true instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Varchar\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] firmId instance String\n" + "                            nullable(Property):\n" + "                                [>3] true instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Integer\n" + "                    temporaryTable(Property):\n" + "                        false instance Boolean\n" + "            type(Property):\n" + "                Anonymous_StripedId instance Integer\n" + "    columnName(Property):\n" + "        id instance String\n" + "    setMappingOwner(Property):\n" + "        Anonymous_StripedId instance RootRelationalInstanceSetImplementation\n" + "            class(Property):\n" + "                [~>] other::Person instance Class\n" + "            distinct(Property):\n" + "                false instance Boolean\n" + "            id(Property):\n" + "                other_Person instance String\n" + "            mainTableAlias(Property):\n" + "                Anonymous_StripedId instance TableAlias\n" + "                    database(Property):\n" + "                        [X] db instance Database\n" + "                    name(Property):\n" + "                         instance String\n" + "                    relationalElement(Property):\n" + "                        Anonymous_StripedId instance Table\n" + "                            columns(Property):\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                            milestoning(Property):\n" + "                            name(Property):\n" + "                                [>3] employeeTable instance String\n" + "                            primaryKey(Property):\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                            schema(Property):\n" + "                                [>3] Anonymous_StripedId instance Schema\n" + "                            setColumns(Property):\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                            temporaryTable(Property):\n" + "                                [>3] false instance Boolean\n" + "            parent(Property):\n" + "                [~>] mappingPackage::myMapping instance Mapping\n" + "            primaryKey(Property):\n" + "                Anonymous_StripedId instance TableAliasColumn\n" + "                    alias(Property):\n" + "                        Anonymous_StripedId instance TableAlias\n" + "                            database(Property):\n" + "                                [X] db instance Database\n" + "                            name(Property):\n" + "                                [>3]  instance String\n" + "                            relationalElement(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                    column(Property):\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] id instance String\n" + "                            nullable(Property):\n" + "                                [>3] false instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Integer\n" + "            propertyMappings(Property):\n" + "                Anonymous_StripedId instance RelationalPropertyMapping\n" + "                    localMappingProperty(Property):\n" + "                        false instance Boolean\n" + "                    owner(Property):\n" + "                        [_] Anonymous_StripedId instance RootRelationalInstanceSetImplementation\n" + "                    property(Property):\n" + "                        name instance Property\n" + "                            aggregation(Property):\n" + "                                [>3] None instance AggregationKind\n" + "                            classifierGenericType(Property):\n" + "                                [>3] Anonymous_StripedId instance GenericType\n" + "                            genericType(Property):\n" + "                                [>3] Anonymous_StripedId instance GenericType\n" + "                            multiplicity(Property):\n" + "                                [X] PureOne instance PackageableMultiplicity\n" + "                            name(Property):\n" + "                                [>3] name instance String\n" + "                            owner(Property):\n" + "                                [X] Person instance Class\n" + "                            referenceUsages(Property):\n" + "                                [>3] Anonymous_StripedId instance ReferenceUsage\n" + "                    relationalOperationElement(Property):\n" + "                        Anonymous_StripedId instance TableAliasColumn\n" + "                            alias(Property):\n" + "                                [>3] Anonymous_StripedId instance TableAlias\n" + "                            column(Property):\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                            columnName(Property):\n" + "                                [>3] name instance String\n" + "                            setMappingOwner(Property):\n" + "                                [>3] Anonymous_StripedId instance RootRelationalInstanceSetImplementation\n" + "                    sourceSetImplementationId(Property):\n" + "                        other_Person instance String\n" + "                    targetSetImplementationId(Property):\n" + "                         instance String\n" + "                Anonymous_StripedId instance RelationalPropertyMapping\n" + "                    localMappingProperty(Property):\n" + "                        false instance Boolean\n" + "                    owner(Property):\n" + "                        [_] Anonymous_StripedId instance RootRelationalInstanceSetImplementation\n" + "                    property(Property):\n" + "                        id instance Property\n" + "                            aggregation(Property):\n" + "                                [>3] None instance AggregationKind\n" + "                            classifierGenericType(Property):\n" + "                                [>3] Anonymous_StripedId instance GenericType\n" + "                            genericType(Property):\n" + "                                [>3] Anonymous_StripedId instance GenericType\n" + "                            multiplicity(Property):\n" + "                                [X] PureOne instance PackageableMultiplicity\n" + "                            name(Property):\n" + "                                [>3] id instance String\n" + "                            owner(Property):\n" + "                                [X] Person instance Class\n" + "                            referenceUsages(Property):\n" + "                                [>3] Anonymous_StripedId instance ReferenceUsage\n" + "                    relationalOperationElement(Property):\n" + "                        [_] Anonymous_StripedId instance TableAliasColumn\n" + "                    sourceSetImplementationId(Property):\n" + "                        other_Person instance String\n" + "                    targetSetImplementationId(Property):\n" + "                         instance String\n" + "                Anonymous_StripedId instance RelationalPropertyMapping\n" + "                    localMappingProperty(Property):\n" + "                        false instance Boolean\n" + "                    owner(Property):\n" + "                        [_] Anonymous_StripedId instance RootRelationalInstanceSetImplementation\n" + "                    property(Property):\n" + "                        other instance Property\n" + "                            aggregation(Property):\n" + "                                [>3] None instance AggregationKind\n" + "                            classifierGenericType(Property):\n" + "                                [>3] Anonymous_StripedId instance GenericType\n" + "                            genericType(Property):\n" + "                                [>3] Anonymous_StripedId instance GenericType\n" + "                            multiplicity(Property):\n" + "                                [X] PureOne instance PackageableMultiplicity\n" + "                            name(Property):\n" + "                                [>3] other instance String\n" + "                            owner(Property):\n" + "                                [X] Person instance Class\n" + "                            referenceUsages(Property):\n" + "                                [>3] Anonymous_StripedId instance ReferenceUsage\n" + "                    relationalOperationElement(Property):\n" + "                        Anonymous_StripedId instance TableAliasColumn\n" + "                            alias(Property):\n" + "                                [>3] Anonymous_StripedId instance TableAlias\n" + "                            column(Property):\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                            columnName(Property):\n" + "                                [>3] other instance String\n" + "                            setMappingOwner(Property):\n" + "                                [>3] Anonymous_StripedId instance RootRelationalInstanceSetImplementation\n" + "                    sourceSetImplementationId(Property):\n" + "                        other_Person instance String\n" + "                    targetSetImplementationId(Property):\n" + "                         instance String\n" + "            root(Property):\n" + "                true instance Boolean\n" + "            stores(Property):\n" + "                [X] db instance Database\n" + "            userDefinedPrimaryKey(Property):\n" + "                false instance Boolean\n" + "Anonymous_StripedId instance TableAliasColumn\n" + "    alias(Property):\n" + "        Anonymous_StripedId instance TableAlias\n" + "            database(Property):\n" + "                [~>] db instance Database\n" + "            name(Property):\n" + "                employeeTable instance String\n" + "            relationalElement(Property):\n" + "                Anonymous_StripedId instance Table\n" + "                    columns(Property):\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] id instance String\n" + "                            nullable(Property):\n" + "                                [>3] false instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Integer\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] name instance String\n" + "                            nullable(Property):\n" + "                                [>3] true instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Varchar\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] other instance String\n" + "                            nullable(Property):\n" + "                                [>3] true instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Varchar\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] firmId instance String\n" + "                            nullable(Property):\n" + "                                [>3] true instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Integer\n" + "                    milestoning(Property):\n" + "                    name(Property):\n" + "                        employeeTable instance String\n" + "                    primaryKey(Property):\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] id instance String\n" + "                            nullable(Property):\n" + "                                [>3] false instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Integer\n" + "                    schema(Property):\n" + "                        Anonymous_StripedId instance Schema\n" + "                            database(Property):\n" + "                                [X] db instance Database\n" + "                            name(Property):\n" + "                                [>3] default instance String\n" + "                            relations(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            tables(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            views(Property):\n" + "                    setColumns(Property):\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] id instance String\n" + "                            nullable(Property):\n" + "                                [>3] false instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Integer\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] name instance String\n" + "                            nullable(Property):\n" + "                                [>3] true instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Varchar\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] other instance String\n" + "                            nullable(Property):\n" + "                                [>3] true instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Varchar\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] firmId instance String\n" + "                            nullable(Property):\n" + "                                [>3] true instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Integer\n" + "                    temporaryTable(Property):\n" + "                        false instance Boolean\n" + "    column(Property):\n" + "        Anonymous_StripedId instance Column\n" + "            name(Property):\n" + "                other instance String\n" + "            nullable(Property):\n" + "                true instance Boolean\n" + "            owner(Property):\n" + "                Anonymous_StripedId instance Table\n" + "                    columns(Property):\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] id instance String\n" + "                            nullable(Property):\n" + "                                [>3] false instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Integer\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] name instance String\n" + "                            nullable(Property):\n" + "                                [>3] true instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Varchar\n" + "                        [_] Anonymous_StripedId instance Column\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] firmId instance String\n" + "                            nullable(Property):\n" + "                                [>3] true instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Integer\n" + "                    milestoning(Property):\n" + "                    name(Property):\n" + "                        employeeTable instance String\n" + "                    primaryKey(Property):\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] id instance String\n" + "                            nullable(Property):\n" + "                                [>3] false instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Integer\n" + "                    schema(Property):\n" + "                        Anonymous_StripedId instance Schema\n" + "                            database(Property):\n" + "                                [X] db instance Database\n" + "                            name(Property):\n" + "                                [>3] default instance String\n" + "                            relations(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            tables(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            views(Property):\n" + "                    setColumns(Property):\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] id instance String\n" + "                            nullable(Property):\n" + "                                [>3] false instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Integer\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] name instance String\n" + "                            nullable(Property):\n" + "                                [>3] true instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Varchar\n" + "                        [_] Anonymous_StripedId instance Column\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] firmId instance String\n" + "                            nullable(Property):\n" + "                                [>3] true instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Integer\n" + "                    temporaryTable(Property):\n" + "                        false instance Boolean\n" + "            type(Property):\n" + "                Anonymous_StripedId instance Varchar\n" + "                    size(Property):\n" + "                        200 instance Integer\n" + "    columnName(Property):\n" + "        other instance String\n" + "    setMappingOwner(Property):\n" + "        Anonymous_StripedId instance RootRelationalInstanceSetImplementation\n" + "            class(Property):\n" + "                [~>] other::Person instance Class\n" + "            distinct(Property):\n" + "                false instance Boolean\n" + "            id(Property):\n" + "                other_Person instance String\n" + "            mainTableAlias(Property):\n" + "                Anonymous_StripedId instance TableAlias\n" + "                    database(Property):\n" + "                        [X] db instance Database\n" + "                    name(Property):\n" + "                         instance String\n" + "                    relationalElement(Property):\n" + "                        Anonymous_StripedId instance Table\n" + "                            columns(Property):\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                            milestoning(Property):\n" + "                            name(Property):\n" + "                                [>3] employeeTable instance String\n" + "                            primaryKey(Property):\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                            schema(Property):\n" + "                                [>3] Anonymous_StripedId instance Schema\n" + "                            setColumns(Property):\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                            temporaryTable(Property):\n" + "                                [>3] false instance Boolean\n" + "            parent(Property):\n" + "                [~>] mappingPackage::myMapping instance Mapping\n" + "            primaryKey(Property):\n" + "                Anonymous_StripedId instance TableAliasColumn\n" + "                    alias(Property):\n" + "                        Anonymous_StripedId instance TableAlias\n" + "                            database(Property):\n" + "                                [X] db instance Database\n" + "                            name(Property):\n" + "                                [>3]  instance String\n" + "                            relationalElement(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                    column(Property):\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] id instance String\n" + "                            nullable(Property):\n" + "                                [>3] false instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Integer\n" + "            propertyMappings(Property):\n" + "                Anonymous_StripedId instance RelationalPropertyMapping\n" + "                    localMappingProperty(Property):\n" + "                        false instance Boolean\n" + "                    owner(Property):\n" + "                        [_] Anonymous_StripedId instance RootRelationalInstanceSetImplementation\n" + "                    property(Property):\n" + "                        name instance Property\n" + "                            aggregation(Property):\n" + "                                [>3] None instance AggregationKind\n" + "                            classifierGenericType(Property):\n" + "                                [>3] Anonymous_StripedId instance GenericType\n" + "                            genericType(Property):\n" + "                                [>3] Anonymous_StripedId instance GenericType\n" + "                            multiplicity(Property):\n" + "                                [X] PureOne instance PackageableMultiplicity\n" + "                            name(Property):\n" + "                                [>3] name instance String\n" + "                            owner(Property):\n" + "                                [X] Person instance Class\n" + "                            referenceUsages(Property):\n" + "                                [>3] Anonymous_StripedId instance ReferenceUsage\n" + "                    relationalOperationElement(Property):\n" + "                        Anonymous_StripedId instance TableAliasColumn\n" + "                            alias(Property):\n" + "                                [>3] Anonymous_StripedId instance TableAlias\n" + "                            column(Property):\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                            columnName(Property):\n" + "                                [>3] name instance String\n" + "                            setMappingOwner(Property):\n" + "                                [>3] Anonymous_StripedId instance RootRelationalInstanceSetImplementation\n" + "                    sourceSetImplementationId(Property):\n" + "                        other_Person instance String\n" + "                    targetSetImplementationId(Property):\n" + "                         instance String\n" + "                Anonymous_StripedId instance RelationalPropertyMapping\n" + "                    localMappingProperty(Property):\n" + "                        false instance Boolean\n" + "                    owner(Property):\n" + "                        [_] Anonymous_StripedId instance RootRelationalInstanceSetImplementation\n" + "                    property(Property):\n" + "                        id instance Property\n" + "                            aggregation(Property):\n" + "                                [>3] None instance AggregationKind\n" + "                            classifierGenericType(Property):\n" + "                                [>3] Anonymous_StripedId instance GenericType\n" + "                            genericType(Property):\n" + "                                [>3] Anonymous_StripedId instance GenericType\n" + "                            multiplicity(Property):\n" + "                                [X] PureOne instance PackageableMultiplicity\n" + "                            name(Property):\n" + "                                [>3] id instance String\n" + "                            owner(Property):\n" + "                                [X] Person instance Class\n" + "                            referenceUsages(Property):\n" + "                                [>3] Anonymous_StripedId instance ReferenceUsage\n" + "                    relationalOperationElement(Property):\n" + "                        Anonymous_StripedId instance TableAliasColumn\n" + "                            alias(Property):\n" + "                                [>3] Anonymous_StripedId instance TableAlias\n" + "                            column(Property):\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                            columnName(Property):\n" + "                                [>3] id instance String\n" + "                            setMappingOwner(Property):\n" + "                                [>3] Anonymous_StripedId instance RootRelationalInstanceSetImplementation\n" + "                    sourceSetImplementationId(Property):\n" + "                        other_Person instance String\n" + "                    targetSetImplementationId(Property):\n" + "                         instance String\n" + "                Anonymous_StripedId instance RelationalPropertyMapping\n" + "                    localMappingProperty(Property):\n" + "                        false instance Boolean\n" + "                    owner(Property):\n" + "                        [_] Anonymous_StripedId instance RootRelationalInstanceSetImplementation\n" + "                    property(Property):\n" + "                        other instance Property\n" + "                            aggregation(Property):\n" + "                                [>3] None instance AggregationKind\n" + "                            classifierGenericType(Property):\n" + "                                [>3] Anonymous_StripedId instance GenericType\n" + "                            genericType(Property):\n" + "                                [>3] Anonymous_StripedId instance GenericType\n" + "                            multiplicity(Property):\n" + "                                [X] PureOne instance PackageableMultiplicity\n" + "                            name(Property):\n" + "                                [>3] other instance String\n" + "                            owner(Property):\n" + "                                [X] Person instance Class\n" + "                            referenceUsages(Property):\n" + "                                [>3] Anonymous_StripedId instance ReferenceUsage\n" + "                    relationalOperationElement(Property):\n" + "                        [_] Anonymous_StripedId instance TableAliasColumn\n" + "                    sourceSetImplementationId(Property):\n" + "                        other_Person instance String\n" + "                    targetSetImplementationId(Property):\n" + "                         instance String\n" + "            root(Property):\n" + "                true instance Boolean\n" + "            stores(Property):\n" + "                [X] db instance Database\n" + "            userDefinedPrimaryKey(Property):\n" + "                false instance Boolean\n" + "]", mappingGraphDump);
}
Also used : EnumerationMappingParser(org.finos.legend.pure.m2.dsl.mapping.serialization.grammar.v1.EnumerationMappingParser) MappingParser(org.finos.legend.pure.m2.dsl.mapping.serialization.grammar.v1.MappingParser) ParserLibrary(org.finos.legend.pure.m3.serialization.grammar.ParserLibrary) M3AntlrParser(org.finos.legend.pure.m3.serialization.grammar.m3parser.antlr.M3AntlrParser) CoreInstance(org.finos.legend.pure.m4.coreinstance.CoreInstance) RelationalParser(org.finos.legend.pure.m2.relational.serialization.grammar.v1.RelationalParser) Test(org.junit.Test)

Example 5 with ReferenceUsage

use of org.finos.legend.pure.m3.compiler.ReferenceUsage in project legend-pure by finos.

the class TestDiagramParsing method testDiagramModelDiagram.

@Test
public void testDiagramModelDiagram() {
    final String source = "###Diagram\n" + "Diagram meta::pure::diagram::DiagramDiagram(width=924.0, height=798.0)\n" + "{\n" + "    TypeView AbstractPathView(type=meta::pure::diagram::AbstractPathView,\n" + "                              stereotypesVisible=true,\n" + "                              attributesVisible=true,\n" + "                              attributeStereotypesVisible=true,\n" + "                              attributeTypesVisible=true,\n" + "                              color=#FFFFCC,\n" + "                              lineWidth=1.0,\n" + "                              position=(599.0, 278.0),\n" + "                              width=123.0,\n" + "                              height=57.1875)\n" + "    TypeView AssociationView(type=meta::pure::diagram::AssociationView,\n" + "                             stereotypesVisible=true,\n" + "                             attributesVisible=true,\n" + "                             attributeStereotypesVisible=true,\n" + "                             attributeTypesVisible=true,\n" + "                             color=#FFFFCC,\n" + "                             lineWidth=1.0,\n" + "                             position=(402.0, 476.0),\n" + "                             width=115.0,\n" + "                             height=42.09375)\n" + "    TypeView Diagram(type=meta::pure::diagram::Diagram,\n" + "                     stereotypesVisible=true,\n" + "                     attributesVisible=true,\n" + "                     attributeStereotypesVisible=true,\n" + "                     attributeTypesVisible=true,\n" + "                     color=#FFFFCC,\n" + "                     lineWidth=1.0,\n" + "                     position=(37.5, 476.0),\n" + "                     width=68.0,\n" + "                     height=42.09375)\n" + "    TypeView DiagramNode(type=meta::pure::diagram::DiagramNode,\n" + "                         stereotypesVisible=true,\n" + "                         attributesVisible=true,\n" + "                         attributeStereotypesVisible=true,\n" + "                         attributeTypesVisible=true,\n" + "                         color=#FFFFCC,\n" + "                         lineWidth=1.0,\n" + "                         position=(310.0, 124.0),\n" + "                         width=299.0,\n" + "                         height=57.1875)\n" + "    TypeView GeneralizationView(type=meta::pure::diagram::GeneralizationView,\n" + "                                stereotypesVisible=true,\n" + "                                attributesVisible=true,\n" + "                                attributeStereotypesVisible=true,\n" + "                                attributeTypesVisible=true,\n" + "                                color=#FFFFCC,\n" + "                                lineWidth=1.0,\n" + "                                position=(599.0, 476.0),\n" + "                                width=129.0,\n" + "                                height=42.09375)\n" + "    TypeView PropertyView(type=meta::pure::diagram::PropertyView,\n" + "                          stereotypesVisible=true,\n" + "                          attributesVisible=true,\n" + "                          attributeStereotypesVisible=true,\n" + "                          attributeTypesVisible=true,\n" + "                          color=#FFFFCC,\n" + "                          lineWidth=1.0,\n" + "                          position=(786.0, 476.0),\n" + "                          width=97.0,\n" + "                          height=42.09375)\n" + "    TypeView TypeView(type=meta::pure::diagram::TypeView,\n" + "                      stereotypesVisible=true,\n" + "                      attributesVisible=true,\n" + "                      attributeStereotypesVisible=true,\n" + "                      attributeTypesVisible=true,\n" + "                      color=#FFFFCC,\n" + "                      lineWidth=1.0,\n" + "                      position=(216.0, 286.0),\n" + "                      width=75.0,\n" + "                      height=42.09375)\n" + "    PropertyView AbstractPathView_source(property=meta::pure::diagram::AbstractPathView.source,\n" + "                                         stereotypesVisible=true,\n" + "                                         nameVisible=true,\n" + "                                         color=#000000,\n" + "                                         lineWidth=-1.0,\n" + "                                         lineStyle=SIMPLE,\n" + "                                         points=[(600.23, 320.0), (290.25, 320.0)],\n" + "                                         label='',\n" + "                                         source=AbstractPathView,\n" + "                                         target=TypeView,\n" + "                                         propertyPosition=(297.5, 320.453125),\n" + "                                         multiplicityPosition=(356.0, 320.453125))\n" + "    PropertyView AbstractPathView_target(property=meta::pure::diagram::AbstractPathView.target,\n" + "                                         stereotypesVisible=true,\n" + "                                         nameVisible=true,\n" + "                                         color=#000000,\n" + "                                         lineWidth=-1.0,\n" + "                                         lineStyle=SIMPLE,\n" + "                                         points=[(600.23, 292.0), (424.0, 292.0), (290.0, 293.0)],\n" + "                                         label='',\n" + "                                         source=AbstractPathView,\n" + "                                         target=TypeView,\n" + "                                         propertyPosition=(299.13357281145454, 278.2436741823325),\n" + "                                         multiplicityPosition=(358.8651741778389, 278.31183889983697))\n" + "    GeneralizationView AbstractPathView_DiagramNode(color=#000000,\n" + "                                                    lineWidth=-1.0,\n" + "                                                    lineStyle=SIMPLE,\n" + "                                                    points=[(459.5, 152.59375), (459.5, 229.59375), (660.5, 229.59375), (660.5, 306.59375)],\n" + "                                                    label='',\n" + "                                                    source=AbstractPathView,\n" + "                                                    target=DiagramNode)\n" + "    GeneralizationView AssociationView_AbstractPathView(color=#000000,\n" + "                                                        lineWidth=-1.0,\n" + "                                                        lineStyle=SIMPLE,\n" + "                                                        points=[(660.5, 306.59375), (660.5, 405.59375), (459.5, 405.59375), (459.5, 497.046875)],\n" + "                                                        label='',\n" + "                                                        source=AssociationView,\n" + "                                                        target=AbstractPathView)\n" + "    GeneralizationView GeneralizationView_AbstractPathView(color=#000000,\n" + "                                                           lineWidth=-1.0,\n" + "                                                           lineStyle=SIMPLE,\n" + "                                                           points=[(660.5, 306.59375), (660.5, 405.59375), (663.5, 405.59375), (663.5, 497.046875)],\n" + "                                                           label='',\n" + "                                                           source=GeneralizationView,\n" + "                                                           target=AbstractPathView)\n" + "    GeneralizationView PropertyView_AbstractPathView(color=#000000,\n" + "                                                     lineWidth=-1.0,\n" + "                                                     lineStyle=SIMPLE,\n" + "                                                     points=[(660.5, 306.59375), (660.5, 405.59375), (834.5, 405.59375), (834.5, 497.046875)],\n" + "                                                     label='',\n" + "                                                     source=PropertyView,\n" + "                                                     target=AbstractPathView)\n" + "    GeneralizationView TypeView_DiagramNode(color=#000000,\n" + "                                            lineWidth=-1.0,\n" + "                                            lineStyle=SIMPLE,\n" + "                                            points=[(459.5, 152.59375), (459.5, 229.59375), (253.5, 229.59375), (253.5, 307.046875)],\n" + "                                            label='',\n" + "                                            source=TypeView,\n" + "                                            target=DiagramNode)\n" + "}\n" + "Diagram meta::pure::diagram::DiagramDiagram1(width=924.0, height=798.0)\n" + "{\n" + "    TypeView AbstractPathView(type=meta::pure::diagram::AbstractPathView,\n" + "                              stereotypesVisible=true,\n" + "                              attributesVisible=true,\n" + "                              attributeStereotypesVisible=true,\n" + "                              attributeTypesVisible=true,\n" + "                              color=#FFFFCC,\n" + "                              lineWidth=1.0,\n" + "                              position=(599.0, 278.0),\n" + "                              width=123.0,\n" + "                              height=57.1875)\n" + "    TypeView AssociationView(type=meta::pure::diagram::AssociationView,\n" + "                             stereotypesVisible=true,\n" + "                             attributesVisible=true,\n" + "                             attributeStereotypesVisible=true,\n" + "                             attributeTypesVisible=true,\n" + "                             color=#FFFFCC,\n" + "                             lineWidth=1.0,\n" + "                             position=(402.0, 476.0),\n" + "                             width=115.0,\n" + "                             height=42.09375)\n" + "    TypeView Diagram(type=meta::pure::diagram::Diagram,\n" + "                     stereotypesVisible=true,\n" + "                     attributesVisible=true,\n" + "                     attributeStereotypesVisible=true,\n" + "                     attributeTypesVisible=true,\n" + "                     color=#FFFFCC,\n" + "                     lineWidth=1.0,\n" + "                     position=(37.5, 476.0),\n" + "                     width=68.0,\n" + "                     height=42.09375)\n" + "    TypeView DiagramNode(type=meta::pure::diagram::DiagramNode,\n" + "                         stereotypesVisible=true,\n" + "                         attributesVisible=true,\n" + "                         attributeStereotypesVisible=true,\n" + "                         attributeTypesVisible=true,\n" + "                         color=#FFFFCC,\n" + "                         lineWidth=1.0,\n" + "                         position=(310.0, 124.0),\n" + "                         width=299.0,\n" + "                         height=57.1875)\n" + "    TypeView GeneralizationView(type=meta::pure::diagram::GeneralizationView,\n" + "                                stereotypesVisible=true,\n" + "                                attributesVisible=true,\n" + "                                attributeStereotypesVisible=true,\n" + "                                attributeTypesVisible=true,\n" + "                                color=#FFFFCC,\n" + "                                lineWidth=1.0,\n" + "                                position=(599.0, 476.0),\n" + "                                width=129.0,\n" + "                                height=42.09375)\n" + "    TypeView PropertyView(type=meta::pure::diagram::PropertyView,\n" + "                          stereotypesVisible=true,\n" + "                          attributesVisible=true,\n" + "                          attributeStereotypesVisible=true,\n" + "                          attributeTypesVisible=true,\n" + "                          color=#FFFFCC,\n" + "                          lineWidth=1.0,\n" + "                          position=(786.0, 476.0),\n" + "                          width=97.0,\n" + "                          height=42.09375)\n" + "    TypeView TypeView(type=meta::pure::diagram::TypeView,\n" + "                      stereotypesVisible=true,\n" + "                      attributesVisible=true,\n" + "                      attributeStereotypesVisible=true,\n" + "                      attributeTypesVisible=true,\n" + "                      color=#FFFFCC,\n" + "                      lineWidth=1.0,\n" + "                      position=(216.0, 286.0),\n" + "                      width=75.0,\n" + "                      height=42.09375)\n" + "    PropertyView AbstractPathView_source(property=meta::pure::diagram::AbstractPathView.source,\n" + "                                         stereotypesVisible=true,\n" + "                                         nameVisible=true,\n" + "                                         color=#000000,\n" + "                                         lineWidth=-1.0,\n" + "                                         lineStyle=SIMPLE,\n" + "                                         points=[(600.23, 320.0), (290.25, 320.0)],\n" + "                                         label='',\n" + "                                         source=AbstractPathView,\n" + "                                         target=TypeView,\n" + "                                         propertyPosition=(297.5, 320.453125),\n" + "                                         multiplicityPosition=(356.0, 320.453125))\n" + "    PropertyView AbstractPathView_target(property=meta::pure::diagram::AbstractPathView.target,\n" + "                                         stereotypesVisible=true,\n" + "                                         nameVisible=true,\n" + "                                         color=#000000,\n" + "                                         lineWidth=-1.0,\n" + "                                         lineStyle=SIMPLE,\n" + "                                         points=[(600.23, 292.0), (424.0, 292.0), (290.0, 293.0)],\n" + "                                         label='',\n" + "                                         source=AbstractPathView,\n" + "                                         target=TypeView,\n" + "                                         propertyPosition=(299.13357281145454, 278.2436741823325),\n" + "                                         multiplicityPosition=(358.8651741778389, 278.31183889983697))\n" + "    GeneralizationView AbstractPathView_DiagramNode(color=#000000,\n" + "                                                    lineWidth=-1.0,\n" + "                                                    lineStyle=SIMPLE,\n" + "                                                    points=[(459.5, 152.59375), (459.5, 229.59375), (660.5, 229.59375), (660.5, 306.59375)],\n" + "                                                    label='',\n" + "                                                    source=AbstractPathView,\n" + "                                                    target=DiagramNode)\n" + "    GeneralizationView AssociationView_AbstractPathView(color=#000000,\n" + "                                                        lineWidth=-1.0,\n" + "                                                        lineStyle=SIMPLE,\n" + "                                                        points=[(660.5, 306.59375), (660.5, 405.59375), (459.5, 405.59375), (459.5, 497.046875)],\n" + "                                                        label='',\n" + "                                                        source=AssociationView,\n" + "                                                        target=AbstractPathView)\n" + "    GeneralizationView GeneralizationView_AbstractPathView(color=#000000,\n" + "                                                           lineWidth=-1.0,\n" + "                                                           lineStyle=SIMPLE,\n" + "                                                           points=[(660.5, 306.59375), (660.5, 405.59375), (663.5, 405.59375), (663.5, 497.046875)],\n" + "                                                           label='',\n" + "                                                           source=GeneralizationView,\n" + "                                                           target=AbstractPathView)\n" + "    GeneralizationView PropertyView_AbstractPathView(color=#000000,\n" + "                                                     lineWidth=-1.0,\n" + "                                                     lineStyle=SIMPLE,\n" + "                                                     points=[(660.5, 306.59375), (660.5, 405.59375), (834.5, 405.59375), (834.5, 497.046875)],\n" + "                                                     label='',\n" + "                                                     source=PropertyView,\n" + "                                                     target=AbstractPathView)\n" + "    GeneralizationView TypeView_DiagramNode(color=#000000,\n" + "                                            lineWidth=-1.0,\n" + "                                            lineStyle=SIMPLE,\n" + "                                            points=[(459.5, 152.59375), (459.5, 229.59375), (253.5, 229.59375), (253.5, 307.046875)],\n" + "                                            label='',\n" + "                                            source=TypeView,\n" + "                                            target=DiagramNode)\n" + "}";
    compileTestSource("testDiagram.pure", source);
    Class typeViewClass = (Class) this.runtime.getCoreInstance("meta::pure::diagram::TypeView");
    RichIterable<? extends ReferenceUsage> typeViewReferenceUsages = typeViewClass._referenceUsages().select(new Predicate<ReferenceUsage>() {

        @Override
        public boolean accept(ReferenceUsage usage) {
            return usage._owner() instanceof TypeView;
        }
    });
    String[] lines = source.split("\n");
    for (ReferenceUsage referenceUsage : typeViewReferenceUsages) {
        SourceInformation sourceInformation = referenceUsage.getSourceInformation();
        Assert.assertEquals("TypeView", lines[sourceInformation.getLine() - 1].substring(sourceInformation.getColumn() - 1, sourceInformation.getColumn() + "TypeView".length() - 1));
    }
}
Also used : TypeView(org.finos.legend.pure.m3.coreinstance.meta.pure.diagram.TypeView) BeforeClass(org.junit.BeforeClass) Class(org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.type.Class) SourceInformation(org.finos.legend.pure.m4.coreinstance.SourceInformation) ReferenceUsage(org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.ReferenceUsage) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)7 ReferenceUsage (org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.ReferenceUsage)5 SourceInformation (org.finos.legend.pure.m4.coreinstance.SourceInformation)4 RuntimeTestScriptBuilder (org.finos.legend.pure.m3.RuntimeTestScriptBuilder)3 PackageableElement (org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.PackageableElement)2 M3AntlrParser (org.finos.legend.pure.m3.serialization.grammar.m3parser.antlr.M3AntlrParser)2 Predicate (org.eclipse.collections.api.block.predicate.Predicate)1 EnumerationMappingParser (org.finos.legend.pure.m2.dsl.mapping.serialization.grammar.v1.EnumerationMappingParser)1 MappingParser (org.finos.legend.pure.m2.dsl.mapping.serialization.grammar.v1.MappingParser)1 RelationalParser (org.finos.legend.pure.m2.relational.serialization.grammar.v1.RelationalParser)1 Package (org.finos.legend.pure.m3.coreinstance.Package)1 AssociationView (org.finos.legend.pure.m3.coreinstance.meta.pure.diagram.AssociationView)1 TypeView (org.finos.legend.pure.m3.coreinstance.meta.pure.diagram.TypeView)1 SetImplementation (org.finos.legend.pure.m3.coreinstance.meta.pure.mapping.SetImplementation)1 Association (org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.relationship.Association)1 Class (org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.type.Class)1 Database (org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.Database)1 ParserLibrary (org.finos.legend.pure.m3.serialization.grammar.ParserLibrary)1 CoreInstance (org.finos.legend.pure.m4.coreinstance.CoreInstance)1 BeforeClass (org.junit.BeforeClass)1