Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [QVTO] Invoke a transformation using its XMI file(Invoke in Java a QVTo transformation from its XMI file, not from the source)
[QVTO] Invoke a transformation using its XMI file [message #835609] Tue, 03 April 2012 09:03 Go to next message
thomas legrand is currently offline 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 09:20 Go to previous message
Ed Willink is currently offline Ed Willink
Messages: 4003
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).
Previous Topic:[ATL] Problem to run ATL in JAVA
Next Topic:[QVTO] Use metamodel mappings with nested packages
Goto Forum:
  


Current Time: Thu Jul 24 11:33:48 EDT 2014

Powered by FUDForum. Page generated in 0.01767 seconds