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

Re: Can rdfs classes specify property instances?

From: Eric Hellman <eric@openly.com>
Date: Fri, 12 May 2000 23:21:04 -0400
Message-Id: <v0422087db5422db9538d@[192.168.1.1]>
To: Peter Ciuffetti <PeterC@acunet.net>, www-rdf-interest@w3.org
Tony Hammond was asking this question a while back. Maybe for the same reason.

The short answer is no. There's no way to imply the extra triples

You could kludge something using AboutEachPrefix. Yuck.

You could put intelligence in your application.  Add
<rdfs:domain rdf:resource="[rdfs]Class> to maritalStatus

then your application needs to know to look at a resource's Class to 
find any implied property values.

Eric

At 2:41 PM -0400 5/12/00, Peter Ciuffetti wrote:
>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

Eric Hellman
Openly Informatics, Inc.
http://www.openly.com/           21st Century Information Infrastructure
LinkBaton: Your Shortcuts to Information  http://my.linkbaton.com/
Received on Friday, 12 May 2000 23:21:21 GMT

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