Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] How can I navigate to find a container or parent of a object?
[ATL] How can I navigate to find a container or parent of a object? [message #91558] Tue, 07 October 2008 18:49 Go to next message
Eclipse UserFriend
Originally posted by: guo.mci.sdu.dk

I have two metamodels building in Ecore, and am doing the transformation
using ATL.

How can I navigate to find a container or parent of a object?
For example, in the source metamodel, I have a object called
"Container", it has a sub object called "Child". The relation between
them is aggregation called "getChild", but from the "Child" there has NO
way to get the "Container".

There is another object "ExternalClass", which is associated to the
"Child" object by relation "link".

The question is: How can I get the "Container" from the "ExternalClass"?

By using "ExternalClass.link", I could get the object "Child". How to
get the "Container" next?

Best Regards,
Yu Guo
Re: [ATL] How can I navigate to find a container or parent of a object? [message #91574 is a reply to message #91558] Tue, 07 October 2008 22:33 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: freddy.allilaire.univ-nantes.fr

This is a multi-part message in MIME format.
--------------070402000209010606070401
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Hi Yu Guo,

If there is no reference "child to parent" in your metamodel, you could
use refImmediateComposite() operation. refImmediateComposite() is a
reflective operation that returns the immediate composite (e.g. the
immediate container).

You will find an example here:
http://www.eclipse.org/m2m/atl/basicExamples_Patterns/articl e.php?file=Port/index.html
in the last section.

HTH

Regards,
Freddy.

Yu Guo a
Re: [ATL] How can I navigate to find a container or parent of a object? [message #91930 is a reply to message #91574] Thu, 09 October 2008 19:02 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jbocanegra.uniamazonia.edu.co

Hi Freddy.

Is there some opcion like refImmediateComposite() for QVTO???

Jos
Re: [QVTO] How can I navigate to find a container or parent of a object? [message #92007 is a reply to message #91930] Fri, 10 October 2008 11:08 Go to previous messageGo to next message
Freddy Allilaire is currently offline Freddy AllilaireFriend
Messages: 130
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------020901040301010809090904
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Hi Jos
Re: [ATL] How can I navigate to find a container or parent of a object? [message #92121 is a reply to message #91930] Sun, 12 October 2008 18:15 Go to previous message
Alfons Laarman is currently offline Alfons LaarmanFriend
Messages: 71
Registered: July 2009
Member
Hi Jos
Previous Topic:[QVTO][ATL] expert in models transformation Job
Next Topic:[ATL] Turning off warnings in the ATL console
Goto Forum:
  


Current Time: Sun May 12 14:25:25 GMT 2024

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

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

Back to the top