Appendix A.Diagrams
This appendix describes the general properties of UML diagrams and how
they relate to a UML (repository) model and to elements of this. It
also introduces the different diagram types of UML.
A UML model consists of elements such as packages, classes, and
associations. The corresponding UML diagrams are graphical
representations of parts of the UML model. UML diagrams contains
graphical elements (nodes connected by paths) that represent elements
in the UML model. As an example, two associated classes defined in a
package will in a diagram for the package be represented by two class
symbols and an association path connecting these two class symbols.
Each diagram has a frame, a contents area, and a heading,
see Figure 460.
The frame is a rectangle. The
frame is primarily used in cases where the diagrammed element has
graphical border elements, like ports for classes and components (in
connection with composite structures), and entry/exit points on
statemachines. In cases where not needed, the frame may be omitted and
implied by the border of the diagram area provided by a tool. In case
the frame is omitted, the headning is also omitted.
The diagram contents area contains the graphical symbols; the primary
graphical symbols defines the type of the diagram, e.g. a class diagram
is a diagram where the primary symbols in the contents area are class
symbols.
The heading is a string contained in a name tag (rectangle with cutoff
corner) in the upper leftmost corner of the rectangle, with the
following syntax:
[<kind>]<name>[<parameters>]
The heading of a diagram represents the kind, name and parameters of
the namespace enclosing or the model element owning elements that are
represented by symbols in the contents area. Most elements of a diagram
contents area represent model elements that are defined in the
namespace or are owned by another model element.
As an example, Figure 461 is a class diagram of a package P: classes C1
and C1 are defined in the namespace of the package P.
Figure 462 illustrates that a package symbol for package P (in some
containing package CP) may show the same contents as the class diagram
for the package. i) is a diagram for package CP with a graphical
symbols representing the fact that the CP package contains a package P.
ii) is a class diagram for this package P. Note that the package symbol
in i) does not have to contain the class symbols and the assocition
symbol; for more realistic models, the package symbols will typically
just have the package names, while the class diagrams for the packages
will have class symbols for the classes defined in the packages.
In Figure 463 i) is a class diagram for the package Cars, with a class
symbol representing the fact that the Cars package contains a class
Car. ii) is a composite structure diagram for this class Car. The class
symbol in i) does not have to contain the structure of the class in a
compartment ; for more realistic models, the class symbols will
typically just have the class names, while the composite structure
diagrams for the classes will have symbols for the composite
structures.
UML diagrams may have the following kinds frame names as part of the
heading.:
· activity
· class
· component
· interaction
· package
· state machine
· use case
Note Short forms of these names should also be defined,
e.g. pkg for package.
As is shown in Figure 464, there are two major kinds of diagram types:
structure diagrams and behavior diagrams.
Structure diagrams show the static structure of the objects in a
system. That is, they depict those elements in a specification that are
irrespective of time. The elements in a structure diagram represent the
meaningful concepts of an application, and may include abstract,
real-world and implementation concepts. For example, a structure
diagram for an airline reservation system might include classifiers
that represent seat assignment algorithms, tickets, and a credit
authorization service. Structure diagrams do not show the details of
dynamic behavior, which are illustrated by behavioral diagrams.
However, they may show relationships to the behaviors of the
classifiers exhibited in the structure diagrams.
Behavior diagrams show the dynamic behavior of the objects in a system,
including their methods, collaborations, activities and state
histories. The dynamic behavior of a system can be described as a
series of changes to the system over time. Behavior diagrams can be
further classified into several other kinds as illustrated in Figure
464.
Please note that this taxonomy provides a logical organization
for the various major kinds of diagrams. However, it does not preclude
the mixing different kinds of diagram types, as one might do when one
combines structural and behavioral elements (e.g., showing a state
machine nested inside an internal structure).
Consequently, the boundaries between the various kinds of diagram types
are not strictly enforced.
The constructs contained in each of the thirteen UML diagrams is
described in the Superstructure chapters as indicated below.
· Activity Diagram - Activities chapter
· Class Diagram - Classses chapter
· Communication Diagram - Interactions chapter
· Component Diagram - Components chapter
· Composite Structure Diagram - Composite Structures chapter
· Deployment diagram - Deployments chapter
· Interaction Overview Diagram - Interactions chapter
· Object Diagram - Classses chapter
· Package Diagram - Classses chapter
· State Machine Diagram - State Machines chapter
· Sequence Diagram - Interactions chapter
· Timing Diagram - Interactions chapter
· Use Case Diagram - Use Cases chapter