Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the use of EA in drawing Types and Multiplicity in UML diagram

2025-03-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces what is the use of Types and Multiplicity in EA UML drawing, it has a certain reference value, interested friends can refer to, hope that you can learn a lot after reading this article, the following let the editor take you to understand it.

7.5.1 Summary (summary)

Types and multiplicity are used in the declaration of Elements that contain values, in order to constrain the kind and number of values that may be contained.

Types and multiplicity are used in the declaration of elements that contain values in order to limit the number and type of values that can be included.

7.5.2 Abstract Syntax (Abstract Syntax)

Figure 7.10 Abstract syntax of types and multiplicity elements

7.5.3 Semantics (semantic)

7.5.3.1 Types and Typed Elements (types and typed elements)

A Type specifies a set of allowed values known as the instances of the Type. Depending on the kind of Type, instances of the Type may be created or destroyed over time. However, the rules for what constitutes an instance of the Type remain fixed by the definition of that Type. All Types in UML are Classifiers (see Clause 9).

A type defines a collection of allowable values for an instance called a type. Depending on the type of type, instances of the type can be created or destroyed after a period of time. However, the rules that determine what constitutes an instance of a type are still modified by the definition of the type. All types in UML are categories.

A TypedElement is a NamedElement that, in some way, represents particular values. Depending on the kind of TypedElement, the actual values that it represents may change over time. Examples of kinds of TypedElement include

ValueSpecification, which directly specifies a collection of values (see Clause 8), and StructuralFeature, which represents values held as part of the structure of the instances of the Classifier that owns it (see sub clause 9.4).

A typed element is in some cases a named element that represents a special value. Depending on the type of typed element, the actual value it represents changes over time. Examples of typed elements include value definitions, which directly define the aggregation of values, as well as structured functionality that can represent values that are maintained as part of the structure of the instance that owns it.

If a TypedElement has an associated Type, then any value represented by the TypedElement (at any point in time) shall be an instance of the given Type. A TypeElement with no associated Type may represent any value.

If a typed element has an associated type, then any value represented by the typed element should be an instance of the given type. Typed elements that have no associated type may represent any value.

7.5.3.2 Multiplicities (multiple)

A MultiplicityElement is an Element that may be instantiated in some way to represent a collection of values.Depending on the kind of MultiplicityElement, the values in the collection may change over time. Examples of kinds of

MultiplicityElement include StructuralFeature, which has values in the context of an instance of the Classifier that owns it (see sub clause 9.4) and Variable, which has values in the context of the execution of an Activity (see sub clause 15.2).

Multiple elements can be instantiated in some way to represent the aggregation of values. Depending on the type of multiple elements, the values in the aggregation change over time. An example of a multiple element has a structured function that maintains the value in the context of an instance of its catalog, and a variable that holds the value in the context of the execution of an activity.

The cardinality of a collection is the number of values contained in that collection. The multiplicity of a MultiplicityElement specifies valid cardinalities of the collection it represents. The multiplicity is a constraint on the cardinality, which shall not be less than the lower bound and not greater than the upper bound specified for the multiplicity (unless the multiplicity is unlimited, in which case there is no constraint on the upper bound).

The cardinality of the aggregation is the number of values included in the aggregation. The multiplicity of multiple elements defines the effective cardinality of the aggregation it represents. Multiplicity is the constraint of cardinality, and the cardinality should not be less than the lower limit of multiplicity nor exceed the upper limit of multiplicity (unless the multiplicity is infinite, which means there is no upper limit).

The lower and upper bounds for the multiplicity of a MultiplicityElement are specified by ValueSpecifications (see Clause 8), which must evaluate to an Integer value for the lowerBound and an UnlimitedNatural value for the upperBound (see Clause 21 on Primitive Types). A MultiplicityElement is unlimited if its upperBound has the UnlimitedNatural value of unlimited ("*") A MultiplicityElement is multivalued if it has an upperBound greater than 1 (including unbounded). A MultiplicityElement that is not multivalued can represent at most a single value.

The upper and lower limits of multielement multiplicity are defined by the value definition (ValueSpecificaiton). After operation, it can get the lower limit value of integer type and the upper limit value of infinite natural number type. If the upper limit is specified as infinite of the type of infinite natural number ("*"), then multiple elements are infinite. If the upper limit of multiple elements is greater than 1 (including the upper limit), then it is multi-valued, and non-multi-valued multiple elements can only represent at most one single value.

A MultiplicityElement can define a multiplicity both of whose bounds are zero. This restricts the allowed cardinality to be 0; that is, it requires that an instantiation of this element contain no values. This is useful in the context of Generalizations (see sub clause 9.2) to constrain the cardinalities of a more general Classifier. It applies to (but is not limited to) redefining properties existing in more general Classifiers.

Multiple elements can define the limit value of the weight as 0. This requires a possible cardinality of 0. That is, an instance of the element that does not contain a value is requested. This approach can be used to constrain the cardinality of more general (superior) categories in generalization scenarios. It requests (but not restricts) the existence of redefined properties in a more general category.

If the MultiplicityElement is specified as ordered (i.e., isOrdered is true), then the collection of values in an instantiation of this Element is ordered. This ordering implies that there is a mapping from positive integers to the elements of the collection of values. If a MultiplicityElement is not multivalued, then the value for isOrdered has no semantic effect.

If multiple elements are defined as ordered (that is, isOrdered is true), the aggregation of values in that element is assumed to be ordered. The order here means that there is a mapping from positive integers to value aggregate elements. If multiple elements are not multi-valued, then the value of isOrdered has no semantic effect.

If the MultiplicityElement is specified as unordered (i.e., isOrdered is false), then no assumptions can be made about the order of the values in an instantiation of this Element.

If multiple elements are defined as unordered (that is, isOrdered is false), then no assumptions can be made about the order of values contained in the element instance.

If the MultiplicityElement is specified as unique (i.e., isUnique is true), then the collection of values in an instantiation of this Element must be unique. That is, no two values in the collection may be equal, where equality of objects (instances of Classes) is based on object identity while equality of data values (instances of DataTypes) and Signal instances is based on value (see also sub clauses 10.2,10.3, and 11.4 on DataTypes, Signals and Classes, respectively). If a MultiplicityElement is not multivalued, then the value for isUnique has no semantic effect.

If multiple elements are specified to be unique (that is, isUnique is true), then the aggregation of values in the element instance must be unique. That is to say, no two values are equal in the aggregation, where the equality is judged by the identity of the object, while the data value and signal instance are judged by the numerical value. If multiple elements are not multi-valued, the value of the isUnique attribute has no semantic effect.

Taken together, the isOrdered and isUnique properties can be used to specify that the collection of values in an instantiation of a MultiplicityElement is of one of four types. Table 7.1 shows the traditional names given to each of these collection types.

In general, the isOrdered and isUnique attributes can be used to determine which of the four types the value aggregations of instances of multiple elements belong to. Table 7.1 shows the traditional names of these four aggregation types.

Table 7.1 Collection types for MultiplicityElements

Thank you for reading this article carefully. I hope the article "what is the use of Types and Multiplicity in EA drawing UML drawing" shared by the editor will be helpful to you. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 239

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report