Skip to main content



      Home
Home » Modeling » EMF » Xor Constraint with EMF
Xor Constraint with EMF [message #1070822] Thu, 18 July 2013 15:00 Go to next message
Eclipse UserFriend
Hi,

what's the best way to realize a UML XOR constraint with EMF. The following model gives you an idea what I mean:

index.php/fa/15638/0/

Cheers,
Phil
  • Attachment: xor_emf.JPG
    (Size: 36.42KB, Downloaded 438 times)
Re: Xor Constraint with EMF [message #1070850 is a reply to message #1070822] Thu, 18 July 2013 16:22 Go to previous message
Eclipse UserFriend
Phil,

The only way in the core framework is to define a constraint:

http://help.eclipse.org/kepler/index.jsp?topic=/org.eclipse.emf.doc/references/overview/EMF.Validation.html

This case could be handled as an invariant that tests that at most one
of the two features is non-null. Or it could be done as a named
constraint on the Remove EClass that tests the same thing.


On 18/07/2013 9:00 PM, Phil H wrote:
> Hi,
>
> what's the best way to realize a UML XOR constraint with EMF. The following model gives you an idea what I mean:
>
>
>
> Cheers,
> Phil
Previous Topic:XSD to Ecore: Prevent generation of w3 schemas
Next Topic:Drag'n drop (or cut & paste) programmatically
Goto Forum:
  


Current Time: Fri Jul 18 23:09:25 EDT 2025

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

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

Back to the top