Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » Using ATL and UML2
Using ATL and UML2 [message #21773] Wed, 07 March 2007 16:06 Go to next message
Eclipse UserFriend
Originally posted by: kehrer.hdm-stuttgart.de

I want to transform a UML2 model into another UML2 model.

This is my serialized input model:

<?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.0.0/UML"
xmi:id="_2NzG8LYJEdutbczTT_VtmA" name="Model" viewpoint="">
<packagedElement xmi:type="uml:Class" xmi:id="_V2TjgMy4EdugfsSOij4z8Q"
name="A"/>
<packagedElement xmi:type="uml:Class" xmi:id="_WcTMgMy4EdugfsSOij4z8Q"
name="B"/>
</uml:Model>


This is my simple ATL transformation file:

module UML2toUML2;
create OUT : UML from IN : UML;

rule Model {
from
i : UML!Model
to
o : UML!Model (
name <- i.name
)
}

rule Class {
from
i : UML!Class
to
o : UML!Class(
name <- i.name,
package <- i.package
)
}


And there is my serialized Output:

<?xml version="1.0" encoding="ISO-8859-1"?>
<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:uml="http://www.eclipse.org/uml2/2.0.0/UML">
<uml:Model name="Model">
<packagedElement xsi:type="uml:Class"
href=" /MultiplicityTransformation/UmlTracerTest/ClassDiagramOut.um l#/1 "/>
<packagedElement xsi:type="uml:Class"
href=" /MultiplicityTransformation/UmlTracerTest/ClassDiagramOut.um l#/2 "/>
</uml:Model>
<uml:Class name="A"/>
<uml:Class name="B"/>
</xmi:XMI>


What's the problem?
I think it is not a problem of the transformation specification in the ATL
file, but a configuration problem.
Does anyone have experiences in using ATL with UML2 or have a simple example
that works?
I'd be very thankful for any help...

regards
Timo
[ATL] Re: Using ATL and UML2 [message #22045 is a reply to message #21773] Wed, 07 March 2007 21:17 Go to previous message
Eclipse UserFriend
Originally posted by: freddy.allilaire.univ-nantes.fr

Hi Timo,

I think the following thread (from the old ATL mailing list) can help
you:
http://www.sciences.univ-nantes.fr/lina/atl/www/atl_discussi on_archive/0704.html

The problem seems similar to yours.

Hope this help.

Regards,
Freddy.

Timo Kehrer a écrit :
> I want to transform a UML2 model into another UML2 model.
>
> This is my serialized input model:
>
> <?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.0.0/UML"
> xmi:id="_2NzG8LYJEdutbczTT_VtmA" name="Model" viewpoint="">
> <packagedElement xmi:type="uml:Class" xmi:id="_V2TjgMy4EdugfsSOij4z8Q"
> name="A"/>
> <packagedElement xmi:type="uml:Class" xmi:id="_WcTMgMy4EdugfsSOij4z8Q"
> name="B"/>
> </uml:Model>
>
>
> This is my simple ATL transformation file:
>
> module UML2toUML2;
> create OUT : UML from IN : UML;
>
> rule Model {
> from
> i : UML!Model
> to
> o : UML!Model (
> name <- i.name
> )
> }
>
> rule Class {
> from
> i : UML!Class
> to
> o : UML!Class(
> name <- i.name,
> package <- i.package
> )
> }
>
>
> And there is my serialized Output:
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:uml="http://www.eclipse.org/uml2/2.0.0/UML">
> <uml:Model name="Model">
> <packagedElement xsi:type="uml:Class"
> href=" /MultiplicityTransformation/UmlTracerTest/ClassDiagramOut.um l#/1 "/>
> <packagedElement xsi:type="uml:Class"
> href=" /MultiplicityTransformation/UmlTracerTest/ClassDiagramOut.um l#/2 "/>
> </uml:Model>
> <uml:Class name="A"/>
> <uml:Class name="B"/>
> </xmi:XMI>
>
>
> What's the problem?
> I think it is not a problem of the transformation specification in the ATL
> file, but a configuration problem.
> Does anyone have experiences in using ATL with UML2 or have a simple example
> that works?
> I'd be very thankful for any help...
>
> regards
> Timo
>
>
Previous Topic:[ATL] Graphical development of ATL transformations
Next Topic:[ATL] transforming UML to EJB
Goto Forum:
  


Current Time: Thu Apr 25 04:54:32 GMT 2024

Powered by FUDForum. Page generated in 0.02795 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top