[mdr-users] RE : [mdr-users] Restoring model using cluetered package
"Olivier RICHAUD" <[email protected]> Thu, 10 Nov 2005 17:22:14 +0100
| Newsgroups | gmane.comp.java.netbeans.modules.mdr.user |
|---|---|
| Message-ID | <000001c5e612$e96fdf70$0a64a8c0@lauris> |
OK what's happening: 1. A model is defined in UML, exported as XMI/UML, and converted to MOF, much like UML2MOF 2. This model is enriched. For example, non abstract classes inherit from a class which has previously been loaded in a package. Thus, in order to use those previouly defined packages, we add all needed imports clauses and we create the new extent by passing references to those clustered packages (array of RefPackage as required). 3. Then we decide to export the model in XMI. Thus, in our XMI there classes that inherits from classe defined in the clustered package. And we only have an import clause for the imported package, but this clause only refers to the MOF ID of the import packages 4. Now, I decide to clean up MDR. And I want to restart from XMI/MOF file previsouly exported. As I told you, there is only an import clause and some of my classes refer to a class defined (by ad xmi.idref attribute) in the imported package. Our system, at start up, recreate all these needed imported packages by reading a bunch of MOF/XMI files. Of course, we can't restore these package with the same MOF Id, as it is of MDR responsibility to assign MOF ID. What's most surprising is MDR behaviour, and to explain this I have attached a model. You can pay attention to class Definition and DataDefinition: they are both defined in the model and not part of an imported package. Definition inherits from DataDefinition but also of a class from this imported package (an import clause exists). Definition an d DataDefinition are correctly restored using XmiReader and MDR does not complain. But although it could restore inheritancy relationship between DataDefinition and Definition, it doesn't. I hope I'm clear enough. Regards. Olivier -----Message d'origine----- De : Martin Matula [mailto:[email protected]] Envoyé : jeudi 10 novembre 2005 16:54 À : [email protected] Objet : Re: [mdr-users] Restoring model using cluetered package I don't understand. What do you mean by "restoring" the model? Martin Olivier RICHAUD wrote: > H i all, > > I need to restore a model where some classes inherits from classes > that > where brought by a clusred Package: > > A in clustered package CP <|---- B in package P > > My XMI file has an import clause for the clustered package. > > Any idea, advice? > > Regards. > > Olivier. > > >
TEST.xmi
(application/octet-stream, 32.9 KB) - not displayed