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: 33140
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
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Generics in EMF
Next Topic:Announcement: EMF Builder Generator
Goto Forum:
  


Current Time: Wed Apr 24 23:22:39 GMT 2024

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

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

Back to the top