First, a
dependency is a semantic relationship between two model elements in which a change to one element
(the independent one) may affect the semantics of the other element (the dependent one). Graphically, a dependency is rendered as a dashed line, possibly directed, and occasionally including a label.
第一个依赖关系,它表示两个模型元素在语义的相关性,体现为改变当中一个元素(语义上独立的那个)会影响到别一个元素的语义(具有依赖性的那个).图形表现上,用一条虚线表示依赖,有时还会带有方向箭头,偶而会用标签来标识依赖的详细关系.
Second, an
association is a structural relationship among classes that describes a set of links, a link
being a connection among objects that are instances of the classes. Aggregation is a special kind of association, representing a structural relationship between a whole and its parts. Graphically, an association is rendered as a solid line, possibly directed,
occasionally including a label, and often containing other adornments, such as multiplicity and end names.
第二个联合关系,它表示的是类之间结构的关系,描写叙述的是一组用来连接类的实例--对象之间的联系.聚集是联合关系的一种特殊形式,它表示的是总体和部分之间的结构关系.图形表现上,用一条实线表示联合,有时也会带有方向箭头,或是用标签标识.通常还有其他特性,比方多重性,终端名称等.
Third, a
generalization is a specialization/generalization relationship in which the specialized element
( the child ) builds on the specification of the generalized element ( the parent ). The child shares the structure and the behavior of the parent. Graphically, a generalization relationship is rendered as a solid line with a hollow arrowhead pointing to the
parent.
第三个通用关系.专用元素(子元素)在通用元素(父元素)的规格基础上构建而成,它们之间的关系被称为特定或通用关系.子元素共享父元素的结构和行为.图形表现上,通用关系被表示为一条实心线,并带有空心箭头指向通用元素.
Fourth, a
realization is a semantic relationship between classifiers, wherein one classifier specifies
a contract that another classifier guarantees to carry out. You’ll encounter realization
relationships in two places: between interfaces and the classes or components that realize them, and between use cases and the collaborations that realize them. Graphically, a realization relationship is rendered as a cross between a generalization and a dependency
relationship.
第四个实现关系,它是分类器之间的语义相关性.当中一个分类器定义说明,还有一个分类器确保实现这个定义.有两个地方会用到实现关系:接口定义说明,类或组件实现这些接口定义;用例定义说明,交互实现用例所做的定义.图形表现上,实现关系被表现为一条带有空心箭头的虚线.
These four elements are the basic relational things you may include in a UML model. There are also variations on these four, such as refinement, trace, include, and extend.
这四种元素是建模时会用到的基本关系元件.来自这四种元素的变体关系有:精炼,追溯,包括和扩展.