XML Metadata Interchange (XMI)

Slides:



Advertisements
Similar presentations
Language Specification using Metamodelling Joachim Fischer Humboldt University Berlin LAB Workshop Geneva
Advertisements

Profiles Construction Eclipse ECESIS Project Construction of Complex UML Profiles UPM ETSI Telecomunicación Ciudad Universitaria s/n Madrid 28040,
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 2, Modeling with UML, Part 4 UML 2 Metamodel.
June 9, 2006 Transforming models with ATL © 2006 ATLAS Nantes Transforming models with ATL The A TLAS Transformation Language Frédéric Jouault ATLAS.
Automated Test Design ™ © 2011 Conformiq, Inc. CONFORMIQ DESIGNER On ES v1.2.1 Stephan Schulz MBT Working Meeting/MTS#56, Göttingen.
Query/Views/Transformations © 2006 ATLAS Nantes Query/Views/Transformations An introduction to the MOF 2.0 QVT standard with focus on the Operational.
UML CASE Tool. ABSTRACT Domain analysis enables identifying families of applications and capturing their terminology in order to assist and guide system.
Ontologies Reasoning Components Agents Simulations An Overview of Model-Driven Engineering and Architecture Jacques Robin.
Creating Architectural Descriptions. Outline Standardizing architectural descriptions: The IEEE has published, “Recommended Practice for Architectural.
Whole Platform Tesi di Dottorato di: RICCARDO SOLMI Università degli Studi di Bologna Facoltà di scienze matematiche, fisiche e naturali Corso di Dottorato.
IBM Software Group © 2005 IBM Corporation University of Nantes Eclipse dayMarch 2005 The Eclipse Modeling Framework and the IBM Model Transformation Framework.
MDE In A Sales Management System: A Case Study © 2008 INRIA, TUD & SAP MDE In A Sales Management System: A Case Study Mathias Fritzsche, Hugo Bruneliere,
MDD Tutorial for managers Eclipse ECESIS Project A presentation of MDD basics Model-driven development (MDD) tutorial for managers EUROPEAN SOFTWARE INSTITUTE,
Comparing M2T & M2M Complementary Approaches © 2008 INRIA, University of York & SINTEF Comparing M2T & M2M Complementary Approaches Hugo Bruneliere,
® Eurostep.ESUKPC v0.1©Copyright Eurostep Limited An Introduction to ISO STEP Part 25 David Price.
HL7 UK 2003 (c) Abies Ltd Modelling Clinical Information Using UML Tim Benson Abies Ltd
Advanced Applications Of Model-to-Model Transformation © 2008 INRIA Advanced Applications Of Model-to-Model Transformation Hugo Bruneliere & Frédéric.
MDC Open Information Model West Virginia University CS486 Presentation Feb 18, 2000 Lijian Liu (OIM:
A novel approach to modeling Zvezdan Protić, Tom Verhoeff, Mark van den Brand.
Composing Models: Principles & Techniques © Copyright TUBS & TUD Composing Models: Principles & Techniques Steven Völkel & Jendrik Johannes.
Model Transformations
Faculty of Informatics and Information Technologies Slovak University of Technology Peter Kajsa and Ľubomír Majtás Design.
Workshop on Integrated Application of Formal Languages, Geneva J.Fischer Mappings, Use of MOF for Language Families Joachim Fischer Workshop on.
Implementation of ISO Encoding Joint Nordic Implementation project Morten Borrebæk Norwegian Mapping Authority,
UML2 Package Merge Usage scenarios and their effect on XMI and Java API interoperability Bran Selic, Jim Amsden, Kenn Hussey Oct, 2003.
Metadata Tools and Methods Chris Nelson Metanet Conference 2 April 2001.
MDA and QVT  Tom Gullion, Director of Product Management, Together Products.
MDE Model Driven Engineering Xavier Blanc Université Pierre et Marie Curie
Introduction to MDA (Model Driven Architecture) CYT.
A REFACTORING TOOL FOR DESIGN PATTERNS WITH MODEL TRANSFORMATIONS Zekai Demirezen Yasemin Topaloğlu Ege University Department of Computer Engineering
Tools for Diagrammatic Specifications Stian Skjerveggen Supervisors: Yngve Lamo, Adrian Rutle, Uwe Egbert Wolter.
Model Handling with EMF Eclipse ECESIS Project Model handling with EMF An introduction to the Eclipse Modeling Framework ATLAS group (INRIA & LINA),
Modeling Tools for Healthcare Technical Overview April 8, 2009.
Alignment of ATL and QVT © 2006 ATLAS Nantes Alignment of ATL and QVT Ivan Kurtev ATLAS group, INRIA & University of Nantes, France
Building Tools by Model Transformations in Eclipse Oskars Vilitis, Audris Kalnins, Edgars Celms, Elina Kalnina, Agris Sostaks, Janis Barzdins Institute.
2nd TTCN-3 User Conference, June The TTCN-3 Metamodel – A Basis for Tool Integration Ina Schieferdecker TU Berlin/Fraunhofer Fokus Hajo Eichler,
What is MOF? The Meta Object Facility (MOF) specification provides a set of CORBA interfaces that can be used to define and manipulate a set of interoperable.
Copyright © 2009 AtlanMod. All Rights Reserved Frédéric Jouault & Hugo Bruneliere AtlanMod team (INRIA & Mines de Nantes) Possible Benefits of Bridging.
UML Profiles Eclipse ECESIS Project The UML Profile technology SOFTEAM 144 Ave des Champs Elysées Paris, France
IVOA Registry videocon 2004/05/13-14 Gerard Lemson1 Model based schema.
ISO/IEC CD and WD : Core Model and Model Mapping ISO/IEC JTC1/SC32/WG September 2005, Toronto SC32/WG2 Japan (Kanrikogaku Ltd) Masaharu.
Usage of OCL April Usage of OCL for design guidelines of models Christian Hein, Fraunhofer FOKUS April 2006.
IBM Software Group ® Overview of SA and RSA Integration John Jessup June 1, 2012 Slides from Kevin Cornell December 2008 Have been reused in this presentation.
WP 3.3 © Copyright Xactium, TUBS & TUD How to build a set of DSLs: from Theory to Practise Xactium, TUBS, Jendrik Johannes (TUD)
Selected Topics in Software Engineering - Distributed Software Development.
Model Driven Development An introduction. Overview Using Models Using Models in Software Feasibility of MDA MDA Technologies The Unified Modeling Language.
XASTRO-2 Overview Presentation CCSDS SAWG Athens Meeting 12 th April 2005.
STASIS Technical Innovations - Simplifying e-Business Collaboration by providing a Semantic Mapping Platform - Dr. Sven Abels - TIE -
Introduction to Model-Driven Simulation © 2008 SAP, TU Dresden, XJ Technologies Introduction to Model-Driven Simulation Mathias Fritzsche 1, Jendrik.
An ATL Example © 2005 ATLAS Nantes An ATL Example The BibTeXML to DocBook Transformation ATLAS group (INRIA & LINA), University of Nantes, France.
ModelPedia Model Driven Engineering Graphical User Interfaces for Web 2.0 Sites Centro de Informática – CIn/UFPe ORCAS Group Eclipse GMF Fábio M. Pereira.
Modelling Support for Quality of Service Eclipse ECESIS Project Modelling Support for Quality of Service Department for Cooperative and Trusted Systems.
Open Tool Integration Framework Gabor Karsai Institute for Software-Integrated Systems PO.Box 1829B Vanderbilt University Nashville, TN 37235, USA.
SimDB Implementation & Browser IVOA InterOp 2008 Meeting, Theory Session 1. Baltimore, 26/10/2008 Laurent Bourgès This work makes use of EURO-VO software,
All Presentation Material Copyright Eurostep Group AB ® A Meta-model of EXPRESS in UML for MOF and UML to EXPRESS David Price April 2002.
ModTransf A Simple Model to Model Transformation Engine Cédric Dumoulin.
Introduction To Model-to-Model Transformation © 2008 INRIA Introduction To Model-to-Model Transformation Hugo Bruneliere & Frédéric Jouault INRIA.
Based on material developed in ATHENA (IST ), INTEROP (IST ) and MODELWARE (IST ) 6-1b. Atlas Transformation Language (ATL) with RSM.
® IBM Software Group A Metamodeling Approach to Pattern Specification Maged Elaasar 1,2, Dr. Lionel Briand 1, Dr. Yvan Labiche 1 1 Carleton University,
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 2, Modeling with UML: UML 2 Metamodel Note to Instructor: The material in this.
Nigel Baker UWE & CERN/EP-CMA Design Patterns for Integrating Product and Process Models The C.R.I.S.T.A.L. Project ( C ooperative R epositories & I nformation.
An Introduction to Metamodelling Eclipse ECESIS Project An Introduction to Metamodelling Principles & Fundamentals Department of Computer Science,
Ontologies Reasoning Components Agents Simulations An Overview of Model-Driven Engineering and Architecture Jacques Robin.
Sheet 1MDAFA2004 Linköping, June 2004 A Language for Model Transformations in the MOF Architecture Ivan Kurtev, Klaas van den Berg University of Twente,
Experiences and Status
Chapter 2, Modeling with UML, Part 4 UML 2 Metamodel
Modelling Clinical Information Using UML
Metadata Framework as the basis for Metadata-driven Architecture
Metadata The metadata contains
XML Metadata Interchange (XMI)
Presentation transcript:

XML Metadata Interchange (XMI) Introduction to XML Metadata Interchange (XMI) Department for Cooperative and Trusted Systems Information and Communication Technology, SINTEF, Forskningsveien 1, N-0314 Oslo, Norway http://www.sintef.no

Context of this work The present courseware has been elaborated in the context of the MODELWARE European IST FP6 project (http://www.modelware-ist.org/). Co-funded by the European Commission, the MODELWARE project involves 19 partners from 8 European countries. MODELWARE aims to improve software productivity by capitalizing on techniques known as Model-Driven Development (MDD). To achieve the goal of large-scale adoption of these MDD techniques, MODELWARE promotes the idea of a collaborative development of courseware dedicated to this domain. The MDD courseware provided here with the status of open source software is produced under the EPL 1.0 license.

XMI from 30 000 feet XMI is short for XML Metadata Interchange XMI is a standard (and a trademark) from the Object Management Group (OMG) XMI is a framework for Defining, interchanging, manipulating and integrating XML data and objects Used for integration Tools, applications, repositories, data warehouses Typically used as interchange format for UML tools XMI defines rules for schema definition Definition of schema from any valid Meta Object Facility (MOF) model Schema production XMI defines rules for metadata generation Metadata according to a MOF metamodel is generated into XML according to the generated XML schema Document production

Metamodel: Model of a set of models Metamodels are specifications models are valid if no false statements according to metamodel (i.e., well-formed) Metametamodel model of metamodels reflexive metamodel, i.e., expressed using itself ref. Kurt Gödel minimal reflexive metamodel can be used to express any statement about a model

Meta levels in OMG M0 – what is to be modelled (Das Ding an sich) M1 – Models (Das Ding für mich) May contain both class/type and instance models M2 – Metamodels UML2.0 and CWM (Common Warehouse Metamodel) M3 – The metametamodel MOF Interpretation (not instantiation!) crosses meta-layers, theories reside in one layer (e.g., instance models can be deduced from class models) The Meta Object Facility (MOF) Facility to handle models and instances of models at multiple levels Contains self describing metametamodel (called MOF) Needed as context for XMI tutorial. One can easily use to much time in confusing the audience about the MOF 4 level stack. M3 is the meta-meta-meta-data or meta-meta-model, this is where MOF it self belongs M2 is the meta-meta-data or meta-model, this is where metamodels such as UML2.0 and CWM belong M1 is the meta-data or model, this is where models belong, examples are UML2.0 models M0 is the data, or the actual things that are described by the models at level 1 Note that the levels are dependent of the viewpoint. For a UML tool, the models will be the actual data (M0) while the UML2.0 metamodel will be part of the model (M1) for the UML tool.

History - XMI versions and MOF versions XMI 1.1 corresponds to MOF 1.3 XMI 1.2 corresponds to MOF 1.4 XMI 1.3 (added Schema support) corresponds to MOF 1.4 XMI 2.0 (adds Schema support and changes document format) corresponds to MOF 1.4 XMI 2.1 corresponds  to MOF 2.0

MOF and XMI XML Schema MOF Metamodel XMI Document MOF Metadata Generation Rules Instance of Instance of MOF Metadata XMI Document Generation Rules

Schema production rules I A set of rules are defined by the standard Some of them are quite complex Typically intended to be implemented, not for human usage EBNF (Extended Backus-Naur form) rules are supplied Metamodel Class Mapped to xsd:element and xsd:complexType with same name as Metamodel Class Attribute of Class Mapped to xsd:element and xsd:attribute if simple data type and the cardinality of the attribute is [1..1] or [0..1] Mapped to element if xsd:complexType Note: only possible in CMOF (Complete MOF) EMOF and ECORE do not allow attributes of complex type in classes

Schema Production Example <xsd:schema xmlns:xsd=”http://www.w3c.org/2001/XMLSchema” xmlns:xmi=”http://www.omg.org/XMI” targetNamespace=”http://www.sintef.org/CDs” xmlns:cds=”http://www.sintef.org/CDs”> <xsd:complexType name=”CD”> <xsd:choice minOccurs=”0” maxOccurs=”unbounded”> <xsd:element name=”title” type=”xsd:string”/> <xsd:element name=”artist” type=”xsd:string”/> <xsd:element name=”num_tracs” type=”xsd:integer”/> <xsd:element ref=”xmi:Extension”/> </xsd:choice> <xsd:attribute ref=”xmi:id”/> <xsd:attribute name=”title” type=”xsd:string”/> <xsd:attribute name=”artist” type=”xsd:string”/> <xsd:attribute name=”num_tracs” type=”xsd:integer”/> </xsd:complexType> <xsd:element name=”CD” type=”cds:CD”/> </xsd:schema>

Document Production Example According to schema generated in previous slide Born to Run Bruce Springsteen 8 tracks <?xml version="1.0" encoding="UTF-8"?> <cds:CD xmlns:cds="http://www.sintef.org/CDs" xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xmlns:xmi=”http://www.omg.org/XMI” xsi:schemaLocation="http://www.sintef.org/CDs" artist="Bruce Springsteen" title="Born To Run" num_tracs="8" xmi:id="_1"> </cds:CD>

Schema Production Rules II Association between classes An xsd:element is created with name set to the name of the reference and type set to the type name of the referenced class Multiplicity definitions are included if the appropriate parameters are set at the time of generation enforceMinimumMultiplicity enforceMaximumMultiplicity Inheritance Challenge XML schemas only allow single inheritance MOF allows multiple inheritance Solution XMI uses a copy down strategy to implement inheritance For multiple inheritance properties that occur more than once in the hierarchy are included only once in the

Schema with relationship <?xml version="1.0" encoding="UTF-8"?> <xsd:schema xmlns:cdlib="www.sintef.org" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="www.sintef.org"> <xsd:import namespace=http://www.omg.org/XMI schemaLocation="XMI.xsd" /> <xsd:complexType name="CD"> <xsd:choice maxOccurs="unbounded" minOccurs="0"> <xsd:element ref="xmi:Extension" /> </xsd:choice> <xsd:attribute ref="xmi:id" /> <xsd:attributeGroup ref="xmi:ObjectAttribs" /> <xsd:attribute name="title" type="xsd:string" use="required" /> <xsd:attribute name="artist" type="xsd:string" /> <xsd:attribute name="num_tracs" type="xsd:int" /> </xsd:complexType> <xsd:element name="CD" type="cdlib:CD" /> <xsd:complexType name="CDLibrary"> <xsd:element name="cds" type="cdlib:CD" /> <xsd:attribute name="owner" type="xsd:string" /> <xsd:element name="CDLibrary" type="cdlib:CDLibrary" /> </xsd:schema> The red line indicates how the reference is implemented in the schema

Schema with inheritance <?xml version="1.0" encoding="UTF-8"?> <xsd:schema xmlns:xmi=http://www.omg.org/XMI xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns=“ml"> <xsd:import namespace="http://www.omg.org/XMI" schemaLocation="XMI.xsd"/> <xsd:complexType name="Media"> <xsd:choice maxOccurs="unbounded" minOccurs="0"> <xsd:element ref="xmi:Extension"/> </xsd:choice> <xsd:attribute ref="xmi:id"/> <xsd:attributeGroup ref="xmi:ObjectAttribs"/> <xsd:attribute name="title" type="xsd:string"/> </xsd:complexType> <xsd:element name="Media" type=“ml:Media"/> <xsd:complexType name="CD"> <xsd:attribute name="artist" type="xsd:string"/> <xsd:attribute name="num_tracs" type="xsd:int"/> <xsd:element name="CD" type=“ml:CD"/> </xsd:schema> The red lines show that the copy-down pattern has been used to handle inheritance

Document with relationship CD Library Owner = Jon Doe Born to Run Bruce Springsteen 8 tracks Achtung Baby U2 13 tracks <?xml version="1.0" encoding="UTF-8"?> <cdlib:CDLibrary xmlns:cdlib="www.sintef.org" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="www.sintef.org CDLibraryXMI.xsd http://www.omg.org/XMI XMI.xsd " owner="Tor Neple" xmi:id="_1"> <cds title="Born To Run" xmi:id="_2" artist="Bruce Springsteen" num_tracs="8"></cds> <cds title="Achtung Baby" xmi:id="_3" artist="U2" num_tracs="13"></cds> </cdlib:CDLibrary>

XMI allows you to express differences in XMI documents Can be used to just communicate the changes in a document rather than the whole document Types of differences Add Delete Replace

Simple example of differences collection.xmi <xmi:XMI xmi:version=”2.0” xmlns:xmi=http://www.omg.org/XMI> <MediaCollection xmi:id=”_1”> <items xmi:id=”_2” name=”Purple Rain” xmi:type=”CD”/> <items xmi:id=”_3” name=”Pulp Fiction” xmi:type=”DV”/> </MediaCollection> </xmi:XMI> differences <xmi:XMI xmi:version=”2.0” xmlns:xmi=http://www.omg.org/XMI> <xmi:Delete> <target href=”collection.xmi#_2”/> </xmi:Delete> <xmi:Add addition=”NM1” position=”1”> <target href=”collection.xmi#_1”/> </xmi:Add> <CD xmi:id=”NM1” name=”Thunder Road”/> </xmi:XMI> result <xmi:XMI xmi:version=”2.0” xmlns:xmi=http://www.omg.org/XMI> <MediaCollection xmi:id=”_1”> <items xmi:id=”NM1” name=Thunder Road” xmi:type=”CD”/> <items xmi:id=”_3” name=”Pulp Fiction” xmi:type=”DVD”/> </MediaCollection> </xmi:XMI>

Tool interoperability Use of XMI for tool interoperability is not always straightforward Different XMI versions and different metamodel versions Take XMI for UML as an example XMI 1.0 for UML 1.3 XMI 1.1 for UML 1.3 XMI 1.2 for UML 1.4 XMI 2.0 for UML 1.4 XMI 2.1 for UML 2.0 Common to see that UML tools have a ”choose XMI format” dialog when exporting to XMI

ECORE (EMF metamodel) is similar to EMOF XMI in Eclipse Eclipse uses the Eclipse Modeling Framework (EMF) as its Meta Object Facility ECORE (EMF metamodel) is similar to EMOF The EMF project contains tools to Create ECORE metamodels Create XMI schemas for ECORE models Create models according to the defined metamodels Reading and writing such models in XMI format Ecore XMI != OMG XMI Some small differences since there are some differences between ECORE and EMOF (Essential MOF)

SIMPLE UML model in XMI format <?xml version="1.0" encoding="UTF-8"?> <uml:Model xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:uml="http://www.eclipse.org/uml2/1.0.0/UML" xmi:id="_UwyEFBV_Edqs_vsvaW3hqA" name=“CarOwner" > <ownedMember xmi:type="uml:Class" xmi:id="_UwyEHxV_Edqs_vsvaW3hqA" name="Car"> <ownedAttribute xmi:id="_UwyEIBV_Edqs_vsvaW3hqA" name="owner" visibility="private" type="_UwyEIhV_Edqs_vsvaW3hqA" association="_UwyEJxV_Edqs_vsvaW3hqA"/> <ownedAttribute xmi:id="_UwyEIRV_Edqs_vsvaW3hqA" name="manufacturer" visibility="private"> <type xmi:type="uml:PrimitiveType" href="pathmap://UML2_LIBRARIES/UML2PrimitiveTypes.library.uml2#_IXlH8a86EdieaYgxtVWN8Q"/> </ownedAttribute> </ownedMember> <ownedMember xmi:type="uml:Class" xmi:id="_UwyEIhV_Edqs_vsvaW3hqA" name="Owner"> <ownedAttribute xmi:id="_UwyEIxV_Edqs_vsvaW3hqA" name="ownedCars" visibility="private" type="_UwyEHxV_Edqs_vsvaW3hqA" association="_UwyEJxV_Edqs_vsvaW3hqA"> <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_UwyEJBV_Edqs_vsvaW3hqA" value="-1"/> <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_UwyEJRV_Edqs_vsvaW3hqA"/> <ownedAttribute xmi:id="_UwyEJhV_Edqs_vsvaW3hqA" name="name" visibility="private"> <ownedMember xmi:type="uml:Association" xmi:id="_UwyEJxV_Edqs_vsvaW3hqA" memberEnd="_UwyEIBV_Edqs_vsvaW3hqA _UwyEIxV_Edqs_vsvaW3hqA"/> </uml:Model> This example is included in order to show the possible complexity of XMI documents. Simplified UML2.0 xmi file exported from Rational Software Architect EMF based, not MOF XMI compliant

Summary and Conclusion XMI allows for defining, interchanging, manipulating and integrating XML data and objects Defines rules for creation of schema from metamodel and document from model Works on MOF based models Widely used for model interchange between UML tools Great possibilites for version conflicts