Single connection between two nodes [message #205534] |
Mon, 15 September 2008 20:09 |
Eclipse User |
|
|
|
Originally posted by: zor0901.yahoo.com
Hi all,
does anyone know which OCL constrain I should use, if I want to have only
a single/unique connection between two nodes (e.g. I have a connection
between nodes N1 and N2, and I want it to be unique- the user should not
be able to create connection neither from N1 to N2, not from N2 to N1)
Thanks for your help,
Zori
|
|
|
Re: Single connection between two nodes -- OCL [message #206161 is a reply to message #205534] |
Sun, 21 September 2008 13:23 |
Eclipse User |
|
|
|
Originally posted by: xxx.xxxxxxxx.xxx
Hallo Zori,
depending on your domain model, the OCL expression for the Link Mapping
could look like this:
self.sourceConnections->forAll(conn|conn.target<>oppositeEnd) and
self.targetConnections->forAll(conn|conn.source<>oppositeEnd)
You could define it as a Link Constraint for your Link Mapping (either a
Source End Constraint of Target End Constraint- both will do the same job,
having this expression).
Best wishes,
Iliyana
Zori wrote:
> Hi all,
> does anyone know which OCL constrain I should use, if I want to have only
> a single/unique connection between two nodes (e.g. I have a connection
> between nodes N1 and N2, and I want it to be unique- the user should not
> be able to create connection neither from N1 to N2, not from N2 to N1)
> Thanks for your help,
> Zori
|
|
|
Powered by
FUDForum. Page generated in 0.02572 seconds