Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Possible to configure the xml-structure of an ecore-model instance?
Possible to configure the xml-structure of an ecore-model instance? [message #431664] Tue, 21 July 2009 10:01 Go to next message
Eclipse UserFriend
Originally posted by: formatzeh.gmx.de

I'm interested in if it is possible to configure the structure of the
xml which will be created when instantiating an ecore model by an
generated editor. I would have an xml structure containing classes of my
metamodel as xml structure-elements and not as attributes. Now that's
the case only for my root class of my model, containing the defined
prefix. All the other classes appear as attributes in the xml and the
roles of the references are represented as xml elements. I imagine that
only classes of the metamodel are sufficient as xml-elements and roles
names of the references don't need to appear, isn't it? Hope I expressed
myself understandable.

best regards,
Gilbert
Re: Possible to configure the xml-structure of an ecore-model instance? [message #431677 is a reply to message #431664] Tue, 21 July 2009 14:11 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------040700020009010609070909
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Gilbert,

Comments below.


Gilbert Mirenque wrote:
> I'm interested in if it is possible to configure the structure of the
> xml which will be created when instantiating an ecore model by an
> generated editor.
To an extent yes.
> I would have an xml structure containing classes of my
> metamodel as xml structure-elements and not as attributes.
Extended meta data annotations can be used for that.
> Now that's
> the case only for my root class of my model, containing the defined
> prefix. All the other classes appear as attributes in the xml and the
> roles of the references are represented as xml elements. I imagine that
> only classes of the metamodel are sufficient as xml-elements and roles
> names of the references don't need to appear, isn't it?
Not sure what you mean. Have a read through this:

http://www.eclipse.org/modeling/emf/docs/overviews/XMLSchema ToEcoreMapping.pdf

The annotations it describes can be added directly to an Ecore model...
> Hope I expressed
> myself understandable.
>
> best regards,
> Gilbert
>

--------------040700020009010609070909
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Gilbert,<br>
<br>
Comments below.<br>
<br>
<br>
Gilbert Mirenque wrote:
<blockquote cite="mid:h443mk$7ms$1@build.eclipse.org" type="cite">
<pre wrap="">I'm interested in if it is possible to configure the structure of the
xml which will be created when instantiating an ecore model by an
generated editor. </pre>
</blockquote>
To an extent yes. <br>
<blockquote cite="mid:h443mk$7ms$1@build.eclipse.org" type="cite">
<pre wrap="">I would have an xml structure containing classes of my
metamodel as xml structure-elements and not as attributes.</pre>
</blockquote>
Extended meta data annotations can be used for that.<br>
<blockquote cite="mid:h443mk$7ms$1@build.eclipse.org" type="cite">
<pre wrap=""> Now that's
the case only for my root class of my model, containing the defined
prefix. All the other classes appear as attributes in the xml and the
roles of the references are represented as xml elements. I imagine that
only classes of the metamodel are sufficient as xml-elements and roles
names of the references don't need to appear, isn't it? </pre>
</blockquote>
Not sure what you mean. Have a read through this:<br>
<blockquote><a
href=" http://www.eclipse.org/modeling/emf/docs/overviews/XMLSchema ToEcoreMapping.pdf"> http://www.eclipse.org/modeling/emf/docs/overviews/XMLSchema ToEcoreMapping.pdf</a><br>
</blockquote>
The annotations it describes can be added directly to an Ecore model...<br>
<blockquote cite="mid:h443mk$7ms$1@build.eclipse.org" type="cite">
<pre wrap="">Hope I expressed
myself understandable.

best regards,
Gilbert
</pre>
</blockquote>
</body>
</html>

--------------040700020009010609070909--


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:EMF XML Serialization
Next Topic:Creating an Instance on ModelPackage; Extension Point
Goto Forum:
  


Current Time: Thu Apr 25 07:49:55 GMT 2024

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

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

Back to the top