RE: Datatype restricted- allValuesFrom

Dear Peter:

Thanks for your fast response. 

I showed a small example of a my real problem, that is extending an
ontology, which I cannot change (e.g. resources form datatype to object
property), by restricting datatype property to only have values of a certain
class (e.g. Resource B).

So when doing :

<owl:Class rdf:ID="A">
     <rdfs:subClassOf>
       <owl:Restriction>
          <owl:allValuesFrom>
	    <rdf:List>
	      <rdf:first
rdf:datatype="http://www.w3.org/2001/XMLSchema#string">b1</rdf:first>
              <rdf:rest>
	        <rdf:List
rdf:rest="http://www.w3.org/1999/02/22-rdf-syntax-ns#nil">
		  <rdf:first
rdf:datatype="http://www.w3.org/2001/XMLSchema#string">b2</rdf:first>
		</rdf:List>
	      </rdf:rest>
	    </rdf:List>
          </owl:allValuesFrom>
         <owl:onProperty rdf:resource ="#hasB"/>         
       </owl:Restriction>
     </rdfs:subClassOf>
   </owl:Class>

There is no longer any reference that b1 and b2 are individuals of B
Then you could say that they could be typed as  nm:b1...., This does not
work for me because is a big list of individuals, and they could constantly
change.

So I think I cannot use OWL-DL.

Thanks again.

Luis Bermudez


 

-----Original Message-----
From: Peter F. Patel-Schneider [mailto:pfps@research.bell-labs.com] 
Sent: Wednesday, February 18, 2004 9:01 AM
To: leb27@drexel.edu
Cc: www-rdf-logic@w3.org
Subject: Re: Datatype restricted- allValuesFrom

From: Luis Bermudez <leb27@drexel.edu>
Subject: Datatype restricted- allValuesFrom
Date: Wed, 18 Feb 2004 08:37:47 -0500

> Hi All:
>  
> I have the following questions:
>  
> 1. ) Could a datatype Property be restricted with  an "allValuesFrom"
> restriction ?

A quick examination of the non-RDF (abstract) syntax for OWL DL will produce
the knowledge that this is allowed in both OWL DL and OWL Lite.
(Look in Section 2.3.1.2 of OWL S&AS at http://www.w3.org/TR/owl-semantics.)


>  (I think is possible, but it will be OWL-Full)  e.g. :
>  
>  <owl:DatatypeProperty rdf:ID="hasB">
>     <rdfs:domain rdf:resource="#A"/>
>  <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/
> <http://www.w3.org/2001/XMLSchema#string> >    
>   </owl:DatatypeProperty>
>   
>   <owl:Class rdf:ID="A">
>     <rdfs:subClassOf>
>       <owl:Restriction>
>         <owl:allValuesFrom rdf:resource ="#B"/>         
>          <owl:onProperty rdf:resource ="#hasB"/>
>       </owl:Restriction>
>     </rdfs:subClassOf>
>   </owl:Class>
>  
>   <owl:Class rdf:ID="B"/>
>   <B rdf:ID="b1"/>
>   <B rdf:ID="b2"/>

However, the above is OWL Full, as in OWL DL the restrictions on datatype
properties must be datatype classes, rdfs:Literal, or oneOf's on literals.

> 2.) If it is possible how should an individual look like?
>  
>  
>   <A rdf:ID="individual_a">
>     <hasB rdf:resource="#b1"/>
>   </A>
>  
> or
>  
>  <A rdf:ID="individual_a"> 
>     <hasB>ns:b1<hasB>
>   </A>

These two have the same meaning to RDF, and thus to OWL.

>   3.) If I want to extend a datatype property so that it should be 
> restricted to a set of individuals is  the previous the best way to 
> go, or is there any work around to have it in OWL-DL ?

Datatype properties in OWL DL have things like integers as their value.  I
think that what you really want here is not a datatype property, but instead
an objectproperty, as in the following:

   <owl:ObjectProperty rdf:ID="hasB">
     <rdfs:domain rdf:resource="#A"/>
     <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
   </owl:ObjectProperty>
   
   <owl:Class rdf:ID="A">
     <rdfs:subClassOf>
       <owl:Restriction>
         <owl:allValuesFrom rdf:resource ="#B"/>         
          <owl:onProperty rdf:resource ="#hasB"/>
       </owl:Restriction>
     </rdfs:subClassOf>
   </owl:Class>
  
   <owl:Class rdf:ID="B"/>
   <B rdf:ID="b1"/>
   <B rdf:ID="b2"/>


If you indeed want a datatype property you could go about it this way in OWL
DL.

   <owl:DatatypeProperty rdf:ID="hasB">
     <rdfs:domain rdf:resource="#A"/>
     <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
   </owl:DatatypeProperty>
   
   <owl:Class rdf:ID="A">
     <rdfs:subClassOf>
       <owl:Restriction>
          <owl:allValuesFrom>
	    <rdf:List>
	      <rdf:first
rdf:datatype="http://www.w3.org/2001/XMLSchema#string">b1</rdf:first>
              <rdf:rest>
	        <rdf:List
rdf:rest="http://www.w3.org/1999/02/22-rdf-syntax-ns#nil">
		  <rdf:first
rdf:datatype="http://www.w3.org/2001/XMLSchema#string">b1</rdf:first>
		</rdf:List>
	      </rdf:rest>
	    </rdf:List>
          </owl:allValuesFrom>
         <owl:onProperty rdf:resource ="#hasB"/>         
       </owl:Restriction>
     </rdfs:subClassOf>
   </owl:Class>



> Thank you very much,
>  
> Luis Bermudez
> leb27@drexel.edu


Peter F. Patel-Schneider

Received on Wednesday, 18 February 2004 09:43:00 UTC