Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsEnds of association
https://www.eclipse.org/forums/index.php/mv/msg/150236/472208/#msg_472208
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]]>2007-04-03T08:29:20-00:00Re: Ends of association
https://www.eclipse.org/forums/index.php/mv/msg/150236/472214/#msg_472214
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
>]]>james bruck2007-04-03T16:47:54-00:00Re: Ends of association
https://www.eclipse.org/forums/index.php/mv/msg/150236/605368/#msg_605368
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
>]]>james bruck2007-04-03T16:47:54-00:00Re: Ends of association
https://www.eclipse.org/forums/index.php/mv/msg/150236/472225/#msg_472225
Originally posted by: guillaume.clement.gmail.com
Ok, thanks for your post.
Guillaume]]>2007-04-04T14:53:00-00:00Re: Ends of association
https://www.eclipse.org/forums/index.php/mv/msg/150236/605422/#msg_605422
Originally posted by: guillaume.clement.gmail.com