W3C home > Mailing lists > Public > www-rdf-logic@w3.org > June 2001

Re: properties with classes as values?

From: Sean B. Palmer <sean@mysterylights.com>
Date: Thu, 7 Jun 2001 14:49:12 +0100
Message-ID: <01e101c0ef58$bc1f43e0$aae593c3@z5n9x1>
To: "David Martin" <martin@ai.sri.com>, <www-rdf-logic@w3.org>
> I want to declare a property that will take a class as its value
> than an instance of a class).

Use daml:hasValue on a DAML restriction for that.

> For instance, I want to declare class MyClass with property
> myProperty, and say that the range of myProperty is Class,
> so that an instance of MyClass can have myProperty with,
> say, class Person as its value.

Er... that's not what you're asking for above. Why would the range of
myProperty be Class, e.g. if you want it to take Person as a value? Is
Person the only instance of Class?

If you want Person to be the only *value* that myProperty can take,

   :MyClass rdfs:subClassOf
      [ daml:onProperty :myProperty;
        daml:hasValue :Person ] .

> (2) Now, what if I want to say that the range of myPropery is
> Class (as above), AND that its values are restricted to the
> subclasses of some particular class, say, Animal.  Is this doable?
> And if so, how would this range be declared?

That would be an intersectionOf, I think... you want to say that the
range is the intersection of Class and a subClassOf Animal?

   :x rdfs:range
      [ daml:intersectionOf
          (:Class [ rdfs:subClassOf :Animal ]) ] .

XML RDF of these things available upon request...

Kindest Regards,
Sean B. Palmer
@prefix : <http://webns.net/roughterms/> .
:Sean :hasHomepage <http://purl.org/net/sbp/> .
Received on Thursday, 7 June 2001 09:48:29 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 2 March 2016 11:10:35 UTC