Skip to main content



      Home
Home » Modeling » QVT-OML » Dynamic set of input models
icon5.gif  Dynamic set of input models [message #1370873] Wed, 21 May 2014 01:54 Go to next message
Eclipse UserFriend
Hello,

In operational QVT, can I take a array of in models as an input of my transformation? knowing that every time I run the transformation I want to use different number of input models.

I mean.. to define a transformation, you define your input/output models. In this example I have 2 in models and 1 out model:

transformation xTransformation(in y:featuremodelview, in z:featuremodelview,out target:featuremodelview);


However, in my transformation I want the input to be a set of in models that may vary in size each time I run the transformation. (so, when I run it for the first time I'll take 2 in models .. when I run it for the second time I'll take 3 in models and so on...)

Note: My transformation merges all the input models regardless of how many of them I have.

Thank you very much in advance, I appreciate your help!

[Updated on: Wed, 21 May 2014 01:58] by Moderator

Re: Dynamic set of input models [message #1371188 is a reply to message #1370873] Wed, 21 May 2014 04:56 Go to previous messageGo to next message
Eclipse UserFriend
Hi

No, but it would be nice if a Collection of models could be defined.
Raise an OMG issue: http://www.omg.org/report_issue.htm

The workaround is define a Model-of-Models model so that you can pass
multiple models wrapped as a single model.

Regards

Ed Willink

On 21/05/2014 06:54, Sama Elrawy wrote:
> Hello,
> In operational QVT, can I take a array of in models as an input of my
> transformation? knowing that every time I run the transformation I
> want to use different number of input models.
>
> I mean.. to define a transformation, you define your input/output
> models. In this example I have 2 in models and 1 out model:
>
>
> transformation xTransformation(in y:featuremodelview, in
> z:featuremodelview,out target:featuremodelview);
>
>
> However, in my transformation I want the input to be a set of in
> models that may vary in size each time I run the transformation. (so,
> when I run it for the first time I'll take 2 in models .. when I run
> it for the second time I want to get 3 in models and so on...)
>
>
> Thank you very much in advance, I appreciate your help!
Re: Dynamic set of input models [message #1404311 is a reply to message #1371188] Thu, 31 July 2014 03:41 Go to previous messageGo to next message
Eclipse UserFriend
When running the transformation from the run-transformation menu, indeed you can only select one input resource. By default, with EMF editors you can only create one root in the resource, however, EMF supports multiple roots in one resource. Programmatically you can create multiple roots.

Furthermore, if you run the transformation from java, you get access to the model-extends that are input of the transformation. These model-extends can be filled with multiple models. Then you can input models from multiple resources to the QVTo-transformation.
Re: Dynamic set of input models [message #1419180 is a reply to message #1404311] Mon, 08 September 2014 04:03 Go to previous message
Eclipse UserFriend
I got the idea Mr. Rolf! thank you very much.
Previous Topic:Run exported transformation
Next Topic:Running QVTo in a web-based application
Goto Forum:
  


Current Time: Sun Jun 22 16:17:48 EDT 2025

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

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

Back to the top