problem adding an association property to ownedAttribute [message #897518] |
Tue, 24 July 2012 11:27 |
Martin Benedict Messages: 22 Registered: June 2012 |
Junior Member |
|
|
My target model is the eclipse UML2 mm.
The navigable ends of the associations must be contained in the ownedAttribute-property of the classes the association references. I don't know how I have to write this down. Perhaps I have to use resoleTemp, but I haven't understood how it works, yet.
Code is the following:
rule ClassToClass{
from
c1: HL7!HL7Class
to
c2: UML!Class (
name <- c1.name,
ownedAttribute <- --here the property p2 the association should appear
)
}
from
a: HL7!HL7Association
to
as: UML!Association (
name <- a.name,
ownedEnd <- Set{p1},
memberEnd <- Set{p2}
),
p1: UML!Property (
name <- a.associationEnds.first().name,
type <- a.associationEnds.first().connectedClass
),
p2: UML!Property (
name <- a.associationEnds.last().name,
type <- a.associationEnds.last().connectedClass
)
}
How would I add p2 to ownedAttribute in the class rule?
I would be happy if anybody could help me. Thanks in advance
[Updated on: Tue, 24 July 2012 11:30] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03172 seconds