Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Amalgam » Is there any way to generate an indefinite number of target models in a qvto m2m transformation?
Is there any way to generate an indefinite number of target models in a qvto m2m transformation? [message #525204] Mon, 24 August 2009 15:45 Go to next message
Toñi Reina is currently offline Toñi ReinaFriend
Messages: 209
Registered: July 2009
Senior Member
Hi all,

my question is related to the mindmap2xhtml (included in the book
Eclipse Modeling Project: A Domain-Specific Language (DSL) Toolkit) or
the Uml2Xhtml example that Sergey has mentioned in his answer to my
previous question
('org.eclipse.m2m/org.eclipse.m2m.qvt.oml/examples/org.eclip se.m2m.qvt.oml.econ2009.tutorial').

In both cases a unique xhtml file is generated that contains all the
mindmap information, in the first example, and all the uml model
information in the second one. But what if I want to generate different
xhtml files, one for each topic, in the first example, and one for
each class in the second one.

In both cases the number of instances of the output metamodel is
variable, because it depends on the number of topics in the first
example, and on the number of classes in the second one. My question is:
is there any way of specifying this in qvto?

Best regards,
Toñi
Re: Is there any way to generate an indefinite number of target models in a qvto m2m transformation? [message #525205 is a reply to message #525204] Mon, 24 August 2009 18:43 Go to previous messageGo to next message
Sergey Boyko is currently offline Sergey BoykoFriend
Messages: 162
Registered: July 2009
Senior Member
Hi Toñi ,

There's no direct way to express arbitrary number of output models in
qvto engine.

Described scenario can be archived like follows:
- using Ant script. First invocation of qvto engine would create output
model with root objects each for separate entity. Then this model can be
processed with Xpand template to save each entity to physical file.
- using Java black-box library with qvto script. Such library can take
same model produced by qvto script (with arbitrary number of root
objects) and then save each object as system file.

Regards,
Sergey

Toñi Reina Quintero wrote:
> Hi all,
>
> my question is related to the mindmap2xhtml (included in the book
> Eclipse Modeling Project: A Domain-Specific Language (DSL) Toolkit) or
> the Uml2Xhtml example that Sergey has mentioned in his answer to my
> previous question
> ('org.eclipse.m2m/org.eclipse.m2m.qvt.oml/examples/org.eclip se.m2m.qvt.oml.econ2009.tutorial').
>
>
> In both cases a unique xhtml file is generated that contains all the
> mindmap information, in the first example, and all the uml model
> information in the second one. But what if I want to generate different
> xhtml files, one for each topic, in the first example, and one for each
> class in the second one.
>
> In both cases the number of instances of the output metamodel is
> variable, because it depends on the number of topics in the first
> example, and on the number of classes in the second one. My question is:
> is there any way of specifying this in qvto?
>
> Best regards,
> Toñi
Re: Is there any way to generate an indefinite number of target models in a qvto m2m transformation? [message #525206 is a reply to message #525205] Mon, 24 August 2009 20:30 Go to previous messageGo to next message
Toñi Reina is currently offline Toñi ReinaFriend
Messages: 209
Registered: July 2009
Senior Member
As far as I understood, they are two alternative ways of solving the
problem, aren't they?

Sergey Boyko escribió:
> Hi Toñi ,
>
> There's no direct way to express arbitrary number of output models in
> qvto engine.
>
> Described scenario can be archived like follows:
> - using Ant script. First invocation of qvto engine would create output
> model with root objects each for separate entity. Then this model can be
> processed with Xpand template to save each entity to physical file.
> - using Java black-box library with qvto script. Such library can take
> same model produced by qvto script (with arbitrary number of root
> objects) and then save each object as system file.
>
> Regards,
> Sergey
>
> Toñi Reina Quintero wrote:
>> Hi all,
>>
>> my question is related to the mindmap2xhtml (included in the book
>> Eclipse Modeling Project: A Domain-Specific Language (DSL) Toolkit) or
>> the Uml2Xhtml example that Sergey has mentioned in his answer to my
>> previous question
>> ('org.eclipse.m2m/org.eclipse.m2m.qvt.oml/examples/org.eclip se.m2m.qvt.oml.econ2009.tutorial').
>>
>>
>> In both cases a unique xhtml file is generated that contains all the
>> mindmap information, in the first example, and all the uml model
>> information in the second one. But what if I want to generate
>> different xhtml files, one for each topic, in the first example, and
>> one for each class in the second one.
>>
>> In both cases the number of instances of the output metamodel is
>> variable, because it depends on the number of topics in the first
>> example, and on the number of classes in the second one. My question
>> is: is there any way of specifying this in qvto?
>>
>> Best regards,
>> Toñi
Re: Is there any way to generate an indefinite number of target models in a qvto m2m transformation? [message #525208 is a reply to message #525206] Tue, 25 August 2009 13:37 Go to previous message
Sergey Boyko is currently offline Sergey BoykoFriend
Messages: 162
Registered: July 2009
Senior Member
Hi Toñi ,

Yes, I've suggested two ways:
1. Coupling with Xpand by means of Ant script.
2. Providing black-box library for qvto to achieve desired behavior.

However it is not improbable that there are some other solutions for
your scenario ;)

Regards,
Sergey

Toñi Reina Quintero wrote:
>
> As far as I understood, they are two alternative ways of solving the
> problem, aren't they?
>
> Sergey Boyko escribió:
>> Hi Toñi ,
>>
>> There's no direct way to express arbitrary number of output models in
>> qvto engine.
>>
>> Described scenario can be archived like follows:
>> - using Ant script. First invocation of qvto engine would create
>> output model with root objects each for separate entity. Then this
>> model can be processed with Xpand template to save each entity to
>> physical file.
>> - using Java black-box library with qvto script. Such library can take
>> same model produced by qvto script (with arbitrary number of root
>> objects) and then save each object as system file.
>>
>> Regards,
>> Sergey
>>
>> Toñi Reina Quintero wrote:
>>> Hi all,
>>>
>>> my question is related to the mindmap2xhtml (included in the book
>>> Eclipse Modeling Project: A Domain-Specific Language (DSL) Toolkit)
>>> or the Uml2Xhtml example that Sergey has mentioned in his answer to
>>> my previous question
>>> ('org.eclipse.m2m/org.eclipse.m2m.qvt.oml/examples/org.eclip se.m2m.qvt.oml.econ2009.tutorial').
>>>
>>>
>>> In both cases a unique xhtml file is generated that contains all the
>>> mindmap information, in the first example, and all the uml model
>>> information in the second one. But what if I want to generate
>>> different xhtml files, one for each topic, in the first example, and
>>> one for each class in the second one.
>>>
>>> In both cases the number of instances of the output metamodel is
>>> variable, because it depends on the number of topics in the first
>>> example, and on the number of classes in the second one. My question
>>> is: is there any way of specifying this in qvto?
>>>
>>> Best regards,
>>> Toñi
Re: Is there any way to generate an indefinite number of target models in a qvto m2m transformation? [message #583877 is a reply to message #525204] Mon, 24 August 2009 18:43 Go to previous message
Sergey Boyko is currently offline Sergey BoykoFriend
Messages: 162
Registered: July 2009
Senior Member
Hi Toñi ,

There's no direct way to express arbitrary number of output models in
qvto engine.

Described scenario can be archived like follows:
- using Ant script. First invocation of qvto engine would create output
model with root objects each for separate entity. Then this model can be
processed with Xpand template to save each entity to physical file.
- using Java black-box library with qvto script. Such library can take
same model produced by qvto script (with arbitrary number of root
objects) and then save each object as system file.

Regards,
Sergey

Toñi Reina Quintero wrote:
> Hi all,
>
> my question is related to the mindmap2xhtml (included in the book
> Eclipse Modeling Project: A Domain-Specific Language (DSL) Toolkit) or
> the Uml2Xhtml example that Sergey has mentioned in his answer to my
> previous question
> ('org.eclipse.m2m/org.eclipse.m2m.qvt.oml/examples/org.eclip se.m2m.qvt.oml.econ2009.tutorial').
>
>
> In both cases a unique xhtml file is generated that contains all the
> mindmap information, in the first example, and all the uml model
> information in the second one. But what if I want to generate different
> xhtml files, one for each topic, in the first example, and one for each
> class in the second one.
>
> In both cases the number of instances of the output metamodel is
> variable, because it depends on the number of topics in the first
> example, and on the number of classes in the second one. My question is:
> is there any way of specifying this in qvto?
>
> Best regards,
> Toñi
Re: Is there any way to generate an indefinite number of target models in a qvto m2m transformation? [message #583890 is a reply to message #525205] Mon, 24 August 2009 20:30 Go to previous message
Toñi Reina is currently offline Toñi ReinaFriend
Messages: 209
Registered: July 2009
Senior Member
As far as I understood, they are two alternative ways of solving the
problem, aren't they?

Sergey Boyko escribió:
> Hi Toñi ,
>
> There's no direct way to express arbitrary number of output models in
> qvto engine.
>
> Described scenario can be archived like follows:
> - using Ant script. First invocation of qvto engine would create output
> model with root objects each for separate entity. Then this model can be
> processed with Xpand template to save each entity to physical file.
> - using Java black-box library with qvto script. Such library can take
> same model produced by qvto script (with arbitrary number of root
> objects) and then save each object as system file.
>
> Regards,
> Sergey
>
> Toñi Reina Quintero wrote:
>> Hi all,
>>
>> my question is related to the mindmap2xhtml (included in the book
>> Eclipse Modeling Project: A Domain-Specific Language (DSL) Toolkit) or
>> the Uml2Xhtml example that Sergey has mentioned in his answer to my
>> previous question
>> ('org.eclipse.m2m/org.eclipse.m2m.qvt.oml/examples/org.eclip se.m2m.qvt.oml.econ2009.tutorial').
>>
>>
>> In both cases a unique xhtml file is generated that contains all the
>> mindmap information, in the first example, and all the uml model
>> information in the second one. But what if I want to generate
>> different xhtml files, one for each topic, in the first example, and
>> one for each class in the second one.
>>
>> In both cases the number of instances of the output metamodel is
>> variable, because it depends on the number of topics in the first
>> example, and on the number of classes in the second one. My question
>> is: is there any way of specifying this in qvto?
>>
>> Best regards,
>> Toñi
Re: Is there any way to generate an indefinite number of target models in a qvto m2m transformation? [message #583919 is a reply to message #525206] Tue, 25 August 2009 13:37 Go to previous message
Sergey Boyko is currently offline Sergey BoykoFriend
Messages: 162
Registered: July 2009
Senior Member
Hi Toñi ,

Yes, I've suggested two ways:
1. Coupling with Xpand by means of Ant script.
2. Providing black-box library for qvto to achieve desired behavior.

However it is not improbable that there are some other solutions for
your scenario ;)

Regards,
Sergey

Toñi Reina Quintero wrote:
>
> As far as I understood, they are two alternative ways of solving the
> problem, aren't they?
>
> Sergey Boyko escribió:
>> Hi Toñi ,
>>
>> There's no direct way to express arbitrary number of output models in
>> qvto engine.
>>
>> Described scenario can be archived like follows:
>> - using Ant script. First invocation of qvto engine would create
>> output model with root objects each for separate entity. Then this
>> model can be processed with Xpand template to save each entity to
>> physical file.
>> - using Java black-box library with qvto script. Such library can take
>> same model produced by qvto script (with arbitrary number of root
>> objects) and then save each object as system file.
>>
>> Regards,
>> Sergey
>>
>> Toñi Reina Quintero wrote:
>>> Hi all,
>>>
>>> my question is related to the mindmap2xhtml (included in the book
>>> Eclipse Modeling Project: A Domain-Specific Language (DSL) Toolkit)
>>> or the Uml2Xhtml example that Sergey has mentioned in his answer to
>>> my previous question
>>> ('org.eclipse.m2m/org.eclipse.m2m.qvt.oml/examples/org.eclip se.m2m.qvt.oml.econ2009.tutorial').
>>>
>>>
>>> In both cases a unique xhtml file is generated that contains all the
>>> mindmap information, in the first example, and all the uml model
>>> information in the second one. But what if I want to generate
>>> different xhtml files, one for each topic, in the first example, and
>>> one for each class in the second one.
>>>
>>> In both cases the number of instances of the output metamodel is
>>> variable, because it depends on the number of topics in the first
>>> example, and on the number of classes in the second one. My question
>>> is: is there any way of specifying this in qvto?
>>>
>>> Best regards,
>>> Toñi
Previous Topic:Question about the construct keyword.
Next Topic:Question about the construct keyword.
Goto Forum:
  


Current Time: Sat Nov 22 17:57:29 GMT 2014

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

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