Navigation in UML class diagrams and XML schemas - PowerPoint PPT Presentation

About This Presentation
Title:

Navigation in UML class diagrams and XML schemas

Description:

Translation from UML cds to XML schemas ... Disjunction - Abstract Classes. Exp = (Simple | Compound ) Repetition - Collection classes ... – PowerPoint PPT presentation

Number of Views:90
Avg rating:3.0/5.0
Slides: 13
Provided by: T10866
Learn more at: https://www2.ccs.neu.edu
Category:

less

Transcript and Presenter's Notes

Title: Navigation in UML class diagrams and XML schemas


1
Navigation in UML class diagramsand XML schemas
  • Karl Lieberherr
  • UBS AG
  • Northeastern University

2
Overview
  • Translation from UML cds to XML schemas
  • Navigation through XML documents (and object
    structures) Structure-shy traversal pattern
  • DJ library email exchange with Mike Mannion

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

4
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, JDOM
  • SAX
  • UML
  • programs (Java etc.)

5
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

6
Commonality
Generate a visitor library from class graph for
copying, displaying, printing, checking,
comparing and tracing of objects.
XML schemas
UML class diagrams
structure of objects, Java processing
7
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

8
What are the basic elements of XML?
  • Sequence
  • lt!ELEMENT Compound (Op , Exp , Exp )gt
  • Disjunction
  • lt!ELEMENT Exp (Simple Compound )gt
  • Repetition
  • lt!ELEMENT Author (Person , Publication )gt

9
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 )

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

11
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 super classes should be abstract.

12
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.
Write a Comment
User Comments (0)
About PowerShow.com