Skip to main content



      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 02:09 Go to next message
Eclipse UserFriend
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 02:33 Go to previous message
Eclipse UserFriend
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 Jul 01 15:10:50 EDT 2025

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

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

Back to the top