UML legend \ UML обозначения (легенда)
2010-Лип-02, П'ятниця 14:10Unified Modeling Language is a standard graphical language for presenting different elements of software design. The following examples are some of the most common elements of UML. For further detail about formal specifications, refer to http://www.rational.com and http://www.omg.org.
UML diagrams consist of the following items:
Boxes
Boxes represent classes of objects. Yellow boxes denote core data or assets and are central to the diagram. White white boxes denote important information, but are not crucial. The class names appear at the top of the box. Attributes, if shown, appear below the class name. The class name and attributes are separated by a line.
Lines
Lines represent possible relationships between objects of two classes. Objects of the class on one end of the line can be "associated" of the class on the other end of the line.
Filled diamonds
Filled diamonds on the end of a line indicate containment by value. Objects of the class on the other end of the line are part of one and only one object of the class the diamond touches.
Hollow diamonds
Open diamonds on the end of a line indicate containment by reference. Objects at the diamond end of the line can be thought of as grouping objects of the class at the other end of the line.
Cardinality numbers
These appear at the end of relationship lines to indicate a cardinality restriction.
1 one and only one
0..1 zero or one
0..n zero or more
1..n one or more
If no cardinality restriction is shown, the cardinality is assumed to be 0..n, unless a solid diamond appears on the end of a relationship line. In that case, the cardinality must be 1.
Plus signs
Plus signs appearing at the end of relationship lines indicate the object of the class at the end of the line plays a role in the relationship. Text following the plus sign indicates the object's role in the relationship.
Arrows
Arrows at the end of a relationship line indicate the direction of the relationship between two objects is in the direction of the arrow. The absence of any arrows on a relationship line indicates the direction of the relationship between the objects is normally in both directions.
The following diagrams illustrate the above concepts: