Previous | Table of Contents | Next |
As noted previously, the MOF Model provides two ways of relating MOF values; that is, Associations and Attributes. In both
cases, a relation has a property known as aggregation that determines how strongly related values are tied together.
The MOF Model currently supports three aggregation semantics; that is, “none,? “shared,? and “composite? in order of increasing
strength.
NOTE: In practice, the semantics of aggregation are mostly concerned with the life-cycles of related values. Since different
mappings will use different strategies for managing the life-cycles of values, aggregation semantics are largely mapping specific.
An Attribute or Association with aggregation of “none? has the weakest form of relation between values. This will typically
correspond to independent life-cycles for both parties and the use of shallow copy semantics in a mapping.
An Attribute or Association with aggregation of “composite? has the strongest form of relation between values. A “composite?
relation involving two types is asymmetric, with one “end? labeled as the “composition? type and the other end labelled the
“component? type. An instance of the first type is “composed of? instances of the second type.
An M1-level “composite? relation is defined to have information model semantics that can be loosely described as containment
semantics:
1. If a value “v1? is a component of some other value “v2? in a given composite relation, “v1? may not be a component of any other value “v3? in any composite relation. In short, a value can have at most one container in any “composite? relation. (This restriction does not apply when “v1? is a null instance.)
2. A value may not be related to itself in the closure of any “composite? relations. In short, a value may not directly or indirectly contain itself.
Other restrictions may apply to “composite? relations in some mappings (e.g., 8.11.2, “The Composition Closure Rule,?
on page 155).
An Attribute or Association with aggregation of “shared? corresponds to a relation between values that is between “none? and
“shared.?
NOTE: The semantics of “shared? aggregation should correspond to the semantics of an Aggregate in UML. Unfortunately, the
OMG UML specification gives no clear guidance on what these semantics should be. As an interim measure, the use of “shared?
aggregation in the MOF is discouraged.