W3C home > Mailing lists > Public > www-rdf-interest@w3.org > May 2000

Can rdfs classes specify property instances?

From: Peter Ciuffetti <PeterC@acunet.net>
Date: Fri, 12 May 2000 14:41:36 -0400
Message-ID: <391C505F.DF0B2B51@acunet.net>
To: www-rdf-interest@w3.org
Hello,

I have been trying to puzzle out whether I can use mechanisms in RDF
Schemas to cause instances of a certain class of resource to inherit
property values from a parent class.

For example, to extend the example 1 in the RDF Schema spec, which
defines a class Person and a property maritalStatus, could I define a
class MarriedPerson that is a subclass of Person and that establishes a
value for property maritalStatus=Married?  Something like:

<rdf:RDF xml:lang="en"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">

 <rdfs:Class rdf:ID="Person">
  <rdfs:comment>The class of people.</rdfs:comment>
  <rdfs:subClassOf
rdf:resource="http://www.w3.org/2000/03/example/classes#Animal"/>
 </rdfs:Class>

 <rdfs:Class rdf:ID="MarriedPerson">
  <rdfs:comment>A subclass of Person inheriting a property maritalStatus
'Married'</rdfs:comment>
  <rdfs:subClassOf rdf:resource="#Person"/>
  <maritalStatus>
   <rdf:type rdf:resource="#maritalStatus"/>
   <rdf:value rdf:resource="#Married"/>
  </maritalStatus>
 </rdfs:Class>

 <rdf:Property ID="maritalStatus">
  <rdfs:range rdf:resource="#MaritalStatus"/>
  <rdfs:domain rdf:resource="#Person"/>
 </rdf:Property>
...
 <rdfs:Class rdf:ID="MaritalStatus"/>

 <MaritalStatus rdf:ID="Married"/>
 <MaritalStatus rdf:ID="Divorced"/>
 <MaritalStatus rdf:ID="Single"/>
 <MaritalStatus rdf:ID="Widowed"/>

</rdf:RDF>

Basically why I want to do this is that I would like to avoid having to
redundantly store common metadata in instances of resources that are all
members of some class by specifying the metadata in the class
declaration.

If this is not permitted by RDF Schemas or is not in the spirit of RDF
Schemas, then I'd be interested in other approaches people are using to
avoid redundantly storing metadata that is common to each instance of a
class.

Thanks,
Pete Ciuffetti
Received on Friday, 12 May 2000 14:48:31 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:51:43 GMT