Model Repositories (XMI, JMI, EMF) - PowerPoint PPT Presentation

About This Presentation
Title:

Model Repositories (XMI, JMI, EMF)

Description:

Model creation through meta-model instantiation ... CWM. Models. UML. MOF. MetaModels. Validate. 14. XMI Document. Every XMI document consists: ... – PowerPoint PPT presentation

Number of Views:454
Avg rating:3.0/5.0
Slides: 54
Provided by: Luci191
Category:
Tags: emf | jmi | xmi | cwm | model | repositories

less

Transcript and Presenter's Notes

Title: Model Repositories (XMI, JMI, EMF)


1
Model Repositories(XMI, JMI, EMF)
  • by
  • Luciana de Paiva Silva
  • lps_at_cin.ufpe.br
  • www.cin.ufpe.br/lps
  • Disciplina IN0980-MDA, Components and Software
    Reuse
  • Professor Jacques Robin

2
OUTLINE
  • Model repositories
  • Requirements and services
  • Model manipulation formats
  • Programming objects
  • XML document
  • Exemplos (ZoooMM, AM3, ReMoDD)
  • Existing tools
  • XMI
  • JMI
  • EMF

3
What is a model repository?
  • Ideally combine services from project artifact
    management system and model base management
    system
  • Services
  • Persistence and fault tolerance
  • Concurrent and authenticated access control
  • Version control
  • Model query
  • Model conformity to meta-model
  • Model creation through meta-model instantiation
  • API to connect a variety of model manipulation
    tools
  • Graphical editors
  • Indented embedded vertically listed items
    editors
  • Transformation engines
  • Formal verification
  • Code generation
  • Test generation

DiVinE
4
Model Manipulation Formats Programmable Objects
  • One programming language class for each
    meta-model meta-class
  • One programming object for each model element
    (i.e., meta-class instance)
  • Advantages
  • Model manipulation services can be directly
    programmed in same language
  • To the point gt succinct, concise
  • Paradigm alignment (object-orientation)
  • Disadvantages
  • Intermediate software needed for both
    persistence and human reading
  • Conventional OO platform do not support
    meta-circularity

5
XML Language family
  • XML
  • Flexible language to encode documents or data
    using sequences of elements containing
    attribute-value pairs and delimited by opening
    and closing tags defining an open-ended set of
    categories
  • An XML document is well-formed conforms to XML
    syntax
  • XML Schema
  • XML encoded metadata language to encode XML
    document schemas
  • 44 built-in data types
  • Specifies type, cardinality and ordering
    constraints on the elements and attributes of an
    XML document
  • An XML document is valid with respect to a
    schema if it satisfies the constraints specified
    in the schema
  • XSLT
  • XML encoded language to specify and apply
    transformation on XML documents

6
Model Manipulation Formats XML Document
  • One XML tag for each meta-model meta-class
  • One XML Schema for each graph to tree ordering
    projection of one MOF meta-model
  • One XML element or attribute for each model
    element
  • Thus, one XML document for each model
  • Advantages
  • Persistent and human understandable
  • Shared meta-circularity representation principle
  • XML Schema is meta-level description reusing
    base level language (XML)
  • MOF2 is meta-level description reusing base
    level language (UML2 Infra-structure)
  • Disadvantages
  • Verbose
  • Paradigm mismatch makes robust parsing
    challenging

7
Examples
  • There are several projects that have been started
    some time ago on model repositories ZoooMM, AM3,
    ReMoDD, etc.
  • http//www.cs.york.ac.uk/puml/puml-list-archive/

8
Zooomm project
ZOOOMM is the International ZOO of MetaModels,
Schemas, Grammars and Ontology for Software
Engineering.
  • Megazoo (zoo of megamodels)
  • Textual megamodels.
  • Megamodels in UML.
  • Megamodels in sciences art.
  • Metametazoo (zoo of metametamodels)
  • UML, MOF, XMI, EMF, KM3, Emphatic, GXL, USE,
    ODMG, Xschema, GXL, RSF, TA, Telos, EXPRESS, OWL,
    RDFS, DAML, OIL, GXL, RSF, TA, Telos, EXPRESS,
    OWL, RDFS, DAML, OIL.

Metazoo (zoo of metamodels) We have already a
few hundreds of metamodels collected over years
from more than 2000 papers in software
engineering.
9
Planet MDE
10
AM3 - ATLAS MegaModel Management
  • The goal of AM3 (ATLAS MegaModel Management) is
    to provide a practical support for modeling in
    the large. The objective is to deal with global
    resource management in a model-engineering
    environment. We base this activity on the concept
    of a "megamodel".
  • Features
  • Management of various artifacts
  • Management of various relations between artifacts
  • Sharing and exchange of megamodel elements
  • User interfaces for viewing (browsing, creating,
    changing, etc.) megamodel elements

11
ReMoDD
  • On May 24 at ICSE, - ReMoDD (ReMoDD A Repository
    for Model Driven Development)
  • Create a community resource of model-driven
    development artifacts to provide infrastructure
    to improve the use of model-based development.

12
XML Metadata Interchange (XMI)
  • XML Metadata Interchange (XMI) provê o mecanismo
    para implementar a distribuição de modelos entre
    ferramentas de diferentes empresas e entre
    repositórios, ou seja, intercâmbio de metadados
    entre ferramentas de modelagem.
  • Integra três padrões XML, UML, MOF
  • Padrão OMG para codificar modelos de documentos
    XML em conformidade com o padrão MOF meta-model
  • Permits automated generation of
  • An XML schema document from a MOF meta-model and
    vice-versa
  • An XML document from a model and vice-versa
  • XML document generated from model is valid with
    respect to the XML schema document generated from
    the models meta-model
  • Model generated from XML document conforms to the
    meta-model generated from the XML schema of the
    XML document

13
XMI Simplified
XML Streams (Models) (Many - based on each
metamodel DTD
XML Syntax and Encoding
X MI
MOF Metadata Definitions Management
Validate
XML Schema (MetaModels) (1 per metamodel used
for validation)
UML Metamodel Analysis Design
14
XMI Document
  • Every XMI document consists
  • An XML version processing instruction. Example
    lt? XML version1.0 ?gt
  • An optional encoding declaration that specifies
    the character set, which follows the ISO-10646
    (also called extended Unicode) standard. Example
    lt? XML version1.0 ENCODINGUCS-2 ?gt
  • Any other valid XML processing instructions.
  • A schema XML element.
  • An import XML element for the XMI namespace.

15
Example of MOF meta-models serializationas XML
Schema using XMI
extends
extends
0 ..
includes
  • ltxsdschema xmlnsxsdhttp//www.w3.org/2005/XMLS
    chemagt
  • ltxsdcomplexType name umlModelgt
  • ltxsdcomplexType name actorgt
  • ltxsdsequencegt ltxsdelement name name
    type xsdstring/gt lt/xsdsequencegt
  • lt/xsdcomplexTypegt
  • ltxsdcomplexType name useCasegt
    ltxsdsequencegt ltxsdelement name title type
    xsdstring/gt lt/xsdsequencegt
  • lt/xsdcomplexTypegt
  • ltxsdcomplexType name systemgt
  • ltxsdsequencegt ltxsdelement name name
    type xsdstring/gt lt/xsdsequencegt
  • lt/xsdcomplexTypegt
  • ltxsdcomplexType name actor2useCase
    isDirected true isAggregation false
    isGeneralization falsegt
  • ltxsdsequencegt
  • ltxsdelement from actor minOccurs
    1 maxOccurs 1/gt ltxsdelement to
    useCase minOccurs 1 maxOccurs 1/gt
    lt/xsdsequencegt
  • lt/xsdcomplexTypegt
  • ltxsdcomplexType name system2useCase
    isDirected true isAggregation true
    isGeneralization falsegt
  • ltxsdsequencegt
  • ltxsdelement name from ref system
    minOccurs 1 maxOccurs 1/gt
  • ltxsdelement name to ref useCase
    minOccurs 1 maxOccurs unbounded/gt
  • lt/xsdsequencegt

16
XMI Specification
17
Projeto UFPE
18
Projeto UNIOESTE
  • Objetivos principais
  • Estudo de diagramas i gerados pela ferramenta
    OME na linguagem TELOS
  • Estudo da tecnologia XML e o padrão XMI
  • Estudar o padrão XMI para implementar uma
    ferramenta computacional que possa mapear
    diagramas SD e SR (i) para Diagramas de Caso de
    Uso UML.
  • Coordenador Victor Francisco Araya Santander

19
Java Metadata Interface - JMI
  • Enables the implementation of a dynamic,
    platform-independent infrastructure to manage the
    creation, storage, access, discovery, and
    substitute of metadata.
  • JMI is based on the Meta Object Facility (MOF)
  • For any MOF model, JMI defines the templates for
    generating the Java APIs.

20
Application Areas
  • Data warehousing and BI
  • Integration of DW/BI tools frameworks
  • Component-based development and deployment (UML)
  • Integration of tool suites/component frameworks
  • Enterprise information portals
  • Integration of disparate data sources
  • Systems Management
  • Hardware/software inventory, storage management

21
JMI Use-Cases
  • Data warehousing applications
  • Different data sources, data warehouse formats,
    and analytical tools
  • Community requires common interchange
    infrastructure to provide a common programming
    model and a common interchange format

22
JMI Use-Cases
  • The Software Development Scenario
  • Different tool for each task
  • Different tools for the same task
  • JMI as a platform for integrating heterogeneous
    software development tools to provide a complete
    software development solution
  • Large Enterprise JavaBeans (EJB) application
    (UML tools, Integrated Development Environments
    (IDEs), EJB deployment tools)
  • EJB development solution - built around JMI using
    three metamodels that represent the domains of
    the different tasks
  • Each tool participate integrated solution
    through an adapter that maps the tool specific
    APIs to the JMI APIs for the respective model.
  • Reduce integration complexity

23
Java Metadata Interface(JMI) Specification
24
Eclipse Project
  • Provide open platform for application development
    tools
  • Run on a wide range of operating systems
  • GUI and non-GUI
  • Language-neutral
  • HTML, Java, C, JSP, EJB, XML, GIF,
  • Facilitate perfect tool integration
  • At UI and deeper
  • Add new tools to existing installed products
  • Attract community of tool developers
  • Including independent software vendors (ISVs)
  • Capitalize on popularity of Java for writing tools

25
Plataforma Eclipse
the major components, and APIs, of the Eclipse
Platform
26
Eclipse Plug-in Architecture
  • Plug-in - smallest unit
  • Big example HTML editor
  • Small example Action to create zip files
  • Extension point - named entity for collecting
    contributions
  • Example extension point for workbench preference
    UI
  • Extension - a contribution
  • Example specific HTML editor preferences

27
Eclipse Plug-in Architecture
  • Each plug-in
  • Contributes to 1 or more extension points
  • Optionally declares new extension points
  • Depends on a set of other plug-ins
  • Contains Java code libraries and other files
  • Lives in its own plug-in subdirectory
  • Details spelled out in the plug-in manifest
  • Manifest declares contributions
  • Code implements contributions and provides API
  • plugin.xml file in root of plug-in subdirectory

28
Plug-in Manifest
plugin.xml
ltplugin id com.example.tool" name
Example Plug-in Tool" class
"com.example.tool.ToolPlugin"gt ltrequiresgt
ltimport plugin "org.eclipse.core.resources"/gt
ltimport plugin "org.eclipse.ui"/gt
lt/requiresgt ltruntimegt ltlibrary name
tool.jar"/gt lt/runtimegt ltextension
point "org.eclipse.ui.preferencepages"gt
ltpage id "com.example.tool.preferences"
icon "icons/knob.gif" title Tool
Knobs" class "com.example.tool.ToolPrefe
renceWizard/gt lt/extensiongt ltextension-point
name Frob Providers id
"com.example.tool.frobProvider"/gt lt/plugingt
29
Eclipse
30
Eclipse Modeling Framework (EMF)
  • EMF is a modeling framework and code generation
    facility for building tools and other
    applications based on a structured data model.
  • From a model specification described in XMI, EMF
    provides tools and runtime support to produce a
    set of Java classes for the model, a set of
    adapter classes that enable viewing and
    command-based editing of the model, and a basic
    editor.
  • In a nutshell it is to exchange models into Java
    code

31
(No Transcript)
32
(No Transcript)
33
(No Transcript)
34
(No Transcript)
35
(No Transcript)
36
(No Transcript)
37
(No Transcript)
38
(No Transcript)
39
Here is the complete class hierarchy of the Ecore
model (shaded boxes are abstract classes)
40
(No Transcript)
41
(No Transcript)
42
(No Transcript)
43
(No Transcript)
44
(No Transcript)
45
(No Transcript)
46
EMF homepage
47
EMF Capítulo 2
48
Summary
  • Há 20 anos atrás
  • estruturada, procedimentos, dados, função.
  • Atualmente
  • Avanço tecnológico novas perspectivas
  • Business intelligence, onlogogies .
  • Futuro
  • federal global model repository
  • web semantica

49
References Model Repositories
  • http//www.tdan.com/i013fe04.htm - The Data
    Administration Newsletter (TDAN.com) Robert S.
    Seiner - Publisher
  • http//www.cin.ufpe.br/if710/slides/ModelReposito
    riesTransformations.ppt
  • http//www.cs.york.ac.uk/puml/puml-list-archive/
  • http//www.sciences.univ-nantes.fr/lina/atl/www/pa
    pers/eTX2006/03a-FreddyAllilaireRev1.pdf
  • http//www.cs.york.ac.uk/puml/puml-list-archive/
  • http//zooomm.org/
  • http//planetmde.org/
  • http//www.eclipse.org/gmt/am3/
  • http//planetmde.org/gamma2006/
  • Bézivin, J, Jouault, F, and Valduriez, P On the
    Need for Megamodels. In Proceedings of the
    OOPSLA/GPCE Best Practices for Model-Driven
    Software Development workshop, 19th Annual ACM
    Conference on Object-Oriented Programming,
    Systems, Languages, and Applications. 2004.
    Disponível em www.sciences.univ-nantes.fr/lina/atl
    /www/papers/OOPSLA04/bezivin-megamodel.pdf

50
References XML and XMI
  • www.omg.org/technology/documents/formal/xmi.htm
  • www.jeckle.de/xmi.htm
  • www.omg.org/technology/xml/
  • http//www.idealliance.org/proceedings/xml05/slide
    s/borensteinfox.ppt
  • http//homepages.inf.ed.ac.uk/perdita/XMI/

51
References - JMI
  • http//java.sun.com/products/jmi/
  • http//www.cs.kent.ac.uk/events/conf/2001/eebw/sli
    des/sjcSlides.pdf
  • http//www.openmdx.org/documents/v1.1/tutorials/jm
    i/htmlsingle/JMI-Binding.htmlS-JMI-MAPPING-OVERVI
    EW
  • http//java.sun.com/products/jmi/pres/preso1/text0
    .htm

52
References - EMF
  • http//www.eclipse.org/emf/docs.phppresentations
  • Eclipse EMF Help - overviews, tutorials, API
    reference - EMF Project Web Site
  • http//www.eclipse.org/emf/ - documentation,
    newsgroup, mailing list, Bugzilla
  • Eclipse Modeling Framework by Frank Budinsky et
    al.
  • Addison-Wesley 1st edition (August 13, 2003) -
    ISBN 0131425420.
  • IBM Redbook
  • publication number SG24-6302-00

53
Thanks
Write a Comment
User Comments (0)
About PowerShow.com