On 10/04/12 01:58, Andrés Zules wrote:
Hi everyone

I use Protege Version 3.4.7 (Build 620) and execute a simple query in the
SPARQL Query Panel on http://www.co-ode.org/ontologies/pizza/pizza.owl:

SELECT ?NombrePizza
WHERE {
  ?NombrePizza ?Relacion pizza:MushroomTopping .
  ?Relacion owl:inverseOf pizza:isToppingOf .
}


The result is 4 pizzas:

  DefaultOWLNamedClass(
http://www.co-ode.org/ontologies/pizza/pizza.owl#FourSeasons)

   DefaultOWLNamedClass(
http://www.co-ode.org/ontologies/pizza/pizza.owl#Mushroom)

   DefaultOWLNamedClass(
http://www.co-ode.org/ontologies/pizza/pizza.owl#Giardiniera)

   DefaultOWLNamedClass(
http://www.co-ode.org/ontologies/pizza/pizza.owl#LaReine)

Are you sure that was the query you ran?
Or alternatively are you sure that was the ontology you ran it over?

The only inverse of pizza:isToppingOf is pizza:hasTopping so you are effectively asking the query:

     ?pizza pizza:hasTopping pizza:MushroomTopping .

Which should return empty for that ontology.

The Ontology models both pizzas and toppings as classes and there is no pizza:hasTopping relationship between the classes. Each of the Pizza classes like FourSeasons are defined via:

    <owl:Class rdf:about="#FourSeasons">
        <rdfs:label xml:lang="pt">QuatroQueijos</rdfs:label>
        <rdfs:subClassOf>
            <owl:Restriction>
                <owl:onProperty rdf:resource="#hasTopping"/>
                <owl:someValuesFrom rdf:resource="#MushroomTopping"/>
            </owl:Restriction>
        </rdfs:subClassOf>
    ...

So an instance of FourSeasons would have an instance of a MushroomTopping on, which is the not the same as your query and the ontology has no such instances anyway.

In any case to do anything useful with that ontology you really need a full DL reasoner such as Pellet.

Dave

Reply via email to