Re: Repeated use of same property in Restricitions for same Class

On Apr 10, 2007, at 9:06 AM, Hans Teijgeler wrote:

> Hi,
>
> I have a very basic question about owl:Restriction, and I cannot  
> find the answer in the Recs.
>
>  The question is as follows:
>
> Assume you have a class Carpenter, and you want to define the kind  
> of tools a carpenter should have, e.g. one or more hammers and one  
> or more saws.

I'm going to speak primarily from the OWL DL perspective.

Generally, what you want is called "qualified cardinality  
restrictions". E.g., the ability to say that a hand "has" exactly 4  
fingers and one thumb (and five digits overall). This feature was a  
part of DAML+OIL, but *not* of OWL, but *is* a feature of OWL 1.1  
(and one of the key motivators for OWL 1.1).

> Is it allowed to use the same property "hasAsTool" in more than one  
> Restriction for that Carpenter class?

You, of course, can use hasAsTool in more than one restriction, but  
it's difficult (practically impossible) to achieve the effect you are  
looking for. See:
	<http://www.w3.org/2001/sw/BestPractices/OEP/QCR/>
(it's not completed or fully reviewed, and mooted by OWL 1.1, but it  
might provide some insight.)

> So in this example:
>
>     <owl:Class rdf:ID="Carpenter">
>         <rdfs:subClassOf>
>             <owl:Restriction>
>                 <owl:onProperty rdf:resource="#hasAsTool"/>
>                 <owl:allValuesFrom rdf:resource="#Hammer"/>
>                 <owl:minCardinality  
> rdf:datatype="&xsd;nonNegativeInteger">1</owl:minCardinality>
>             </owl:Restriction>
>         </rdfs:subClassOf>

This is not legal OWL DL. Bascially you cannot overload the bnodes.  
Even if you allowed it *syntactically* it would be *interpreted* as  
distinct constraints, I think. I guess this is what happens in owl full.

>         <rdfs:subClassOf>
>             <owl:Restriction>
>                 <owl:onProperty rdf:resource="#hasAsTool"/>
>                 <owl:allValuesFrom rdf:resource="#Saw"/>
>                 <owl:minCardinality  
> rdf:datatype="&xsd;nonNegativeInteger">1</owl:minCardinality>
>             </owl:Restriction>
>         </rdfs:subClassOf>
>     </owl:Class>
>
> I think it is correct, but I need to know for sure.

No. Even as legal OWL Full I don't think it captures your modeling  
intent. Basically, you'll get that every tool a carpenter has is  
*both* a hammer and a saw.

But you don't need full QCRs to express this. Two somevaluesfrom do  
the job. (A carpenter has to have at least one Hammer and one Saw.  
It's if you want to express that she must have *AT MOST* one of each  
that things get messy without QCRs).

Here's an example of a QCR in the RDF mapping of OWL 1.1, taken from

	<http://www.owldl.com/ontologies/family.owl>:

    <owl:Class rdf:about="#PersonWithAtLeastTwoMaleChildren">
       <owl:equivalentClass>
          <owl:Restriction>
             <owl:onProperty rdf:resource="#hasChild"/>
             <owl:minCardinality  
rdf:datatype="&xsd;nonNegativeInteger">2</owl:minCardinality>
             <owl:onClass rdf:resource="#Male"/>
          </owl:Restriction>
       </owl:equivalentClass>
    </owl:Class>

(Uhm...this is a bit old...the onClass will be in a different  
namespace for the moment.)

Hope this helps.

See:
	<http://code.google.com/p/owl1-1/>
	<http://webont.org/owl/1.1/>
For more OWL 1.1 details.

(And for this level of OWL question, the more natural forum is  
<public-owl-dev@w3.org>.)

Cheers,
Bijan.

Received on Tuesday, 10 April 2007 08:33:11 UTC