[Pellet-users] Simple datatype restriction question.

Georgios Meditskos gmeditsk at csd.auth.gr
Sat Jul 12 01:19:06 UTC 2008


I believe that the classes should be defined in a "necessary and 
sufficient" manner, such as

<owl:Class rdf:ID="AvailableItem">
    <owl:equivalentClass>
      <owl:Class>
        <owl:intersectionOf rdf:parseType="Collection">
          <owl:Class rdf:about="#Item"/>
          <owl:Restriction>
            <owl:onProperty>
              <owl:DatatypeProperty rdf:about="#hasStock"/>
            </owl:onProperty>
            <owl:allValuesFrom 
rdf:resource="http://www.w3.org/2001/XMLSchema#positiveInteger"/>
          </owl:Restriction>
        </owl:intersectionOf>
      </owl:Class>
    </owl:equivalentClass>
  </owl:Class>

This will work for the anotherItem. However, the anItem instance would 
not be further classified, since the instance may have
other values, e.g. negative values (open world semantics)

Olivier Rossel wrote:
> Sorry to ask for something probably very simple.
> I have an ontology that defines available and unavailable items based
> on the value of its stock datatype value.
> At the moment Pellet is not able to infer which item is available or
> not (I tried in Swoop 2.2.1 and Swoop 2.3beta4).
>
> Did I miss something in my modeling?
> Any piece of advice is very welcome.
>
> Here is the corresponding ontology:
> ---
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE rdf:RDF [
>  <!ENTITY owl "http://www.w3.org/2002/07/owl#">
>  <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
>  <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#">
>  <!ENTITY tata "http://tata#">
>  <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">
> ]>
> <rdf:RDF xml:base="http://tata"
>         xmlns:owl="&owl;"
>         xmlns:rdf="&rdf;"
>         xmlns:rdfs="&rdfs;"
>         xmlns:tata="&tata;">
>
> <!-- Ontology Information -->
>  <owl:Ontology rdf:about=""
>                rdfs:label="THis is a tata"/>
>
> <!-- Classes -->
>  <owl:Class rdf:about="#AvailableItem">
>    <rdfs:subClassOf rdf:resource="#Item"/>
>    <rdfs:subClassOf>
>      <owl:Restriction>
>        <owl:allValuesFrom rdf:resource="&xsd;positiveInteger"/>
>        <owl:onProperty rdf:resource="#hasStock"/>
>      </owl:Restriction>
>    </rdfs:subClassOf>
>  </owl:Class>
>
>  <owl:Class rdf:about="#Item"/>
>  <owl:Class rdf:about="#UnavailableItem">
>    <rdfs:subClassOf rdf:resource="#Item"/>
>    <rdfs:subClassOf>
>      <owl:Restriction>
>        <owl:hasValue rdf:datatype="&xsd;integer">0</owl:hasValue>
>        <owl:onProperty rdf:resource="#hasStock"/>
>      </owl:Restriction>
>    </rdfs:subClassOf>
>  </owl:Class>
>
> <!-- Datatypes -->
>  <rdfs:Datatype rdf:about="&xsd;integer"/>
>  <rdfs:Datatype rdf:about="&xsd;positiveInteger"/>
>
> <!-- Annotation Properties -->
>  <owl:AnnotationProperty rdf:about="&rdfs;label"/>
>
> <!-- Datatype Properties -->
>  <owl:DatatypeProperty rdf:about="#hasStock">
>    <rdfs:domain rdf:resource="#Item"/>
>    <rdfs:range rdf:resource="&xsd;integer"/>
>  </owl:DatatypeProperty>
>
> <!-- Instances -->
>  <tata:Item rdf:about="#anItem">
>    <tata:hasStock rdf:datatype="&xsd;integer">2</tata:hasStock>
>  </tata:Item>
>
>  <tata:Item rdf:about="#anotherItem">
>    <tata:hasStock rdf:datatype="&xsd;integer">0</tata:hasStock>
>  </tata:Item>
> </rdf:RDF>
> ---
> _______________________________________________
> Pellet-users mailing list
> Pellet-users at lists.owldl.com
> http://lists.owldl.com/mailman/listinfo/pellet-users
> _______________________________________________
>
> Sponsored by Clark & Parsia, LLC http://clarkparsia.com/
>   


More information about the Pellet-users mailing list