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

Re: How to restrict the possible values of a class?

From: Pierre-Antoine CHAMPIN <champin@bat710.univ-lyon1.fr>
Date: Tue, 27 Jun 2000 16:20:37 +0200
Message-ID: <3958B835.1DEBCEC0@bat710.univ-lyon1.fr>
To: "McBride, Brian" <bwm@hplb.hpl.hp.com>
CC: www-rdf-interest@w3.org, Tom Van Eetvelde <tom.van_eetvelde@alcatel.be>
"McBride, Brian" wrote:
> 
> >
> >It does not seem right to me that DayRange be a subclass of Range :
> >typically, Range is a class and DayRange is the instance,
> >but DayRange may ALSO be a class (in which case Range is a metaclass)
> >
> >This is absolutely possible in RDF,
> >you just have to declare that Range is a subclass of class
> >(and that is IS also a class, as you did - both things are different !)
> >
> 
> Yup - thats much cleaner.  To answer Tom's request for RDF:
> 
> <rdfs:Class rdf:ID='DayRange'>
>   <rdf:type rdf:resource='#Range'/>
>   <thisNameSpace:ge>0</thisNameSpace:ge>
>   <thisNameSpace:le>31</thisNameSpace:le>
> </rdfs:Class>
> 
> Does that do it?


absolutely, furthermore, we have

<rdfs:Class rdf:ID='Range'>
   <rdfs:subClassOf rdf:resource='&rdfs;Class'/>
</rdfs:Class>

so Range IS a class, then it can have instances
and it is a SUBCLASS of class, then its instances are also instance of class
-> DayRange, as an instance of Range, has type Class

 hope this helps

  Pierre-Antoine

--- Quid quid Latine dictum sit, altum viditur
    Whatever is said in Latin sounds important.
Received on Tuesday, 27 June 2000 10:23:50 GMT

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