[ATL]Load input model for atl transformation within java code [message #104976] |
Wed, 13 May 2009 16:24  |
Eclipse User |
|
|
|
I'm running a transformation between 2 own metamodels (ecore). If I run
this transformation within the Eclipse Environment everything works fine.
The problem comes when I try to run it from java code. I have taken a deep
look over some examples over Internet :
http://wiki.eclipse.org/JWT_Transformations and Milan Milanovic's template
http://milan.milanovic.org/download/atl.zip. None of them work.
Milan's example makes an xml injection from file,
ASMModel xmlModel = injectXMLModelFromFile(InputOneFile);
ASMModel otherModel = getOtherMMFromOneMM(xmlModel);
extractXMLModelToFile(otherModel, OutputOtherFile);
//this sentence is part of getOtherMMFromOneMM method
so when I execute:
AtlLauncher.getDefault().launch(this.OneMM2OtherMMurl,Collec tions.EMPTY_MAP,
models, Collections.EMPTY_MAP,Collections.EMPTY_LIST);
the input model conforms no longer to my input ecore metamodel but to
xml.ecore and my .asm does nothing. I get the following output:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
On the other side, if I try to load my input model as I've seen in the
first example:
ASMEMFModel bpelInputModel = (ASMEMFModel) modelHandler.loadModel("IN",
oneMM, URI.createFileURI(inFilePath));
being oneMM my already loaded source metamodel (input model in inFilePath
conforms to oneMM)
Any help would be fine, I'd be very grateful
I receive an 'org.eclipse.emf.ecore.xmi.ClassNotFoundException: '.
|
|
|
Re: [ATL]Load input model for atl transformation within java code [message #105268 is a reply to message #104976] |
Tue, 19 May 2009 02:51  |
Eclipse User |
|
|
|
Hi!
Could you solve your problem in the meantime? If not: can you please post
the java source code you are executing and the error message in detail?
juanondi wrote:
> I'm running a transformation between 2 own metamodels (ecore). If I run
> this transformation within the Eclipse Environment everything works fine.
> The problem comes when I try to run it from java code. I have taken a deep
> look over some examples over Internet :
> http://wiki.eclipse.org/JWT_Transformations and Milan Milanovic's template
> http://milan.milanovic.org/download/atl.zip. None of them work.
> Milan's example makes an xml injection from file,
> ASMModel xmlModel = injectXMLModelFromFile(InputOneFile);
> ASMModel otherModel = getOtherMMFromOneMM(xmlModel);
> extractXMLModelToFile(otherModel, OutputOtherFile);
> //this sentence is part of getOtherMMFromOneMM method
> so when I execute:
> AtlLauncher.getDefault().launch(this.OneMM2OtherMMurl,Collec tions.EMPTY_MAP,
> models, Collections.EMPTY_MAP,Collections.EMPTY_LIST);
> the input model conforms no longer to my input ecore metamodel but to
> xml.ecore and my .asm does nothing. I get the following output:
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
> On the other side, if I try to load my input model as I've seen in the
> first example:
> ASMEMFModel bpelInputModel = (ASMEMFModel) modelHandler.loadModel("IN",
> oneMM, URI.createFileURI(inFilePath));
> being oneMM my already loaded source metamodel (input model in inFilePath
> conforms to oneMM)
> Any help would be fine, I'd be very grateful
> I receive an 'org.eclipse.emf.ecore.xmi.ClassNotFoundException: '.
|
|
|
Powered by
FUDForum. Page generated in 0.11588 seconds