Re[2]: true/false in RDF?


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


  <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")) {

  if (model.hasTriple(res, "urn:myterms:isCached", "")) {
  } else if (model.hasTriple(res, "urn:myterms:isCached", "")) {

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


Received on Thursday, 17 March 2005 00:28:51 UTC