This topic describes the information import and export features of Together. You must obtain and install a Together product with support for the various types of import-export operations in order to use the features. (See Where to Get Help for on-line resources for current product information.)
You can export information from your Together model in several ways:
Export Class or ER
diagrams, or EJBs to DDL files for
import into JDBC compliant databases
Generate
Interface Definition Language (IDL)
for a project.
You can also import several types of information into Together:
This section explains how to import files created with Rational RoseŽ. You can import Rose's .mdl files to create Together projects. Model files must be from Rose 98 version 4.2 or later. If you have older Rose models in a format previous to Rose98 version 4.2, you must convert them to the later format using an evaluation or regular version of Rose.
Import must take place within the context of a Together project. For maximum efficiency, especially when importing large models, close other applications to free up memory.
To import a Rose model:
On the Main menu, choose Tools | Import | Import from Rational Rose. The Open File dialog for your system displays.
Select the Rose model file you wish to import and click OK.
Import processing begins and progress is indicated on the Together status bar.
Notes:
If the converter finds more than one diagram with the same name in one logical package, the diagram file names are modified by adding an incremented index to the end of the file name. For example, if there is already a diagram file named Main.vfUseCase and the converter needs to save another Main.vfUseCase file, then the latter one is saved as Main1.vfUseCase and the diagram names reflect the changed filename).
Note links ("Note anchors" in Rose terminology) are not imported.
Direct conversion of a Together project into Rose's .mdl format is not supported. However, you can export model information to an XMI-compliant format that can be imported into Rose (see XMI Import-Export).
Together enables importing information from JDBC databases and exporting model information to create model-based database schemas. The following RDBMS types are currently supported:
ODBC/Access 97
Cloudscape
ODBC/MS SQL Server
SequelLink/Oracle
Oracle 7.3x, 8.x
With this feature you can generate Data Definition Language (DDL) for a data table based on a Class diagram, ER diagram, or EJB. You can opt to generate DDL files only, or to generate DLL and run in the same operation.
To run Generate DDL:
Open a project
containing the diagram to use as the source for information export.
Open
the Class diagram, ER diagram, or diagram modeling an EJB, from
which you want to generate a database schema.
Choose
Tools | Generate DDL on the main menu.
Use the Generate DDL expert dialog to choose the supported DBMS, set access parameters, etc. For Help on the Expert fields, see Reference: Database Export.
TIP:If you are exporting from a Class diagram, all classes in the source diagram must have their Persistent property set to True.
With this feature you can import schematic information from a supported database to create a Class diagram, ER diagram, or EJB.
To run Import Database:
Use your DBMS
administration utility to create a JDBC/ODBC data source for the
source database, if such a data source doesn't already exist. (You
will need to specify the data source during the import procedure.)
Open
a Together project in which to create diagram(s) from imported
schematic information (or create a new project).
Navigate
to the desired package.
Choose
Tools | Import Database on the main menu.
Use the Import Database expert dialog to choose the supported DBMS, choose tables, etc. For Help on the Expert fields, see Reference: Database Import.
If a Together project contains class diagrams with models appropriately structured to support IDL, you can generate and then round-trip engineer IDL for specific diagrams, selected classes, a specific package structure, or for the entire Together project.
In products with IDL support, the support is deactivated by default for performance reasons. You can activate and deactivate IDL support as needed.
To activate IDL support:
Open a project.
On the Modules tab of the Explorer, expand the Early Access node to show the IDL Export Support node.
Expand the IDL Export Support node to show the IDL Export Support module.
On the speedmenu, choose Activate.
After activation, the Generate IDL command is added to the Tools menu.
To generate IDL:
Open the project containing the class diagrams that will be the source for IDL generation. If you want IDL for the whole project, skip to step 5.
If you want to generate IDL for a specific package, navigate to it and open the <default> diagram in the Diagram pane.
If you want IDL for a particular package structure, navigate into the top-level package of that structure and select it in the Model tab of the Explorer.
If you want to generate IDL for one specific package, select the package in the Model tab of the Explorer.
Choose Tools | Generate IDL on the main menu to launch the Generate IDL dialog.
In the dialog, choose the desired Package option based on your preferences in 1-4.
Select a target directory for the generated IDL file(s).
Optionally review and change IDL Options. Click Options and use on-screen help text to change any option settings. Click OK to effect any changes.
Click OK in the Generate IDL dialog to launch IDL generation.
Open
the message pane before generating IDL so you can see the messages
generated by the process.
Deactivate IDL Export Support in the Modules tab when you are finished to free up system resources.
Together supports round-trip IDL engineering. You don't need to import IDL into a project... you can simply create a project around existing IDL code and continue working with it in Together. The process is the same as creating any new project, except that you choose IDL as the default programming language during the creation process.
You can import a model described in XMI (subset of XML) into a Together project. This generates source code in the programming language(s) supported by your Together product.
You can export model information from a Together project to an XML file containing the modeling information described in XMI.
Note that XMI import-Export requires Sun JRE version 1.2x or above
XMI import is available on the main Tools menu. If you are importing a large model, close other applications to free up memory.
To import a model described in XML:
Create a Together project for the model, or open an existing project to which you want to add the XML model and create or navigate to the desired package.
On the Main menu, choose Tools | Import | Import from XMI.
Navigate to the XML file containing the XMI information you wish to import into Together.
Wait while the XMI code is processed. This may take some time depending on the size of the model.
When processing is finished, a package diagram is created in the diagram pane. The Explorer's Model tab displays the packages and the default class diagram for each package. When you open diagrams and select classes, the generated source code displays in the Editor.
Note: If you plan to export a model from Rational Rose to XMI and later import it to Together, you should choose the ASCII/MBCS option in the Character Set options in Rose's Unisys XML Export dialog. Models exported to other character sets will not be properly imported into Together.
You can export a Together model to an XML file with the model described in XMI. You can subsequently import the XMI model into other systems that support XMI. Together provides these XMI export options:
Unisys XMI Interchange (compatible with Rational Rose)
IBM XMI Toolkit
Pure OMG XMI
To export a Together model to XMI:
Open the Together project you want to export.
On the Main menu, choose Tools | Export | Export to XMI.
In the dialog, select or create a directory for storing the resulting XML file.
Wait while the XMI code is generated. This may take some time depending on the size of the model. Progress displays on the Together status bar.
Note that only Class and Use Case diagrams are exported from the Together model.
You can import a Data Type Definition (DTD) file into a Together project. The import process creates a new XML structure diagram in the current package.
You can modify the XML elements visually in the XML structure diagram. You can also load the DTD file in the Editor and edit it as text. However, If you modify the XML code visually, the original DTD file is not updated. To update the file you should export the XML structure diagram.
To import a DTD:
On the Main menu choose: Tools |
Import | Import from DTD
In the resulting file chooser dialog, navigate to and select the DTD file you want to import.
A new XML structure diagram file is create in the current package and the diagram opens in a new tab in the Diagram pane. A shortcut to the new diagram is added to the diagram that was current before you began the import process.
To export a DTD file from a modified XML structure diagram:
Make sure the XML structure diagram is open, and is the current diagram in the Diagram pane.
On the Main menu choose: Tools | Export | Export to DTD.
In the resulting file chooser dialog, specify the location and filename of the DTD file you want to export.
To open a DTD file in the Editor:
Right-click on the Editor pane.
On the speedmenu choose Open.
In the resulting file chooser dialog, navigate to and select the DTD file you want to open.
Important: Together does not presently provide round-trip engineering for XML. Thus, modifications to an XML structure diagram imported from a DTD are not reflected in the source file. Likewise, changes to the source file are not reflected in any XML structure diagram.