create UML association using ownedEnd, ownedMEmber [message #536302] |
Thu, 27 May 2010 11:12  |
Eclipse User |
|
|
|
hi all, how can I create association from uml class,
the ownedEnd are as properties of that class
and what is different between ownedEnd and memberEnd
Quote: |
from op : UML!Class
(
op.hasStereotype('ObjectProperty')
)
using{
src : UML!Property = op.ownedAttribute -> select(e | e.hasStereotype('domain'));
dst : UML!Property = op.ownedAttribute -> select(e | e.hasStereotype('range')) ;
}
to ass : UML!Association(
name <- op.name,
ownedEnd <- Set{src , dst },
navigableOwnedEnd <- src ,
memberEnd <- Set{src , dst}
)
|
by this code only the association with no properties
[Updated on: Thu, 27 May 2010 11:13] by Moderator
|
|
|
Re: create UML association using ownedEnd, ownedMEmber [message #536320 is a reply to message #536302] |
Thu, 27 May 2010 12:04  |
Eclipse User |
|
|
|
An association is completely different to a class, unless it is an
AssociationClass.
A normal association uses memberEnds to refewrences Property ends owned
by a Class.
However for nonnavigable links, the Class-owned Property does not exist
so the Association must own it via ownedEnd.
An AssociationClass enhances the link withy full class characteristics.
Read a good UML or OCL document.
Regards
Ed Willink
On 27/05/2010 16:12, wafaa wrote:
> hi all, how can I create association from uml class,
> the ownedEnd are as properties of that class
> and what is different between ownedEnd and memberEnd
>
> Quote:
>> from op : UML!Class
>> (
>> op.hasStereotype('ObjectProperty')
>> )
>> using{
>> src : UML!Propert = op.ownedAttribute -> select(e |
>> e.hasStereotype('domain'));
>> dst : UML!Propert = op.ownedAttribute -> select(e |
>> e.hasStereotype('range')) ;
>> }
>> to ass : UML!Association(
>> name <- op.name,
>> ownedEnd <- Set{src , dst },
>> navigableOwnedEnd <- src ,
>> memberEnd <- Set{src , dst} )
>
>
> by this code only the association with no properties
|
|
|
Powered by
FUDForum. Page generated in 0.03498 seconds