Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL]xmi:id preservation for UML2 transformation?
[ATL]xmi:id preservation for UML2 transformation? [message #75258] Thu, 21 February 2008 19:16 Go to next message
Eclipse UserFriend
Originally posted by: zhuj.in.tum.de

Hi everyone,

If I'm transforming a UML2 Model to another UML2 Model (actually doing
some changes to the same source model, like add/delete attributes, and
generate some operations, and then save the model with another name), how
can I preserve the xmi:id of the old elements of the source UML2 Model?
Without xmi:id-preservation, references from other models will be broken.

I read the following:
"a model handler is a library providing primitives for handling models:
* Creating new models,
* Loading and saving models,
* Adding and deleting elements,
* Reading and writing element properties. "

So I guess maybe this should be solved with a new Model Handler? Does the
UML2 Model Handler provides this functionality?

Another mean to achieve this, I think, could be using "refining mode",
well I just didn't figure out how to configure this "refining mode" for a
UML2 model, can anyone point me to an example of "refining a UML2 model"?

thx indeed.
Re: [ATL]xmi:id preservation for UML2 transformation? [message #75309 is a reply to message #75258] Sat, 23 February 2008 14:52 Go to previous messageGo to next message
Frédéric Jouault is currently offline Frédéric JouaultFriend
Messages: 572
Registered: July 2009
Senior Member
Hello,

You are correct in assuming that refining mode would do what you want
wrt. XMI ids.
It is not fully functionnal in ATL 2006 just yet, but we are working on
it. Stay tuned.

In the mean time, you may try to use the __xmiID__ virtual property.
Note that you have to modify the set(...) method of UMLModelElement if
you want to be able to set XMI ids, not just read them.

Information about model handlers can be found on the wiki:
http://wiki.eclipse.org/ATL_Model_Handlers


Regards,

Frédéric Jouault

Jinhui a écrit :
> Hi everyone,
> If I'm transforming a UML2 Model to another UML2 Model (actually doing
> some changes to the same source model, like add/delete attributes, and
> generate some operations, and then save the model with another name),
> how can I preserve the xmi:id of the old elements of the source UML2
> Model? Without xmi:id-preservation, references from other models will be
> broken.
>
> I read the following: "a model handler is a library providing primitives
> for handling models:
> * Creating new models,
> * Loading and saving models,
> * Adding and deleting elements,
> * Reading and writing element properties. "
>
> So I guess maybe this should be solved with a new Model Handler? Does
> the UML2 Model Handler provides this functionality?
> Another mean to achieve this, I think, could be using "refining mode",
> well I just didn't figure out how to configure this "refining mode" for
> a UML2 model, can anyone point me to an example of "refining a UML2 model"?
>
> thx indeed.
>
Re: [ATL]xmi:id preservation for UML2 transformation? [message #75388 is a reply to message #75309] Tue, 26 February 2008 19:45 Go to previous message
Eclipse UserFriend
Originally posted by: zhuj.in.tum.de

Hi Frédéric,

> In the mean time, you may try to use the __xmiID__ virtual property.
> Note that you have to modify the set(...) method of UMLModelElement if
> you want to be able to set XMI ids, not just read them.

Could you please give me more information on how to use this "__xmiID__"
virtual property?

I saw your previous message about this issue.
( http://dev.eclipse.org/newslists/news.eclipse.modeling.m2m/m sg01953.html)
you mentioned that "refining mode is the right way, but only in ATL 2004"
and You mentioned "__xmiID__ is one possible solution. However setting of
__xmiID__ is only supported in the EMF driver for the moment. Not for the
UML2 driver."

I guess this suits my situation well, cause I am using RSA7/Eclipse3.2
with ATL(2007 Feb 16), which doesn't have the UML2 driver.



I really appreciate your help. Thanks indeed.

Jinhui
Previous Topic:ATL, AM3 version
Next Topic:[Announce] Eclipse/OMG Symposium at EclipseCon 2008
Goto Forum:
  


Current Time: Wed Apr 24 15:47:24 GMT 2024

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

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

Back to the top