There are multiple reasons why you may want to export an entire meta model. For example, you may plan to set up a test database using the exported meta model. Or, you may want to compare two meta models, e.g., test and production, using the Metamodel Diff tool. Exporting the meta model can also be a means of keeping track of meta model changes. There are three ways to export:
- Export Using the swArchitect
- Automated Export Using the swXmlExport Tool
- Export with Data Using the swExplorer Client (this option would include the export of data along with the meta model)
Export Using the swArchitect
The Architect allows for export to either XML or XMI file format.
Prerequisites
- An installation of the SystemWeaver Architect client (swArchitect)
- Assignment of the SW Architect role in the database
XML Export
The XML Export... option in the Architect client enables you to export the entire meta model of a database in a SystemWeaver XML formatted file that can be imported into other SystemWeaver databases.
- Click XML Export.... The Export Meta Data dialog will display.
- Enter an Export Description if desired. This is optional.
- Check the Include config-items option if you want to include the config items. Note that technically config items are not part of the meta model however, they serve to configure a database much in the same way as the meta model.
- Click Save and select a location for the generated XML file using the Save As dialog.
XMI Export
An XMI file can be imported into, for example, Enterprise Architect to view the meta model in UML.
- Select the Export to XMI... or Export to XMI with PartTypes as Classes... option. The latter represents SystemWeaver part types as UML classes.
- Enter a File name for your XMI output file and a location using the Save As dialog and click Save. The file will generate.
Automated Export Using the swXmlExport Tool
For automated export, you can utilize the swXmlExport tool. Below is an example command line for exporting only the meta model. It could, for example, be incorporated in to scheduled back-up processes.
Example Command
swXmlExport.exe XmlFileName=c:\temp\MMExport.xml ExportMetadata=true ServerName=sys7 ServerPort=1234 ServerUserName=username ServerPassword=password
To include the plain text of any Item/Part type and/or Attributes Descriptions, include IncludePlainDescription=true in your command.
Export with Data Using the swExplorer Client
There is also an Include metadata option for exporting an entire meta model when exporting data. See XML Export: Exporting Models from SystemWeaver.