Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » transform uml class to a uml property in another class(ownedAttribute <- UML!Class.allInstances() -> ......)
icon11.gif  transform uml class to a uml property in another class [message #536087] Wed, 26 May 2010 22:57
wafaa is currently offline wafaaFriend
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

Previous Topic:ATL Autocompletion..!!1
Next Topic:counter
Goto Forum:
  


Current Time: Fri Apr 26 05:25:03 GMT 2024

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

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

Back to the top