Hi Matthias, > Do you think this is possible? It should be possible with a MOF transformation. I can imagine how we would do it with MoTMoT. Since Spring imports 3GL the transformation rule can be specified on 3GL!Method. I guess it's possible with ATL but I don't have enough practical experience with that language/tool to tell.
Best regards, Pieter. On 9/8/05, Matthias Bohlen <[EMAIL PROTECTED]> wrote: > Hello Pieter, > > Wednesday, September 7, 2005, 10:42:35 AM, you wrote: > > PVG> Hi Matthias, > >> An interesting consequence is that UML2MOF generates the union of both > >> metamodels into the Spring metamodel. This is not quite what we > >> expected, right? On the other hand, it may help us because ATL will > >> easily be able to find the 3GL metaclasses, then. I am not sure yet. > PVG> This is normal. I'm using a metamodel (for traceability) that imports > PVG> the UML metamodel. The JMI interfaces generated for my traceability > PVG> models include those for UML models. It's even so that I can only > PVG> associate a traceability node with a UML model element if I load my > PVG> UML-XMI files into an extent conforming to the UML metapackage from > PVG> the traceability models. Elements in extents conforming to the UML > PVG> metapackage from the standard UML DI metamodel cannot be referenced > PVG> from my traceability elements. > > Yes, that's what I expected after I saw the Spring metamodel in XMI. > It's good to get your confirmation of this fact. > > PVG> I do wonder why the Spring metamodel uses the 3GL metamodel. Do you > PVG> just want to reuse elements declared in the 3GL metamodel or do you > PVG> still consider the 3GL elements as being from another metamodel? > > Well, I'd like to do the following: > > A Spring service is an element of the new metamodel for Spring apps > (just to tell you an example). It has a 1:0..n association to the > Method metaclass fromt the 3GL metamodel, because a Spring service has > methods. > > There will be two M2M transformations: > * one from UML to Spring > * one from Spring to 3GL > > Part of the first transformation will be a rule "UMLOpTo3GLMethod" > that transforms UML Operations into 3GL Methods, e.g. the methods of > the Spring services. > > Part of the second transformation will be a rule > "SpringServiceTo3GLClasses" to transform a Spring service into a > service interface, a service impl base and a service impl which will > be just 3 instances of the Class metaclass from the 3GL metamodel. > > Inside SpringServiceTo3GLClasses, there will be code to duplicate the > service methods into the service interface (signature only) and the > service base implementation (signature plus new body for exception > handling and delegate to the "handle..." method). > > Now this is the trick: I want to re-use the same ATL code that I need > for "UMLOpTo3GLMethod" again in the Java cartridge. The difficulty is > to write the rule so that it works identically on the pure 3GL as well > as the "enriched" Spring metamodel. The metaclasses would be the same > (UML!Operation and ???!Method) but the "???" would once be the 3GL > package included in the Spring metamodel and once be the "pure, > original" 3GL package in the 3GL metamodel used in the Java cartridge. > > Do you think this is possible? What would be the correct syntax for > "???" ? > > Cheers... > Matthias > > --- > > Matthias Bohlen > Beratung, Schulung, Coaching für IT-Projekte > > Internet: > http://www.mbohlen.de/ > [EMAIL PROTECTED] > > > > > ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf