[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

XML Object Model Challenge: RDF vs. XMI

  • From: David Megginson <david@m...>
  • To: "XML Developers' List" <xml-dev@i...>
  • Date: Fri, 28 May 1999 17:51:48 -0400 (EDT)

xmi rdf
I think that it would be very useful for someone to us to post the
same simple object model in both the W3C's RDF Schema and the OMG's
XMI, to help XML developers compare the two.  I've included some
simple Java classes and my attempt at an RDF Schema in this message;
any takers for writing the equivalent XMI?

Here's a very dumb object model as a set of Java classes (I'm using
variables for class attributes instead of get/set methods with
interfaces just to keep things short):

  public class Entity
    public String name;
    public String startDate;
    public String endData;

  public class Being extends Entity
    public Being sire;
    public Being dame;

  public class Person extends Being
    public String nationality[];

In RDF, I cannot express the fact that more than one nationality is
allowed for Person, but otherwise, here's my best attempt at a
bare-bones RDF Schema for the same object model:

  <?xml version="1.0"?>

  <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"

  <rdfs:Class ID="Entity"/>

  <rdfs:Class ID="Being">
  <rdfs:subClassOf rdf:resource="#Entity"/>

  <rdfs:Class ID="Person">
  <rdfs:subClassOf rdf:resource="#Being"/>

  <rdf:Property ID="name">
  <rdfs:range rdf:resource="#Entity"/>

  <rdf:Property ID="startDate">
  <rdfs:range rdf:resource="#Entity"/>

  <rdf:Property ID="endDate">
  <rdfs:range rdf:resource="#Entity"/>

  <rdf:Property ID="sire">
  <rdfs:range rdf:resource="#Being"/>
  <rdfs:domain rdf:resource="#Being"/>

  <rdf:Property ID="dame">
  <rdfs:range rdf:resource="#Being"/>
  <rdfs:domain rdf:resource="#Being"/>

  <rdf:Property ID="nationality">
  <rdfs:range rdf:resource="#Person"/>


I'd love to see the same thing in XMI.  Any takers?

All the best,


David Megginson                 david@m...

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To (un)subscribe, mailto:majordomo@i... the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@i...)


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.

Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.