[QVTO] Invoke a transformation using its XMI file [message #835609] |
Tue, 03 April 2012 13:03 |
thomas legrand Messages: 10 Registered: September 2010 |
Junior Member |
|
|
Hello all,
I investigate the way to call in Java a QVTo transformation, not from the qvto file but from an XMI file representing the transformation (conforming the qvto metamodel).
Does anyone have a clue to do so ?
Thanks,
Tom
PS: For those interested in the reason why I do that, read below
I "transform qvto transformation", i.e I use qvto transfos to transform other qvto transfos. First, I create an XMI file "mytransfo.xmi" from a qvto file "mytransfo.qvto" using the following code and the Eclipse/Qvto launcher:
modeltype qvto uses qvtoperational::expressions('[...]eclipse.org/QVT/1.0.0/Operational');
transformation copyToXmi(in model : qvto,out outmodel : qvto);
main()
{
model.objects()[OperationalTransformation].deepclone();
}
"mytransfo.xmi" is an instance of the qvtoperational metamodel. Then I transform this instance to change names, mapping operations, parameters... and obtain a "finaltransfo.xmi". I finally want to execute this final transformation, directly from the XMI file without having to translate the model to some qvto code (m2t).
|
|
|
Re: [QVTO] Invoke a transformation using its XMI file [message #835623 is a reply to message #835609] |
Tue, 03 April 2012 13:20 |
Ed Willink Messages: 7673 Registered: July 2009 |
Senior Member |
|
|
Hi
Nicolas Rouquette has a patch awaiting source approval. If you contact
him, nicolas.f.rouquette _at_ jpl.nasa.gov, he may able to let you have
a copy. Be aware that the XMI file is not OMG compliant and may evlv e
to be OMG complinat once OMG defines an XMI serialisation to comply with.
Regards
Ed Willink
On 03/04/2012 14:03, thomas legrand wrote:
> Hello all,
>
> I investigate the way to call in Java a QVTo transformation, not from
> the qvto file but from an XMI file representing the transformation
> (conforming the qvto metamodel).
>
> Does anyone have a clue to do so ?
>
> Thanks,
> Tom
>
> PS: For those interested in the reason why I do that, read below
>
> I "transform qvto transformation", i.e I use qvto transfos to
> transform other qvto transfos. First, I create an XMI file
> "mytransfo.xmi" from a qvto file "mytransfo.qvto" using the following
> code and the Eclipse/Qvto launcher:
>
> modeltype qvto uses
> qvtoperational::expressions('[...]eclipse.org/QVT/1.0.0/Operational');
>
> transformation copyToXmi(in model : qvto,out outmodel : qvto);
>
> main()
> {
> model.objects()[OperationalTransformation].deepclone();
> }
>
>
> "mytransfo.xmi" is an instance of the qvtoperational metamodel. Then I
> transform this instance to change names, mapping operations,
> parameters... and obtain a "finaltransfo.xmi". I finally want to
> execute this final transformation, directly from the XMI file without
> having to translate the model to some qvto code (m2t).
|
|
|
Powered by
FUDForum. Page generated in 0.03370 seconds