diff options
author | wpiers | 2008-02-27 11:15:50 +0000 |
---|---|---|
committer | wpiers | 2008-02-27 11:15:50 +0000 |
commit | cd3f4327a904712608701eecceedc99f1218f8b4 (patch) | |
tree | c61af2902c499c7d23557d53445f1803dfd99f05 /tests/org.eclipse.m2m.atl.tests/data/expected | |
parent | 89525b562eeb77f7b5c0d71a69c4685a966c5ba5 (diff) | |
download | org.eclipse.atl-cd3f4327a904712608701eecceedc99f1218f8b4.tar.gz org.eclipse.atl-cd3f4327a904712608701eecceedc99f1218f8b4.tar.xz org.eclipse.atl-cd3f4327a904712608701eecceedc99f1218f8b4.zip |
updated tests sets
Diffstat (limited to 'tests/org.eclipse.m2m.atl.tests/data/expected')
3 files changed, 475 insertions, 0 deletions
diff --git a/tests/org.eclipse.m2m.atl.tests/data/expected/Relational2UML/Relational2UML.atl.ecore b/tests/org.eclipse.m2m.atl.tests/data/expected/Relational2UML/Relational2UML.atl.ecore new file mode 100644 index 00000000..16053a7c --- /dev/null +++ b/tests/org.eclipse.m2m.atl.tests/data/expected/Relational2UML/Relational2UML.atl.ecore @@ -0,0 +1,333 @@ +<?xml version="1.0" encoding="Cp1252"?> +<atl:Module xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:atl="http://www.eclipse.org/gmt/2005/ATL" xmlns:ocl="http://www.eclipse.org/gmt/2005/OCL" location="5:1-98:2" name="Relational2UML2"> + <inModels location="6:23-6:38" name="IN"> + <metamodel href="temp#/1"/> + </inModels> + <inModels location="6:40-6:49" name="PRO"> + <metamodel href="temp#/0"/> + </inModels> + <outModels location="6:8-6:17" name="OUT"> + <metamodel href="temp#/0"/> + </outModels> + <elements xsi:type="atl:Helper" location="12:1-12:60"> + <definition location="12:8-12:59"> + <feature xsi:type="ocl:Attribute" location="12:14-12:59" name="stringType"> + <initExpression xsi:type="ocl:OclUndefinedExp" location="12:47-12:59"/> + <type xsi:type="ocl:OclModelElement" location="12:27-12:44" name="PrimitiveType"> + <model href="temp#/0"/> + </type> + </feature> + </definition> + </elements> + <elements xsi:type="atl:Helper" location="13:1-13:61"> + <definition location="13:8-13:60"> + <feature xsi:type="ocl:Attribute" location="13:14-13:60" name="integerType"> + <initExpression xsi:type="ocl:OclUndefinedExp" location="13:48-13:60"/> + <type xsi:type="ocl:OclModelElement" location="13:28-13:45" name="PrimitiveType"> + <model href="temp#/0"/> + </type> + </feature> + </definition> + </elements> + <elements xsi:type="atl:Helper" location="15:1-24:8"> + <definition location="15:8-24:7"> + <feature xsi:type="ocl:Operation" location="15:40-24:7" name="computeType"> + <returnType xsi:type="ocl:OclModelElement" location="15:56-15:73" name="PrimitiveType"> + <model href="temp#/0"/> + </returnType> + <body xsi:type="ocl:IfExp" location="16:2-24:7"> + <thenExpression xsi:type="ocl:NavigationOrAttributeCallExp" location="17:3-17:24" name="stringType"> + <source xsi:type="ocl:VariableExp" location="17:3-17:13"> + <referredVariable href="temp#/3"/> + </source> + </thenExpression> + <condition xsi:type="ocl:OperatorCallExp" location="16:5-16:25" operationName="="> + <source xsi:type="ocl:NavigationOrAttributeCallExp" location="16:5-16:14" name="type"> + <source xsi:type="ocl:VariableExp" location="16:5-16:9"> + <referredVariable href="temp#/2"/> + </source> + </source> + <arguments xsi:type="ocl:EnumLiteralExp" location="16:17-16:25" name="VARCHAR"/> + </condition> + <elseExpression xsi:type="ocl:IfExp" location="19:3-23:8"> + <thenExpression xsi:type="ocl:NavigationOrAttributeCallExp" location="20:4-20:26" name="integerType"> + <source xsi:type="ocl:VariableExp" location="20:4-20:14"> + <referredVariable href="temp#/5"/> + </source> + </thenExpression> + <condition xsi:type="ocl:OperatorCallExp" location="19:6-19:26" operationName="="> + <source xsi:type="ocl:NavigationOrAttributeCallExp" location="19:6-19:15" name="type"> + <source xsi:type="ocl:VariableExp" location="19:6-19:10"> + <referredVariable href="temp#/4"/> + </source> + </source> + <arguments xsi:type="ocl:EnumLiteralExp" location="19:18-19:26" name="NUMERIC"/> + </condition> + <elseExpression xsi:type="ocl:NavigationOrAttributeCallExp" location="22:7-22:29" name="integerType"> + <source xsi:type="ocl:VariableExp" location="22:7-22:17"> + <referredVariable href="temp#/6"/> + </source> + </elseExpression> + </elseExpression> + </body> + </feature> + <context_ location="15:8-15:33"> + <context_ xsi:type="ocl:OclModelElement" location="15:16-15:33" name="Column"> + <model href="temp#/1"/> + </context_> + </context_> + </definition> + </elements> + <elements xsi:type="atl:Helper" location="26:1-27:80"> + <definition location="26:8-27:79"> + <feature xsi:type="ocl:Operation" location="26:14-27:79" name="getStereotype"> + <parameters location="26:28-26:41" varName="name" variableExp="//@elements.3/@definition/@feature/@body/@source/@body/@arguments.0"> + <type xsi:type="ocl:StringType" location="26:35-26:41"/> + </parameters> + <returnType xsi:type="ocl:OclModelElement" location="26:45-26:59" name="Stereotype"> + <model href="temp#/0"/> + </returnType> + <body xsi:type="ocl:CollectionOperationCallExp" location="27:5-27:79" operationName="first"> + <source xsi:type="ocl:IteratorExp" location="27:5-27:70" name="select"> + <source xsi:type="ocl:OperationCallExp" location="27:5-27:43" operationName="allInstancesFrom"> + <source xsi:type="ocl:OclModelElement" location="27:5-27:19" name="Stereotype"> + <model href="temp#/0"/> + </source> + <arguments xsi:type="ocl:StringExp" location="27:37-27:42" stringSymbol="PRO"/> + </source> + <body xsi:type="ocl:OperatorCallExp" location="27:56-27:69" operationName="="> + <source xsi:type="ocl:NavigationOrAttributeCallExp" location="27:56-27:62" name="name"> + <source xsi:type="ocl:VariableExp" location="27:56-27:57" referredVariable="//@elements.3/@definition/@feature/@body/@source/@iterators.0"/> + </source> + <arguments xsi:type="ocl:VariableExp" location="27:65-27:69" referredVariable="//@elements.3/@definition/@feature/@parameters.0"/> + </body> + <iterators location="27:52-27:53" varName="p" variableExp="//@elements.3/@definition/@feature/@body/@source/@body/@source/@source"/> + </source> + </body> + </feature> + </definition> + </elements> + <elements xsi:type="atl:MatchedRule" location="34:1-48:2" name="Column2Property"> + <outPattern location="37:2-43:4"> + <elements xsi:type="atl:SimpleOutPatternElement" location="38:3-43:4" varName="out" variableExp="//@elements.4/@actionBlock/@statements.0/@expression/@source"> + <type xsi:type="ocl:OclModelElement" location="38:9-38:21" name="Property"> + <model href="temp#/0"/> + </type> + <bindings location="39:4-39:18" propertyName="name"> + <value xsi:type="ocl:NavigationOrAttributeCallExp" location="39:12-39:18" name="name"> + <source xsi:type="ocl:VariableExp" location="39:12-39:13" referredVariable="//@elements.4/@inPattern/@elements.0"/> + </value> + </bindings> + <bindings location="40:4-40:26" propertyName="isUnique"> + <value xsi:type="ocl:NavigationOrAttributeCallExp" location="40:16-40:26" name="isUnique"> + <source xsi:type="ocl:VariableExp" location="40:16-40:17" referredVariable="//@elements.4/@inPattern/@elements.0"/> + </value> + </bindings> + <bindings location="42:4-42:33" propertyName="type"> + <value xsi:type="ocl:NavigationOrAttributeCallExp" location="42:12-42:33" name="stringType"> + <source xsi:type="ocl:VariableExp" location="42:12-42:22"> + <referredVariable href="temp#/7"/> + </source> + </value> + </bindings> + </elements> + </outPattern> + <actionBlock location="44:2-47:3"> + <statements xsi:type="atl:ExpressionStat" location="45:5-45:61"> + <expression xsi:type="ocl:OperationCallExp" location="45:5-45:60" operationName="applyStereotype"> + <source xsi:type="ocl:VariableExp" location="45:5-45:8" referredVariable="//@elements.4/@outPattern/@elements.0"/> + <arguments xsi:type="ocl:OperationCallExp" location="45:25-45:59" operationName="getStereotype"> + <source xsi:type="ocl:VariableExp" location="45:25-45:35"> + <referredVariable href="temp#/8"/> + </source> + <arguments xsi:type="ocl:StringExp" location="45:50-45:58" stringSymbol="Column"/> + </arguments> + </expression> + </statements> + </actionBlock> + <inPattern location="35:2-36:24"> + <elements xsi:type="atl:SimpleInPatternElement" location="36:3-36:24" varName="p" variableExp="//@elements.4/@outPattern/@elements.0/@bindings.0/@value/@source //@elements.4/@outPattern/@elements.0/@bindings.1/@value/@source"> + <type xsi:type="ocl:OclModelElement" location="36:7-36:24" name="Column"> + <model href="temp#/1"/> + </type> + </elements> + </inPattern> + </elements> + <elements xsi:type="atl:MatchedRule" location="51:1-72:2" name="Database2Model"> + <outPattern location="54:2-64:4"> + <elements xsi:type="atl:SimpleOutPatternElement" location="55:3-58:4" varName="out" variableExp="//@elements.5/@actionBlock/@statements.2/@expression/@source //@elements.5/@actionBlock/@statements.3/@expression/@source"> + <type xsi:type="ocl:OclModelElement" location="55:9-55:18" name="Model"> + <model href="temp#/0"/> + </type> + <bindings location="56:4-56:18" propertyName="name"> + <value xsi:type="ocl:NavigationOrAttributeCallExp" location="56:12-56:18" name="name"> + <source xsi:type="ocl:VariableExp" location="56:12-56:13" referredVariable="//@elements.5/@inPattern/@elements.0"/> + </value> + </bindings> + <bindings location="57:4-57:75" propertyName="packagedElement"> + <value xsi:type="ocl:CollectionOperationCallExp" location="57:23-57:75" operationName="flatten"> + <source xsi:type="ocl:SequenceExp" location="57:23-57:62"> + <elements xsi:type="ocl:NavigationOrAttributeCallExp" location="57:32-57:46" name="ownedSchemas"> + <source xsi:type="ocl:VariableExp" location="57:32-57:33" referredVariable="//@elements.5/@inPattern/@elements.0"/> + </elements> + <elements xsi:type="ocl:VariableExp" location="57:47-57:54" referredVariable="//@elements.5/@outPattern/@elements.1"/> + <elements xsi:type="ocl:VariableExp" location="57:55-57:61" referredVariable="//@elements.5/@outPattern/@elements.2"/> + </source> + </value> + </bindings> + </elements> + <elements xsi:type="atl:SimpleOutPatternElement" location="59:3-61:4" varName="integer" variableExp="//@elements.5/@outPattern/@elements.0/@bindings.1/@value/@source/@elements.1 //@elements.5/@actionBlock/@statements.1/@value"> + <type xsi:type="ocl:OclModelElement" location="59:13-59:30" name="PrimitiveType"> + <model href="temp#/0"/> + </type> + <bindings location="60:4-60:21" propertyName="name"> + <value xsi:type="ocl:StringExp" location="60:12-60:21" stringSymbol="Integer"/> + </bindings> + </elements> + <elements xsi:type="atl:SimpleOutPatternElement" location="62:3-64:4" varName="string" variableExp="//@elements.5/@outPattern/@elements.0/@bindings.1/@value/@source/@elements.2 //@elements.5/@actionBlock/@statements.0/@value"> + <type xsi:type="ocl:OclModelElement" location="62:12-62:29" name="PrimitiveType"> + <model href="temp#/0"/> + </type> + <bindings location="63:4-63:20" propertyName="name"> + <value xsi:type="ocl:StringExp" location="63:12-63:20" stringSymbol="String"/> + </bindings> + </elements> + </outPattern> + <actionBlock location="65:2-71:3"> + <statements xsi:type="atl:BindingStat" location="66:3-66:35"> + <source xsi:type="ocl:NavigationOrAttributeCallExp" location="66:3-66:24" name="stringType"> + <source xsi:type="ocl:VariableExp" location="66:3-66:13"> + <referredVariable href="temp#/9"/> + </source> + </source> + <value xsi:type="ocl:VariableExp" location="66:28-66:34" referredVariable="//@elements.5/@outPattern/@elements.2"/> + </statements> + <statements xsi:type="atl:BindingStat" location="67:6-67:40"> + <source xsi:type="ocl:NavigationOrAttributeCallExp" location="67:6-67:28" name="integerType"> + <source xsi:type="ocl:VariableExp" location="67:6-67:16"> + <referredVariable href="temp#/10"/> + </source> + </source> + <value xsi:type="ocl:VariableExp" location="67:32-67:39" referredVariable="//@elements.5/@outPattern/@elements.1"/> + </statements> + <statements xsi:type="atl:ExpressionStat" location="69:6-69:104"> + <expression xsi:type="ocl:OperationCallExp" location="69:6-69:103" operationName="applyProfile"> + <source xsi:type="ocl:VariableExp" location="69:6-69:9" referredVariable="//@elements.5/@outPattern/@elements.0"/> + <arguments xsi:type="ocl:CollectionOperationCallExp" location="69:23-69:102" operationName="first"> + <source xsi:type="ocl:IteratorExp" location="69:23-69:93" name="select"> + <source xsi:type="ocl:OperationCallExp" location="69:23-69:58" operationName="allInstancesFrom"> + <source xsi:type="ocl:OclModelElement" location="69:23-69:34" name="Profile"> + <model href="temp#/0"/> + </source> + <arguments xsi:type="ocl:StringExp" location="69:52-69:57" stringSymbol="PRO"/> + </source> + <body xsi:type="ocl:OperatorCallExp" location="69:71-69:92" operationName="="> + <source xsi:type="ocl:NavigationOrAttributeCallExp" location="69:71-69:77" name="name"> + <source xsi:type="ocl:VariableExp" location="69:71-69:72" referredVariable="//@elements.5/@actionBlock/@statements.2/@expression/@arguments.0/@source/@iterators.0"/> + </source> + <arguments xsi:type="ocl:StringExp" location="69:80-69:92" stringSymbol="relational"/> + </body> + <iterators location="69:67-69:68" varName="p" variableExp="//@elements.5/@actionBlock/@statements.2/@expression/@arguments.0/@source/@body/@source/@source"/> + </source> + </arguments> + </expression> + </statements> + <statements xsi:type="atl:ExpressionStat" location="70:6-70:64"> + <expression xsi:type="ocl:OperationCallExp" location="70:6-70:63" operationName="applyStereotype"> + <source xsi:type="ocl:VariableExp" location="70:6-70:9" referredVariable="//@elements.5/@outPattern/@elements.0"/> + <arguments xsi:type="ocl:OperationCallExp" location="70:26-70:62" operationName="getStereotype"> + <source xsi:type="ocl:VariableExp" location="70:26-70:36"> + <referredVariable href="temp#/11"/> + </source> + <arguments xsi:type="ocl:StringExp" location="70:51-70:61" stringSymbol="Database"/> + </arguments> + </expression> + </statements> + </actionBlock> + <inPattern location="52:2-53:26"> + <elements xsi:type="atl:SimpleInPatternElement" location="53:3-53:26" varName="d" variableExp="//@elements.5/@outPattern/@elements.0/@bindings.0/@value/@source //@elements.5/@outPattern/@elements.0/@bindings.1/@value/@source/@elements.0/@source"> + <type xsi:type="ocl:OclModelElement" location="53:7-53:26" name="Database"> + <model href="temp#/1"/> + </type> + </elements> + </inPattern> + </elements> + <elements xsi:type="atl:MatchedRule" location="74:1-85:2" name="Table2Class"> + <outPattern location="77:2-81:4"> + <elements xsi:type="atl:SimpleOutPatternElement" location="78:3-81:4" varName="out" variableExp="//@elements.6/@actionBlock/@statements.0/@expression/@source"> + <type xsi:type="ocl:OclModelElement" location="78:9-78:18" name="Class"> + <model href="temp#/0"/> + </type> + <bindings location="79:4-79:18" propertyName="name"> + <value xsi:type="ocl:NavigationOrAttributeCallExp" location="79:12-79:18" name="name"> + <source xsi:type="ocl:VariableExp" location="79:12-79:13" referredVariable="//@elements.6/@inPattern/@elements.0"/> + </value> + </bindings> + <bindings location="80:4-80:36" propertyName="ownedAttribute"> + <value xsi:type="ocl:NavigationOrAttributeCallExp" location="80:22-80:36" name="ownedColumns"> + <source xsi:type="ocl:VariableExp" location="80:22-80:23" referredVariable="//@elements.6/@inPattern/@elements.0"/> + </value> + </bindings> + </elements> + </outPattern> + <actionBlock location="82:2-84:3"> + <statements xsi:type="atl:ExpressionStat" location="83:5-83:60"> + <expression xsi:type="ocl:OperationCallExp" location="83:5-83:59" operationName="applyStereotype"> + <source xsi:type="ocl:VariableExp" location="83:5-83:8" referredVariable="//@elements.6/@outPattern/@elements.0"/> + <arguments xsi:type="ocl:OperationCallExp" location="83:25-83:58" operationName="getStereotype"> + <source xsi:type="ocl:VariableExp" location="83:25-83:35"> + <referredVariable href="temp#/12"/> + </source> + <arguments xsi:type="ocl:StringExp" location="83:50-83:57" stringSymbol="Table"/> + </arguments> + </expression> + </statements> + </actionBlock> + <inPattern location="75:2-76:23"> + <elements xsi:type="atl:SimpleInPatternElement" location="76:3-76:23" varName="t" variableExp="//@elements.6/@outPattern/@elements.0/@bindings.0/@value/@source //@elements.6/@outPattern/@elements.0/@bindings.1/@value/@source"> + <type xsi:type="ocl:OclModelElement" location="76:7-76:23" name="Table"> + <model href="temp#/1"/> + </type> + </elements> + </inPattern> + </elements> + <elements xsi:type="atl:MatchedRule" location="87:1-98:2" name="Schema2Package"> + <outPattern location="90:2-94:4"> + <elements xsi:type="atl:SimpleOutPatternElement" location="91:3-94:4" varName="out" variableExp="//@elements.7/@actionBlock/@statements.0/@expression/@source"> + <type xsi:type="ocl:OclModelElement" location="91:9-91:20" name="Package"> + <model href="temp#/0"/> + </type> + <bindings location="92:4-92:18" propertyName="name"> + <value xsi:type="ocl:NavigationOrAttributeCallExp" location="92:12-92:18" name="name"> + <source xsi:type="ocl:VariableExp" location="92:12-92:13" referredVariable="//@elements.7/@inPattern/@elements.0"/> + </value> + </bindings> + <bindings location="93:4-93:36" propertyName="packagedElement"> + <value xsi:type="ocl:NavigationOrAttributeCallExp" location="93:23-93:36" name="ownedTables"> + <source xsi:type="ocl:VariableExp" location="93:23-93:24" referredVariable="//@elements.7/@inPattern/@elements.0"/> + </value> + </bindings> + </elements> + </outPattern> + <actionBlock location="95:2-97:3"> + <statements xsi:type="atl:ExpressionStat" location="96:4-96:60"> + <expression xsi:type="ocl:OperationCallExp" location="96:4-96:59" operationName="applyStereotype"> + <source xsi:type="ocl:VariableExp" location="96:4-96:7" referredVariable="//@elements.7/@outPattern/@elements.0"/> + <arguments xsi:type="ocl:OperationCallExp" location="96:24-96:58" operationName="getStereotype"> + <source xsi:type="ocl:VariableExp" location="96:24-96:34"> + <referredVariable href="temp#/13"/> + </source> + <arguments xsi:type="ocl:StringExp" location="96:49-96:57" stringSymbol="Schema"/> + </arguments> + </expression> + </statements> + </actionBlock> + <inPattern location="88:2-89:24"> + <elements xsi:type="atl:SimpleInPatternElement" location="89:3-89:24" varName="s" variableExp="//@elements.7/@outPattern/@elements.0/@bindings.0/@value/@source //@elements.7/@outPattern/@elements.0/@bindings.1/@value/@source"> + <type xsi:type="ocl:OclModelElement" location="89:7-89:24" name="Schema"> + <model href="temp#/1"/> + </type> + </elements> + </inPattern> + </elements> +</atl:Module> diff --git a/tests/org.eclipse.m2m.atl.tests/data/expected/Relational2UML/relational.uml b/tests/org.eclipse.m2m.atl.tests/data/expected/Relational2UML/relational.uml new file mode 100644 index 00000000..d2780518 --- /dev/null +++ b/tests/org.eclipse.m2m.atl.tests/data/expected/Relational2UML/relational.uml @@ -0,0 +1,109 @@ +<?xml version="1.0" encoding="UTF-8"?> +<uml:Profile xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/2.1.0/UML" xmi:id="_nzsm8J_mEduSF4kFqdqOMg" name="relational" metaclassReference="_Tmdp4J_sEduSF4kFqdqOMg _Tmdp4Z_sEduSF4kFqdqOMg _Tmdp4p_sEduSF4kFqdqOMg _Tmdp45_sEduSF4kFqdqOMg"> + <eAnnotations xmi:id="_Qbr6gZ_tEduSF4kFqdqOMg" source="http://www.eclipse.org/uml2/2.0.0/UML"> + <contents xmi:type="ecore:EPackage" xmi:id="_1xsbUFxxEdy9ZeGhUWzsNw" name="relational" nsURI="http:///schemas/relational/_1xjRYFxxEdy9ZeGhUWzsNw/1" nsPrefix="relational"> + <eClassifiers xmi:type="ecore:EClass" xmi:id="_1xsbUVxxEdy9ZeGhUWzsNw" name="Database"> + <eAnnotations xmi:id="_1xsbUlxxEdy9ZeGhUWzsNw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_02BbgJ_rEduSF4kFqdqOMg"/> + <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_1xsbU1xxEdy9ZeGhUWzsNw" name="base_Model" ordered="false" lowerBound="1"> + <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/2.1.0/UML#//Model"/> + </eStructuralFeatures> + </eClassifiers> + <eClassifiers xmi:type="ecore:EClass" xmi:id="_1xsbVVxxEdy9ZeGhUWzsNw" name="Schema"> + <eAnnotations xmi:id="_1xsbVlxxEdy9ZeGhUWzsNw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_4Z2uoJ_rEduSF4kFqdqOMg"/> + <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_1xsbV1xxEdy9ZeGhUWzsNw" name="base_Package" ordered="false" lowerBound="1"> + <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/2.1.0/UML#//Package"/> + </eStructuralFeatures> + </eClassifiers> + <eClassifiers xmi:type="ecore:EClass" xmi:id="_1xsbWVxxEdy9ZeGhUWzsNw" name="Table"> + <eAnnotations xmi:id="_1xsbWlxxEdy9ZeGhUWzsNw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_45JSsJ_rEduSF4kFqdqOMg"/> + <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_1xsbW1xxEdy9ZeGhUWzsNw" name="base_Class" ordered="false" lowerBound="1"> + <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/2.1.0/UML#//Class"/> + </eStructuralFeatures> + </eClassifiers> + <eClassifiers xmi:type="ecore:EClass" xmi:id="_1xsbXVxxEdy9ZeGhUWzsNw" name="Column"> + <eAnnotations xmi:id="_1xsbXlxxEdy9ZeGhUWzsNw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_5ELeAJ_rEduSF4kFqdqOMg"/> + <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_1xsbX1xxEdy9ZeGhUWzsNw" name="base_Property" ordered="false" lowerBound="1"> + <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/2.1.0/UML#//Property"/> + </eStructuralFeatures> + <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_1xsbYVxxEdy9ZeGhUWzsNw" name="isPrimaryKey" ordered="false" defaultValueLiteral="false"> + <eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/> + </eStructuralFeatures> + </eClassifiers> + </contents> + <contents xmi:type="ecore:EPackage" xmi:id="_Qbr6gp_tEduSF4kFqdqOMg" name="relational" nsURI="http:///schemas/relational/_Qbr6gJ_tEduSF4kFqdqOMg/0" nsPrefix="relational"> + <eClassifiers xmi:type="ecore:EClass" xmi:id="_Qbr6g5_tEduSF4kFqdqOMg" name="Database"> + <eAnnotations xmi:id="_Qbr6hJ_tEduSF4kFqdqOMg" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_02BbgJ_rEduSF4kFqdqOMg"/> + <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_Qbr6hZ_tEduSF4kFqdqOMg" name="base_Model" ordered="false" lowerBound="1"> + <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/2.1.0/UML#//Model"/> + </eStructuralFeatures> + </eClassifiers> + <eClassifiers xmi:type="ecore:EClass" xmi:id="_Qbr6hp_tEduSF4kFqdqOMg" name="Schema"> + <eAnnotations xmi:id="_Qbr6h5_tEduSF4kFqdqOMg" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_4Z2uoJ_rEduSF4kFqdqOMg"/> + <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_Qbr6iJ_tEduSF4kFqdqOMg" name="base_Package" ordered="false" lowerBound="1"> + <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/2.1.0/UML#//Package"/> + </eStructuralFeatures> + </eClassifiers> + <eClassifiers xmi:type="ecore:EClass" xmi:id="_Qbr6iZ_tEduSF4kFqdqOMg" name="Table"> + <eAnnotations xmi:id="_Qbr6ip_tEduSF4kFqdqOMg" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_45JSsJ_rEduSF4kFqdqOMg"/> + <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_Qbr6i5_tEduSF4kFqdqOMg" name="base_Class" ordered="false" lowerBound="1"> + <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/2.1.0/UML#//Class"/> + </eStructuralFeatures> + </eClassifiers> + <eClassifiers xmi:type="ecore:EClass" xmi:id="_Qbr6jJ_tEduSF4kFqdqOMg" name="Column"> + <eAnnotations xmi:id="_Qbr6jZ_tEduSF4kFqdqOMg" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_5ELeAJ_rEduSF4kFqdqOMg"/> + <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_Qbr6jp_tEduSF4kFqdqOMg" name="base_Property" ordered="false" lowerBound="1"> + <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/2.1.0/UML#//Property"/> + </eStructuralFeatures> + </eClassifiers> + </contents> + </eAnnotations> + <elementImport xmi:id="_Tmdp4J_sEduSF4kFqdqOMg"> + <importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Package"/> + </elementImport> + <elementImport xmi:id="_Tmdp4Z_sEduSF4kFqdqOMg"> + <importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Model"/> + </elementImport> + <elementImport xmi:id="_Tmdp4p_sEduSF4kFqdqOMg"> + <importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/> + </elementImport> + <elementImport xmi:id="_Tmdp45_sEduSF4kFqdqOMg"> + <importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Property"/> + </elementImport> + <packagedElement xmi:type="uml:Stereotype" xmi:id="_02BbgJ_rEduSF4kFqdqOMg" name="Database"> + <ownedAttribute xmi:id="_Y5BIop_sEduSF4kFqdqOMg" name="base_Model" association="_Y5BIoJ_sEduSF4kFqdqOMg"> + <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Model"/> + </ownedAttribute> + </packagedElement> + <packagedElement xmi:type="uml:Stereotype" xmi:id="_4Z2uoJ_rEduSF4kFqdqOMg" name="Schema"> + <ownedAttribute xmi:id="_akcvsp_sEduSF4kFqdqOMg" name="base_Package" association="_akcvsJ_sEduSF4kFqdqOMg"> + <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Package"/> + </ownedAttribute> + </packagedElement> + <packagedElement xmi:type="uml:Stereotype" xmi:id="_45JSsJ_rEduSF4kFqdqOMg" name="Table"> + <ownedAttribute xmi:id="_b7648p_sEduSF4kFqdqOMg" name="base_Class" association="_b7648J_sEduSF4kFqdqOMg"> + <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/> + </ownedAttribute> + </packagedElement> + <packagedElement xmi:type="uml:Stereotype" xmi:id="_5ELeAJ_rEduSF4kFqdqOMg" name="Column"> + <ownedAttribute xmi:id="_dWhOsp_sEduSF4kFqdqOMg" name="base_Property" association="_dWhOsJ_sEduSF4kFqdqOMg"> + <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Property"/> + </ownedAttribute> + <ownedAttribute xmi:id="_DhKOQlxtEdy9oP823wGjgw" name="isPrimaryKey"> + <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_Kmul8FxxEdyEkfVS2wxhpg"/> + <defaultValue xmi:type="uml:LiteralBoolean" xmi:id="_PxO78FxxEdyEkfVS2wxhpg"/> + </ownedAttribute> + </packagedElement> + <packagedElement xmi:type="uml:Extension" xmi:id="_Y5BIoJ_sEduSF4kFqdqOMg" name="Model_Database" memberEnd="_Y5BIoZ_sEduSF4kFqdqOMg _Y5BIop_sEduSF4kFqdqOMg"> + <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_Y5BIoZ_sEduSF4kFqdqOMg" name="extension_Database" type="_02BbgJ_rEduSF4kFqdqOMg" aggregation="composite" association="_Y5BIoJ_sEduSF4kFqdqOMg"/> + </packagedElement> + <packagedElement xmi:type="uml:Extension" xmi:id="_akcvsJ_sEduSF4kFqdqOMg" name="Package_Schema" memberEnd="_akcvsZ_sEduSF4kFqdqOMg _akcvsp_sEduSF4kFqdqOMg"> + <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_akcvsZ_sEduSF4kFqdqOMg" name="extension_Schema" type="_4Z2uoJ_rEduSF4kFqdqOMg" aggregation="composite" association="_akcvsJ_sEduSF4kFqdqOMg"/> + </packagedElement> + <packagedElement xmi:type="uml:Extension" xmi:id="_b7648J_sEduSF4kFqdqOMg" name="Class_Table" memberEnd="_b7648Z_sEduSF4kFqdqOMg _b7648p_sEduSF4kFqdqOMg"> + <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_b7648Z_sEduSF4kFqdqOMg" name="extension_Table" type="_45JSsJ_rEduSF4kFqdqOMg" aggregation="composite" association="_b7648J_sEduSF4kFqdqOMg"/> + </packagedElement> + <packagedElement xmi:type="uml:Extension" xmi:id="_dWhOsJ_sEduSF4kFqdqOMg" name="Property_Column" memberEnd="_dWhOsZ_sEduSF4kFqdqOMg _dWhOsp_sEduSF4kFqdqOMg"> + <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_dWhOsZ_sEduSF4kFqdqOMg" name="extension_Column" type="_5ELeAJ_rEduSF4kFqdqOMg" aggregation="composite" association="_dWhOsJ_sEduSF4kFqdqOMg"/> + </packagedElement> +</uml:Profile> diff --git a/tests/org.eclipse.m2m.atl.tests/data/expected/Relational2UML/sample-Relational.uml b/tests/org.eclipse.m2m.atl.tests/data/expected/Relational2UML/sample-Relational.uml new file mode 100644 index 00000000..53d64127 --- /dev/null +++ b/tests/org.eclipse.m2m.atl.tests/data/expected/Relational2UML/sample-Relational.uml @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<xmi:XMI xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:relational="http:///schemas/relational/_1xjRYFxxEdy9ZeGhUWzsNw/1" xmlns:uml="http://www.eclipse.org/uml2/2.1.0/UML" xsi:schemaLocation="http:///schemas/relational/_1xjRYFxxEdy9ZeGhUWzsNw/1 relational.uml#_1xsbUFxxEdy9ZeGhUWzsNw"> + <uml:Model xmi:id="_iYWNBd_DEdyvBP-bKlL6Yw" name="sample_database"> + <packagedElement xmi:type="uml:Package" xmi:id="_iYWNCt_DEdyvBP-bKlL6Yw" name="sample_schema"> + <packagedElement xmi:type="uml:Class" xmi:id="_iYWNCN_DEdyvBP-bKlL6Yw" name="Table1"> + <ownedAttribute xmi:id="_iYWNAN_DEdyvBP-bKlL6Yw" name="column1"/> + <ownedAttribute xmi:id="_iYWNAd_DEdyvBP-bKlL6Yw" name="column2"/> + <ownedAttribute xmi:id="_iYWNAt_DEdyvBP-bKlL6Yw" name="column3"/> + </packagedElement> + <packagedElement xmi:type="uml:Class" xmi:id="_iYWNCd_DEdyvBP-bKlL6Yw" name="Table2"> + <ownedAttribute xmi:id="_iYWNA9_DEdyvBP-bKlL6Yw" name="column1"/> + <ownedAttribute xmi:id="_iYWNBN_DEdyvBP-bKlL6Yw" name="column2"/> + </packagedElement> + </packagedElement> + <packagedElement xmi:type="uml:PrimitiveType" xmi:id="_iYWNBt_DEdyvBP-bKlL6Yw" name="Integer"/> + <packagedElement xmi:type="uml:PrimitiveType" xmi:id="_iYWNB9_DEdyvBP-bKlL6Yw" name="String"/> + <profileApplication xmi:id="_iYWNC9_DEdyvBP-bKlL6Yw"> + <eAnnotations xmi:id="_iYWNDN_DEdyvBP-bKlL6Yw" source="http://www.eclipse.org/uml2/2.0.0/UML"> + <references xmi:type="ecore:EPackage" href="relational.uml#_1xsbUFxxEdy9ZeGhUWzsNw"/> + </eAnnotations> + <appliedProfile href="relational.uml#_nzsm8J_mEduSF4kFqdqOMg"/> + </profileApplication> + </uml:Model> + <relational:Column xmi:id="_iYWNDd_DEdyvBP-bKlL6Yw" base_Property="_iYWNAN_DEdyvBP-bKlL6Yw"/> + <relational:Schema xmi:id="_iYWNDt_DEdyvBP-bKlL6Yw" base_Package="_iYWNCt_DEdyvBP-bKlL6Yw"/> + <relational:Table xmi:id="_iYWND9_DEdyvBP-bKlL6Yw" base_Class="_iYWNCd_DEdyvBP-bKlL6Yw"/> + <relational:Table xmi:id="_iYWNEN_DEdyvBP-bKlL6Yw" base_Class="_iYWNCN_DEdyvBP-bKlL6Yw"/> + <relational:Database xmi:id="_iYWNEd_DEdyvBP-bKlL6Yw" base_Model="_iYWNBd_DEdyvBP-bKlL6Yw"/> + <relational:Column xmi:id="_iYWNEt_DEdyvBP-bKlL6Yw" base_Property="_iYWNBN_DEdyvBP-bKlL6Yw"/> + <relational:Column xmi:id="_iYWNE9_DEdyvBP-bKlL6Yw" base_Property="_iYWNA9_DEdyvBP-bKlL6Yw"/> + <relational:Column xmi:id="_iYWNFN_DEdyvBP-bKlL6Yw" base_Property="_iYWNAt_DEdyvBP-bKlL6Yw"/> + <relational:Column xmi:id="_iYWNFd_DEdyvBP-bKlL6Yw" base_Property="_iYWNAd_DEdyvBP-bKlL6Yw"/> +</xmi:XMI> |