Defining Classes

Using Visual Modeler, we define the four classes of our model:

  • Network

  • Domain

  • Node

  • Line

The Network class is an identified class. This means that the class has an identifier attribute which you can use as a key when storing instances of this class in a dictionary, for example.

  1. Click on the Class button in the main toolbar and create four empty classes in a new diagram.

    As we want to define the Network class as an identified class, you will now add a specific Server property to tag this class.

  2. In the Documentation editor of the Network class, add the following comment to specify that this class has an identifier attribute:

    ilog.server.identifier="identifier"

    The identifier attribute will be defined later.

    We also want to store all instances of Network in a dictionary, therefore:

  3. Add the following tag in the documentation of the class:

    ilog.server.useDictionary="true"

This specific comments will be recognized by the Server XMI parser which will add the corresponding characteristics to the dynamic type.

Creating Four Classes in Visual Modeler