The Common Warehouse Metamodel (CWM) is a standard by the Object Management Group (OMG). The intention of CWM is to define a standard for metadata in Data Warehouses and Business Intelligence applications. CWM uses the Meta Object Facility (MOF) as the underlying framework. MOF is also used in other standards of the OMG, for example UML.
My intention was to learn about CWM and it is very difficult to learn a data model by studying the specifications on paper. I wanted an interactive editor. But i did not find an open source editor in the net. I found a MOF complient database, the Metadata Repository (MDR) (note 2011: no longer available), but it does not have an editor.
So i decided to transform the CWM/MOF model to EMF and generate an editor from it.
The editor is in an early, but it is already usable for experiments and for learning CWM.
In [1,2] a mapping between MOF and EMF is described. These articles served as a starting point, but i did not find the E-MORF software described in one of these articles on the net. Therefore i wrote an XSLT transformation that implements the following mapping of MOF elements to EMF elements.
| MOF Element | EMF Element | EMF Tag |
|---|---|---|
| XMI.content | ecore:EPackage | ecore:EPackage |
| Model:Attribute | ecore:EReference or ecore:EAttribute | eStructuralFeatures |
| Model:Class | ecore:EClass | eClassifiers |
| Model:DataType | ecore:EEnum or ecore:EDataType | eClassifiers |
| Model:Package | eSubpackages | |
| Model:Reference | ecore:EReference | eStructuralFeatures |
I transformed the CMW 1.1 XML specification into an Ecore/EMF model.
The following screenshot shows a small extract of the resulting EMF ecore model.
From the ecore model i generated an EMF Editor. The following screenshot shows the "New Wizard". You can see that there is a model for every subpackage of CWM. The "CWM Model" is the best choice most of the time.
The next screen shows the subpackages available and the complexity of CWM. In this example the "relational container is chosen".
The relational package is used for information on objects in relational databases. In the next screenshot the elements available are shown.
The editor is available per request.
There are a number of open issues.
Model:Association classes and these contain the referenced classes. These are
transformed to the Ecore/EMF references.
Core.ModelElement. And references often use classes that are very general and very high in
the class hierarchy. This complicates the usage of CWM in an editor.
Copyright © 2007-2012 Jörn Dinkla. All rights reserved.