Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 14: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 14:44 Go to previous message
Sergey Boyko is currently offline Sergey BoykoFriend
Messages: 171
Registered: July 2009
Senior Member
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 Apr 25 22:52:21 GMT 2024

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

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

Back to the top