graphical model transformation framework
DESCRIPTION
This is a Model Driven Approach to convert heterogeneous models into domain-specific model.TRANSCRIPT
Graphical Model Transformation Framework (GMTF)- Normalizing heterogeneous models into UML – a suggested approach
Problem Space • Product Vendors need a tool to visualize and persist
heterogeneous domain models in the form of a platform-specific yet standard-based model.• In order to minimize the chaos, the product vendors are very fast coming
up with standard specifications for industry domain models. • For example,
o telecom industry has proposed a common meta-model for telecom products. o Similarly, warehouse tools have agreed upon CWM (Common Warehouse
Model).o Statistical tools trying to adopt a common Predictive Mark-up Modeling Language
(PMML).o Rule Engines adhere to Ontology Definition Model (ODM).
• These meta-models are referred as Computational Independent Model (CIM).
Solution Approach• We embrace the MDA to address the problem
Capturing the business requirement using a Computation Independent Model (CIM – e.g. SBVR/ODM/XMI/XSD/WSDL/Annotated POJO). – as mentioned in the problem space
Then defining the system functionality into platform-independent model (PIM - e.g. EMOF) using an appropriate Domain Specific Language (e.g. EMF).
In an attempt to ensure synergy and interoperability between different meta-models, OMG has proposed MOF (Meta-Object Facility).
It’s the responsibility of MOF implementers to provide an API that can convert heterogeneous CIMs into a standard Platform Independent Model
Finally, given a Platform Definition Model (PDM - e.g. eclipse GMF
vocabulary) the PIM is translated to one or more platform-specific models (PSMs - e.g. UML with domain specific stereotype).
Eclipse makes it so simple !
UML
XSD
WSDL
DB Schema
EMF+GMFDomain Specific Graphical model
Annotated POJO
Case Study A: A Finance Vendor needs to render the purchase-order requirements received as WSDL into a PSM
CIM (human elaborated
specifications)
Case Study A: Implementation
• Convert CIM to Ecoreo Xsd2EcoreBuilder –
dynamically generates the EClass hierarchy using EMF API.
Case Study A: Implementation• Convert Ecore to UML
o Eclass hierarchy is converted into UML class hierarchy using UML Diagramming Framework API (uml2tools plugin).
UML meta model (implemented as uml.ecore -> ecore.ecore)• Convert PIM to PSM
o the domain specific (FinanceEntity) stereotypes are applied to the uml model in order to obtain a PSM.
• Visualize the PSMo GMF persists the UML superstructures using a diagram notational
model (an eclipse specific diagram persistence vocabulary-PDM).o finally the PSM (domain specific uml model) is rendered on a
graphical editor.
Case Study A: Final PSM
• This domain specific uml file now can be imported into any other xmi-compliant uml tools (Rational / EA/ Poseidon etc.).
• Only the data "behind" the diagram <uml:Model/>… will be transmitted. • The diagram elements will be recreated by importer tools.
Viewer & Editor
Controller
GEF
Model
EMF
«notational»View
Diagram model
«semantic»EObject
Biz Model
«notational»commands
Graphical editing Component (IGraphicalEditPart)
Editing policies
requests
figures
layouts
references
manipulates
reads
listens
returns understands
handles
ConnectionRouters
creates/updates
PSM is visually rendered/ manipulated by gef Controller and persisted in emf Model
CIM
CIM-to-Ecore
Behind the scene….
Case Study B : Converting Java Model into PSM
Case Study B : Visualizing PSM
JavaEcoreBuilder UMLModelGenerator GMF Renderer
Case Study C : Transforming DB Schema into Graphical Model
Schema Meta Model (DTP) (DB2EcoreBuilder) Ecore Meta Model (EMF) UML Meta Model PSM with Table stereotype (UMLTools) Editor (GMF)
Graphical Model Transformation Framework – in a nutshell