Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Deep Cloning Source Elements
Deep Cloning Source Elements [message #519682] Tue, 09 March 2010 16:58 Go to next message
Andy Ed is currently offline Andy EdFriend
Messages: 64
Registered: December 2009
Member
I wish to use the 'hybrid' approach ETL for M2M transformation. My source and target meta-models are similar, and for much of the translation I could deep clone the source elements for use in the target. Is there a feature available that allows me to do this easily, without manually constructing a duplicate?
Re: Deep Cloning Source Elements [message #519693 is a reply to message #519682] Tue, 09 March 2010 12:22 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Andy,

You can right-click on your .ecore file and select Epsilon->Generate
ETL. This will generate a copy ETL transformation which you can then
extend/modify.

Cheers,
Dimitris

Andy wrote:
> I wish to use the 'hybrid' approach ETL for M2M transformation. My
> source and target meta-models are similar, and for much of the
> translation I could deep clone the source elements for use in the
> target. Is there a feature available that allows me to do this easily,
> without manually constructing a duplicate?
Re: Deep Cloning Source Elements [message #519852 is a reply to message #519693] Wed, 10 March 2010 09:12 Go to previous messageGo to next message
Andy Ed is currently offline Andy EdFriend
Messages: 64
Registered: December 2009
Member
That's very useful, thanks.
Re: Deep Cloning Source Elements [message #519875 is a reply to message #519852] Wed, 10 March 2010 10:23 Go to previous messageGo to next message
Andy Ed is currently offline Andy EdFriend
Messages: 64
Registered: December 2009
Member
Hi Dimitrios,

further to my recent post; it would appear that the transformation generated does not create deep clones. I'll explain why I would find deep cloning useful. In my transformation a source node (with its sub-tree) is used in more than one node in the target. The target nodes that use the source node require a copy of the original source node (and its sub-tree). Therefore I wish to have deep clones of a particular source node to insert into various target nodes.

Cheers, Andy
Re: Deep Cloning Source Elements [message #519878 is a reply to message #519875] Wed, 10 March 2010 10:31 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Andy,

I see. In this case you'll need to write a custom EOL operation that
clones the elements of interest. If you could send me (dskolovos _ gmail
_ com) your source and target metamodels and a short description of what
you're trying to achieve I may be able to propose other workarounds too.

Cheers,
Dimitris

Andy wrote:
> Hi Dimitrios,
>
> further to my recent post; it would appear that the transformation
> generated does not create deep clones. I'll explain why I would find
> deep cloning useful. In my transformation a source node (with its
> sub-tree) is used in more than one node in the target. The target nodes
> that use the source node require a copy of the original source node (and
> its sub-tree). Therefore I wish to have deep clones of a particular
> source node to insert into various target nodes.
> Cheers, Andy


--
Spread the word: http://www.eclipse.org/gmt/epsilon/spreadtheword
Follow Epsilon on Twitter: http://twitter.com/epsilonews
Re: Deep Cloning Source Elements [message #587336 is a reply to message #519875] Wed, 10 March 2010 10:31 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Andy,

I see. In this case you'll need to write a custom EOL operation that
clones the elements of interest. If you could send me (dskolovos _ gmail
_ com) your source and target metamodels and a short description of what
you're trying to achieve I may be able to propose other workarounds too.

Cheers,
Dimitris

Andy wrote:
> Hi Dimitrios,
>
> further to my recent post; it would appear that the transformation
> generated does not create deep clones. I'll explain why I would find
> deep cloning useful. In my transformation a source node (with its
> sub-tree) is used in more than one node in the target. The target nodes
> that use the source node require a copy of the original source node (and
> its sub-tree). Therefore I wish to have deep clones of a particular
> source node to insert into various target nodes.
> Cheers, Andy


--
Spread the word: http://www.eclipse.org/gmt/epsilon/spreadtheword
Follow Epsilon on Twitter: http://twitter.com/epsilonews
Previous Topic:Deep Cloning Source Elements
Next Topic:samples of inter-model consystency
Goto Forum:
  


Current Time: Thu Mar 28 20:59:15 GMT 2024

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

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

Back to the top