| [news.eclipse.tools.emf] Re: [Ecore] Does EMF has some utility in ecore to store referred EClass(s) |
Wang,
Comments below.
Yes.I'm sorry for my wrong representation. The following is the correct.
---------------------------------------------------------------------------
Assuming EClass A has a reference to EClass B, this reference is lower bound is 1 and upper bound is unbounded(like *). It looks like A--(1....*)-->B, right?
There's a whole hierarchy of classes for representing any reference whose upper bound is something other that 1. EObjectEList is the root of that hierarchy. Things like the lower bound are not absolutely enforced; clearly a list will start empty and if you want to clear a list so that it's empty again, you're allowed to do that regardless of the lower bound. But if you invoke Diagnostician.INSTANCE.validate, it will complain if the list's size isn't 1 or more.
However, if we want to represent it at runtime of a model, we need to represent (1....*), especially ecore model itself. So, my question is whether ecore has some runtime implementation like one referred many?
Thanks.