- From: John Pacheco <pacheco@AI.SRI.COM>
- Date: Tue, 17 Sep 2002 11:37:25 -0700 (PDT)
- To: www-rdf-logic@w3.org
The reference description of DAML seems to state that a Restriction may contain multiple qualified expressions. This sounds like a very good idea, since it makes Restrictions a very powerful tool in defining complicated classes. What I don't understand it how to reconcile the DAML syntax with the meathod of parsing it into triples. Let's take this simple example where we define the number of outragous things to be found in the pockets of a cartoon character. <daml:Class rdf:ID="CartoonCharacter"> <rdfs:subClassOf> <daml:Restriction> <daml:onProperty rdf:resource="#hasInPocket"/> <daml:hasClassQ rdf:resource="#Elephant"/> <daml:maxCardinalityQ>2</daml:maxCardinalityQ> <daml:hasClassQ rdf:resource="#Dynamite"/> <daml:maxCardinalityQ>4</daml:maxCardinalityQ> <daml:hasClassQ rdf:resource="#Anvil"/> <daml:maxCardinalityQ>1</daml:maxCardinalityQ> </daml:Restriction> </rdfs:subClassOf> </daml:Class> I would like to say that a "CartoonCharacter" can have as many as 2 Elephants, 4 sticks of Dynamite, and 1 Anvil in her pockets and any given time, but I am not able to associate the hasClassQ tag with the maxCardinalityQ tag in any meaningful way. We end up parsing this code into these triples (The following is based on the JENA parser, but it has been cleaned up for easier reading.): CartoonCharacter, type, Class CartoonCharacter, subClassOf, AnonClass_123 AnonClass_123, type, Restriction AnonClass_123, onProperty, hasInPocket AnonClass_123, hasClassQ, Elephant AnonClass_123, hasClassQ, Dynamite AnonClass_123, hasClassQ, Anvil AnonClass_123, maxCardinalityQ, 2 AnonClass_123, maxCardinalityQ, 4 AnonClass_123, maxCardinalityQ, 1 Here you can plainly see that not only is the pairing of hasClassQ and maxCardinalityQ not specified in the DAML syntax, but it cannot show up in the model. There's no way to pair the tags together without an alternative parsing method, becasue there is no entity to associate the class-cardinality pair with except for the Restriction's anonymous class. As it is, the daml code above is valid. The daml validator at http://www.daml.org/validator/ has no problem with it. To see the entire example go to http://www.ai.sri.com/daml/scratch/QualifiedExpression.daml The triple model generated by the JENA parser can be seen at http://www.ai.sri.com/daml/scratch/QualifiedExpression-tripleModel.txt It appears that one of the following must be true: (a) one should not put more than one qualified expression into a restriction -in which case the DAML+OIL documentation should be modified to make this clear (b) a parser is expected to rely on adjacency of hasClassQ instances and maxCardinalityQ instances to determine their pairings, and then to represent these pairings internally using additional anonymous classes - in which case JENA would need an update to reflect this (c) additional syntax is needed in DAML+OIL to specify the pairings and JENA still needs an update to reflect this. I'd appreciate clarification of which of the above is the right way to look at this. Thank you very much, John
Received on Tuesday, 17 September 2002 14:37:57 UTC