URI transformationURI = URI.createURI(Transformation.class
.getResource("/mytrans.qvto").toURI().toString());
TransformationExecutor executor = new TransformationExecutor(transformationURI);
// load resource 1 (XMI)
Resource res1 = new XMIResourceFactoryImpl().createResource(null);
res1.load(isAML, null);
// load resource 2 (concrete format)
Resource res2 = new de.example.org.concrete.util.ConcreteResourceFactoryImpl()
.createResource(null);
res2.load(isDDS, null);
// create the input extents with its initial contents
ModelExtent in1 = new BasicModelExtent(res1.getContents());
ModelExtent in2 = new BasicModelExtent(res2.getContents());
// setup the execution environment details
ExecutionContextImpl context = new ExecutionContextImpl();
context.setConfigProperty("keepModeling", true);
// run the transformation
ExecutionDiagnostic diagnostics = executor.execute(context, in1, in2);