Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » EClass loading parameters dynamically from an XML file(Newbie question)
EClass loading parameters dynamically from an XML file [message #654089] Mon, 14 February 2011 07:09 Go to next message
Lior Missing name is currently offline Lior Missing nameFriend
Messages: 18
Registered: February 2011
Junior Member
Hi Everyone,
I have an EClass that needs to acquire some parameters (for example, some command file parameters or parameters that exists in an XML file) dynamically.
As a newbie , I'm interested in your opinion - what's the best way to do it? which data structure fits best here?
I thought about an HashMap<String,String>, or eAnnotation.
In Addition, is there any established way to load objects dynamically to an EClass object?

Thanks,
Lior
Re: EClass loading parameters dynamically from an XML file [message #654091 is a reply to message #654089] Mon, 14 February 2011 07:33 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 30543
Registered: July 2009
Senior Member
Lior,

Comments below.

Lior wrote:
> Hi Everyone,
> I have an EClass that needs to acquire some parameters (for example,
> some command file parameters or parameters that exists in an XML file)
> dynamically.
I'm not sure I really understand what this means...
> As a newbie , I'm interested in your opinion - what's the best way to
> do it? which data structure fits best here?
An EClass for a generated model is generally a static thing that's best
not modified. Of course you can associate things with it in the normal
Java way, i.e., with a map that has the EClass as the key...
> I thought about an HashMap<String,String>, or eAnnotation.
EAnnotations are generally static information associated with the class,
not dynamic information... Certainly it's possible for an EAnnotation
use it's references feature to refer to EObjects in some other resource,
but I'm not sure that's really what you want; you'd need to use dynamic
package loading (GenPackage options) to support that...
> In Addition, is there any established way to load objects dynamically
> to an EClass object?
No. You should think of this as similar to wanting to load dynamic
objects to a java.lang.Class, i.e., you generally can't and don't...
>
> Thanks,
> Lior
>
Previous Topic:[CDO] CDOChangeSetData with CDOCollectionLoadingPolicy set
Next Topic:[Teneo] String fields mapping (problem with ntext/varchar)
Goto Forum:
  


Current Time: Tue Oct 15 08:49:53 GMT 2019

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

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

Back to the top