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.