O'Reilly logo

Learning UML by Sinan Si Alhir

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Properties

A property is a characteristic 1of a model element. Use properties to define attributes and rules for a given type of modeling element. For example, properties can define the following: attributes representing a project’s start and end dates, a specific textual description of the relationship between a project and the things that make up the project, and a rule that the start date must precede the end date.

Properties are shown as a comma-delimited list of text strings inside a pair of braces ({}) after or below the name of a model element. Each property may be expressed in any natural or computer language. Each text string may be a tag or constraint, both of which are discussed in the next sections.

Tags

A tag is an attribute of a model element and its corresponding value — for example, attributes representing a project’s start and end dates.

Defining tags

In the UML, you create a tag definition when defining a stereotype by showing a name for the attribute, called a keyword, followed by a colon followed by the type of the attribute. The tags defined for a stereotype apply to each model element to which the stereotype is applied.

For example, Figure 9-4 updates Figure 9-1 and shows a tag named Start Date (which is a string representing a project’s start date), a tag named End Date (which is a string representing a project’s end date), and a tag named Descripton (which is a string representing a description of the relationship between a project and a thing that makes up the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required