Skip to main content

model structure definition

Overview

When defining a 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 UML class diagrams. You can define the structure of the model by defining entities and interactions that represent design items and their parent-child relationships in the metamodel using class diagrams.

Entity is a template for a model. In object-oriented design, entities are classes and models are instances. Interaction is a model template that represents the interaction (behavior) between models. UML sequence diagrams can be expressed as interactions.

The steps for defining the structure of the model in the class diagram are explained below in the following order.

  • Prepare class diagram for structure definition
  • add entity
  • Delete entity
  • Change per-entity settings
  • Define hierarchy of entities
  • Add/remove interactions
  • Categorize and define for each package

Image of model structure definition by class diagram

Model structure definition by class diagram


Prepare class diagram for structure definition

Switch to metamodel edit screen

To start defining the metamodel, first switch to the metamodel editing screen. Here are the steps:

Switch to metamodel edit screen

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

Adding class diagrams to the metamodel

To add a class diagram to your metamodel, use the profile navigator and follow these steps:

Add class diagram to metamodel

Operation procedure
  1. Right-click the root node displayed at the top of the profile navigator or the package already created in the profile, and execute [Add Class Diagram] from the context menu.
  2. After entering the name of the added class diagram, the added class diagram will be displayed in the center of the screen and can be edited.
tip
  • A metamodel can have multiple class diagrams. You can define separate class diagrams for each type of model, or define detailed class diagrams by extracting parts such as overall diagrams and detailed diagrams.

add an entity

There are multiple ways to add entities:

  • add new entities to the metamodel
  • Add existing entities to class diagram (re-display entities not in class diagram)
  • Add new entities while modeling (modify metamodel at the same time in model edit screen)

Add a new entity to the metamodel

To add a new entity to the metamodel using the class diagram, add an Entity by dragging and dropping it from the class toolbox and enter a name.

add new entities to metamodel

Add Existing Entity to Class Diagram

To add an entity already defined in the metamodel to the class diagram and make it visible, proceed as follows:

Add existing entities to class diagram

Operation procedure
  1. Drag and drop the defined entity displayed on the profile navigator to the class diagram to add it.

Adding New Entities While Modeling

While modeling on the model edit screen, you can also proceed with modeling by adding undefined entities to the meta model one by one. Here are the steps:

add new entity while modeling

Operation procedure
  1. Right-click the parent model in the model navigator and select [Add Model] > [New Entity] from the context menu.
  2. Enter the necessary information in the [New Entity] dialog and press the [OK] button.
  3. With the above operation, a new entity is added to the metamodel, and a model with the same name as the entity's display name is also added to the model navigator.
note
  • New entities added to the metamodel will appear on the profile navigator, but will not automatically appear on the class diagram. If necessary, add them manually to the class diagram as described in "Adding existing entities to the class diagram" above.

define the entity hierarchy

In order to specify the hierarchical structure of the model in the metamodel, the ownership relationship is connected between the entities that form the parent-child relationship. Here are the steps:

defines hierarchy of entities

Operation procedure
  1. Move the pointer to the parent entity in the class diagram, drag the [▲] icon displayed in the four directions, and drop it on the child entity.
  2. When you drop it, a pop-up will appear with related type choices, click to select Embedded from among them.
  3. This defines a parent-child relationship between entities and allows child entities to be added as part of the parent entity during modeling.
info
  • By specifying the same entity as the referrer as the reference destination, you can define an entity with a nested structure.

Change per-entity settings

To change the icon of an entity or change the handling 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
  • In addition to the standard built-in icons, you can also use your own icons.
  • For more information, see [How To > Profile Definition > View Definition > Use Your Own Icon](../../../how-to/profile-definition/view-definition/use-my-own-icon .md).

delete the entity

There are multiple ways to delete an entity:

  • remove the entity from the metamodel
  • Remove the entity from the class diagram (hide it from the class diagram without removing it from the metamodel)

Remove an entity from the metamodel

To remove an entity from the metamodel using a class diagram, proceed as follows:

delete from metamodel

Operation procedure
  1. Select the target entity on the class diagram and execute [Delete From Model] from the context menu.
  2. If there are models referencing or other related entities to the entity, a warning message will be displayed. If it is okay to delete those models and relationships, press [Delete] to proceed.
  3. As a result, the target entity is deleted from the class diagram as well as from the meta model, and the target entity is also deleted from the profile navigator.
caution
  • If the target entity is selected and the delete key is pressed, it will only be deleted from the class diagram and not from the meta model, just like [Delete From Diagram] in the context menu. and remains on the profile navigator.

You can also remove an entity from the metamodel with the following 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 an entity from a class diagram

To remove an entity from the class diagram and hide it, proceed as follows:

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 removes it from the class diagram, but not from the metamodel and leaves the target entity on the profile navigator. To make them reappear on the class diagram, manually add them to the class diagram as described in Adding Existing Entities to the Class Diagram above.

Add/remove interactions

To add a new interaction to the metamodel, drag and drop [Interaction] from the class toolbox and enter a name, similar to adding an entity.

See
  • For adding entities, see "Adding Entities" above.

To remove an interaction from the metamodel, delete the interaction, similar to deleting an entity.

See
  • For deleting entities, see "Delete an entity" above.

Categorize and define for each package

To categorize metamodel definitions by model type or according to the design process, add packages to the metamodel to categorize the metamodel components. Here are the steps:

Classify and define by package

Operation procedure
  1. Right-click the root node displayed at the top of the profile navigator or a package already created during profiling, and select [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 a package, drag and drop an existing component into the package on the profile navigator to move it.