Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Using Extended MetaData feature kind "Element"
Using Extended MetaData feature kind "Element" [message #690830] Thu, 30 June 2011 09:44 Go to next message
Jan Rosczak is currently offline Jan RosczakFriend
Messages: 53
Registered: July 2009
Location: Hamburg, Germany
Member
Hello,

I have a simple ECore Model which has the following eClassifier:

<eClassifiers xsi:type="ecore:EClass" name="Controller">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http//www.eclipse.org/emf/2002/Ecore#//EString">
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="tranCode" eType="ecore:EDataType http//www.eclipse.org/emf/2002/Ecore#//EString">
<eAnnotations source="http///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="element"/>
</eAnnotations>
</eStructuralFeatures>
</eClassifiers>

Using the simple generated example will produce the following XML:
<application:application xmlns:xsi="http//www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http//fit/application/fis/1.0" name="FlightMaintenance">
<controller name="X3060PwFlightMaintenanceController">
<tranCode>X3060</tranCode>
</controller>
</application:application>

My problem is that I need to read the following XML:

<application>
<controller name="X3060PwFlightMaintenanceController">
<tranCode value="X3060"/>
</controller>
</application>

As I do not want to define the element "tranCode" as an EClass, I would like to somehow transform the element <tranCode value="X3060"/> to <tranCode>X3060</tranCode>.

Is this possible with EMF Core?

Thanks
Jan Rosczak
Re: Using Extended MetaData feature kind &quot;Element&quot; [message #691050 is a reply to message #690830] Thu, 30 June 2011 15:48 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 30439
Registered: July 2009
Senior Member
Jan,

Comments below.

On 30/06/2011 2:44 AM, Jan Rosczak wrote:
> Hello,
>
> I have a simple ECore Model which has the following eClassifier:
>
> <eClassifiers xsi:type="ecore:EClass" name="Controller">
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="name"
> lowerBound="1" eType="ecore:EDataType
> http//www.eclipse.org/emf/2002/Ecore#//EString">
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="tranCode"
> eType="ecore:EDataType http//www.eclipse.org/emf/2002/Ecore#//EString">
> <eAnnotations
> source="http///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="element"/>
> </eAnnotations>
> </eStructuralFeatures>
> </eClassifiers>
>
> Using the simple generated example will produce the following XML:
> <application:application
> xmlns:xsi="http//www.w3.org/2001/XMLSchema-instance"
> xsi:noNamespaceSchemaLocation="http//fit/application/fis/1.0"
> name="FlightMaintenance">
> <controller name="X3060PwFlightMaintenanceController">
> <tranCode>X3060</tranCode>
> </controller>
> </application:application>
>
> My problem is that I need to read the following XML:
>
> <application>
> <controller name="X3060PwFlightMaintenanceController">
> <tranCode value="X3060"/>
> </controller>
> </application>
>
> As I do not want to define the element "tranCode" as an EClass, I
> would like to somehow transform the element <tranCode value="X3060"/>
> to <tranCode>X3060</tranCode>.
>
> Is this possible with EMF Core?
No.
>
> Thanks
> Jan Rosczak
>
Previous Topic:Generics in EMF
Next Topic:Announcement: EMF Builder Generator
Goto Forum:
  


Current Time: Sun Sep 15 08:25:29 GMT 2019

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

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

Back to the top