Skip to content

Commit

Permalink
Update import-cim-uml.md
Browse files Browse the repository at this point in the history
  • Loading branch information
tviegut committed Apr 3, 2024
1 parent 20311d1 commit 4f07e7a
Showing 1 changed file with 17 additions and 14 deletions.
31 changes: 17 additions & 14 deletions docs/how-to/import-cim-uml.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,28 +57,15 @@ Finally, click the Export button.

![Export to XMI](../images/EAExportToXMIOptionsDetail.png)

To import the `.xmi` file, in **CIMTool** open the project you'd like to apply your CIM UML `.xmi` to and **Select File -> Import**. In the Import dialog, expand CIMTool folder and select Import Schema.

![Select Import Schema](../images/ImportSchema.png)

Browse to find the XMI file you exported from Enterprise Architect previously then select the checkboxes next to the project(s) for which you'd like to import the UML. At this point it is important to determine which namespace to specify. This will be the default namespace to be associated with the CIM schema (i.e. the base canonical model). Various releases of the CIM are specified as radio buttons that when selected will provide the default namespace for that release of the CIM while the "Preference*" radio button just give a generic namespace. Edit this field if needed. If importing an `.xmi` file containing your own custom extension packages then provide a unique namespace to associate with them in this field.

![Import Schema Dialog](../images/ImportSchemaDialog.png "Import Schema Dailog")

Once imported the CIM UML will be stored in the **Schema** folder of the project.

There is typically one schema per project, although there are cases where there may be more than one (e.g. if you have custom extensions or multiple CIM UML versions for a single Contextual Profile).

## Using an EA Project file in CIMTool

Exporting XMI can be slow. An alternative is to directly import an Enterprise Architect project file (`.eap` or `.eapx`) into **CIMTool**. This eliminates the need to export anything from EA before importing to CIMTool.

To import an `.eap` or `.eapx`file into a CIMTool project, use the **CIMTool** Schema Import wizard and select a file type of either `.eap` or `.eapx` respectively when browsing for the file. You must close the project in EA before importing it to CIMTool.

!!! tip

As of the EA 16.x release, `.eap` and `.eapx` files are no longer supported. **CIMTool** does not yet support the new EA 16.x project file format and instead the XMI schema option should be utilized if using the new release. For further information refer to EA's [EAP/EAPX File to QEA File Format](https://sparxsystems.com/enterprise_architect_user_guide/16.0/model_exchange/transfereap.html) page for a better understanding of changes in 16.x.


### File Format Considerations

The following table highlights the various tradeoffs of utilizing one format over another:
Expand All @@ -89,6 +76,22 @@ Format | Description | Pros | Cons
`.qea` / `.qeax` | Native EA project files. Introduced in EA 16.x the internal format of these files is based on the [SQLLite](https://www.sqlite.org/) open source database and is stored as binaries. Both file types support basic replication with the `.qeax` extension indicating that file sharing is enabled. A `.qeax` file can simply be renamed back to `.qea` to disable file sharing. | _These formats are not yet supported in **CIMTool**._ <br/><br/> These native project file formats will be able to be imported directly into **CIMTool** without the overhead of having to export an `.xmi` file.| | If hosting a CIMTool project on Github the use of one of these project files is not recommended (see: [About large files on GitHub](https://docs.github.com/en/repositories/working-with-files/managing-large-files/about-large-files-on-github) and [Git LFS](https://docs.github.com/en/repositories/working-with-files/managing-large-files/configuring-git-large-file-storage)). Instead an `.xmi` file should be utilized.
`.xmi` | The XMI (XML Metadata Interchange) format is an Object Management Group (OMG) standard for exchanging metadata information via Extensible Markup Language (XML). | Exporting the CIM as an `.xmi` schema file has added flexibility not available when using a native EA project file. Specifically, a subset of the CIM can be exported by simply selecting a specific package for export. This approach can be used to reduce the size of the schema file in a **CIMTool** project. Given that profiles are commonly defined for a particular domain (e.g. Transmission, Distribution, Market-related profiles) just a subset of the CIM can be exported and used within **CIMTool**. This is more suitable when hosting a **CIMTool** project in Github. <br/><br/> **CIMTool** supports the ability to import multiple `.xmi` schema files and for a user to assign a distinct namespace to each. This is useful when defining and exporting custom extensions as a separate `.xmi` file that coexists alongside an `.xmi` for the CIM model. | Exporting `.xmi` files can be time consuming and therefore inconvenient if quick iterative changes are needed to the CIM with a reimport into a **CIMTool** project. In this scenario it is suggested to use one of the native EA project files. The direct use of a project file eliminates the roundtrip time needed for the "make changes to the UML, export to XMI, import XMI into CIMTool" cycle.

## Importing a Schema File in CIMTool

To import an `.xmi`, `.eap` or `.eapx` file into **CIMTool**, open the project you'd like to use the schema with and **Select File -> Import**. In the Import dialog, expand CIMTool folder and select Import Schema.

![Select Import Schema](../images/ImportSchema.png)

Browse to find the `.xmi`, `.eap` or `.eapx` file then select the checkboxes next to the project(s) you want to import the schema file into.

At this point it is important to determine which namespace to specify. This will be the namespace associated with your imported CIM schema (i.e. the base canonical model). Various releases of the CIM are specified as radio buttons and provide the default namespace for the respective release. While the "Preference*" radio button just gives a generic namespace, most of the time you will want to customize it as needed. If importing an `.xmi` file containing your own custom extension packages you should provide a unique namespace to associate with this "extensions schema". (For more information on extensions visit the topic [CIMTool Support for Extension Namespaces](https://cimtool.ucaiug.io/how-to/cimtool-support-for-extension-namespaces/)). ote that if importing an `.eap` or `.eapx` file into a **CIMTool** project you must close the project in EA before importing it to **CIMTool**. Finally, if loading changes over an existing schema with the same name be sure to select the "Replace existig schema" checkbox.

![Import Schema Dialog](../images/ImportSchemaDialog.png "Import Schema Dailog")

Once imported the CIM UML will be stored in the **Schema** folder of the project.

There is typically one schema per project, although there are cases where there may be more than one (e.g. if you have custom extensions or multiple CIM UML versions for a single Contextual Profile).

## CIMTool Profiling Tutorial

For further details on how to use CIMTool to create and edit profiles based on the CIM visit the **How To** section of [https://cimtool.ucaiug.io/](https://cimtool.ucaiug.io/).
Expand Down

0 comments on commit 4f07e7a

Please sign in to comment.