Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » Parse ATL transformation with Java
Parse ATL transformation with Java [message #1106608] Wed, 11 September 2013 10:06 Go to next message
Fi Fi is currently offline Fi Fi
Messages: 133
Registered: March 2010
Senior Member
Hi all,
after using successfully ANT task to inject and extract ATL transformation,
<?xml version="1.0"?>
<project name="atlcopy" default="run" basedir=".">
    <property name="in1"  value="transformation.atl"/>
    <property name="out1" value="transformation.xmi"/>

    <property name="atl.launcher" value="EMF-specific VM" />

    <target name="run">
        <atl.loadModel modelHandler="EMF" name="ATL" metamodel="MOF" path="../MetaModels/ATL.ecore" />
        <atl.loadModel name="atl1" metamodel="ATL" path="${in1}">
            <injector name="ATL" />
        </atl.loadModel>
        <atl.saveModel model="atl1" path="${out1}"/>
    </target>
</project>

<?xml version="1.0"?>
<project name="atlcopy" default="run" basedir=".">
    <property name="out1" value="transformation.xmi"/>

    <property name="atl.launcher" value="EMF-specific VM" />

    <target name="run">
        <atl.loadModel modelHandler="EMF" name="ATL" metamodel="MOF" path="../MetaModels/ATL.ecore" />
        <atl.loadModel name="atl1" metamodel="ATL" path="${out1}"/>

        <atl.saveModel model="atl1" path="${out1}.out.atl">
             <extractor name="ATL"/>
        </atl.saveModel>
    </target>
</project>


I try know to do it using java.
are there any existing java code to do this?
Best regards
Re: Parse ATL transformation with Java [message #1106630 is a reply to message #1106608] Wed, 11 September 2013 10:47 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo Bruneliere
Messages: 607
Registered: July 2009
Senior Member
Hello,

The ATL Core API allows to inject/extract models and run transformations programmatically (some concrete examples can be found from there).
Using it, you will be able to do the same that what you are doing with ATL ANT tasks.

Best regards,


------------------------------------------
Hugo Bruneliere - R&D Engineer
AtlanMod research team (Inria, EMN & LINA)
Ecole des Mines de Nantes
Nantes - France
------------------------------------------
Re: Parse ATL transformation with Java [message #1106668 is a reply to message #1106630] Wed, 11 September 2013 11:37 Go to previous message
Fi Fi is currently offline Fi Fi
Messages: 133
Registered: March 2010
Senior Member
Hi Hugo
thank you for reply, but I try to find java code
to parse my transformation (and not to run it).
I don't find any concrete code in http://wiki.eclipse.org/ATL/Developer_Guide#Parser Sad

thanks
Previous Topic:how to use primitiveTypes, OclAny, OclVoid
Next Topic:Problem assigning in a target the source element of an emftvm rule
Goto Forum:
  


Current Time: Sun Oct 26 05:26:17 GMT 2014

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

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