n-ary association and association class

UML related questions and discussions

Moderator: Moderators

n-ary association and association class

Postby Jomppa Koskinen » Fri Feb 24, 2006 7:08 am

Hi!

I wonder if it is possible to add an association class to a n-ary
association so that link to the association class would start from the
diamond? It works fine with MagicDraw version 9.0, but it seems that the
current version (10.5) allows adding an association class only to the
associations between two classes (or between a class and the diamond).

Thanks!
Jomppa Koskinen
 
Posts Rating:

Re: n-ary association and association class

Postby Mindaugas Genutis » Tue Feb 28, 2006 4:21 am

Hello,

If I understood you correctly, you want to draw an AssociationClass between
two diamonds (N-ary associations). N-ary association is a class in the
model. Thus, AssociationClass is allowed to connect to it. With MagicDraw
10.5sp1 I have succeeded in drawing AssociationClass between two diamonds
and a diamond and a class. See the image attached.

If you want to have a diamond instead of AssociationClass "Class" symbol, it
is not possible in MagicDraw.

Best regards,

--
Mindaugas Genutis
Programmer
No Magic Lithuanian Development Center
P.O. box 2166, Lt-44011, Kaunas
Phone: +370 37 324032 Fax: +370 37 320670
E-mail: mindaugas.genutis
WWW: http://www.magicdraw.com
--
MagicDraw - UML Made Simple

----- Original Message -----
From: "nntp://news.nomagic.com/nomagic.products.magicdrawuml.uml"
<jomppak>
To: "Mindaugas Genutis" <mindaugas.genutis>
Sent: Tuesday, February 28, 2006 2:01 PM
Subject: n-ary association and association class


> Hi!
>
> I wonder if it is possible to add an association class to a n-ary
> association so that link to the association class would start from the
> diamond? It works fine with MagicDraw version 9.0, but it seems that the
> current version (10.5) allows adding an association class only to the
> associations between two classes (or between a class and the diamond).
>
> Thanks!
>
You do not have the required permissions to view the files attached to this post.
Mindaugas Genutis
 
Posts Rating:

Re: n-ary association and association class

Postby Jomppa Koskinen » Thu Mar 02, 2006 2:30 am

Mindaugas Genutis wrote:
> Hello,
>
> If I understood you correctly, you want to draw an AssociationClass between
> two diamonds (N-ary associations). N-ary association is a class in the

Actually no. I just want to have an AssociationClass attached directly
to the diamond (as it is said in the programs help file), not between a
class and a diamond symbol. Please, refer attached picture. For some
reason, I can draw the association class only between two classes (I
think here the diamond is just like any other class).

JK
You do not have the required permissions to view the files attached to this post.
Jomppa Koskinen
 
Posts Rating:

Re: n-ary association and association class

Postby Mindaugas Genutis » Fri Mar 03, 2006 2:43 am

Hello,

> Actually no. I just want to have an AssociationClass attached directly
> to the diamond (as it is said in the programs help file), not between a
> class and a diamond symbol. Please, refer attached picture. For some
> reason, I can draw the association class only between two classes (I
> think here the diamond is just like any other class).

It is not possible to do this in MagicDraw. What is the semantic meaning of
the model you want to construct? Could you refer to UML 2.0 Specification to
advocate your proposed nonation?

I the UML 2.0 Superstructure (2005.07.04) chapter "7.3.4 AssociationClass"
p. 43 I found:

"An association class is shown as a class symbol attached to the association
path by a dashed line. The association path and the association class symbol
represent the same underlying model element, which has a single name".

According to the spec, AssociationClass is attached to Association and they
are a single model element. The notation does not provide an option for
attaching AssociationClass to any other symbol.

Best regards,

--
Mindaugas Genutis
Programmer
No Magic Lithuanian Development Center
P.O. box 2166, Lt-44011, Kaunas
Phone: +370 37 324032 Fax: +370 37 320670
E-mail: mindaugas.genutis
WWW: http://www.magicdraw.com
--
MagicDraw - UML Made Simple

You do not have the required permissions to view the files attached to this post.
Mindaugas Genutis
 
Posts Rating:

Re: n-ary association and association class

Postby Mindaugas Genutis » Thu Mar 09, 2006 2:54 am

Hello,

> In the documentation (or help file) of the MagicDraw it is said that
>
> "N-ary Association
> An is an association among two or more classes (a single class may
> appear more than once).
> An N-ary Association is shown as a large diamond with a path from the
> diamond to each participant class.
> An association class symbol _may be attached to the diamond_ by a dashed
> line. This indicates an n-ary association that has attributes,
> operations, and/or associations."
>
> There is also a picture for that (similar to the picture I have sent).

There is a bug in our documentation. It is not possible to have this
notation in 10.5 version. We'll update documentation in the nearest release.

> Yes, this is the case with two association ends (or member ends in
> UML2). If we have more than two, the association is represented with a
> diamond symbol and the association class is attached to the diamond (as
> stated in the help file).

Thanks for the feedback. We haven't found such notation in OMG's UML 2.0
spec. Such notation is not supported by current MagicDraw version.

Sorry for inconveniences,

Best regards,

--
Mindaugas Genutis
Programmer
No Magic Lithuanian Development Center
P.O. box 2166, Lt-44011, Kaunas
Phone: +370 37 324032 Fax: +370 37 320670
E-mail: mindaugas.genutis
WWW: http://www.magicdraw.com
--
MagicDraw - UML Made Simple

You do not have the required permissions to view the files attached to this post.
Mindaugas Genutis
 
Posts Rating:

Re: n-ary association and association class

Postby Jomppa Koskinen » Thu Mar 09, 2006 3:42 am

Mindaugas Genutis wrote:
> Hello,

Hello
>
>> Actually no. I just want to have an AssociationClass attached directly
>> to the diamond (as it is said in the programs help file), not between a
>> class and a diamond symbol. Please, refer attached picture. For some
>> reason, I can draw the association class only between two classes (I
>> think here the diamond is just like any other class).
>
> It is not possible to do this in MagicDraw. What is the semantic meaning of
> the model you want to construct? Could you refer to UML 2.0 Specification to
> advocate your proposed nonation?

In the documentation (or help file) of the MagicDraw it is said that

"N-ary Association
An is an association among two or more classes (a single class may
appear more than once).
An N-ary Association is shown as a large diamond with a path from the
diamond to each participant class.
An association class symbol _may be attached to the diamond_ by a dashed
line. This indicates an n-ary association that has attributes,
operations, and/or associations."

There is also a picture for that (similar to the picture I have sent).

>
> I the UML 2.0 Superstructure (2005.07.04) chapter "7.3.4 AssociationClass"
> p. 43 I found:
>
> "An association class is shown as a class symbol attached to the association
> path by a dashed line. The association path and the association class symbol
> represent the same underlying model element, which has a single name".

Yes, this is the case with two association ends (or member ends in
UML2). If we have more than two, the association is represented with a
diamond symbol and the association class is attached to the diamond (as
stated in the help file).

>
> According to the spec, AssociationClass is attached to Association and they
> are a single model element. The notation does not provide an option for
> attaching AssociationClass to any other symbol.
>
Yes, I know that the diamond is just the visualization element for n-ary
association, but I think the view element for the class part should be
attached to the diamond, not to the one of the association line
visualization elements.

Best regards,

--
Johannes Koskinen
Researcher
Tampere University Of Technology
Finland
You do not have the required permissions to view the files attached to this post.
Jomppa Koskinen
 
Posts Rating:

Re: n-ary association and association class

Postby Jomppa Koskinen » Thu Mar 09, 2006 5:58 am

Mindaugas Genutis wrote:
>> Yes, this is the case with two association ends (or member ends in
>> UML2). If we have more than two, the association is represented with a
>> diamond symbol and the association class is attached to the diamond (as
>> stated in the help file).
>
> Thanks for the feedback. We haven't found such notation in OMG's UML 2.0
> spec. Such notation is not supported by current MagicDraw version.

The notation for n-ary classes (UML 1.5) is specified in figure 3-44,
page 3-80 (UML specification file 03-03-01.pdf). The text in the current
UML specification (05-07-04?) is just copied from the old binary
association notation guide. For the n-ary associations, the old
specification defines following:

If a class box is attached to the diamond by a dashed line, then the
corresponding Classifier supplies the classifier properties for an N-ary
AssociationClass.

In the issue 8974
(<http://www.omg.org/issues/uml2-rtf.open.html#Issue8974>) there is a
comment for the notation for n-ary AssociationClasses:

The notation for Associations allows them to be depicted as a diamond
(even binary associations).
However the Notation for AssociationClasses assumes the Association is
depicted as a line only, and does not describe an option for attaching
an AssociationClass to an Association shown as a diamond. This should be
fairly obvious - just have the dotted line attached to the diamond
instead of the Association's line.

So, I think you should follow the specification of the UML 1.5 for n-ary
associationclass notation, because UML 2.0 specification says nothing
about it.


Best regards,

--
Johannes Koskinen
Researcher
Tampere University Of Technology
Finland
You do not have the required permissions to view the files attached to this post.
Jomppa Koskinen
 
Posts Rating:

Re: n-ary association and association class

Postby Mindaugas Genutis » Tue Mar 14, 2006 3:05 am

Hello,

> So, I think you should follow the specification of the UML 1.5 for n-ary
> associationclass notation, because UML 2.0 specification says nothing
> about it

Thanks for the feedback on association classes and n-ary associations. We'll
definitely improve this feature in the nearest versions.

Best regards,

--
Mindaugas Genutis
Programmer
No Magic Lithuanian Development Center
P.O. box 2166, Lt-44011, Kaunas
Phone: +370 37 324032 Fax: +370 37 320670
E-mail: mindaugas.genutis
WWW: http://www.magicdraw.com
--
MagicDraw - UML Made Simple

You do not have the required permissions to view the files attached to this post.
Mindaugas Genutis
 
Posts Rating:

Re: n-ary association and association class

Postby axel.scheithauer@oose.de » Fri Sep 21, 2018 8:03 am

Hi,

I tried drawing a n-ary association class today, and it seems it is still not working.

It is mentioned in the documentation: https://docs.nomagic.com/display/MD190/ ... tion+Class, but the text below the header "To draw an N-ary association class" only describes how to draw an n-ary association. This is not the same.

The structure in the model, that is created by the diamond in the diagram is also not correct, but that's another problem. Since it uses a class (wrongly) as a representation of the diamond, it would be quite simple to show it as an association class, as soon as I add some attributes to this class. This would at least allow to show the correct concrete syntax, even though the abstract syntax representation is not quite correct. While a correct representation would be preferrable, to provide the desired notation would be an acceptable workaround.

best regards

Axel Scheithauer
axel.scheithauer@oose.de
Forum Beginner
Forum Beginner
 
Posts: 60
Posts Rating:0
Joined: Fri May 21, 2010 7:19 am


Return to Software Modeling (UML)

Who is online

Users browsing this forum: No registered users and 1 guest