[ETL] How to create a target model by java code [message #1625488] |
Fri, 20 February 2015 07:17  |
Eclipse User |
|
|
|
Hi to everybody,
i have been using Epsilon ecosystem for a few time
I have read many post in this forum but i have not found anything to help me.
I need to call from java code an etl transformation.
Before, I used the tree2graph.etl file from example by ant script and the transformation succeeded to create a target file, now i would like to reach the same result from java code.
I have seen the example for eunit and i have caught the code to create an empty model
protected EmfModel loadEmptyModel(String name, String metamodelPath) throws EolModelLoadingException
{
EmfModel model = new EmfModel();
model.setName(name);
model.setMetamodelFileUri(getResourceEmfURI(metamodelPath));
model.setModelFileUri(URI.createFileURI(new File("Empty" + name + ".model").getAbsolutePath()));
model.setReadOnLoad(false);
model.setStoredOnDisposal(false);
model.load();
return model;
}
but i can not create a file for this target model after the correct execution of the transformation.
If i create the file from
File file = new File(path);
file.createNewFile();
the file is created in the target folder but it remains empty.
thanks in advance
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05090 seconds