how to model association [message #16437] |
Tue, 13 February 2007 05:30  |
Eclipse User |
|
|
|
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 #16474 is a reply to message #16437] |
Wed, 14 February 2007 04:23  |
Eclipse User |
|
|
|
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
>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.04066 seconds