Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » EMF in-memory repo ?
EMF in-memory repo ? [message #1101940] Thu, 05 September 2013 06:04 Go to next message
John D is currently offline John DFriend
Messages: 6
Registered: August 2013
Junior Member
Hi,

I have a usecase where I create a lot of EMF objects (not belonging to the same resourceset) in memory. I need to store these objects in some kind of a repo(something like a hashmap) in memory so that the objects could be retrieved later. Currently I store the objects in a hashmap. I am sure there must be better way to do this.

Could someone please point me in the right direction to solve this in a right way ?

Thanks,
John D
Re: EMF in-memory repo ? [message #1101975 is a reply to message #1101940] Thu, 05 September 2013 07:05 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 31780
Registered: July 2009
Senior Member
John,

It's better to ask EMF questions on the eclipse.tools.emf forum. More
comments below.

On 05/09/2013 8:04 AM, John D wrote:
> Hi,
> I have a usecase where I create a lot of EMF objects (not belonging to
> the same resourceset) in memory. I need to store these objects in some
> kind of a repo(something like a hashmap) in memory so that the objects
> could be retrieved later.
How are they retrieved? I.e., what's the key for retrieving them? Are
they contained by a resource? Why do you need to do this?
> Currently I store the objects in a hashmap. I am sure there must be
> better way to do this.
What do you consider not-so-deal about your current approach?
>
> Could someone please point me in the right direction to solve this in
> a right way ?
It's not really clear the nature of your problem or the purpose of your
solution...

The method
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.delegatedGetResource(URI,
boolean) might be useful for specializing your resource set to delegate
to some "global" resource set that contains resources you wish to share
across many resource sets. Be careful with such an approach though,
e.g., if you allow such shared objects to be modified in an editor
that's likely to cause problems...


> Thanks, John D


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: EMF in-memory repo ? [message #1102129 is a reply to message #1101975] Thu, 05 September 2013 11:59 Go to previous message
John D is currently offline John DFriend
Messages: 6
Registered: August 2013
Junior Member
Thank you for the reply Ed.

I will rephrase my question and post it in the right forum.

Thanks,
John D
Previous Topic:Eclipse shortcuts do not work when I switch keyboard
Next Topic:Change of Port address in mihini server
Goto Forum:
  


Current Time: Sun Mar 07 16:13:28 GMT 2021

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

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

Back to the top