Restrictions on links [message #157068] |
Wed, 24 October 2007 21:08 ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: renee.steiner.intervoice.com
Hi, All!
I have a node which has 3 possible link instances outgoing. These link
instances are all subclasses of a specific link type.
For example, I have a generic "transition" link and the 3 subclassed links
are "yes", "no", and "maybe". The generic transition link is defined as
0..* and the schema requires that all transitions be of the name
"transition" and have an attribute "type" that describes the subclass. I
want to be able to only allow one of each of the subclassed links to come
out of the node.
How can I guarantee that I only allow one "yes", one "no", and one
"maybe"? To elaborate, I would like to "grey out" yes (in the hanger pop
up menu) if the yes transition type has already been placed on the canvas.
Thanks in advance!
|
|
|
Re: Restrictions on links [message #157076 is a reply to message #157068] |
Wed, 24 October 2007 22:55 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: jan.herriger.gmx.de
Hi Renee,
defining link constraints (source end, language=java) in the mapping
model would be one starting point. After generation, edit generated
JavaConstraints methods in xxxBaseItemSemanticEditPolicy to implement
your constraints.
CrossReferenceAdapter would be of help to resolve transitions connected
to your node, if the relations between transitions and nodes are
unidirectional.
Renee Steiner's schrieb:
> Hi, All!
>
> I have a node which has 3 possible link instances outgoing. These link
> instances are all subclasses of a specific link type.
> For example, I have a generic "transition" link and the 3 subclassed
> links are "yes", "no", and "maybe". The generic transition link is
> defined as 0..* and the schema requires that all transitions be of the
> name "transition" and have an attribute "type" that describes the
> subclass. I want to be able to only allow one of each of the subclassed
> links to come out of the node.
>
> How can I guarantee that I only allow one "yes", one "no", and one
> "maybe"? To elaborate, I would like to "grey out" yes (in the hanger
> pop up menu) if the yes transition type has already been placed on the
> canvas.
>
> Thanks in advance!
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.03401 seconds