[ATL][newbie] Some problem in UML2 to UML2 transformation [message #74240] |
Mon, 04 February 2008 15:41 |
Eclipse User |
|
|
|
Originally posted by: zappasan.gmail.com
Hi!
I want to execute a transformation that from a class stereotyped by
<<wsdl>> create one class for each wsdl element. For example if I have a
class named DatabaseManager stereotyped by <<wsdl>> I want in output all
the classes about wsdl language (definition, portType, ecc.). This not
properly a mapping but a creation of classes from zero. I have some
problems:
1. I have to Setup the type of some property and I've written this code:
type <- UML2!DataType.allInstancesFrom('UML2')->any(e | e.name = 'String')
But it has no effect at the uml output file. When I go to obeserve the
"type" feature of the property I have a blank field.
2. How Can I setup an association between two classes?
This what I've written
helper def: c1: UML2!Property = '';
rule createPT{
from
cs: UML2!Class (cs.hasStereotype('service::wsdl'))
to
ct: UML2!Class,
p0: UML2!Property(
name<-'name',
type <- UML2!DataType.allInstancesFrom('UML2')->any(e | e.name =
'String'),
default<-cs.name
),
a: UML2!Association
do{
ct.name<-'wsdl:PortType'+thisModule.counter.toString();
thisModule.counter <-thisModule.counter+1;
ct.ownedAttribute<-Set{p0};
a.name<-thisModule.c1.name+'To'+ct.name;
a.memberEnd<-Set{p0, thisModule.c1};
}
}
The helper caches a property defined in the creation of another class. I
can't think that this association set up works fine because in the
relatedElement feature I have blank.
Can you help-me please?
Thank you
Emanuele
|
|
|
|
Powered by
FUDForum. Page generated in 0.01330 seconds