Skip to main content



      Home
Home » Archived » M2M (model-to-model transformation) » how to model association
how to model association [message #16437] Tue, 13 February 2007 05:30 Go to next message
Eclipse UserFriend
Originally posted by: francopinchetti.yahoo.it

Hello everybody,

I've searched the net looking for documentation on how to build model for
ATL transformation, but I haven't found anything except the ATL starter
guide where this simple model is presented:



<?xml version="1.0" encoding="ISO-8859-1"?>

<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
xmlns="Author">

<Author name="David" surname="Touzet"/>

<Author name="Freddy" surname="Allilaire"/>

</xmi:XMI>



I've written this simple metamodel in KM3:



package PrimitiveTypes {

datatype String;

}



package Author {



class Author {

reference authorOf[1-*] : Book oppositeOf writtenBy;

attribute name : String;

attribute surname : String;

}



class Book {

reference writtenBy[1-*] : Author oppositeOf authorOf;

attribute title : String;

}



}



How can I model the association between an author and the book he has
written? In other words, what I have to add to the model presented before?



Thank you very much

Franco
Re:[ATL] how to model association [message #16455 is a reply to message #16437] Tue, 13 February 2007 16:40 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: freddy.allilaire.univ-nantes.fr

Hi Franco,

The following FAQ entry
( http://wiki.eclipse.org/index.php/ATL_FAQ#I_can_use_KM3_to_c reate_metamodels.2C_but_what_about_models.3F)
may give you some clues concerning model creation.

Regards,
Freddy.

Franco a écrit :
> Hello everybody,
>
> I've searched the net looking for documentation on how to build model for
> ATL transformation, but I haven't found anything except the ATL starter
> guide where this simple model is presented:
>
>
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
>
> <xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
> xmlns="Author">
>
> <Author name="David" surname="Touzet"/>
>
> <Author name="Freddy" surname="Allilaire"/>
>
> </xmi:XMI>
>
>
>
> I've written this simple metamodel in KM3:
>
>
>
> package PrimitiveTypes {
>
> datatype String;
>
> }
>
>
>
> package Author {
>
>
>
> class Author {
>
> reference authorOf[1-*] : Book oppositeOf writtenBy;
>
> attribute name : String;
>
> attribute surname : String;
>
> }
>
>
>
> class Book {
>
> reference writtenBy[1-*] : Author oppositeOf authorOf;
>
> attribute title : String;
>
> }
>
>
>
> }
>
>
>
> How can I model the association between an author and the book he has
> written? In other words, what I have to add to the model presented before?
>
>
>
> Thank you very much
>
> Franco
>
>
>
Re: [ATL] how to model association [message #16474 is a reply to message #16437] Wed, 14 February 2007 04:23 Go to previous message
Eclipse UserFriend
Hi Franco,

You may also want to have a look a
www.eclipse.org/gmt/epsilon/doc/Exeed.pdf for an overview/discussion of
techniques you can use for editing EMF models and a presentation of an
extended EMF reflective editor (Exeed).

Cheers,
Dimitrios

Franco wrote:
> Hello everybody,
>
> I've searched the net looking for documentation on how to build model for
> ATL transformation, but I haven't found anything except the ATL starter
> guide where this simple model is presented:
>
>
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
>
> <xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
> xmlns="Author">
>
> <Author name="David" surname="Touzet"/>
>
> <Author name="Freddy" surname="Allilaire"/>
>
> </xmi:XMI>
>
>
>
> I've written this simple metamodel in KM3:
>
>
>
> package PrimitiveTypes {
>
> datatype String;
>
> }
>
>
>
> package Author {
>
>
>
> class Author {
>
> reference authorOf[1-*] : Book oppositeOf writtenBy;
>
> attribute name : String;
>
> attribute surname : String;
>
> }
>
>
>
> class Book {
>
> reference writtenBy[1-*] : Author oppositeOf authorOf;
>
> attribute title : String;
>
> }
>
>
>
> }
>
>
>
> How can I model the association between an author and the book he has
> written? In other words, what I have to add to the model presented before?
>
>
>
> Thank you very much
>
> Franco
>
>
>
Previous Topic:[ATL] EBNF Injection problem in standalone Java application
Next Topic:[ATL] New ATL use case: Software Quality Control Tools Interoperability (Bugzilla, Mantis, Excel)
Goto Forum:
  


Current Time: Mon Jul 14 13:34:11 EDT 2025

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

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

Back to the top