uml:Association disappears in ecore model generated from uml2 [message #624120] |
Mon, 30 July 2007 19:02 |
Eclipse User |
|
|
|
Originally posted by: i_j_e_x_a.yahoo.co.jp
Hi.
I have just started writing a simple UML model
(by using TOPCASED TOOLS) and convert it to
ecore. A problem I met is that a UML element
of Association is not converted to an EMF element
but it just disappears.
The model is really simple. There's two classes
(say Class1 and Class2) and they have an association
between them. (*)
In order to convert it to ecore model, I used the
eclipse (3.3) wizard to create a new EMF model from UML.
In the generated .ecore file (**), there's no element
(I expect EReference obviously) which is converted
from the uml:Association.
I guess uml:Association should be converted to
ecore:EReference in the procedure and there was
something wrong somewhere.
Please let me know how to do correctly.
Thanks in advance.
(*) The association is serialized like the following.
(The "xmi:id"s are converted by hand for this message.)
<?xml version="1.0" encoding="UTF-8"?>
<uml:Model xmi:version="2.1"
xmlns:xmi="http://schema.omg.org/spec/XMI/2.1"
xmlns:uml="http://www.eclipse.org/uml2/2.1.0/UML"
xmi:id="_A" name="Test02_model">
<packagedElement xmi:type="uml:Package" xmi:id="_B" name="Test02_pkg">
<packagedElement xmi:type="uml:Class" xmi:id="_C" name="Class1"/>
<packagedElement xmi:type="uml:Class" xmi:id="_D" name="Class2"/>
<packagedElement xmi:type="uml:Association" xmi:id="_E"
name="Class1-Class2" memberEnd="_F _G" navigableOwnedEnd="_F _G">
<ownedEnd xmi:id="_F" name="source" type="_C" isUnique="false"
association="_E">
<upperValue xmi:type="uml:LiteralUnlimitedNatural"
xmi:id="_H" value="1"/>
<lowerValue xmi:type="uml:LiteralInteger"
xmi:id="_I" value="1"/>
</ownedEnd>
<ownedEnd xmi:id="_G" name="target" type="_D"
isUnique="false" association="_E">
<upperValue xmi:type="uml:LiteralUnlimitedNatural"
xmi:id="_J" value="1"/>
<lowerValue xmi:type="uml:LiteralInteger"
xmi:id="_K" value="1"/>
</ownedEnd>
</packagedElement>
</packagedElement>
</uml:Model>
(**) Here's the generated .ecore file.
<?xml version="1.0" encoding="UTF-8"?>
<ecore:EPackage xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
name="Test02_model"
nsURI="http:///Test02_model.ecore" nsPrefix="Test02_model">
<eSubpackages name="Test02_pkg"
nsURI="http:///Test02_model/Test02_pkg.ecore"
nsPrefix="Test02_model.Test02_pkg">
<eClassifiers xsi:type="ecore:EClass" name="Class1"/>
<eClassifiers xsi:type="ecore:EClass" name="Class2"/>
</eSubpackages>
</ecore:EPackage>
|
|
|
Powered by
FUDForum. Page generated in 0.02765 seconds