text
stringlengths
16
313
An abstract operation is shown in italics.
A property of a set of values, such as the set of objects related to an object across anassociation, stating whether the set is ordered or unordered.
The ordering property declares whether the set is ordered or unordered.
If it is ordered, the elements in the set have an explicitly imposed order.
Theelements can be obtained in that order.
When a new link is added to the associa-tion, its position in the sequence must be specified by the operation adding it.
Theposition may be an argument of the operation or it may be implicit.
For example, agiven operation may place a new link at the end of the existing list of links, but thelocation of the new link must be specified somehow.
A sorting is totally determined by the val-ues of the objects in the set.
Therefore, it adds no information, although it maycertainly be useful for access purposes.
The information in an ordered association,on the other hand, is additional to the information in the elements themselves.
The ordering property applies to any element that takes a multiplicity, such as
An ordered relationship may be implemented in various ways, but the imple-mentation is usually stated as a language-specified code generation property.
A sorted set requires a separate specification of the sorting rule itself, which isbest given as a constraint.
Ordering is specified by a keyword in braces near the end of the path to which itapplies (Figure 13-138).
The absence of a keyword indicates unordered.
The key-word {ordered} indicates an ordered set.
For design purposes, the keyword{sorted} may be used to indicate a set arranged by internal values.
For an attribute with multiplicity greater than one, one of the ordering key-words may be placed after the attribute string, in braces, as part of a propertystring.
If an ordering keyword is omitted, then the set is unordered.
An ordered set has information in the ordering, information that is additional tothe entities in the set itself.
And just because aset is ordered does not mean that any ordering of entities will be allowed.
These aredecisions that the modeler must make.
In general, the position of the new entitywithin the list is a parameter of the creation operation.
Note that the ordering of a binary association must be specified independentlyfor each direction.
Ordering is meaningless unless the multiplicity in a direction isgreater than one.
An association can be completely unordered, it can be ordered inone direction and not the other, or it can be ordered in both directions.
Then, usually, a new link will be added as an operation on an A object, speci-fying a B object and a position in the list of existing B objects for the new link.
Frequently, an operation on an A object creates a new B object and also creates alink between A and B.
The list must be added to the list of links maintained by A.
Of course, a programmer can implement morecomplicated situations if needed.
An association that is ordered in both directions is somewhat unusual, becauseit can be awkward to specify the insertion point in both directions.
But it is possi-ble, especially if the new links are added at default locations in either direction.
Note that a sorted set does not contain any extra information beyond the infor-mation in the set of entities.
Sorting saves time in an algorithm, but it does notadd information.
It may be regarded as a design optimization and need not be in-cluded in an analysis model.
The location of the new entity must be determined automatically by themethod by examining the attributes on which the list is sorted.
The set of reservations is unordered.
One of a set of states that partition a composite state into substates, all of which areconcurrently active.
An indication of whether the feature applies to an individual object or is shared byan entire class.
Owner scope indicates whether there is a distinct attribute slot for each instance ofa class, or if there is one slot for the entire class itself.
For an operator, owner scopeindicates whether an operation applies to an instance or to the class itself (such as acreation operator).
Possible values areinstance Each classifier instance has its own distinct copy of anattribute slot.
Values in one slot are independent of valuesin other slots.
For an operator, the operator applies to an individualobject.
Allthe instances of the classifier share access to the one slot.
For an operator, the operator applies to the entire class,such as a creation operator or an operator that returnsstatistics about the entire set of instances.
A class-scope attribute or operator is underlined (Figure 13-139).
An instance-scope attribute or operator is not underlined.
For an association, this would say whether the source position of a link holds in-stances or classifiers.
A general-purpose mechanism for organizing elements into groups.
Packages maybe nested within other packages.
A system may correspond to a single high-levelpackage, with everything else in the model contained in it recursively.
Both modelelements and diagrams may appear in a package.
See also access, dependency, import, model, namespace, subsystem.
A package is a grouping of model elements and diagrams.
Every model elementthat is not part of another model element must be declared within exactly onenamespace; the namespace containing the declaration of an element is said to ownthe element.
A package is a general-purpose namespace that can own any kind ofmodel element that is not restricted to one kind of owner.
Each diagram must beowned by exactly one package, which may be nested within (and therefore ownedby) another package.
A package may contain subordinate packages and ordinarymodel elements.
Some packages may be subsystems or models.
The entire systemdescription can be thought of as a single high-level subsystem package with every-thing else in it.
All kinds of UML model elements and diagrams can be organizedinto packages.
Packages own model elements, subsets of the model, and diagrams.
Packages arethe basis for configuration control, storage, and access control.
Each element canbe directly owned by another model element or by a single package, so the owner-ship hierarchy is a strict tree.
However, model elements (including packages) canreference other elements in other packages, so the usage network is a graph.
The special kinds of package are model, subsystem, and system.
It is the only model el-ement not owned by some other model element.
It indirectly includes everythingin the model.
There are several predefined stereotypes of model and subsystem.
See Chapter 14, Standard Elements, for details.
Packages may have dependency relationships to other packages.
In most casesthese summarize dependencies among the contents of the packages.
The access dependency is particular to packages themselves and is not a sum-marization of dependencies on their elements.
It indicates that elements in the cli-ent package are granted permission to have relationships to elements in thesupplier package.
The relationships are also subject to visibility specifications.
The accessdependency variation import is like an Ada uses statement.
It adds the namesfrom the supplier namespace to the client namespace (they must not conflict).
Butthe access dependency does not alter the client namespace.
It is mainly an accesscontrol mechanism in larger development projects, rather than a fundamental se-mantic relationship.
A nested package has access to any elements directly contained in outer pack-ages (to any degree of nesting), without needing either import dependencies orvisibility.
A package must import its contained packages to see inside them, how-ever.
A contained package is, in general, an encapsulation boundary.
A package defines the visibility of its contained elements as private, protected,or public.
Private elements are not available at all outside the containing package(regardless of imports).
Protected elements are available only to packages withgeneralizations to the containing package, and public elements are available to im-porting packages and to descendants of the package.
See access for a full description of the visibility rules for elements in variouspackages.
A package is shown as a large rectangle with a small rectangle (a “tab”) attached onone corner (usually, the left side of the upper side of the large rectangle).
If contents of the package are not shown, then the name of the package is placedwithin the large rectangle.
If contents of the package are shown, then the name ofthe package may be placed within the tab.
A keyword string may be placed above the package name.
Keywords may in-clude subsystem, system, and model.
User-defined stereotypes are also notatedwith keywords, but they must not conflict with the predefined keywords.
A list of properties may be placed in braces after or below the package name.
The visibility of a package element outside the package may be indicated by pre-ceding the name of the element by a visibility symbol (‘+’ for public, ‘-’ for private,‘#’ for protected).
Relationships may be drawn between package symbols to show relationshipsamong at least some of the elements in the packages.
In particular, dependencyamong packages (other than permission dependencies, such as access and import)implies that there exist one or more dependencies among the elements.
A tool may also show visibility by selectively displaying those elements that meet achosen visibility level, for instance, all the public elements only.
A tool may show visibility by a graphic marker, such as color or font.