Ok, thanks, that explains why it didn't work as I expected...


I don't really need any information I can't access through the PackageFacade, 
but I was actually checking the runtime return type of getPackage(), and wanted 
to loop until I encountered a Model, which would mean I was at the top level 
and could stop looping. I used instanceof for that, but obviously that didn't 
work as I got PackageFacades no matter what. It's not a serious problem in 
itself, as I could use metaObjects if I really wanted, but currently I'm 
checking on the presence of a stereotype, which also works in my case.



Conceptually though, I must say I find the mapping a bit confusing: Unless I'm 
mistaken, org.omg.uml.UmlPackage is in fact a Proxy, used to create JMI objects 
from the UML metamodel. I.e. in fact it is the handle to the metamodel.

As you point out, there's org.omg.uml.modelmanagement.Model and 
org.omg.uml.modelmanagement.UmlPackage in the metamodel, which are related via 
a generalization.

Then in the metafacades, there's org.andromda.metafacades.uml14.PackageFacade 
and org.andromda.metafacades.uml14.ModelFacade. To me, it feels straightforward 
that these (being in the same package) are mapped to UmlPackage and Model.

I have no problems with the fact that you might not see the need for a separate 
metafacade for Model, and that you want a metafacade for the 
org.omg.uml.UmlPackage proxy, but in that case, I'd prefer the latter to be 
named e.g. MetaModelFacade, in order to avoid confusion.



Anyway, you might feel my proposal to be the confusing one of course, so no 
need to change anything in that case, but I thought I'd just share my view on 
this matter...



Thanks,



Hans
--
If we cannot live so as to be happy, let us at least live so as to deserve it

 -- Immanuel Hermann Fichte
_________________________________________________________
Reply to the post : http://galaxy.andromda.org/forum/viewtopic.php?p=3238#3238
Posting to http://forum.andromda.org/ is preferred over posting to the mailing 
list!


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Andromda-user mailing list
Andromda-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/andromda-user

Reply via email to