|
Re: Doubt defining my ecore model [message #511225 is a reply to message #511217] |
Sun, 31 January 2010 14:20 |
Ed Merks Messages: 33218 Registered: July 2009 |
Senior Member |
|
|
Comments below.
M. wrote:
> Hi,
>
> I'm trying to define a ecore model that i need to develope a emf
> widget editor (to verify the result), and then a gmf based grapic
> editor.
>
> I've tried to define it from a xml schema, the problem is that in
> practice the schema contains numerous details that I don't care
> (schema import and other..) and increase the complexity of the result.
> So because I think that my model domain is simple, I've tried to
> define manually (via uml diagram editor), but unsuccessfully .
Using Ecore Tools to directly edit Ecore would seem more direct and simpler.
>
> Below this a description of the model and problems that I've
> encountered in its manual definition
>
> ---------description of domain model----------
> I have 4 element to model (.. ..and finally to draw)
> -1-One with an ID EString Attribute
> -2-Two
> -3-Three
> --I suppose that all are children of an Abstract class "number" (that
> i don't nedd to draw, and I don't care)
>
> -4-Then there is another elemente "item" with id1 and id2 attriburte
> (EString type)
>
> Well my problem is to understand the relationship (how to model them?)
> betwen 1,2,3 and item when the expected structure is like below defined :
>
> The Root is one element (every instances of my model is contained in a
> "one" element) then
>
> one element can contain:
> -0 or unbounded item
> -0 or unbounded two
> -0 or unbounded three
>
> item element can contain
> -0 or unbounded one
>
> two element can contain
> -0 or unbounded one
> -0 or unbounded item
> -0 or unbounded three
>
> three element can contain
> -0 or unbounded one
> -0 or unbounded two
> -0 or unbounded item
I'm just not sure what your question is. By the time you describe what
you want completely, you'd have spelled out exactly what your Ecore
model should be. Even the Sample Ecore Editor is not so hard to use...
>
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Re: Doubt defining my ecore model [message #511227 is a reply to message #511217] |
Sun, 31 January 2010 14:43 |
M. Messages: 19 Registered: November 2009 |
Junior Member |
|
|
well,
I've modeled the containment relationship betwen element (eclass), like aggregation 0..*. .
-So, I'm not sure of this choice because there are numeros aggregations in both directions?
-Then another question is: if (and eventually how) the concept of "Root" element (external container of all, but that can also contain itself) can be modeled in ecore (this interest me also because in the gmf generator process I need indicate a root element..)
----
I've tried to remake my ecore like I think (adding only a Root Element)
image of ecore here (note: name used are different not one,two,three but policy,all,excatlyone and policyassertion for item)
Problem: why when i run editor (as Eclpise application) and create in a new general project a file "wplocy Model" I can't make child that I need? image here
[Updated on: Sun, 31 January 2010 16:55] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
Re: Doubt defining my ecore model [message #514304 is a reply to message #514301] |
Sat, 13 February 2010 21:06 |
Ed Merks Messages: 33218 Registered: July 2009 |
Senior Member |
|
|
You'd get this if you support child creation for a reference that isn't
containment. It indicates there's a reference to an object not
contained by any parent object and not contained directly in a resource.
M. wrote:
> auto refresh correct with "notify" setted true. thanks
>
> But when I save I've always problem, the message is:
>
> "org.eclipse.emf.ecore.resource.Resource$IOWrappedException: The
> object mailto:'Wpolicy.impl.PolicyImpl@cdd92e (id: null)' is not
> contained in a resource."
>
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.04444 seconds