W3C home > Mailing lists > Public > www-webont-wg@w3.org > July 2002

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

From: Dan Connolly <connolly@w3.org>
Date: 11 Jul 2002 16:55:07 -0500
To: www-webont-wg@w3.org
Message-Id: <1026424507.14567.43.camel@dirk>

Guus and everybody,

A bit of implementation experience and review

  A UML Presentation Syntax for OWL Lite
  Author: Guus Schreiber
  Created:: April 3, 2002
  Last update: April 19, 2002 

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


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.

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:
dia2owl XSLT transformation:
OWL/RDF output:

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:

    :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...

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

Another relevant bit of work is:

  Objects by Design: Transforming XMI to HTML
  Copyright  1999-2001 Objects by Design, Inc.

Dan Connolly, W3C http://www.w3.org/People/Connolly/
Received on Thursday, 11 July 2002 17:54:13 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:56:45 UTC