Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL]Several relations between classes
[ATL]Several relations between classes [message #547166] Thu, 15 July 2010 18:59 Go to next message
Miranda is currently offline MirandaFriend
Messages: 25
Registered: June 2010
Junior Member
Hello!
I am new to Atl. My problem is that I have 2 classes and 2 relations between them.
Class A->Class B (relation AB, multiplicity 1)
Class A->ClassB(relation AB2, multiplicity 2)

I need to trnasform it to:
Class A->ClassAB->ClassB(multiplicity between ClassAB and Class A equals 1)
ClassA->ClassAB2->ClassB(multiplicity between ClassAB2 and ClassA equals 2)

How it is possible to implement in ATL?
Thanks for any help!
Re: [ATL]Several relations between classes [message #547264 is a reply to message #547166] Fri, 16 July 2010 07:20 Go to previous message
Vincent MAHE is currently offline Vincent MAHEFriend
Messages: 129
Registered: July 2009
Senior Member
Le 15/07/2010 20:59, Miranda a écrit :
> Hello!
> I am new to Atl. My problem is that I have 2 classes and 2 relations
> between them.
> Class A->Class B (relation AB, multiplicity 1)
> Class A->ClassB(relation AB2, multiplicity 2)
>
> I need to trnasform it to:
> Class A->ClassAB->ClassB(multiplicity between ClassAB and Class A equals 1)
> ClassA->ClassAB2->ClassB(multiplicity between ClassAB2 and ClassA equals 2)
>
> How it is possible to implement in ATL? Thanks for any help!

You may use a collect on the relation (which is a collection of Bs) and
use a called rule to generate corresponding class AB2
( http://wiki.eclipse.org/ATL/User_Guide_-_The_ATL_Language#Ca lled_Rules).

--
Cordialement

Vincent MAHÉ

Ingénieur Expert - Projet IDM++ - Équipe AtlanMod
École des Mines de Nantes
La Chantrerie - 4, rue Alfred Kastler
B.P. 20722 - F-44307 NANTES Cedex 3
Tel: (33)2 51 85 81 00
Previous Topic:[QVTo] Referencing types of super-model (model inheritance)
Next Topic:[Xtend] Couldn't find extension 'transform(null::Specifications)'
Goto Forum:
  


Current Time: Fri Apr 19 04:06:52 GMT 2024

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

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

Back to the top