Skip to main content

Model structure definition

Overview

When defining Metamodel, the first thing to do is to define the structure of the model. Next Design allows you to define the structure of your model in the form of a UML class diagram. You can define the structure of the model by defining the entities and interactions that represent the design items and their parent-child relationships in the metamodel using a class diagram.

Entity is a model template. When applied to object-oriented design, an entity is a class and a model is an instance. Interaction is a model template that represents the interaction (behavior) between models. You can interact with UML sequence diagrams.

The procedure for defining the structure of a model in a class diagram is described below in the following order.

  • Prepare a class diagram for structure definition
  • Add an entity
  • Delete the entity
  • Change the settings for each entity
  • Define the hierarchical structure of the entity
  • Add/remove interactions
  • Classify and define by package

Image of model structure definition by class diagram

Model structure definition by class diagram


Prepare a class diagram for structure definition

Switch to the metamodel edit screen

To start defining the metamodel, first switch to the metamodel edit screen. The procedure is as follows.

Switch to metamodel edit screen

Operation procedure
  1. Switch to Profile Navigator with the selector at the top of the navigator.

Add a class diagram to the metamodel

To add a class diagram to your metamodel, use the Profile Navigator as follows:

Add class diagram to metamodel

Operation procedure
  1. Right-click the root node displayed at the top of the profile navigator or the package created in the profile, and execute [Add Class Diagram] from the context menu.
  2. Enter the name of the added class diagram, and the added class diagram will be displayed in the center of the screen and can be edited.
tip
  • You can create multiple class diagrams in your metamodel. You can define the class diagram separately for each model type, or you can define a detailed class diagram by cutting out a part like the whole diagram and the detailed diagram.

Add an entity

There are several ways to add an entity:

  • Add a new entity to the metamodel
  • Add an existing entity to the class diagram (redisplay the entity not in the class diagram)
  • Add a new entity while modeling (change the metamodel at the same time on the model edit screen)

Add a new entity to the metamodel

To add a new entity to the metamodel using the class diagram, drag and drop Entity from the Class Toolbox to add it and enter a name.

Add new entities to the metamodel

Add an existing entity to the class diagram

To add and display the entities already defined in the metamodel to the class diagram, follow these steps:

Add existing entity to class diagram

Operation procedure
  1. Add the predefined entity displayed on the profile navigator by dragging and dropping it on the class diagram.

Add new entities while modeling

You can also proceed with modeling by sequentially adding undefined entities to the metamodel while modeling on the model edit screen. The procedure is as follows.

Add new entity while modeling

Operation procedure
  1. Right-click on the parent model in the Model Navigator and select Add Model> New Entity from the context menu.
  2. Enter the required information in the [New Entity] dialog and click the [OK] button.
  3. By the above operation, the new entity is added to the metamodel, and at the same time, the model with the same name as the display name of the entity is also added to the model navigator.
note
  • New entities added to the metamodel will appear in the profile navigator, but not automatically in the class diagram. If necessary, manually add it to the class diagram as described in "Adding an Existing Entity to the Class Diagram" above.

Define the hierarchical structure of an entity

To specify the hierarchical structure of the model in the metamodel, establish an ownership relationship between the parent-child relationships. The procedure is as follows.

Define Entity Hierarchy

Operation procedure
  1. In the class diagram, move the pointer to the parent entity, drag the [โ–ฒ] icon that appears in the four directions, and drop it on the child entity.
  2. When you drop it, a related type of choice will pop up, and you can select it by clicking Embedded.
  3. This defines the parent-child relationship between the entities and allows you to add child entities as components of the parent entity during modeling.
info
  • You can define a nested entity by specifying the same entity as the referrer as the reference destination.

Change the settings for each entity

To change the icon of an entity or change the treatment of an entity to an abstract class, select the target entity in the class diagram or profile navigator and then use the Inspector to change it.

Change Entity Settings

reference
Using custom icons

Delete an entity

There are several ways to delete an entity:

  • Remove the entity from the metamodel
  • Remove the entity from the class diagram (do not remove it from the metamodel and hide it in the class diagram)

Remove an entity from the metamodel

To remove an entity from the metamodel using a class diagram, do the following:

Delete from metamodel

Operation procedure
  1. Select the target entity in the class diagram and execute [Delete From Model] from the context menu.
  2. If there is a model or other related entity that references that entity, a warning message will be displayed. If you want to delete those models and associations, click [Delete] to proceed.
  3. This removes the target entity from the class diagram as well as from the metamodel and from the Profile Navigator.
Attention
  • If you select the target entity and press the delete key, it will only be deleted from the class diagram and deleted from the metamodel, similar to [Delete From Diagram] in the context menu. It also remains on the profile navigator.

You can also remove an entity from the metamodel by following these steps:

Other operating procedures
  1. Select the target entity in the profile navigator and execute [Delete] from the context menu, or press the delete key.

Remove the entity from the class diagram

To remove an entity from the class diagram and hide it, do the following:

Delete from class diagram

Operation procedure
  1. Select the target entity in the class diagram and execute [Delete From Diagram] from the context menu, or press the delete key.
  2. This will remove it from the class diagram, but not from the metamodel, and the target entity will remain in the profile navigator. To redisplay it in the class diagram, manually add it to the class diagram by following the steps in "Adding an Existing Entity to the Class Diagram" above.

Add/remove interactions

To add a new interaction to the metamodel, just drag and drop Interaction from the Class Toolbox, add it, and enter a name, just as you would add an entity.

See
  • For information on adding an entity, see "Adding an Entity" above.

To remove an interaction from the metamodel, remove it in the same way that you delete an entity.

See
  • For information on deleting an entity, see "Deleting an Entity" above.

Classify and define by package

To categorize metamodel definitions by model type or according to the design process, add packages to the metamodel to categorize the components of the metamodel. The procedure is as follows.

Define by classifying by package

Operation procedure
  1. Right-click the root node displayed at the top of the profile navigator or the package created in the profile, and execute [Add]> [Package] from the context menu.
  2. Execute [Rename] from the context menu of the added package, or press the f2 key and enter the name of the package.
  3. After adding the package, drag and drop existing components into the package on the Profile Navigator to move them.