UML class diagrams and XML schemas Karl Lieberherr UBS AG Northeastern University.

Slides:



Advertisements
Similar presentations
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 12Slide 1 Software Design l Objectives To explain how a software design may be represented.
Advertisements

Unified Modeling Language
XML Parsing Using Java APIs AIP Independence project Fall 2010.
INTERPRETER Main Topics What is an Interpreter. Why should we learn about them.
7M701 1 Software Engineering Object-oriented Design Sommerville, Ian (2001) Software Engineering, 6 th edition: Chapter 12 )
Visitor Pattern Jeff Schott CS590L Spring What is the Purpose of the Visitor Pattern ? n Represent an operation to be performed on the elements.
©Ian Sommerville 2006Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design.
4/16/2007Declare a Schema File I1. 4/16/2007Declare a Schema File I2 Declare a Schema File A collection of semantic validation rules designed to constrain.
1 An introduction to design patterns Based on material produced by John Vlissides and Douglas C. Schmidt.
CS 331, Principles of Programming Languages Introduction.
DSpace XML UI Project Texas A&M University Digital Initiatives, Research and Technology Scott Phillips, Cody Green, Alexey Maslov, Adam Mikeal, Brian Surratt,
XForms: A case study Rajiv Shivane & Pavitar Singh.
EAD: A Technical Introduction Julie Hardesty, Metadata Analyst June 3, 2014.
Pervasive e-commerce with XML Babak Esfandiari Carleton University Ottawa, Canada.
Introduction to XSLT By Ed Rosenthal And Dave Pion.
CHAPTER ONE Problem Solving and the Object- Oriented Paradigm.
Lushan Han, Tim Finin, Cynthia Parr, Joel Sachs, and Anupam Joshi RDF123: from Spreadsheets to RDF.
Web Services Description Language CS409 Application Services Even Semester 2007.
Intro. to XML & XML DB Bun Yue Professor, CS/CIS UHCL.
Design Pattern Interpreter By Swathi Polusani. What is an Interpreter? The Interpreter pattern describes how to define a grammar for simple languages,
Chapter 6: Structured Vs. Object Oriented Analysis and Design.
Pattern Language for AP1 Pattern Language for Adaptive Programming (AP) Karl Lieberherr Northeastern University.
Python – Part 1 Python Programming Language 1. What is Python? High-level language Interpreted – easy to test and use interactively Object-oriented Open-source.
XML A web enabled data description language 4/22/2001 By Mark Lawson & Edward Ryan L’Herault.
Presentation Topic: XML and ASP Presented by Yanzhi Zhang.
SaveUML System design. System overview Possible...
COMP 6471 Software Design Methodologies Winter 2006 Dr Greg Butler
CS3773 Software Engineering Lecture 04 UML Class Diagram.
ECE450 - Software Engineering II1 ECE450 – Software Engineering II Today: Design Patterns IX Interpreter, Mediator, Template Method recap.
Embedded XML Documentation for Fortran 90 and C/C++ Brett N. DiFrischia RS Information Systems NOAA | GFDL.
Not only mark-up languages! There are other many other grammar formalisms and tools than XML. Some of them standardized (ASN). Even XML does not always.
C. Huc/CNES, D. Boucon/CNES-SILOGIC, D.M. Sawyer/NASA/GSFC, J.G. Garrett/NASA-Raytheon Producer-Archive Interface Methodology Abstract Standard PAIMAS.
Design Patterns Gang Qian Department of Computer Science University of Central Oklahoma.
Sheet 1 DocEng’03, Grenoble, November 2003 Model Driven Architecture based XML Processing Ivan Kurtev, Klaas van den Berg University of Twente, the Netherlands.
Pattern Language for AP1 Pattern Language for Adaptive Programming (AP) Karl Lieberherr Northeastern University.
Comparison of CEN, FGDC and ISO standards for metadata Ing. Jan Ruzicka Institute of Economics and Control Systems VŠB – Technical university Ostrava 17.
Unified Modelling Language (UML) Software Engineering Lab. Sharif University of Technology.
CS 331, Principles of Programming Languages Chapter 1.
Dom and XSLT Dom – document object model DOM – collection of nodes in a tree.
Translating Traversals to AspectJ. Outline Motivation Demeter Process for Traversals AspectJ Translation Process.
The Visitor Pattern (Behavioral) ©SoftMoore ConsultingSlide 1.
The Interpreter Pattern (Behavioral) ©SoftMoore ConsultingSlide 1.
Martin Kruliš by Martin Kruliš (v1.1)1.
DJ: traversal-visitor-style programming in Java Josh Marshall/ Doug Orleans Want to add more on traversal through collections and Aspectual Components.
Using DSDL plus annotations for Netconf (+) data modeling Rohan Mahy draft-mahy-canmod-dsdl-01.
Pattern Language for AP1 Pattern Language for Adaptive Programming (AP) Karl Lieberherr Northeastern University.
1 Storing and Maintaining Semistructured Data Efficiently in an Object- Relational Database Mo Yuanying and Ling Tok Wang.
TOSCA V1.1: Variants of Collections of Specs. Spec Structure – Variant A The XML Simple Profile is a subsetting of the V1.1 spec but compliant with the.
Design Overview. Generated Packages ► fUML.Library.* - generated ► fUML.Semantics.* - generated ► fUML.Syntax.* - generated ► fUML.Test.* - generated.
1 Model Driven Health Tools Design and Implementation of CDA Templates Dave Carlson Contractor to CHIO
CSCE 240 – Intro to Software Engineering Lecture 3.
Pattern Language for AP1 Pattern Language for Adaptive Programming (AP) Karl Lieberherr Northeastern University.
Why XML (eXtensible Markup Language) To allow the definition and use of many application-specific markup languages Slogan: XML does for data what Java.
Strategy Design Pattern
Good for DJ over Java Extending traversals for collections (b..*)
Introduction to Design Patterns
Chapter 6: Structured Vs. Object Oriented Analysis and Design.
Behavioral Design Patterns
XML in Web Technologies
Software Architecture & Design Pattern
Presentation by Julie Betlach 7/02/2009
Implementing Language Extensions with Model Transformations
University of Houston-Clear Lake
Evaluating Compuware OptimalJ as an MDA tool
Introduction to Computer Science for Majors II
Software Design Lecture : 14.
Chapter 6: Structured Vs. Object Oriented Analysis and Design.
WebDAV Design Overview
Implementing Language Extensions with Model Transformations
Presentation transcript:

UML class diagrams and XML schemas Karl Lieberherr UBS AG Northeastern University

Overview Translation from UML cds to XML schemas Other standards beyond XML: Structure- shy object pattern Navigation through XML documents (and object structures): Structure-shy traversal pattern

Comparison XML schema –defines language structure of objects (documents) UML class diagram –defines structure of objects –summarizes program all classes –interfaces

Processing of Objects XML –XSLT, JSP –programs (Java etc.) Document Object Model –provides a standard set of objects for representing XML documents Fine grained model: one element - one class SAX UML –programs (Java etc.)

What brings XML? Agreement at syntax level –several proposals to write schemas –useful to have unified, simple approach to define mark-up languages Still need agreement at semantic level –hard data integration problems not eliminated

Commonality XML schemas UML class diagrams structure of objects, Java processing Generate a visitor library from class graph for copying, displaying, printing, checking, comparing and tracing of objects.

What can OO designers learn from XML? It is useful to separate the structure of your design from the implementation –E.g., XSLT descriptions are distinct from schemas It is useful to view an OO design as a grammar that defines application specific objects

What are the basic elements of XML? Sequence – Disjunction – Repetition –

What are the basic elements of UML class diagrams? Sequence - Concrete Classes –Compound = (op Op, arg1 Exp, arg2 Exp ) Disjunction - Abstract Classes –Exp = (Simple | Compound ) Repetition - Collection classes –Author = (Person, Publication* )

Avoid duplication! We should define a systematic process to generate XML schemas from UML class diagrams Has many benefits: –more flexible –easier to maintain

How do we have to write UML class diagrams? To make the translation easy (and to improve the UML class diagram) –Classes are partitioned into abstract classes and concrete classes. Abstract classes have at least one subclass. –Follow the Abstract Super Class rule (ASR). That means that all superclasses should be abstract.

UML Cd to XML Schema The translation algorithm roughly proceeds as follows: Flatten the UML class diagram, i.e., push all parts of abstract classes down to concrete classes. Replace undirected associations by two directed associations.Follow the ordering of parts and the ordering policy. –Concrete classes are translated into a schema element A of the form (B1, B2, B3,...). –Abstract classes are translated into a schema element of the form A (B1 | B2 | B3 |...). –An optional part B is represented as B?. A repeated part B is represented as B+ or B*.