Book a Demo

Author Topic: Relationship appearance with stereotype  (Read 5242 times)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Relationship appearance with stereotype
« on: April 14, 2005, 10:58:33 pm »
If you go to the Configuration | UML | Stereotypes dialog, you can adjust the appearance of shapes (GraphNodes) with the attributes on the dialog.  But you can't do it for lines (GraphEdges). ???

Can this be fixed please?

Actually, this is another example of the shapes vs lines dichotomy I've noticed in EA.  Doesn't really make sense to me.  They're both model elements, the common attributes and functionality should be placed at the corect point in the hierarchy! ::)

Paolo
« Last Edit: April 14, 2005, 10:58:55 pm by PaoloFCantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

thomaskilian

  • Guest
Re: Relationship appearance with stereotype
« Reply #1 on: April 15, 2005, 12:30:19 am »
Hmm. Elements are elements and egdes are edges. Even from a mathematical point of view they are quite different. I wonder how one should modify the shape of an edge. You definitely would need a different automat to define edge and element shapes.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Relationship appearance with stereotype
« Reply #2 on: April 15, 2005, 12:49:26 am »
Sorry, Thomas, again, you're right and you're wrong...   ;)

According to the UML 2 Superstructure Section 7.2 Abstract Syntax, Elements are elements and Relationships are elements.

In my original post I was using element in the UML 2 way...  GraphElement is the base and GraphNode and GraphEdge are the inheritors.

I realise  EA tends to use element to mean shape, but that's not UML compliant... ;)

Paolo
« Last Edit: April 15, 2005, 12:49:38 am by PaoloFCantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

thomaskilian

  • Guest
Re: Relationship appearance with stereotype
« Reply #3 on: April 15, 2005, 05:05:10 am »
Carefully reading the section
Quote
7.2.3 Element (from Kernel)
An element is a constituent of a model. As such, it has the capability of owning other elements.
Description
Element is an abstract metaclass with no superclass. It is used as the common superclass for all metaclasses in the
infrastructure library. Element has a derived composition association to itself to support the general capability for elements
to own other elements.
Attributes
No additional attributes.
and
Quote
7.2.4 Relationship (from Kernel)
Relationship is an abstract concept that specifies some kind of relationship between elements.
Description
A relationship references one or more related elements. Relationship is an abstract metaclass.
Attributes
No additional attributes.
Associations
• / relatedElement: Element [1..*]Specifies the elements related by the Relationship. This is a derived union.
Constraints
No additional constraints.
Semantics
Relationship has no specific semantics. The various subclasses of Relationship will add semantics appropriate to the concept
they represent.
Notation
There is no general notation for a Relationship. The specific subclasses of Relationship will define their own notation. In most
cases the notation is a variation on a line drawn between the related elements.

shows me that an element is basically nothing but an abstract class. Can you show me the extension to the abstract class element which you refer to?

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Relationship appearance with stereotype
« Reply #4 on: April 15, 2005, 07:27:10 am »
See diagram: Figure 3 - The root diagram of the Kernel Package in 7.2 Abstract Syntax.

BTW: as I read it, nothing in the text you quoted inhibits Relationship inheriting from Element as shown in the diagram.

I've found when reading the specifications you need to look at both the diagrams and the text, unfortunately the text appears to not be self-sufficient.

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

thomaskilian

  • Guest
Re: Relationship appearance with stereotype
« Reply #5 on: April 15, 2005, 07:51:58 am »
I saw this diagramm too. But this abstract class Element does not have anything along like stereotype. These seem to come at a higher level and I did not find where. My point is that (EA) elements and the Element in the diagram are somewhat different (although EA elements are derived from Element). Maybe we should wait for next monday and Bruce to comment on this ::)

sargasso

  • EA Practitioner
  • ***
  • Posts: 1406
  • Karma: +1/-2
  • 10 COMFROM 30; 20 HALT; 30 ONSUB(50,90,10)
    • View Profile
Re: Relationship appearance with stereotype
« Reply #6 on: April 15, 2005, 09:10:18 pm »
Actually, I'm pretty well much with Paolo on this.

OMG be d*mned.  Mathematically, it should be possible to "invert" nodes and edges on a directed graph with no inherent loss of semantics.  It is merely a different viewpoint of the same graph.

Ergo (weakly, but you'll get my drift), in EA a link element should have the same characteristics - and exhibit the same behaviours - as a shape element.

By way of a concrete example.  Consider the deployment model.  Nodes, usually representing some computational device, communicate with other nodes, represented by the edge of your choice.  Fine and dandy when the focus of attention is on the characteristics of the devices.  However if (when) our attention shifts to the communication characteristics, IMO the edges "become" shapes and the devices become links.

I would love to see EA be capable of this type of transformation - it would support that change of focus and  mean that information needs to be entered once only!

I have spoke.
bruce
"It is not so expressed, but what of that?
'Twere good you do so much for charity."

Oh I forgot, we aren't doing him are we.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Relationship appearance with stereotype
« Reply #7 on: April 16, 2005, 06:44:19 am »
Onya Bruce   ;D

Actually, I'm not so sure we need to damn the UML.  Although if they violate first principles, as Bruce suggests, we can ignore their dictate...  

From Thomas' quote, an edge is just an element that references other elements.  Including, by the way, other edges.  I should be able to define dertain linkages between associations etc.

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Relationship appearance with stereotype
« Reply #8 on: April 17, 2005, 06:32:36 pm »
Hey guys,

EA 5.0 will actually have support for model to model transformations through use of templates (same as code templates)

Out of interest, after seeing bruce's post I sat down to see if I could write a transformation like what he was talking about.

A short while later (Maybe half an hour) I had written templates that created nodes from associations and associations from nodes.  I'm sure it still has problems, but I'll get an account for the EA user group and post the exported reference data there.  (It won't make any sense at all to the current build of EA though.)

Simon

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Relationship appearance with stereotype
« Reply #9 on: April 17, 2005, 10:55:48 pm »
If you look at the code generation templates section of the EA user group there will now be a transformation template xml file.

To preview what transformation templates will look like (in the code template editor) edit the file to replace Invert Graph_Transform_Template with Transform_Code_Template.  Also you'll need to change one TemplateName from Connector to Connector__Anything.

Then import it into EA, and add the language Transform.

Simon

thomaskilian

  • Guest
Re: Relationship appearance with stereotype
« Reply #10 on: April 18, 2005, 01:16:37 am »
Quote
I have spoke.
bruce

Habemus papam ;)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Relationship appearance with stereotype
« Reply #11 on: April 18, 2005, 01:37:50 am »
Now we're in trouble...  In a previous life, my nickname bestowed on me by my colleauges was "Pope Paul"... ;D

Now which of us is the Italian pope and which the French? ;)

Paolo

Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

sargasso

  • EA Practitioner
  • ***
  • Posts: 1406
  • Karma: +1/-2
  • 10 COMFROM 30; 20 HALT; 30 ONSUB(50,90,10)
    • View Profile
Re: Relationship appearance with stereotype
« Reply #12 on: June 09, 2005, 12:11:22 am »
Has anyone taken this transform any further?  I want to invert an activity diagram.  In fact, its a pure inversion of activities to control flows and v.v.  Can it be done?  

???
bruce
"It is not so expressed, but what of that?
'Twere good you do so much for charity."

Oh I forgot, we aren't doing him are we.