Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » xmi:XMI root node to uml:Package root node
xmi:XMI root node to uml:Package root node [message #916423] Wed, 19 September 2012 02:06 Go to next message
Yasser Khan is currently offline Yasser Khan
Messages: 18
Registered: October 2011
Junior Member
I need to write a very simple transformation (last phase of a huge one), just need to transform the XMI root node to uml:Package root node and copy rest of the elements as they are. How do I proceed to do this?

rule XmoToUml {
from s: ???????
to t: UML!Package (
packagedElement <- ?????????
)
}

Thank you
Re: xmi:XMI root node to uml:Package root node [message #916614 is a reply to message #916423] Wed, 19 September 2012 08:26 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo Bruneliere
Messages: 604
Registered: July 2009
Senior Member
Hello,

XMI is just a serialization format for your models, what you have to consider when defining your transformation are the source and target metamodels.
In your case, UML seems to be the target metamodel.
You have to take a look to your source metamodel to identify the actual type of the root element in your input model.

Best regards,

Hugo


------------------------------------------
Hugo Bruneliere - R&D Engineer
AtlanMod research team (Inria, EMN & LINA)
Ecole des Mines de Nantes
Nantes - France
------------------------------------------
Re: xmi:XMI root node to uml:Package root node [message #916853 is a reply to message #916614] Wed, 19 September 2012 14:55 Go to previous message
Yasser Khan is currently offline Yasser Khan
Messages: 18
Registered: October 2011
Junior Member
Dear Hugo,

The source model and the target models are the same, which is UML.
The root element in the source model in UML!Package. Unfortunately, I am not able to produce UML!Package root element in the target model. Model elements were being placed outside the root node by my transformation. Hence the target model contains xmi:XMI root node. This forces me to write a second transformation that would convert xmi:XMI root node to UML!Package root node.
You further guidance will be appreciated.
Previous Topic:[ATL] Help with lazy rule
Next Topic:[ATL] Not transformed all code
Goto Forum:
  


Current Time: Mon Sep 22 14:23:20 GMT 2014

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

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