Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] Transformatio problem with extended metadata in ecore
[ATL] Transformatio problem with extended metadata in ecore [message #498553] Tue, 17 November 2009 13:14 Go to next message
Mark Hoffmann is currently offline Mark HoffmannFriend
Messages: 113
Registered: July 2009
Location: Jena
Senior Member
Hi,
I am new in m2m. I have an ecore model using extended metadata to customize the de-/serialization. This is my source model. The target model is an ecore without extended metadata.

Is a transformation possible?

SourceModel:
<?xml version="1.0" encoding="UTF-8"?>
<ecore:EPackage xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="tst"
nsURI="platform:/resource/t/test.xsd" nsPrefix="">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="qualified" value="false"/>
</eAnnotations>
<eClassifiers xsi:type="ecore:EClass" name="Test">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="name" value="test"/>
<details key="kind" value="elementOnly"/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="element"/>
<details key="name" value="name"/>
<details key="namespace" value="##targetNamespace"/>
</eAnnotations>
</eStructuralFeatures>
</eClassifiers>
</ecore:EPackage>

TargetModel:
<?xml version="1.0" encoding="UTF-8"?>
<ecore:EPackage xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="t2"
nsURI="http://t2" nsPrefix="">
<eClassifiers xsi:type="ecore:EClass" name="T2">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="nameT2" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eClassifiers>
</ecore:EPackage>


ATL:
-- @path T2=/xmlatl/T2.ecore

module t2;
create OUT : T2 from IN : TST;

rule NAMES {
from T : TST!Test
to TT : T2!T2 (
nameT2 <- T.name
)
}

I only get the error:
Error loading platform:/resource/xmlatl/dummy.test: org.eclipse.emf.ecore.xmi.ClassNotFoundException: Class 'test' is not found or is abstract. (platform:/resource/xmlatl/dummy.test, 2, 123)

What am I doin wrong?

Mark

[Updated on: Tue, 17 November 2009 13:17]

Report message to a moderator

Re: [ATL] Transformation problem with extended metadata in ecore [message #499588 is a reply to message #498553] Mon, 23 November 2009 12:22 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 8
Registered: July 2009
Junior Member
Hello,

i have the same problem, seems that atl can not handle extended metadata.

I created an ecore model from a xml schema. Most of the attributes are
named differently in the ecore model than in the xml schema. The correct
names in the xml files are done with extended metadata.

When i try to read or write these xml files with ATL, i also get the error:
Error loading platform:/(...):
org.eclipse.emf.ecore.xmi.ClassNotFoundException: Class '(...)' is not
found or is abstract. (platform:(...))

Can anyone tell me, if QVTO can handle extended metadata? I tried a
simple transformation with the files from above but got an error
message, too (org.eclipse.m2m.internal.qvt.oml.emf.util.EmfException:
Failed to save model to platform:/resource/KBL/kbl2kbl.schema)

I don't have much experience with QVTO, so i don't know if it is because
of the extended metadata, but i think so.

Klaus
Re: [ATL] Transformation problem with extended metadata in ecore [message #499630 is a reply to message #499588] Mon, 23 November 2009 15:06 Go to previous message
Mark Hoffmann is currently offline Mark HoffmannFriend
Messages: 113
Registered: July 2009
Location: Jena
Senior Member
Hi Klaus,

thank you for your feedback. Do you have a seperate post regarding the QVTO problem that I can watch? If yes, can you give me the link?

I would be nice to stay in contact regarding this problem.


Mark
Previous Topic:How can i define a metamodel in the properties in QVT
Next Topic:[ATL] Unique lazy rules with multiple arguments
Goto Forum:
  


Current Time: Fri Aug 23 09:30:43 GMT 2019

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

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

Back to the top