W3C home > Mailing lists > Public > semantic-web@w3.org > March 2005

Re[2]: true/false in RDF?

From: David Powell <djpowell@djpowell.net>
Date: Thu, 17 Mar 2005 00:28:18 +0000
Message-ID: <1663173259.20050317002818@djpowell.net>
To: "Joshua Allen" <joshuaa@microsoft.com>
CC: "Danny Ayers" <danny.ayers@gmail.com>, "Seth Russell" <russell.seth@gmail.com>, <semantic-web@w3.org>

Hi,

> If my object has multiple Boolean properties (it does), do I give it
> multiple rdf:types?

Yes, that is what I would do.  A resource having multiple rdf:types is
not unusual.

> One rdf:type per property, or one per combinatorial group of
> properties?

I'd go for one per property.

> Without having n factorial number of classes for n Booleans, you end
> up with RDFS classes that never completely match the actual data.
> And how do I differentiate between true, false, and unspecified?

If the three states are relevant for the property, then you would need
to create an extra URI for the class of the inverse state:

Eg:

  <http://foobar/page.html> <rdf:type> <urn:myterms:CachedObject>
(for true)
  
  <http://foobar/page.html> <rdf:type> <urn:myterms:UncachedObject>
(for false)

Or no triple for unspecified.
  
> And of course, all of it means I *need* RDFS (and OWL),
> *everywhere*. Why take such a huge dependency if you don't need to?

You don't need RDFS or OWL reasoners.  It is just a matter of whether
you do (in pseudo-code):

  if (model.hasTriple(res, "rdf:type", "urn:myterms:CachedObject")) {
     ...
  } else if (model.hasTriple(res, "rdf:type", "urn:myterms:UncachedObject")) {
     ...
     
or

  if (model.hasTriple(res, "urn:myterms:isCached", "http://xmlns.com/wordnet/1.6/true")) {
     ...
  } else if (model.hasTriple(res, "urn:myterms:isCached", "http://xmlns.com/wordnet/1.6/false")) {
     ...

Of course, if you wanted to use RDFS to derive the rdf:type's of
things from the domains and ranges of the classes, then you would need
an RDFS reasoner. But I would also want to avoid dragging in that
dependency.

-- 
Dave
Received on Thursday, 17 March 2005 00:28:51 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 21:45:04 GMT