Skip to main content



      Home
Home » Modeling » EMF » EMap<Object, EObject>
EMap<Object, EObject> [message #430846] Fri, 12 June 2009 07:13 Go to next message
Eclipse UserFriend
Hi,

I need an efeature with a "type" Map<Object, EObject>. Unfortunately
defining a EMap<Object, EObject> datatype requires custom implementation of
(de)serializing the "value" EObject. And I do not want implement such
serialization as the object already is an EObject.

In principle I can make my EObject be able to identify itself with the
"key", but still I need a specific "unique" colletion (as feature value
holder).
That collection should ensure there is only one EObject with the same "key",
similar to set, but adding new EObject should replace the same "key" object.

Maybe somebody had similar issue?
Re: EMap<Object, EObject> [message #430847 is a reply to message #430846] Fri, 12 June 2009 08:53 Go to previous message
Eclipse UserFriend
This is a multi-part message in MIME format.
--------------020406020003000501040002
Content-Type: text/plain; charset=windows-1257; format=flowed
Content-Transfer-Encoding: 7bit

Martynas,

Comments below.

Martynas Lelevicius wrote:
> Hi,
>
> I need an efeature with a "type" Map<Object, EObject>. Unfortunately
> defining a EMap<Object, EObject> datatype requires custom
> implementation of (de)serializing the "value" EObject. And I do not
> want implement such serialization as the object already is an EObject.
How about using an EMap?

http://wiki.eclipse.org/index.php/EMF/FAQ#How_do_I_create_a_ Map_in_EMF.3F

The serialization of EJavaObject isn't human readable so that's going to
be kind of yucky too...
>
> In principle I can make my EObject be able to identify itself with the
> "key", but still I need a specific "unique" colletion (as feature
> value holder).
> That collection should ensure there is only one EObject with the same
> "key", similar to set, but adding new EObject should replace the same
> "key" object.
>
> Maybe somebody had similar issue?

--------------020406020003000501040002
Content-Type: text/html; charset=windows-1257
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=windows-1257"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Martynas,<br>
<br>
Comments below.<br>
<br>
Martynas Lelevicius wrote:
<blockquote cite="mid:h0td8q$ga9$1@build.eclipse.org" type="cite">Hi,
<br>
<br>
I need an efeature with a "type" Map&lt;Object, EObject&gt;.
Unfortunately defining a EMap&lt;Object, EObject&gt; datatype requires
custom implementation of (de)serializing the "value" EObject. And I do
not want implement such serialization as the object already is an
EObject.
<br>
</blockquote>
How about using an EMap?
Previous Topic:[TENEO] Problem with GMF BasicDecorationNodeImpl
Next Topic:Customizing XML format of root element
Goto Forum:
  


Current Time: Fri Jul 18 21:59:10 EDT 2025

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

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

Back to the top