Common Warehouse Metamodel in EMF

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) , but it does not have an editor.

So i decided to transform the CWM/MOF model to EMF and generate an editor from it.

There are a number of open issues.

The editor is in an early stage and still under development, but it is already useable for experiments and for learning CWM.

Mapping MOF to EMF Ecore

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.

Model of CWM in EMF Ecore

An editor plugin for CWM in EMF

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. For a start the "CWM Model" is the one to choose.

New Wizard of CWM in EMF Ecore

The next screen shows the subpackages available.

New children nodes for the relational package of CWM

The relational package is used for information on objects in relational databases. In the next screenshot the elements available are shown.

Elements in the relational package

The editor is available on my update site.

References

[1] Keith Duddy, Anna Gerber, Kerry Raymond. Eclipse Modelling Framework (EMF) - import/export from MOF / JMI. Status Report. Pegamento Project, DSTC. May 2003.

[2] Anna Gerber, Kerry Raymond. MOF to EMF: There and Back Again. Cooperative Research Centre for Enterprise Distributed Systems (DSTC). University of Queensland, Australia.

[3] Harald Kühn, Marion Murzek. Interoperability Issues in Metamodelling Platforms. Proceedings of the First International Conference on Interoperability of Enterprise Software and Applications (INTEROP-ESA'05). 1995.

[4] Tracy Gardner. Model-Driven Metadata Integration using MOF 2.0 and Eclipse. OMG MDA Implementers’ Workshop. December 2003, Burlingame, USA.

Valid XHTML 1.0 Strict Firefox 3 Firebug - Web Development Evolved
Last modified: