transform uml class to a uml property in another class [message #536087] |
Wed, 26 May 2010 22:57 |
wafaa Messages: 163 Registered: January 2010 Location: Egypt |
Senior Member |
|
|
I want to transform a class with stereotype "datatypeProperty" to a property in a uml class(B) , if the type of an attribute in the first class "datatypeProperty" which is called Domain is the uml class(B)
How can I make this binding:
rule ontClass {
from
c : UML!Class (
c.hasStereotype('OntClass')
)
to
out : UML!Class (
name <- c.name,
ownedAttribute <- UML!Class.allInstances() -> select(c|c.hasStereotype('DatatypeProperty'))
-> select(p|p.attribute)->
select(e | e.hasStereotype('domain') and e.type = c)
)
}
rule dataTypeProperty{
from
dtp : UML!Class(
dtp.hasStereotype('DatatypeProperty')
)
to
out : UML!Property(
name <- dtp.name,
type <- dtp.attribute -> select(p |p.hasStereotype('range')).type ,
owner <-dtp.attribute -> select(p |p.hasStereotype('domain')).type
)
}
[Updated on: Wed, 26 May 2010 22:58] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.03883 seconds