Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [QVTO] Split a target model in several parts
[QVTO] Split a target model in several parts [message #97213] Thu, 18 December 2008 19:11 Go to next message
Eclipse UserFriend
Originally posted by: jbocanegra.uniamazonia.edu.co

Hi.

I have a model "LayerModel" with 3 elements of type Layer: Layer1, Layer2
and Layer3, and I have a QVTO transformation to obtain a "PackageModel"
with three Packages: Pack1, Pack2 and Pack3.

1. Is it possible transform only 2 elements of source model i.e (Layer2 and
Layer3) , parameterizing the Run configurations dialog?

2. Is it possible to obtain two target models, one for the transformation of
Layer2 and other for the transformation of Layer3 ?

Regards.

Jos
Re: [QVTO] Split a target model in several parts [message #97229 is a reply to message #97213] Thu, 18 December 2008 22:44 Go to previous messageGo to next message
Radomil Dvorak is currently offline Radomil DvorakFriend
Messages: 249
Registered: July 2009
Senior Member
Hi José,

You can certainly have multiple input models and multiple output models.
It just requires definition of corresponding modeltypes and appropriate
transformation signature.

The code snippet bellow shows how to uses multiple input and outputs of
specific
modeltypes.
....

modeltype ECORE uses "http://www.eclipse.org/emf/2002/Ecore";
modeltype UML uses "http://www.eclipse.org/uml2/3.0.0/UML";

transformation Foo(in inModel1 : UML, in inModel2 : UML, out outModel1 :
ECORE, out outModel2 : ECORE);

main() {
-- select specific objects from a given in model parameter
-- and call a mapping to populate a particular out model
inModel2.rootObjects()[Package]->map rootMaping2();
...
}

mapping UML::Package::rootMaping2() : EPackage@outModel2 {
-- decompose into further mapping calls
}


I hope this helps.

Regards,
/Radek



On Thu, 18 Dec 2008 20:11:41 +0100, Jose Bocanegra
<jbocanegra@uniamazonia.edu.co> wrote:

> Hi.
>
> I have a model "LayerModel" with 3 elements of type Layer: Layer1, Layer2
> and Layer3, and I have a QVTO transformation to obtain a "PackageModel"
> with three Packages: Pack1, Pack2 and Pack3.
>
> 1. Is it possible transform only 2 elements of source model i.e (Layer2
> and
> Layer3) , parameterizing the Run configurations dialog?
>
> 2. Is it possible to obtain two target models, one for the
> transformation of
> Layer2 and other for the transformation of Layer3 ?
>
> Regards.
>
> José
>
>
Re: [QVTO] Split a target model in several parts [message #97243 is a reply to message #97229] Fri, 19 December 2008 08:47 Go to previous message
Eclipse UserFriend
Originally posted by: jbocanegra.uniamazonia.edu.co

It is amazing!

Thanks Radek.

"Radek Dvorak" <radek.dvorak@borland.com> escribi
Previous Topic:Flattening a UML model with "refining"
Next Topic:Cannot Load KM3Parser
Goto Forum:
  


Current Time: Fri Apr 26 05:09:24 GMT 2024

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

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

Back to the top