How to create a data model with Topcased
Creating a datamodel that extends XSDataCommon.uml
- Select a datamodel folder where the model should be created.
- Select menu entry File / New / Other / Topcased / Topcased Diagrams / UML Model with TOPCASED and press Next
- Select Create Model and enter the model name (without .uml) and press Finish.
- In the Outline view right click on Additional Resources ans select Load Resource
- Click on the button Browse Workspace and search for the XSDataCommon.uml
Now you can use types from XSDataCommon.uml in the new model. To drag an existing type onto the diagram open the XSDataCommon.uml resource in the Outline view and drag the class (e.g. XSData) onto the diagram.
To use an existing class as the type of an attribute: Create a Property in a class and open the Properties view (e.g. by right-clicking on the diagram). On the "Model" page click the button on the right side of the Type field. An Object Selection dialog pops up from which you can now select the type. In the Serach field you can enter the beginning of the searched type to filter the selection list.
How are changes from base models (e.g. XSDataCommon.uml) propagated to dependent models
Changes to a base model are automatically propagated to a dependent model, since the dependent model references the base model by relative paths. Of course these relative paths must be valid within the workspace (see next section for details).
References to XSDDataCommon.uml or any other used resource are made relative to the workspace location of the model that is created. The directory structure should reflect the SVN structure. This can be done if the EDNA SVN is checked out and used in te workspace or if sibling subprojects of EDNA are top-level projects in the Eclipse workspace.
For example, kernel and mxv1 are sibling in the SVN tree. These two subtress can be imported as top-level projects into the workspace. References from XSDataMXv1.uml to XSDataCommon.uml will be like follows:
<type xmi:type="uml:Class" href="../../kernel/datamodel/XSDataCommon.uml#_AWAkcOZ-Ed-EdKKHX-lwYA"/>