how to construct a uml property in the LET expression [message #537096] |
Tue, 01 June 2010 06:23  |
Eclipse User |
|
|
|
hi all
I am supposed to construct a class ownedAttributes from aother classes that has stereotype 'datatype'
I stopped in how to create a uml property in the let expression and fill its attributes like name and type, and the class that owns this property, all these constructed properties will be appended in a sequence then returned to the ownedAttribute property
can u check the idea and tell me how to use it
rule ontClass{
from
oc : UML!Class(
oc.hasStereotype('OntClass')
)
to
c : UML!Class(
name <- oc.name ,
ownedAttribute <- oc.myDatatypeProperty -> iterate( p ; propSeq : Sequence(UML!Property) = Sequence{} |
let a : UML!Property = ?????
-- i want here to set its name as p.name
-- type as p.ownedAttribute -> select(m | m.hasStereotype('range')) -> asSequecnce() ->first().type
--and the owner is of course class c
propSeq.including(a)
)
}
-- where myDatatypeProperty is a sequence of uml class that each class of this sequence will create an attribute in the class who calls the helper
thanks in advanced
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03547 seconds