Skip to main content



      Home
Home » Archived » M2M (model-to-model transformation) » [QVT] Call QVT from Java code/command line
[QVT] Call QVT from Java code/command line [message #83679] Wed, 04 June 2008 10:18 Go to next message
Eclipse UserFriend
Originally posted by: David-392.Li.MorganStanley.com

Hi,

Another question :-) for QVT

Is there any way that we can call call QVT from java code? Even further,
if we can, can we get the root (pointer) for the output model instance (in
memory), not a file?

Thanks.

David
Re: [QVT] Call QVT from Java code/command line [message #83694 is a reply to message #83679] Wed, 04 June 2008 10:44 Go to previous message
Eclipse UserFriend
Hi David,

Java API for transformation launching is
org.eclipse.m2m.qvt.oml.runtime.util.QvtoTransformationHelpe r class.

Usage examples can be found in 'org.eclipse.m2m.qvt.oml.tests' plugin.

Code snippet:
URI scriptUri = ..
List<EObject> inObjects = ..
TransfExecutionResult execResult = new
QvtoTransformationHelper(scriptUri).executeTransformation(in Objects,
Collections.<String, Object>emptyMap(), null);

Where 'scriptUri' can specify file, platform resource or bundled script
(using platform:/plugin/ form).

Transformation output extents are created in memory. Persistence is
responsibility of caller.

Regards,
Sergey


David wrote:
> Hi,
>
> Another question :-) for QVT
>
> Is there any way that we can call call QVT from java code? Even further,
> if we can, can we get the root (pointer) for the output model instance
> (in memory), not a file?
> Thanks.
>
> David
>
Previous Topic:[QVT] qvt lanuch config: transformation IN parameter: invalid source
Next Topic:[ATL] problem with with xmi output
Goto Forum:
  


Current Time: Thu Jul 03 13:18:56 EDT 2025

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

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

Back to the top