Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL]Load input model for atl transformation within java code
[ATL]Load input model for atl transformation within java code [message #104976] Wed, 13 May 2009 20:24 Go to next message
juanondi is currently offline juanondiFriend
Messages: 1
Registered: July 2009
Junior Member
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 06:51 Go to previous message
Lucas is currently offline LucasFriend
Messages: 9
Registered: July 2009
Junior Member
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: '.
Previous Topic:[ATL] UML2 Profile application - multiple source models problem
Next Topic:[ATL] How to implement symbol-table building in ATL?
Goto Forum:
  


Current Time: Fri Apr 19 15:29:49 GMT 2024

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

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

Back to the top