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

Re: A certain difficulty

  • From: David Megginson <david@m...>
  • To: xml-dev@x...
  • Date: 26 Feb 2000 11:40:01 -0500

book.rdf
Mark Birbeck <Mark.Birbeck@i...> writes:

> I must say I prefer old-fashioned OO techniques then ;-) where I'm
> not limited to only having one class. Why in your model have you
> decided that 'creator' is the must use tag for anyone who creates
> something, but 'hook' and 'jumper' are valid objects? If your
> argument was consistent then you should just have a generic object
> that can be a person, book or jumper, and a 'created by' tag. And
> then I can say 'this jumper was created by that book' which we may
> want to inhibit.

Perhaps you're a little confused because my example was too short.
Try a slightly longer version:

  <rdf:RDF ...>

  <ppl:Person rdf:about="http://www.people.org/a">
    <dc:title>Jane Smith</dc:title>
  </ppl:Person>

  <ppl:Person rdf:about="http://www.people.org/b">
    <dc:title>John Doe</dc:title>
  </ppl:Person>

  <megg:Jumper rdf:about="http://www.foo.com/1">
    <dc:creator rdf:about="http://www.people.org/a"/>
  </megg:Jumper>

  <megg:Book rdf:about="http://www.amazon.com/ids/00002">
    <dc:creator rdf:about="http://www.people.org/b"/>
  </megg:Book>

  </rdf:RDF>

Of course, the best class design depends on the specific domain being
modelled, but it doesn't usually make sense to have classes like
"Author" or "Knitter", since the same person is often both; instead,
you have a class like "Person" (or "Entity" or "Party" or something
like that).  When a Person appears as the creator of a Book, then the
person is an author; when the Person appears as the creator of a
Jumper, then the Person also happens to be a knitter.  This is
standard OO -- nothing RDF-specific here.

> Another problem with your example is that you're dealing with instances
> of the class and not the class itself. I might not have any information
> in my database about books that you have written David, but I could
> still use RDFS to find out that you are an author. With the example you
> gave above, I would only know that you are an author if I have a book in
> my database.

That's really a classification problem.  If you're working in a
problem domain where you're more interested in classification (here's
what she is) rather than relationships (here's what she interacts
with), then you could do something like this:

  <ppl:Person rdf:about="http://www.people.org/a">
    <dc:title>Jane Smith</dc:title>
    <ppl:category>knitter</ppl:category>
    <ppl:category>author</ppl:category>
    <ppl:category>beekeeper</ppl:category>
  </ppl:Person>

In any case, none if these is really an RDF- or DC-specific issue: you
can model things any way you want.  The advantage of the RDF
(bottom-up) approach is that it's possible, when you want, to
recognize properties even when you don't know about the class, and
that encourages us to write global, general-purpose reusable
properties (which will probably be a good thing).


All the best,


David

-- 
David Megginson                 david@m...
           http://www.megginson.com/

***************************************************************************
This is xml-dev, the mailing list for XML developers.
To unsubscribe, mailto:majordomo@x...&BODY=unsubscribe%20xml-dev
List archives are available at http://xml.org/archives/xml-dev/threads.html
***************************************************************************

PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
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.