Re: Enumerations

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,


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>
>and not (the way we have to formulate it now):
><s:Person rdf:ID="Mike">
>     <s:maritalstatus rdf:resource="Single"/>
>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
>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

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

Received on Tuesday, 26 September 2000 12:40:48 UTC