|
|
|
Re: Extracting Data from GMF Model [message #518969 is a reply to message #518963] |
Fri, 05 March 2010 15:21 |
Ed Merks Messages: 33142 Registered: July 2009 |
Senior Member |
|
|
This is a multi-part message in MIME format.
--------------070505020708040806090400
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Senaka,
Comments below.
Senaka wrote:
>
> Hi Merks,
>
> I assume 'Your models will automatically be serialized to XML'
> means, the model definition file created under Eclipse project when
> save the model project. I agree that this file is in xml format.
>
> e.g:-
>
> <mindmap:map xmlns:mindmap="http://www.example.org/mindmap">
> <rootTopics name="Topic_One">
> <attributes name="att1"/>
> </rootTopics>
> <rootTopics name="Topic_Two"/>
> </mindmap:map>
>
> However my requirment is extracting the data (say "att1") from the
> model definition.
There will be a bunch of Topic instances that have a getName method as
well as a getAttributes method with Attribute instances that also have
getName methods.
> I can use xmlbean, xslt etc to extract the data from the above xml
> file. Is that the best solution? Is there any runtime java objects
> created when drow the diagram?
No, you'll be using EMF:
< http://www.theserverside.com/tt/articles/article.tss?l=Bindi ngXMLJava>
http://www.theserverside.com/tt/articles/article.tss?l=Bindi ngXMLJava
>
> Regards,
> Senaka
--------------070505020708040806090400
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Senaka,<br>
<br>
Comments below.<br>
<br>
Senaka wrote:
<blockquote cite="mid:hmr730$8d6$1@build.eclipse.org" type="cite"><br>
Hi Merks,
<br>
<br>
I assume 'Your models will automatically be serialized to XML' means,
the model definition file created under Eclipse project when save the
model project. I agree that this file is in xml format.
<br>
<br>
e.g:-
<br>
<br>
<mindmap:map xmlns:mindmap=<a class="moz-txt-link-rfc2396E" href="http://www.example.org/mindmap">"http://www.example.org/mindmap"</a>>
<br>
<rootTopics name="Topic_One">
<br>
<attributes name="att1"/>
<br>
</rootTopics>
<br>
<rootTopics name="Topic_Two"/>
<br>
</mindmap:map>
<br>
<br>
However my requirment is extracting the data (say "att1") from the
model definition.</blockquote>
There will be a bunch of Topic instances that have a getName method as
well as a getAttributes method with Attribute instances that also have
getName methods.<br>
<blockquote cite="mid:hmr730$8d6$1@build.eclipse.org" type="cite"> I
can use xmlbean, xslt etc to extract the data from the above xml file.
Is that the best solution? Is there any runtime java objects created
when drow the diagram?
<br>
</blockquote>
No, you'll be using EMF:<a
href=" http://www.theserverside.com/tt/articles/article.tss?l=Bindi ngXMLJava"><br>
</a>
<blockquote><a
href=" http://www.theserverside.com/tt/articles/article.tss?l=Bindi ngXMLJava"> http://www.theserverside.com/tt/articles/article.tss?l=Bindi ngXMLJava</a><br>
</blockquote>
<blockquote cite="mid:hmr730$8d6$1@build.eclipse.org" type="cite"><br>
Regards,
<br>
Senaka
<br>
</blockquote>
</body>
</html>
--------------070505020708040806090400--
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
Re: Extracting Data from GMF Model [message #518995 is a reply to message #518980] |
Fri, 05 March 2010 16:09 |
Ed Merks Messages: 33142 Registered: July 2009 |
Senior Member |
|
|
Senaka,
I'd suggest reading some basic information that's freely available on
the web. I already pointed you at some but my impression is you've not
read it. What you describe simply already works and all the source is
right there to look at how it works, so I'm not sure what your questions
are driving at. Just generate an editor and start to understand how it
all works, then ask more meaningful questions.
Senaka wrote:
> Hi Merks,
>
> Thanks. I'm trying to figure out how I can use EMF at runtime to
> extract data from the GMF model. My senario;
>
> 1. Drow the model using GMF based editor.
> 2. When click on 'Save' trigger EMF to extract data from the model.
>
> Any ideas?
>
> Regards,
> Senaka
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.03499 seconds