[QVT] Call QVT from Java code/command line [message #83679] |
Wed, 04 June 2008 14:18 |
Eclipse User |
|
|
|
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 |
Sergey Boyko 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
>
|
|
|
Powered by
FUDForum. Page generated in 0.02714 seconds