Importing and Exporting a Model Using XML Metadata Interchange (XMI)

From RAD Studio
Jump to: navigation, search

Go Up to Importing and Exporting Models

The Modeling supports XMI (XML Metadata Interchange) format. Please see the Object Management Group (OMG) Website for more information on XMI or to download the complete specification.

XMI enables the exchange of UML models across different UML modeling applications. For example, if you have a UML model created with another tool, you can import it as an XMI file into the Modeling for extension of your project or as the basis of a new project. Likewise, you can export RAD Studio modeling projects for use in other applications. The result in each case is a single, portable .XMI file.

To export a model to XMI format

  1. In the Model View, right-click the root project node and choose Export Project to XMI.
    Alternatively, select the root project node and choose File > Export Project to XMI on the main menu.
    The XMI Export dialog box opens.
  2. In the Select XMI Type group box, select the XMI type in which format you want to export the model. You can select from the following XMI types:
    • XMI for UML 1.3 (Unisys Extension)
    • XMI for UML 1.3 (Unisys Extension, Recommended for RAD Studio) - the default value
    • XMI for UML 1.3 (Unisys Extension, Recommended for IBM Rational Rose)
  3. On the XMI encoding drop-down combo box, click the drop-down arrow to select an appropriate character encoding. The default encoding is UTF-8.
  4. In the Select the Export Destination, specify the export destination file. You can enter the file name (with the .XMI extension) and the path to the file to create or you can accept the default:
  5. Click Export. If the destination directory does not exist, a confirmation dialog asks if you want to create it.
  6. Click Yes.
The wizard creates the specified XMI file and saves in it the selected modeling project in the selected XMI type format.

To import a UML model, stored in XMI format, into an existing project

  1. You need to have an .XMI file storing a UML model in the XMI format. For example, you can export the UML model, from the third-party UML modeling tool, using the XMI format. When exporting from Rational Rose, choose XMI version 1.1, using the Unisys extension.
  2. In the Model View, right-click the root node of an implementation or a design project. (The design project must comply to the UML 1.5 specification.)
  3. On the context menu, choose Import Project from XMI.
    Alternatively, in the Model View, select the root node of an implementation or a design project. Then, on the main menu, choose File > Import Project from XMI.
  4. The XMI Import dialog box opens. Browse for the .xmi file containing a UML model to import. This file can store, in the XMI format, a UML model or a modeling project.
  5. Click Import.
The UML model stored in the selected .xmi XMI format file is imported into the selected project.

See Also