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

Re: Enumerations

From: Mor Peleg <peleg@SMI.Stanford.EDU>
Date: Tue, 26 Sep 2000 09:36:19 -0700
Message-Id: <4.2.0.58.20000926093511.00cde220@smi.stanford.edu>
To: Tom Van Eetvelde <tom.van_eetvelde@alcatel.be>, Graham Klyne <GK@dial.pipex.com>, Ray Fergerson <fergerson@SMI.Stanford.EDU>, rdf interest <www-rdf-interest@w3.org>, Gerard Maas <gerard.maas@alcatel.be>, Erik De Blieck <Erik.De_Blieck@alcatel.be>
Hi tom,

Thank you very much for your answer.

I am not clear about one thing: in the Bag, are the different enumerations 
Classes or String Literals?

Thanks very much,

Mor

At 02:50 PM 09/26/2000 +0200, Tom Van Eetvelde wrote:
>Hello RDF comunity,
>
>I did some more thinking as I was not pleased with my own proposal to 
>implement an enumeration of days.
>
>The core problem, I think, is the fact that the 'range' property only 
>accepts classes. When validating
>(or maybe better: typechecking), only instances of those classes may 
>appear. This means that literals
>can never be used as the instance must be typed, which means that it is a 
>resource (with a 'type'
>property)! This questions the use of literals in the RDF schema model. 
>Literals can only be used for the
>moment with properties that are not restricted in range. This makes the 
>example 1 of the RDF M&S a bit
>akward: what you would like to use is the following:
>
><s:Person rdf:ID="Mike">
>     <s:maritalstatus> Single </s:maritalstatus>
></s:Person>
>
>and not (the way we have to formulate it now):
>
><s:Person rdf:ID="Mike">
>     <s:maritalstatus rdf:resource="Single"/>
></s:Person>
>
>I currently believe that the most elegant way to introduce enumerations is 
>to define a new
>constraintproperty instance: 'literalRange'. This constraintproperty can 
>only have 'bag' instances as
>value.
>
>Continuing the 'days' example then: make a bag with all the days that you 
>need. Make your property that
>you want to see restricted to days and add to this property the 
>literalRange = days bag. When making an
>RDF instance using the defined property, the type checker can search for 
>the filled-in value in the bag.
>If it is in, validation = ok, else nok.
>
>Conclusion: the current defined 'RDF keywords' do not suffice to capture 
>all kinds of behaviour that the
>user wants. The current framework doesn't really support the use of 
>literals when it comes to type
>checking.
>
>Greetings,
>
>Tom.

********************************************
Mor Peleg, Ph.D.
Stanford Medical Informatics
Medical School Office Building x-208, 251 Campus Drive
Stanford, CA 94305-5479
Phone: (650) 723-7711 Fax: (650) 725-7944
E-Mail: peleg@smi.stanford.edu
URL: http://smi-web.stanford.edu/people/peleg/
Received on Tuesday, 26 September 2000 12:40:48 GMT

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