|
|
|
|
Re: Create Relation Edge through JAva Service [message #1764079 is a reply to message #1763850] |
Wed, 24 May 2017 15:00 |
|
Hi Paul,
As suggested by Laurent, you simply have to create an EdgeMapping to simulate this "complex" relation.
There are two options
The first one consists in creating a RelationBaseEdge between your list mappings and use a JavaService to navigate the model from the one you will choose as source mapping to the target element. Note that the displayed direction is simply a configuration of the edge, you can choose to display the arrow on the source or on the targe (or ven both). You have maybe a direction which will be simpler to compute.
The other solution consists in the creation of an ElementBasedEdge, based on one of the non displayed element (the functional exchange for example), you will need to be able to provide a query (semantic candidates of the mapping) to retrieve them from the semantic element used as diagram root (or you can keep it empty but it will navigate the whole model to find the candidates). Then from the exchange, you will have to write two queries or JavaService to retireve the source or the target. Which can be esaier to compute than the relation from the source to the target.
Note that you can get the semantic cross referencer of the session (or maybe reuse yours if you have your own cross referencer) to retrieve an element which references another one if their is no eOpposite reference.
Regards,
Maxime
|
|
|
Re: Create Relation Edge through JAva Service [message #1764080 is a reply to message #1764079] |
Wed, 24 May 2017 15:01 |
|
Hi Paul,
As suggested by Laurent, you simply have to create an EdgeMapping to simulate this "complex" relation.
There are two options
The first one consists in creating a RelationBaseEdge between your list mappings and use a JavaService to navigate the model from the one you will choose as source mapping to the target element. Note that the displayed direction is simply a configuration of the edge, you can choose to display the arrow on the source or on the targe (or ven both). You have maybe a direction which will be simpler to compute.
The other solution consists in the creation of an ElementBasedEdge, based on one of the non displayed element (the functional exchange for example), you will need to be able to provide a query (semantic candidates of the mapping) to retrieve them from the semantic element used as diagram root (or you can keep it empty but it will navigate the whole model to find the candidates). Then from the exchange, you will have to write two queries or JavaService to retireve the source or the target. Which can be esaier to compute than the relation from the source to the target.
Note that you can get the semantic cross referencer of the session (or maybe reuse yours if you have your own cross referencer) to retrieve an element which references another one if their is no eOpposite reference.
Regards,
Maxime
|
|
|
|
Powered by
FUDForum. Page generated in 0.04438 seconds