您的位置:首页 > Web前端

EA&UML日拱一卒-活动图::Feature和StuctualFeature

2017-08-21 19:37 453 查看
9.4.3.1 Features(特征)

Each Feature is associated with a Classifier called its featuringClassifier. The Feature represents some structural or behavioral characteristic for its featuringClassifier, except for Properties acting as qualifiers (see 9.5.3).

每个特征都和一个叫做特征化类目的类目相关联。特征表现类目的某些结构方面的或者是行为方面的特性。作为限定子的属性除外。

The isStatic property specifies whether the characteristic relates to the Classifier’s instances considered individually (isStatic=false), or to the Classifier itself (isStatic=true). All semantics relating to Features that do not explicitly state whether the
feature is static shall be assumed to refer to non-static Features. Where semantics are not explicitly specified for static Features, those semantics are undefined.

isStatic属性定义特性是和类目的独立的实例相有关(isStatic=false),还是和类目本身有关。所有和没有明确说明是否为静态的特征有关的语义都应该认为涉及的是非静态特征。当语义没有明确地为静态特征定义,那些语义是无定义的(?)。

9.4.3.2 Structural Features(结构特征)

A StructuralFeature is a typed Feature of a Classifier that specifies the structure of instances of the Classifier.The StructuralFeatures of a Classifier that are Properties are called the attributes of the Classifier (see 9.2.3). In UML,

Property is the only kind of StructuralFeature so all of the StructuralFeatures of a Classifier are Properties, and hence attributes.

结构特征是类目的特征的一个种类,它定义了类目实例的结构。类目的结构特征是被称为类目属性的性质。在UML中,性质是结构特征唯一的一种类型,即类目的结构特征就是性质,也就是属性。

For each instance of a Classifier there is a value or collection of values for each direct or inherited non-static attribute of the Classifier, as follows:

对于类目的每个实例的直接或继承的非静态属性,存在值或值的聚合,规则如下:

· If the attribute’s multiplicity is 0..1, there shall either be no value or a single value whose Type conforms to the Type of the attribute

如果属性的多重度是0..1,则不存在或存在一个单值,值的类型符合属性的类型。

· If the attribute’s multiplicity is 1..1, there shall be a single value whose Type conforms to the Type of the attribute.

如果属性的多重度是1..1,应给存在一个单值,值的类型符合属性的类型。

· If the attribute’s multiplicity is j..k where k is not 1, there shall be a collection of values whose size is not less than j and not greater than k, each of whose Types conforms to the Type of the attribute.

如果属性的多重都是j..k,这里k不为1,则存在一个值的聚合,聚合的大小不小于j而且不大于k,每一个类型都应该符合属性的类型。

· If the attribute’s multiplicity is 0..0, there shall be no value or values.

如果属性的多重都为0..0,那么不存在值或值的聚合。

If a StructuralFeature is marked with isStatic = true, then the bullet points above are relative to the Classifier itself considered as an identifiable individual within some execution scope, rather than to individual instances. (See sub

clause 6.3.1 for a discussion of execution scope.)

如果结构特征被标记为isStatic=true,那么上面的要点就是关于类目自身的,它在某些执行域中被被识别,而不是一个独立的实例被识别。

In a semantically conforming tool, each inherited static StructuralFeature shall have one of two alternative semantics:

在一个语义一致的工具中,每一个继承的静态结构特征应该具有两个可选语义

中的一个:

1.Within an execution scope, the value or collection of values of the StructuralFeature is always the same for any inheriting Classifier as its value or collection of values for the owning Classifier. These semantics correspond

to those for static members in Java and C#.

 在执行领域中,结构特征在继承 类目中和在结构特征的拥有者类目中的的值或者值聚合都是一样的。这样的语义符合Java和C#对于静态成员的定义。

2. Within an execution scope, the StructuralFeature has a separate and in    dependent value or collection of values for its owning Classifier and for each Classifier that inherits it. These semantics correspond to those for class

instance variables in Ruby and Smalltalk.

在执行领域中,结构特征在它的所有者类目中和继承类目中有分离的,独立的值或值聚合。这样的语义符合Ruby和Smarttalk。

If a StructuralFeature is marked with isReadOnly true, then it may not be updated once it has been assigned an initial value. Conversely, when isReadOnly is false (the default), the value may be modified.

如果结构特征被标记为isReadOnly为真,那么一旦它被赋初值以后,就不应该再被更新。相反地,当isReadOnly为假(缺省值),值可以被更改。

参考资料:

《OMG Unified Modeling Language TM (OMG UML) Version 2.5》

  URL:http://www.omg.org/spec/UML/2.5

以上就是今天的文章,欢迎点赞,关注并推荐给您的朋友!
阅读更多更新文章,请扫描下面二维码,关注微信公众号【面向对象思考】

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  EA UML 活动图