Database Reference
In-Depth Information
Object
Package
Classifier
Feature
Relational
Schema
Table
Column
Record
Record
File
Record
Def
Field
Multi-
dimensional
Schema
Dimension
Dimensioned
Object
XML
Schema
ElementType
Attribute
Fig. 12.4 Classifier equivalence (from [PCTM03])
nearly every model element in a CWM description will be owned by some namespace.
Normally, the only model elements that are not owned by namespaces are those
representing top-level namespaces (that is, namespaces not owned by other namespaces).
The composite association between Namespace and ModelElement allows namespaces to
own model elements, and hence, other namespaces. This association is one of the primary
structuring mechanisms within the CWM. This association enables model elements to be
organized in hierarchical, or tree-like, arrangements in which the parent namespace is said
to contain, or own, its child ModelElement regardless of their ultimate type. Element
ownership is reused extensively throughout the CWM to indicate ownership relationships
between classes of every level.
Because of the package structure of CWM, model elements must be able to reference
objects in other packages. This is achieved by the Package subclass of Namespace. Packages,
because they are namespaces, allow model elements of arbitrary types to be collected into
hierarchies. However, because a model element can be owned by, at most, one namespace, we
cannot use this mechanism to pull in model elements owned by different namespaces. Instead,
the Package class provides the notion of importing model elements from other packages.
Resource Packages
Next, we give a short example of how elements of the Object Model (more specific,
of the Core package) can be efficiently reused in metamodels of the Resource
packages. Figure 12.4 shows the equivalence.
The first column of the diagram contains the names of the resource packages.
The second column contains the names of the classes of the resource packages
corresponding to Core 's class Package. Similarly, the third column is formed by the
class names corresponding to Core's class Classifier. The fourth column contains
the class names corresponding to Core's class Feature.
Search WWH ::




Custom Search