Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » create UML association using ownedEnd, ownedMEmber
create UML association using ownedEnd, ownedMEmber [message #536302] Thu, 27 May 2010 15:12 Go to next message
wafaa is currently offline wafaaFriend
Messages: 163
Registered: January 2010
Location: Egypt
Senior Member
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 15:13]

Report message to a moderator

Re: create UML association using ownedEnd, ownedMEmber [message #536320 is a reply to message #536302] Thu, 27 May 2010 16:04 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7098
Registered: July 2009
Senior Member
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
Previous Topic:Create a children for an element
Next Topic:[ATL] how to extends ATL language with own library ?
Goto Forum:
  


Current Time: Sun Apr 18 22:21:43 GMT 2021

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

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

Back to the top