Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » emf load
emf load [message #428861] Wed, 01 April 2009 06:54 Go to next message
gitanjali punj is currently offline gitanjali punjFriend
Messages: 59
Registered: July 2009
Member
Hi,
I was trying to validate a particular ecore model in emf which gave these
errors.

The opposite of a containment reference must be a containment reference.
A container must have the upper bound of '1' not '-1'

Can you explain me in detail what is the meaning of these errors or under
what condition these errors occur
Re: emf load [message #428872 is a reply to message #428861] Wed, 01 April 2009 11:22 Go to previous messageGo to next message
Felix Dorner is currently offline Felix DornerFriend
Messages: 676
Registered: July 2009
Senior Member
gitanjali punj wrote:
> Hi,
> I was trying to validate a particular ecore model in emf which gave
> these errors.
>
> The opposite of a containment reference must be a containment reference.
In other words you must be a child of your mother and your mother must
be a child of you. How did you validate this? Sure you don't mean:

"The opposite of a containment reference must be a *non* containment
reference."?

The negation of this rule is valid, not what you describe.

> A container must have the upper bound of '1' not '-1'
Each EObject is contained in exactly 0 or 1 containers. Check the 'upper
bound' attribute of the reference under question.

> under what condition these errors occur
At least the first one is an error in your validation rules. I doubt
that this was validated with something from www.eclipse.org/emf.


Felix
Re: emf load [message #428873 is a reply to message #428861] Wed, 01 April 2009 11:23 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33216
Registered: July 2009
Senior Member
Gitanjali,

Comments below.

gitanjali punj wrote:
> Hi,
> I was trying to validate a particular ecore model in emf which gave
> these errors.
>
> The opposite of a containment reference must be a containment reference.
You mean "The opposite of a containment reference must not be a
containment reference" where the above is the opposite of that.
> A container must have the upper bound of '1' not '-1'
>
> Can you explain me in detail what is the meaning of these errors or
> under what condition these errors occur
You can't make both ends of a bidirectional reference be containment.
Containment must induce a tree structure which means one of the sides
must represent the downward direction of the child relationship while
the other must represent the upward direction of the parent
relationship. So the opposite of a containment reference necessarily is
a container reference and a container reference necessarily must have
and upper bound of 1 because you can only have one parent in a tree
structure.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: emf load [message #428874 is a reply to message #428872] Wed, 01 April 2009 11:24 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33216
Registered: July 2009
Senior Member
Felix,

Oops, I'll have to read farther head before replying. :-P


Felix Dorner wrote:
> gitanjali punj wrote:
>> Hi,
>> I was trying to validate a particular ecore model in emf which gave
>> these errors.
>>
>> The opposite of a containment reference must be a containment reference.
> In other words you must be a child of your mother and your mother must
> be a child of you. How did you validate this? Sure you don't mean:
>
> "The opposite of a containment reference must be a *non* containment
> reference."?
>
> The negation of this rule is valid, not what you describe.
>
>> A container must have the upper bound of '1' not '-1'
> Each EObject is contained in exactly 0 or 1 containers. Check the
> 'upper bound' attribute of the reference under question.
>
>> under what condition these errors occur
> At least the first one is an error in your validation rules. I doubt
> that this was validated with something from www.eclipse.org/emf.
>
>
> Felix


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: emf load [message #428899 is a reply to message #428874] Wed, 01 April 2009 14:26 Go to previous message
Felix Dorner is currently offline Felix DornerFriend
Messages: 676
Registered: July 2009
Senior Member
Ed Merks wrote:
> Felix,
>
> Oops, I'll have to read farther head before replying. :-P

Probably you thought 'oh no this guy again, I won't read his post' :-p


Felix
Previous Topic:Hide/Reorder Nodes/Properties in Editor
Next Topic:serialized EObjects with xmi
Goto Forum:
  


Current Time: Thu Sep 19 18:59:49 GMT 2024

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

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

Back to the top