Skip to main content



      Home
Home » Modeling » EMF » Serialise Individual Objects and Defining specific Interface with schema
Serialise Individual Objects and Defining specific Interface with schema [message #400881] Fri, 05 May 2006 11:40 Go to next message
Eclipse UserFriend
Originally posted by: darran.white.cognos.com

Hi,
We need to serialise individual objects from our model and I found a
previous post where someone had to do somthing similar:-
http://dev.eclipse.org/newslists/news.eclipse.tools.emf/msg0 2617.html

The conclusion of which is subclassing XMLResourceImpl:-
http://dev.eclipse.org/newslists/news.eclipse.tools.emf/msg0 2628.html

With the new 2.2 release is this still necessary? Or is there a way to
serialise specific objects in the model perhaps using a URI Fragment? Such
as is suggested in the post:-
http://dev.eclipse.org/newslists/news.eclipse.tools.emf/msg0 2621.html

Also when generating the model from an XMLSchema is there a way to specify
a base class for certain generated classes? For example we will be using
an ID and Name
in most elements so a supertype containing these would be useful in the
model.
Obviously this can be done with JET templates but I wondered if there was
a easier way of doing this.

Thanks

Darran
Re: Serialise Individual Objects and Defining specific Interface with schema [message #400885 is a reply to message #400881] Fri, 05 May 2006 12:21 Go to previous messageGo to next message
Eclipse UserFriend
This is a multi-part message in MIME format.
--------------000102080408080402020802
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Darran,

XMLHelperImpl.saveString shows a technique for reusing the parts used
during serialization to save just a collection of things without copying
or adding to a resource.

GenModel properties like these can be used to inject base classes or
interfaces into all instances:



Darran wrote:
> Hi,
> We need to serialise individual objects from our model and I found a
> previous post where someone had to do somthing similar:-
> http://dev.eclipse.org/newslists/news.eclipse.tools.emf/msg0 2617.html
>
> The conclusion of which is subclassing XMLResourceImpl:-
> http://dev.eclipse.org/newslists/news.eclipse.tools.emf/msg0 2628.html
>
> With the new 2.2 release is this still necessary? Or is there a way to
> serialise specific objects in the model perhaps using a URI Fragment?
> Such as is suggested in the post:-
> http://dev.eclipse.org/newslists/news.eclipse.tools.emf/msg0 2621.html
>
> Also when generating the model from an XMLSchema is there a way to
> specify a base class for certain generated classes? For example we
> will be using an ID and Name
> in most elements so a supertype containing these would be useful in
> the model.
> Obviously this can be done with JET templates but I wondered if there
> was a easier way of doing this.
>
> Thanks
>
> Darran
>
>


--------------000102080408080402020802
Content-Type: multipart/related;
boundary="------------040907050101010701080107"


--------------040907050101010701080107
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Darran,<br>
<br>
XMLHelperImpl.saveString shows a technique for reusing the parts used
during serialization to save just a collection of things without
copying or adding to a resource.<br>
<br>
GenModel properties like these can be used to inject base classes or
interfaces into all instances:<br>
<blockquote><img src="cid:part1.02070505.02020107@ca.ibm.com" alt=""><br>
</blockquote>
<br>
Darran wrote:
<blockquote cite="mid540996ef7a634adb7fd5c687d11e8339$1@www.eclipse.org"
type="cite">Hi,
<br>
We need to serialise individual objects from our model and I found a
previous post where someone had to do somthing similar:-
<br>
<a class="moz-txt-link-freetext" href=" http://dev.eclipse.org/newslists/news.eclipse.tools.emf/msg0 2617.html"> http://dev.eclipse.org/newslists/news.eclipse.tools.emf/msg0 2617.html</a>
<br>
<br>
The conclusion of which is subclassing XMLResourceImpl:-
<br>
<a class="moz-txt-link-freetext" href=" http://dev.eclipse.org/newslists/news.eclipse.tools.emf/msg0 2628.html"> http://dev.eclipse.org/newslists/news.eclipse.tools.emf/msg0 2628.html</a>
<br>
<br>
With the new 2.2 release is this still necessary? Or is there a way to
serialise specific objects in the model perhaps using a URI Fragment?
Such as is suggested in the post:-
<br>
<a class="moz-txt-link-freetext" href=" http://dev.eclipse.org/newslists/news.eclipse.tools.emf/msg0 2621.html"> http://dev.eclipse.org/newslists/news.eclipse.tools.emf/msg0 2621.html</a>
<br>
<br>
Also when generating the model from an XMLSchema is there a way to
specify a base class for certain generated classes? For example we will
be using an ID and Name
<br>
in most elements so a supertype containing these would be useful in the
model.
<br>
Obviously this can be done with JET templates but I wondered if there
was a easier way of doing this.
<br>
<br>
Thanks
<br>
<br>
Darran
<br>
Re: Serialise Individual Objects and Defining specific Interface with schema [message #400887 is a reply to message #400885] Fri, 05 May 2006 12:51 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: darran.white.cognos.com

Ok,
I`ll check the saveString code.
Thanks Ed.

Was the comment:-

"GenModel properties like these can be used to inject base classes or
interfaces into all instances:"

Supposed to have some text or was it an attachment?
I`m using the Web Interface so something may of got a bit messed up.

I was looking through the gen model properties using the Eclipse plugin
and couldn`t see anything to set a interface/base class in them on a
specific object in the model. Maybe I`m just being a bit on the blind side.

Thanks

Darran
Re: Serialise Individual Objects and Defining specific Interface with schema [message #400893 is a reply to message #400887] Fri, 05 May 2006 16:37 Go to previous messageGo to next message
Eclipse UserFriend
Darran,

It was a picture pointing out the Root Extends Class property and the
Root Extends Interface Property. All root classes will extend the
former, in place of EObjectImpl, and all root interfaces will extend the
later, instead of EObject.


Darran wrote:
> Ok,
> I`ll check the saveString code.
> Thanks Ed.
>
> Was the comment:-
> "GenModel properties like these can be used to inject base classes or
> interfaces into all instances:"
>
> Supposed to have some text or was it an attachment?
> I`m using the Web Interface so something may of got a bit messed up.
>
> I was looking through the gen model properties using the Eclipse
> plugin and couldn`t see anything to set a interface/base class in them
> on a specific object in the model. Maybe I`m just being a bit on the
> blind side.
>
> Thanks
>
> Darran
>
Re: Serialise Individual Objects and Defining specific Interface with schema [message #400903 is a reply to message #400893] Mon, 08 May 2006 04:14 Go to previous message
Eclipse UserFriend
Originally posted by: darran.white.cognos.com

Thanks Ed,
Thats exactly what we need for a super type. I thought it would be easier
then writing a JET template. Don`t know how I missed that though, as I
checked the GenModel.
I`ll sign up to the news group so I can send/receive attachements as well.
Previous Topic:Programmatically open/close containment structures in the generated editor
Next Topic:questions about loading genmodels
Goto Forum:
  


Current Time: Fri Sep 26 20:44:53 EDT 2025

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

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

Back to the top