properties with classes as values?

A question for DAML language gurus -

I want to declare a property that will take a class as its value (rather
than an instance of a class).

For instance, I want to declare class MyClass with property myProperty,
and say that the range of myProperty is Class, so that an instance of
MyClass can have myProperty with, say, class Person as its value.

(1) How should the range of myProperty be declared?  Like this?:

   xmlns:daml="http://www.daml.org/2001/03/daml+oil#"
   ...
   <daml:ObjectProperty rdf:ID="myProperty">
       <rdfs:domain rdf:resource="#myClass"/>
       <rdfs:range rdf:resource="daml:Class"/>

(2) Now, what if I want to say that the range of myPropery is Class (as
above), AND that its values are restricted to the subclasses of some
particular class, say, Animal.  Is this doable?  And if so, how would
this range be declared?

Thanks,

- David Martin

Received on Thursday, 7 June 2001 02:33:28 UTC