Re: Enumerations

Hello Mark,

It is not only a matter of syntax.

I could easily fool the current system by writing:

 <s:maritalstatus rdf:resource="Nonsense"/>

The parser looks at the type of the resource, which is 'maritalstatus' and is satisfied. It cannot
check if Nonsense really is intended to be a correct instance of the class MaritalStatus. In order
to do this, it has to run through x amount of schema's to look for all allowed instances of
When using bags for your enumerations, all allowed elements are bundled. The RDF supports bag
elements easier than class instances. Just look at the graph picture: get me all bag elements is
just following the 'li' arcs to their values. Get me all class instances is starting from the
classtype and reversing all arc arrows. Class instances have more chance of being scattered around
then bag elements.

What is more: if you are always going to hang types to property values, then you might as well say
goodbye to Literals as they will never be used anymore. I believe sets of literals should not always
be encapsulated in a class. This looks a bit unnatural sometimes.

If you want a person to make a choice out of getting: a car, a travel ticket, a movie, a new
haircolour. Are you going to stuff al these choices in a class? I guess not. I think you just want a
wrapper called 'Choices' and paste all the elements in it. When creating classes, you focus on
objects sharing some property. You could always look for some artificial link between the elements
of Choices and use this as an argument to create a class, but then again, that smells like an
unnatural implementation. It even gets messier if the elements of 'Choices' are classes themselves.

The latter is the fundamental reason why I was looking for a natural implementation of enumerations
(which also supports enumerations of classes and even classes/Literal mixes). This is just my
opinion of course.



Mark Grossman wrote:

> Making enumerants be members of a class seems like the perfect application of existing RDFS
> constructs, and I don't see the syntax
>    <s:maritalstatus rdf:resource="Single"/>
> any more burdensome than
>    <s:maritalstatus>Single</s:maritalstatus>
>    -- Mark

Received on Wednesday, 27 September 2000 08:16:31 UTC