dia2owl -- convert UML diagram from dia to OWL using XSLT

Guus and everybody,

A bit of implementation experience and review
of...

  A UML Presentation Syntax for OWL Lite
  Author: Guus Schreiber
  Created:: April 3, 2002
  Last update: April 19, 2002 
http://www.swi.psy.uva.nl/usr/Schreiber/docs/owl-uml/owl-uml.html

How did you make those diagrams, by the way?
Can your tool make XMI? Would you please make
it available?

Anyway...

I got this idea that I could reproduce them
using Dia, an open source diagramming tool that
uses XML for its storage format and has UML support.
  http://www.lysator.liu.se/~alla/dia/

Then I'd convert from their XML format to
ours, using XSLT.

It worked great for the first example,
the class with two subclasses:

XML created with Dia:
  http://www.w3.org/2002/03owlt/umlp/clsTwoSub.xml
dia2owl XSLT transformation:
  http://www.w3.org/2002/03owlt/umlp/dia2owl.xsl
OWL/RDF output:
  http://www.w3.org/2002/03owlt/umlp/clsTwoSub.rdf

(details:
http://www.w3.org/2002/03owlt/umlp/Makefile )

Viewed thru RDF/n3 glasses, the output
looks like this:

    :O0     a s:Class;
         s:label "Animal" .
    
    :O1     a s:Class;
         s:label "Male";
         s:subClassOf :O0 .
    
    :O2     a s:Class;
         s:label "Female";
         s:subClassOf :O0 .

OK, so far, so good.

But I didn't get any interesting results for the
2nd example: dia doesn't seem to support
multiplicity/cardinality on attributes, and as you
noted, the notation you used for the enumeration
was a little goofy.

The third example was pretty straightforward:
  http://www.w3.org/2002/03owlt/umlp/objProp.xml
=>
  http://www.w3.org/2002/03owlt/umlp/objProp.rdf

i.e.
    :O0     a s:Class;
         s:label "Animal" .
    
    :O1     a s:Class;
         s:label "Animal";
         owl:hasAtLeastOne :O3 .
    
    :O3     a r:Property;
         s:domain :O1;
         s:label "HasParent";
         s:range :O0 .

By the way... do you mean to have two classes
with the same "Animal" label, or are UML
class label/names unambiguous? (1/2 ;-)
i.e. should my conversion conclude that
classes with the same name are identical?


Dia doesn't grok "UML association class"es, so
I couldn't do the subProperty example.

I got tired and quit there.

The examples
under "Disjointness and identity" look straightforward.

I dunno about defined classes... how do you expect
that diagram would convert to OWL?

Here's a possible interpretation:

	:Man rdfs:subClassOf :Male, :Person.

	[ ont:unionOf (:Male :Person) ] rdfs:subClassOf :Man.

or, perhaps equivalently,

	:Man owl:intersectionOf (:Male :Person).

Has anybody else played around with mechanical conversion
of OWL and UML?

Sergey Melnik did some RDF/UML/XMI stuff a while ago...
http://www-db.stanford.edu/~melnik/rdf/uml/

I should probably be using XMI rather than Dia's XML
format, but I don't have any handy tools that generate
XMI.


Another relevant bit of work is:

  Objects by Design: Transforming XMI to HTML
  Copyright © 1999-2001 Objects by Design, Inc.
  http://www.objectsbydesign.com/projects/xmi_to_html.html

-- 
Dan Connolly, W3C http://www.w3.org/People/Connolly/

Received on Thursday, 11 July 2002 17:54:13 UTC