Previous Table of Contents Next


4.5 Relationships Metamodel

   The Relationships metamodel depends on the following package:

   org.omg::CWM::ObjectModel::Core

   The Relationships metamodel collects together classes and associations that describe the relationships between object within a CWM information store. The Relationships metamodel describes to types of relationships: association and generalization.

   Association relationships record linkages between model elements. These linkages may represent simple linkages between model elements or aggregation (“is part of?) relationships between model elements; aggregation relationships come in two forms -shared and composite. Associations have two or more named ends that link them to instances of the classes connected by the association.

   Generalization relationships record arrangements of model elements into type hierarchies in a parent/child (or “is type of?) fashion. Child types are said to “specialize,? “subclass,? or “subtype? their parental types, represent a subset of parental instances that fulfill the definition of the child type, and inherit the structural features (Attributes, AssociationEnd) and behavioral features (Operations, Methods) of their parents. Parental types are said to “generalize? their child types or to be “superclasses? or “supertypes? of their children.

   CWM generalization hierarchies support multiple inheritance; that is, child types may have more than one parental type and inherit the union of the features of all their parental types. Although called “hierarchies,? multiple inheritance actually represents a directed acyclic graph of parental and child types.

   The classes and associations of the Relationships metamodel are shown in Figure 4-6 .


   Figure 4-6 Relationship metamodel