1. Home
  2. Docs
  3. Chapter 4. Profile and Stereotype
  4. 1. Profile
  5. How to draw a Profile Diagram

How to draw a Profile Diagram

Download PDF

A profile diagram enables you to create domain and platform specific stereotypes and define the relationships between them. You can create stereotypes by drawing stereotype shapes and relate them with composition or generalization through the resource-centric interface. You can also define and visualize tagged values of stereotypes.

Creating a profile diagram

To create a profile diagram:

  1. Select Modeling > Profile > New Profile from the toolbar
  2. Name the diagram and press Enter to confirm.
    Naming a profile diagram

Drawing a stereotype

To draw a stereotype in profile diagram:

  1. Select Stereotype in diagram toolbar.
    Selecting Stereotype in diagram toolbar
  2. Click on the diagram to create a stereotype.
  3. In the Select Base Type of Stereotype window, select the base type of stereotype from the model type tree. A base type is the type of model element that the stereotype will extend.
    Selecting a base type
    Note: You can check Display model element types in-use to list only the types of model elements used in project. The text box Filter enables you to filter model element type base on the type name. (e.g. enter class to list only class)
  4. Click OK. Name the stereotype and press Enter to confirm creation.

Defining tagged values for stereotypes

A stereotype may have properties, which may be referred as tag definitions. When a stereotype is applied to a model element, the values of the properties may be referred as tagged values.

You can define tagged values for a stereotypes. By doing so, when you apply the stereotype with tagged values defined to a model element, you can fill in the values for the model element.

  1. Right click on a stereotype shape and select Open Specification… from the popup menu.
  2. In the Stereotype Specification window, open the Tagged Value Definitions tab.
  3. Click Add. Select the type of tagged value to define. The type of tagged value limits the type of content user can enter for a tag.
    Add tag

    Tag type Description
    Text The most common and general type of tagged value that consists of words.
    Multi-line Text The value of tag is a text in multiple lines.
    Model element The value of tag is a model element in project.
    Enumeration The value of tag can be chosen from a list of possible values. For example, to select “red” out of values red, green and blue.
    Integer The value of tag must be a real number.
    Floating point number The value of tag must be a number that consists of one or more digits.
    Boolean The value of tag is a boolean (true/false).
  4. Double click the name cell and enter the name of tag. Repeat step 3 and 4 to add all tagged values for this stereotype.
    Tags defined for an Vehicle stereotype
  5. You can assign a default value to a tag by editing the Default Value cell. Usually, you give a tag a default value when the value is true in most cases. For example, a tag “in-door-temperature” can have “25” as default value. By confirming changes, you can see the stereotype show on diagram, with tagged values show below the stereotype name.
    Stereotypes with tagged values defined

Relating stereotypes

Stereotypes can be related with each other by composition or generalization. Relating stereotypes not just affect the modeling in profile, but also the model elements that the stereotypes will be applied to.

Composition

A composition relationship shows a “part of” relationship between stereotypes. The composite stereotype has responsibility for the existence and storage of the composed stereotype.

Composition between stereotypes

To create a composed stereotype:

  1. Move the mouse pointer over a stereotype. Press on the Resource Catalog button and drag it out.
  2. Select Composition -> Stereotype from Resource Catalog.
    Create Composition
  3. Name the stereotype and press Enter.

Since composition models a “part of” relationship, when you apply a composite stereotype to a model element, you can add tagged value defined in composed stereotype in the model element. For example, stereotype Vehicle is composed of stereotype Wheel. If you apply stereotype Vehicle to a class, you can specify the properties of tagged values as defined by both stereotype Vehicle and Wheel.

Generalization

A generalization relationship shows a “kind of” relationship between stereotypes.

A generalization relationship
To create a specific stereotype from a general stereotype:

  1. Move the mosue pointer over a stereotype. Press on the Resource Catalog button and drag it out.
  2. Select Generalization-> Stereotype from Resource Catalog.
    Create Generalization
  3. Name the stereotype and press Enter.

Since generalization models a “kind of” relationship, when you apply a specialized stereotype to a model element, you can add tagged value defined in general stereotype in the model element. For example, stereotype Vehicle is a generalized stereotype of Truck. If you apply stereotype Truck to a class, you can specify the properties of tagged values as defined by both stereotype Vehicle and Truck.