Representing UML in RDF

(New) A testbed converter that supports automatic translation from UML/XMI to RDFS/RDF/XML is available.

The UML community developed a set of useful models for representing static and dynamic components of software-intensive systems. UML is an industry standard and serves as a modeling basis for emerging standards in other areas like OIM, CWM etc. As of today there exist a variety of UML vocabularies for describing object models, datatypes, database schemas, transformations etc.

The goal of this work is to make UML "RDF-compatible". This allows mixing and extending UML models and the language elements of UML itself on the Web in an open manner. XMI, the current standard for encoding UML in XML by OMG, does not offer this capability. It is based upon a hard-wired DTD. For example, if a third party were to refine the concept "Event" defined in UML statecharts into say "ExternalEvent" and "InternalEvent", it would not be possible to serialize the corresponding event instances in XMI.

The UML/RDF mapping suggested here is not a special encoding for UML. The only thing I did was to create a URL for every identifiable UML entity (e.g. http://www.omg.org/uml/1.3/Foundation.Core.Class or http://www.omg.org/uml/1.3/Foundation.Data_Types.Boolean.true). UML association ends correspond to RDF properties, the rest is mechanical conversion. I did this conversion for some important subsets of the UML standard. The URLs for UML/RDF were chosen to include tag names used in XMI as suffixes to facilitate conversion to/from XMI.

Representing the conceptual model of UML in RDF is similar to defining an alternative RDF Schema specification. UML bootstraps itself using the Foundation.Core package in a way similar to RDFS. It contains a lot of details that go far beyond the scope of RDFS.

New (May 11, 2000): a validator for RDF-encoded UML models is available! It is included in the API code distribution. The distribution also provides a UML-enhanced RDF model implementation that supports generalization and inverse relationships.

Example: validating the state machine schema using schemas defined in the core, datatypes and behavior packages:

java edu.stanford.db.rdf.uml.UMLModel
    http://www-db.stanford.edu/~melnik/rdf/uml/uml-state-20000507.rdf
    http://www-db.stanford.edu/~melnik/rdf/uml/uml-datatypes-20000507.rdf
    http://www-db.stanford.edu/~melnik/rdf/uml/uml-core-20000507.rdf
    http://www-db.stanford.edu/~melnik/rdf/uml/uml-behavior-20000507.rdf
Currently, typing and cardinality constraints are validated.

Revision history

2000-05-07 (DataTypes, State Machines, Core, Behavior)
  • Download uml-datatypes-20000507.rdf, uml-state-20000507.rdf, uml-core-20000507.rdf, uml-behavior-20000507.rdf
  • Removed order specification using rdf:Seq (added new experimental support for order, see API). Corrected multiplicity. Automatically validated all models.
  • 2000-04-26 (State Machines)
  • Download uml-state-20000426.rdf
  • Added Event types
  • 2000-04-25 (State Machines)
  • Download uml-state-20000425.rdf
  • State Machines, original draft
  • 2000-04-22 (Core)
  • Download uml-core-20000422.rdf
  • Vocabulary revision, proposed by Reinhold Klapsing. Renamed the identifiers in accordance with the XMI specification.
  • 2000-04-21 (Core)
  • Download uml-core-20000421.rdf
  • Original draft
  • Example

    This example illustrates how the flexibility of RDF can be deployed for mixing the UML state machine vocabulary with DublinCore. The consistency of the model is preserved. The data instance depicted below cannot be represented in XMI without violating the XMI DTD:
    <rdf:RDF xmlns:s="http://www.omg.org/uml/1.3/Behavioral_Elements.State_Machines."
             xmlns:dc="http://purl.org/dc/elements/1.1/">
    
    <s:StateMachine rdf:ID="MyMicrowave">
      <s:StateMachine.top>
        <s:State rdf:ID="PowerOn"
                 dc:Description="This is the start state for the microwave upon powering on"/>
      </s:StateMachine.top>
    </s:StateMachine>
    

    Graphical representation:

    Note that RDF does not define custom graphical representations for specific (meta)models. The above representation is a generic directed labeled graph obtained from the corresponding set of four RDF statements.

    References

    [1]Support for UML in RDF, part of the distribution at http://www-db.stanford.edu/~melnik/rdf/api.html
    [2]W3C Note: A Discussion of the Relationship Between RDF-Schema and UML, http://www.w3.org/TR/NOTE-rdf-uml/
    [3]UML 1.3 Specification, ftp://ftp.omg.org/pub/docs/ad/99-06-08.pdf, also contains description of XMI, a serialization format for UML
    [4]Discussion with Stephen Cranefield on the RDF Interest Mailing list. http://lists.w3.org/Archives/Public/www-rdf-interest/2000May/0154.html
    [5]S. Melnik and S. Decker: A Layered Approach to Information Modeling and Interoperability on the Web, Semantic Web Workshop, Lisboa, Portugal, Sep 2000. Available at http://www-db.stanford.edu/~melnik/pub/sw00/


    Created: Fri Apr 21 03:23:24 Pacific Daylight Time 2000
    Last modified: Tue Nov 28 11:10:54 Pacific Standard Time 2000