Re: XMI import
Martin Matula <[email protected]> Fri, 25 Jul 2003 10:28:24 +0200
| Newsgroups | gmane.comp.java.netbeans.modules.mdr.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Phil, I have replied to your e-mail several days ago on [email protected] mailing list. Here is the text I am copy-pasting from that e-mail: Hi Phil, yes, MDR is able to load XMI 1.1 files, etc. But only if it has the metamodel that the XMI file conforms to. XMI file format is different for MOF models, than for UML models for example. Because XMI is a generic specification of how to derive XML serialization rules from a given metamodel. By default, MDR contains the metamodel of MOF loaded in itself (because MDR is implementation of MOF). What you are trying to do is to load a UML XMI into it. That does not work. You first need to load the definition of UML (from http://mdr.netbeans.org/metamodels.html - make sure you load the right version of UML and please read the instructions at the top of the page - besides the metamodel you will need the diff file that is also provided on the page). To do this, instantiate Model package in MDR Explorer (this will create a new instance of MOF extent - "database" for storing MOF metadata) and import the UML metamodel into this new extent. After that, you should see several UML packages under that new extent. One of them is named UML. Instantiate that package - this will create instance of UML metamodel - an UML extent, into which you should now be able to load UML XMI files. Hopefuly this helps, Martin [email protected] wrote: > Hi, > > I tried to import an XMI file into the MDR explorer but it didn't work. I > got several error messages. The one I got mostly often is the following: > > javax.jmi.xmi.MalformedXMIException: > org.netbeans.lib.jmi.util.DebugException: Namespace cannot be resolved: UML > > I tried to import different files using different XMI version settings. Not > one single file could be successfully imported. > > What am I doing wrong? > > Any help would be appreciated. Thanks in advance. > > Phil >