- From: Jonathan Borden <jonathan@openhealth.org>
- Date: Wed, 11 Sep 2002 23:08:04 -0400
- To: <www-webont-wg@w3.org>
- Cc: <martin@AI.SRI.COM>
This would be very useful -IMHO Jonathan "David Martin" <martin@AI.SRI.COM> wrote: > > Hello rdf-logicians: > > I would like to have a nice way to declare a DAML+OIL property's range > to indicate that: > > each value of the property is a list, of a particular length, > and specific list elements must have specific types. > > (What do I mean by "value of a property"? Siimply this: if <X Prop Y> > is an instance of property Prop, I call Y a "value of the property".) > > I know how to do this, laboriously and non-readably, using a chain of > restrictions on "first" and "rest". But I'm hoping for some syntactic > sugar. I am currently using a partially defined property for this > purpose, called listOfInstancesOf (compare to intersectionOf): > > <daml:Property rdf:ID="listOfInstancesOf"> > <rdfs:domain rdf:resource="#Class"/> > <rdfs:range rdf:resource="#List"/> > <rdfs:comment> > This is a "place-holder" for now, which needs further work. > The range is a list of classes. > "Class listOfInstancesOf X Y Z" (for example) is used to indicate > the class > of lists having an instance of class X as their first member, an > instance > of class Y as their second member, and an instance of class Z as > their > third member. > </rdfs:comment> > </daml:Property> > > My question: what is a complete valid definition for listOfInstancesOf > (if there is one)? > > Here's a simple example of use (again, compare to intersectionOf) : > > <daml:Class rdf:ID="MyClass"> > <listOfInstancesOf rdf:parseType="daml:collection"> > <daml:Class rdf:about="#LocateBook"/> > <daml:Class rdf:about="#CongoBuyBook"/> > </listOfInstancesOf> > </daml:Class> > > A valid instance of MyClass would be the list of length 2, containing an > instance of LocateBook as its first element, and an instance of > CongoBuyBook as its second element. > > Thanks, > David Martin > >
Received on Wednesday, 11 September 2002 23:25:16 UTC