Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Ends of association
Ends of association [message #472208] Tue, 03 April 2007 08:29 Go to next message
Eclipse UserFriend
Originally posted by: guillaume.clement.gmail.com

Hi,

I have UseCases linked to artifact by a simple association. (one artifact
could be associated to many usecases).
I use artifact to describe Business rules.

With the UML 2 API I'm able to parse the artifacts and get all the
associations.
But my trouble occurs when I want to catch the end of the association.
I was expected 'a usecase' but I only have operation to get more than one
ends. (getOwnedEnds).

So my first question is why we could have more than one end for an
association ?
And my second is : how can i get the end (a usecase) of an association ?

Thx

Guillaume
Re: Ends of association [message #472214 is a reply to message #472208] Tue, 03 April 2007 16:47 Go to previous messageGo to next message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Guillaume,

1. The authors of the UML spec probably wanted to keep the concept of
association very generic in the sense that associations can be applied to
many different situations. Sometimes n-ary associations are required for
complex relationships although in practice, I have not seen a tool that
actually allows users to create n-ary associations ;) binary associations
are more common.


2. To get the end of an association, you can try to use the
getOwnedEnd(String, type) version of the API if you want to get the use case
end ( pass the UseCase EClass in the second parameter ). Alternatively,
you can get the list and then iterate through all the items to find the end
you are interested in.

Regards,

- James.


"Guillaume Clement" <guillaume.clement@gmail.com> wrote in message
news:773b53b9c70f9e9b0ba4ab7a05831427$1@www.eclipse.org...
> Hi,
>
> I have UseCases linked to artifact by a simple association. (one artifact
> could be associated to many usecases).
> I use artifact to describe Business rules.
>
> With the UML 2 API I'm able to parse the artifacts and get all the
> associations.
> But my trouble occurs when I want to catch the end of the association.
> I was expected 'a usecase' but I only have operation to get more than one
> ends. (getOwnedEnds).
>
> So my first question is why we could have more than one end for an
> association ?
> And my second is : how can i get the end (a usecase) of an association ?
>
> Thx
>
> Guillaume
>
Re: Ends of association [message #472225 is a reply to message #472214] Wed, 04 April 2007 14:53 Go to previous message
Eclipse UserFriend
Originally posted by: guillaume.clement.gmail.com

Ok, thanks for your post.

Guillaume
Re: Ends of association [message #605368 is a reply to message #472208] Tue, 03 April 2007 16:47 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Guillaume,

1. The authors of the UML spec probably wanted to keep the concept of
association very generic in the sense that associations can be applied to
many different situations. Sometimes n-ary associations are required for
complex relationships although in practice, I have not seen a tool that
actually allows users to create n-ary associations ;) binary associations
are more common.


2. To get the end of an association, you can try to use the
getOwnedEnd(String, type) version of the API if you want to get the use case
end ( pass the UseCase EClass in the second parameter ). Alternatively,
you can get the list and then iterate through all the items to find the end
you are interested in.

Regards,

- James.


"Guillaume Clement" <guillaume.clement@gmail.com> wrote in message
news:773b53b9c70f9e9b0ba4ab7a05831427$1@www.eclipse.org...
> Hi,
>
> I have UseCases linked to artifact by a simple association. (one artifact
> could be associated to many usecases).
> I use artifact to describe Business rules.
>
> With the UML 2 API I'm able to parse the artifacts and get all the
> associations.
> But my trouble occurs when I want to catch the end of the association.
> I was expected 'a usecase' but I only have operation to get more than one
> ends. (getOwnedEnds).
>
> So my first question is why we could have more than one end for an
> association ?
> And my second is : how can i get the end (a usecase) of an association ?
>
> Thx
>
> Guillaume
>
Re: Ends of association [message #605422 is a reply to message #472214] Wed, 04 April 2007 14:53 Go to previous message
Eclipse UserFriend
Originally posted by: guillaume.clement.gmail.com

Ok, thanks for your post.

Guillaume
Previous Topic:Model metrics and model difference
Next Topic:Applying stereotype on Class
Goto Forum:
  


Current Time: Thu Apr 25 23:05:50 GMT 2024

Powered by FUDForum. Page generated in 0.04230 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top