| Working with edges on nodes [message #411840] |
Tue, 07 August 2007 14:30  |
Eclipse User |
|
|
|
Hi!
I'm using EMF and GMF in my master thesis, and have a more theoretical question:
Most editors define edges for nodes (EClasses in EMF). How can edges be incorperated in EMF?
My best guess now is using generic attributes, is there a better way that I've missed?
Regards
|
|
|
|
|
|
|
| Re: Working with edges on nodes [message #411862 is a reply to message #411861] |
Wed, 08 August 2007 08:31   |
Eclipse User |
|
|
|
This is a multi-part message in MIME format.
--------------000704010303050800010607
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Tomas,
Comments below.
Tomas Zijdemans wrote:
> Thank you for the insight. I will explore your suggestions.
>
> Let me try to explain further:
>
> My classes are not relating directly. Ex: Java class "OntologyClass" has a value "generalisedBy" (one of it's edges) which is an object of type "SubClassRelationSet". This class holds references to which "OntologyClass" (or node) it belongs to, and holds all the ontologyClasses it generalises.
>
I see. I would have expected generalizedBy to be multi-valued and to
have SubClassRelation as representing a single generalization relation
between two OntologyClass instances. But this way seems fine too, just
not what I expected because the former way would allow attributes per
generalization and this way allows only attributes for all
generalizations as a unit.
> So in a model "OntologyClass" <-> "SubClassRelation" <-> (0,*) "OntologyClass". This "SubClassRelation"-Class has it's own attributes, but it's not desirable to model this underlaying class.
>
I suppose you mean it's not desirable to see it as a node in the
graphical representation. Instead you'd like to see it as an edge....
> What I would really like is to be able, in GMF, to draw an arrow (reference) between to instances of a class , and then afterwards be able to click on that arrow (to view/edit attributes).
>
It would seem that a SubClassRelation*Set *would correspond to many
graphical edges not just one edge. Is that really your intent? I doubt
GMF supports such a thing. I suppose one way to look at it is to treat
the OntologyClass and it's SubClassRelationSet as both mapping to the
same node and then treading the SubClassRelationSet's references to
other OntologyClasses as the edges; I'm not sure if this is supported
either.
*
*
--------------000704010303050800010607
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Tomas,<br>
<br>
Comments below.<br>
<br>
<br>
Tomas Zijdemans wrote:
<blockquote
cite="mid:40600999.61186574875152.JavaMail.root@cp9.dzone.com"
type="cite">
<pre wrap="">Thank you for the insight. I will explore your suggestions.
Let me try to explain further:
My classes are not relating directly. Ex: Java class "OntologyClass" has a value "generalisedBy" (one of it's edges) which is an object of type "SubClassRelationSet". This class holds references to which "OntologyClass" (or node) it belongs to, and holds all the ontologyClasses it generalises.
</pre>
</blockquote>
I see. I would have expected generalizedBy to be multi-valued and to
have SubClassRelation as representing a single generalization relation
between two OntologyClass instances. But this way seems fine too, just
not what I expected because the former way would allow attributes per
generalization and this way allows only attributes for all
generalizations as a unit.<br>
<blockquote
cite="mid:40600999.61186574875152.JavaMail.root@cp9.dzone.com"
type="cite">
<pre wrap="">
So in a model "OntologyClass" <-> "SubClassRelation" <-> (0,*) "OntologyClass". This "SubClassRelation"-Class has it's own attributes, but it's not desirable to model this underlaying class.
</pre>
</blockquote>
I suppose you mean it's not desirable to see it as a node in the
graphical representation. Instead you'd like to see it as an edge....<br>
<blockquote
cite="mid:40600999.61186574875152.JavaMail.root@cp9.dzone.com"
type="cite">
<pre wrap="">
What I would really like is to be able, in GMF, to draw an arrow (reference) between to instances of a class , and then afterwards be able to click on that arrow (to view/edit attributes).
</pre>
</blockquote>
It would seem that a SubClassRelation<b>Set </b>would correspond to
many graphical edges not just one edge. Is that really your intent? I
doubt GMF supports such a thing. I suppose one way to look at it is
to treat the OntologyClass and it's SubClassRelationSet as both mapping
to the same node and then treading the SubClassRelationSet's references
to other OntologyClasses as the edges; I'm not sure if this is
supported either.<br>
<b><br>
</b><br>
</body>
</html>
--------------000704010303050800010607--
|
|
|
|
| Re: Working with edges on nodes [message #412076 is a reply to message #412074] |
Thu, 16 August 2007 08:43  |
Eclipse User |
|
|
|
This is a multi-part message in MIME format.
--------------010200000900030904080604
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Tomas,
These are GMF questions now best asked on the GMF newsgroup:
news://news.eclipse.org/eclipse.modeling.gmf
Tomas Zijdemans wrote:
> I'm sorry generalizedBy is multi-valued. This is a set. This set has attributes such as rolename (this is supported in gmf), and a couple of other ints and booleans.
>
> Maybee I can show this in the context menu of links in GMF?
>
> And another ting: Is it possible to show the cardinality of references in gmf?
>
--------------010200000900030904080604
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Tomas,<br>
<br>
These are GMF questions now best asked on the GMF newsgroup:<br>
<blockquote><a href="news://news.eclipse.org/eclipse.modeling.gmf">news://news.eclipse.org/eclipse.modeling.gmf</a><br>
</blockquote>
<br>
Tomas Zijdemans wrote:
<blockquote
cite="mid:778997690.9151187267410169.JavaMail.root@cp9.dzone.com"
type="cite">
<pre wrap="">I'm sorry generalizedBy is multi-valued. This is a set. This set has attributes such as rolename (this is supported in gmf), and a couple of other ints and booleans.
Maybee I can show this in the context menu of links in GMF?
And another ting: Is it possible to show the cardinality of references in gmf?
</pre>
</blockquote>
<br>
</body>
</html>
--------------010200000900030904080604--
|
|
|
Powered by
FUDForum. Page generated in 0.06892 seconds