Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » [ATL /AM3 XML Extractor ]
[ATL /AM3 XML Extractor ] [message #1122211] Tue, 01 October 2013 10:36 Go to next message
kicha bicha is currently offline kicha bichaFriend
Messages: 11
Registered: October 2013
Junior Member
Hi,
I want to know if AM3 is available in kepler.

Thank you,
Re: [ATL /AM3 XML Extractor ] [message #1122350 is a reply to message #1122211] Tue, 01 October 2013 13:24 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 674
Registered: July 2009
Senior Member
Hi,

No, AM3 plugins are not upgraded anymore.
If you want to use ANT Tasks for chaining ATL transformations, please directly use the ATL ANT Tasks (cf. the ATL User Guide - ATL Tools section).

Best regards,


--------------------------------------------------------
Hugo Bruneliere, PhD
NaoMod team (IMT Atlantique & LS2N-CNRS)
Nantes - France
--------------------------------------------------------
Re: [ATL /AM3 XML Extractor ] [message #1122388 is a reply to message #1122350] Tue, 01 October 2013 14:12 Go to previous messageGo to next message
kicha bicha is currently offline kicha bichaFriend
Messages: 11
Registered: October 2013
Junior Member
Hello,
Thanks for your reponse.
I want to transforme my model UML + profile To file XML (conform of metamodel Xsd).
I work with Eclipse Kepler.
how to extract XML file?
That you have an example to extract XML file

Regards,
Re: [ATL /AM3 XML Extractor ] [message #1122413 is a reply to message #1122388] Tue, 01 October 2013 14:46 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 674
Registered: July 2009
Senior Member
We have implemented an XML injector/extractor that can be called directly via the ATL ANT Tasks or API for instance.
To use it, you can download its sources from here and then build the plugin to be included in your Eclipse install (according to your Eclipse version, e.g., Kepler).

Best regards,


--------------------------------------------------------
Hugo Bruneliere, PhD
NaoMod team (IMT Atlantique & LS2N-CNRS)
Nantes - France
--------------------------------------------------------
Re: [ATL /AM3 XML Extractor ] [message #1122440 is a reply to message #1122413] Tue, 01 October 2013 15:24 Go to previous messageGo to next message
kicha bicha is currently offline kicha bichaFriend
Messages: 11
Registered: October 2013
Junior Member
I buil example Table2TabularHTML which contains XML Extractor.
and I replaced am3 by atl in Buil.xml

<project name="Table2TabularHTML" default="transfo">
<!-- Project properties -->
<property file="build.properties" />

<!-- Launches the transformations -->
<target name="transfo" depends="loadModels">
<atl.launch path="${transformations.dir}${source.metamodel.name}2${target.name}.asm">
<inModel name="${source.metamodel.name}" model="${source.metamodel.name}" />
<inModel name="IN" model="${source.model.file}" />
<inModel name="${target.metamodel.name}" model="${target.metamodel.name}" />
<library name="${source.metamodel.name}Helpers" path="${lib.dir}${source.metamodel.name}Helpers.asm" />
<outModel name="OUT" model="${target.model.file}" metamodel="${target.metamodel.name}" />
</atl.launch>
<!--am3.saveModel model="${target.model.file}" path="${models.dir}${target.model.file}" /-->

<atl.launch path="${transformations.dir}${target.metamodel.name}2${xml.metamodel.name}.asm">
<inModel name="${target.metamodel.name}" model="${target.metamodel.name}" />
<inModel name="IN" model="${target.model.file}" />
<inModel name="${xml.metamodel.name}" model="${xml.metamodel.name}" />
<outModel name="OUT" model="${xml.model.file}" metamodel="${xml.metamodel.name}" />
</atl.launch>
<atl.saveModel model="${xml.model.file}" path="${models.dir}${target.file}">
<extractor name="xml" />
</atl.saveModel>

</target>

<!-- Loads the metamodels and the source model -->
<target name="loadModels">
<atl.loadModel name="${source.metamodel.name}" metamodel="MOF" path="${metamodels.dir}${source.metamodel.name}.ecore" />
<atl.loadModel name="${target.metamodel.name}" metamodel="MOF" path="${metamodels.dir}${target.metamodel.name}.ecore" />
<atl.loadModel name="${xml.metamodel.name}" metamodel="MOF" path="${metamodels.dir}${xml.metamodel.name}.ecore" />

<atl.loadModel name="${source.model.file}" metamodel="${source.metamodel.name}" path="${models.dir}${source.model.file}" />
</target>
</project>



and i have this error:

[atl.saveModel] Saving model example-XML.ecore to file:/C:\Users\aidi\workspace_KeplerR_testAcccelo\Table2TabularHTML\models\example-TabularHTML.html
[atl.saveModel] org.eclipse.m2m.atl.core.ATLCoreException: org.eclipse.m2m.atl.core.extractor xml not found, check the spelling or register it manually

You know the cause of this error?

thanks



Re: [ATL /AM3 XML Extractor ] [message #1122444 is a reply to message #1122440] Tue, 01 October 2013 15:27 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 674
Registered: July 2009
Senior Member
Have you checked that the additional ATL Projectors plugin is correctly loaded into your Eclipse install?
It looks like this is not the case.


--------------------------------------------------------
Hugo Bruneliere, PhD
NaoMod team (IMT Atlantique & LS2N-CNRS)
Nantes - France
--------------------------------------------------------
Re: [ATL /AM3 XML Extractor ] [message #1122455 is a reply to message #1122444] Tue, 01 October 2013 15:45 Go to previous messageGo to next message
kicha bicha is currently offline kicha bichaFriend
Messages: 11
Registered: October 2013
Junior Member
I have loaded this plugins in my workspace:

org.eclipse.gmt.am3
org.eclipse.gmt.am3.core
org.eclipse.gmt.am3.extractor.launchers
org.eclipse.gmt.am3.modelhandler.emf
org.eclipse.gmt.am3.platform.core
org.eclipse.gmt.am3.platform.extension.am34eclipseplugins
org.eclipse.gmt.am3.platform.extension.am34linuxpackages
org.eclipse.gmt.am3.platform.extension.am3navigability
org.eclipse.gmt.am3.platform.extension.globalmodelmanagement
org.eclipse.gmt.am3.platform.extension.gmm4amw
org.eclipse.gmt.am3.platform.extension.gmm4asm
org.eclipse.gmt.am3.platform.extension.gmm4atl
org.eclipse.gmt.am3.platform.extension.gmm4compositetransformations
org.eclipse.gmt.am3.platform.extension.modelintent
org.eclipse.gmt.am3.platform.runtime.core
org.eclipse.gmt.am3.platform.ui
org.eclipse.gmt.am3.repository.lightweight
org.eclipse.m2m.atl.projectors.xml

lien:
/org.eclipse.mdt.modisco/incubation/trunk/am3/plugins/trunk

I have to add other plugings?





Re: [ATL /AM3 XML Extractor ] [message #1122464 is a reply to message #1122455] Tue, 01 October 2013 15:51 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 674
Registered: July 2009
Senior Member
You have to get only the plugin I sent you the link to: i.e., org.eclipse.m2m.atl.projectors.xml
It is a plugin to complement your ATL install with XML projection capabilities.
The other things you need are already included in ATL.


--------------------------------------------------------
Hugo Bruneliere, PhD
NaoMod team (IMT Atlantique & LS2N-CNRS)
Nantes - France
--------------------------------------------------------
Re: [ATL /AM3 XML Extractor ] [message #1122474 is a reply to message #1122464] Tue, 01 October 2013 16:11 Go to previous messageGo to next message
kicha bicha is currently offline kicha bichaFriend
Messages: 11
Registered: October 2013
Junior Member
Just with this pluging org.eclipse.m2m.atl.projectors.xml

I always have same error.

Re: [ATL /AM3 XML Extractor ] [message #1122648 is a reply to message #1122474] Tue, 01 October 2013 20:00 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 674
Registered: July 2009
Senior Member
Have you checked that the additional ATL Projectors plugin is correctly loaded into your Eclipse install?
It looks like this is not the case.


--------------------------------------------------------
Hugo Bruneliere, PhD
NaoMod team (IMT Atlantique & LS2N-CNRS)
Nantes - France
--------------------------------------------------------
Re: [ATL /AM3 XML Extractor ] [message #1123224 is a reply to message #1122648] Wed, 02 October 2013 10:26 Go to previous messageGo to next message
kicha bicha is currently offline kicha bichaFriend
Messages: 11
Registered: October 2013
Junior Member
Hi,
I am sure that the plugin is installed ,because I see him in the list of the installed plugins,

Same error:

Saving model example-XML.ecore to file:/C:\Users\aidi\workspace_KeplerR_testAcccelo\Table2TabularHTML\models\example-TabularHTML.html
[atl.saveModel] org.eclipse.m2m.atl.core.ATLCoreException: org.eclipse.m2m.atl.core.extractor xml not found, check the spelling or register it manually
[atl.saveModel] at org.eclipse.m2m.atl.core.service.CoreService.getExtractor(CoreService.java:272)
[atl.saveModel] at org.eclipse.m2m.atl.core.ant.tasks.SaveModelTask.execute(SaveModelTask.java:105)
[atl.saveModel] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
[atl.saveModel] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[atl.saveModel] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
[atl.saveModel] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[atl.saveModel] at java.lang.reflect.Method.invoke(Unknown Source)
[atl.saveModel] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[atl.saveModel] at org.apache.tools.ant.Task.perform(Task.java:348)
[atl.saveModel] at org.apache.tools.ant.Target.execute(Target.java:392)
[atl.saveModel] at org.apache.tools.ant.Target.performTasks(Target.java:413)
[atl.saveModel] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
[atl.saveModel] at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
[atl.saveModel] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
[atl.saveModel] at org.eclipse.ant.internal.core.ant.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
[atl.saveModel] at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
[atl.saveModel] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:672)
[atl.saveModel] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:498)
[atl.saveModel] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[atl.saveModel] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
[atl.saveModel] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[atl.saveModel] at java.lang.reflect.Method.invoke(Unknown Source)
[atl.saveModel] at org.eclipse.ant.core.AntRunner.run(AntRunner.java:378)
[atl.saveModel] at org.eclipse.ant.internal.launching.launchConfigurations.AntLaunchDelegate$1.run(AntLaunchDelegate.java:284)
[atl.saveModel] at java.lang.Thread.run(Unknown Source)

BUILD FAILED


But when I delete this instruction <extractor name="xml" /> , I do not have error.

Re: [ATL /AM3 XML Extractor ] [message #1123406 is a reply to message #1123224] Wed, 02 October 2013 14:30 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 674
Registered: July 2009
Senior Member
Have you tried to use the name "XML" instead of "xml"?
Both the injector and extractor are declared this way in the plugin.xml file of this plugin.


--------------------------------------------------------
Hugo Bruneliere, PhD
NaoMod team (IMT Atlantique & LS2N-CNRS)
Nantes - France
--------------------------------------------------------
Re: [ATL /AM3 XML Extractor ] [message #1123431 is a reply to message #1123406] Wed, 02 October 2013 14:58 Go to previous messageGo to next message
kicha bicha is currently offline kicha bichaFriend
Messages: 11
Registered: October 2013
Junior Member
Hi,
Thank you for your reponse.

The solution of this problem is to replace XML by xml.

Re: [ATL /AM3 XML Extractor ] [message #1124476 is a reply to message #1123431] Thu, 03 October 2013 15:21 Go to previous messageGo to next message
kicha bicha is currently offline kicha bichaFriend
Messages: 11
Registered: October 2013
Junior Member
Hi Hugo,
I want to transforme my model UML + profile To file XML (conform of metamodel Xsd).
do you have an example which corresponds this transformation.

Thank you for your help.


Ouafae
Re: [ATL /AM3 XML Extractor ] [message #1124490 is a reply to message #1124476] Thu, 03 October 2013 15:39 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 674
Registered: July 2009
Senior Member
Hi,

Basically, you have two different options here.
1) You write a specific UML-Profiled to XML transformation (according to the XSD you want to follow) and then you can use the XML extractor to obtain your actual XML document.
2) You use EMF to generate an Ecore (meta)model, let's name it XXX, out of your XSD and then you write the UML-Profiled to XXX transformation (thus using EMF to parameterize the serialization of your XXX model as an XML document corresponding to the initial XSD).

Best regards,


--------------------------------------------------------
Hugo Bruneliere, PhD
NaoMod team (IMT Atlantique & LS2N-CNRS)
Nantes - France
--------------------------------------------------------
Re: [ATL /AM3 XML Extractor ] [message #1128370 is a reply to message #1124490] Mon, 07 October 2013 16:13 Go to previous messageGo to next message
kicha bicha is currently offline kicha bichaFriend
Messages: 11
Registered: October 2013
Junior Member
Hi,
in this example i use the second method (EMF to generate an Ecore (meta model).

ATL tranformation:

rule Block2MuseXML{
from museml: MMuml!Class(
thisModule.isBlockStereotyped(museml) and
museml.isMuseMLClassDefinitionStereotyped()
)
to OUT: MMXML!Composite (
name <- museml.name

)
}

I want to put the name of the classes stereotyped in name of the composite


and MMXML.ecore

<eClassifiers xsi:type="ecore:EClass" name="Composite" eSuperTypes="#//Muse">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="name" value="Composite"/>
<details key="kind" value="elementOnly"/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="group2" unique="false"
upperBound="-1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFeatureMapEntry">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="group"/>
<details key="name" value="group:18"/>
</eAnnotations>
</eStructuralFeatures>

but i have this error:

org.eclipse.m2m.atl.engine.emfvm.VMException: Feature name does not exist on Composite
at __applyBlock2MuseXML#14(MuseML2XML.atl[47:7-47:26])
local variables: self=MuseML2XML : ASMModule, link=TransientLink {rule = Block2MuseXML, sourceElements = {museml = org.eclipse.uml2.uml.internal.impl.ClassImpl@12f44f2 (name: Block1, visibility: <unset>) (isLeaf: false, isAbstract: false, isFinalSpecialization: false) (isActive: false)}, targetElements = {OUT = org.eclipse.emf.ecore.impl.DynamicEObjectImpl@41eb8e (eClass: org.eclipse.emf.ecore.impl.EClassImpl@150dee9 (name: Composite) (instanceClassName: null) (abstract: false, interface: false))}, variables = {}}, museml=INuml!Block1, OUT=OUT!<unnamed>
at __exec__#8(MuseML2XML.atl)


Re: [ATL /AM3 XML Extractor ] [message #1827006 is a reply to message #1122413] Wed, 06 May 2020 06:00 Go to previous message
Paul Hernandez is currently offline Paul HernandezFriend
Messages: 9
Registered: April 2020
Junior Member
Hugo Bruneliere wrote on Tue, 01 October 2013 14:46
We have implemented an XML injector/extractor that can be called directly via the ATL ANT Tasks or API for instance.
To use it, you can download its sources from here and then build the plugin to be included in your Eclipse install (according to your Eclipse version, e.g., Kepler).

Best regards,


Hi Hugo,

I know this post is quite all but the link you provided is broken.

I would like to ask you if there any xml projector plugin I can add to the current ATL and Eclipse modelling tools.

Best regards,
Paul
Previous Topic:OWL2XML wrong output
Next Topic:UTF-8 encoding problem in output
Goto Forum:
  


Current Time: Tue Apr 16 13:57:38 GMT 2024

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

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

Back to the top