vincent kleine
vincent kleine

Reputation: 724

Reasoning in SPARQL

For my uni I'm learning about RDF/OWL/SPARQL. I'm trying to build a web app which makes use of automatic classification, I use Protege to develop the ontology. Now I have a class Smartphone and a subclass Fast_Smartphone, which has the equivalent to property set to:

Smartphone
and (hasCores some integer[>=4])

Now when I go to the DL query tab and select instances of the Fast_smartphone class, it succesfully shows all the instances that are a Smartphone and have 4 or more cores. However when I got to the SPARQL query tab and type the following query:

SELECT *
    WHERE { ?x ?y uni:Fast_smartphone}

It gives no results. Using the following query:

SELECT *
        WHERE {uni:Fast_smartphone ?x ?y }

succesfully returns:
x
equivalentClass

y

Smartphone and (hasCores some integer[>=4])

The reasoner is turned on and synchronized (Hermit). I have no idea why it won't return the same results as the DL tab. Am I doing something wrong?

Upvotes: 0

Views: 1010

Answers (1)

user1156544
user1156544

Reputation: 1807

SPARQL Query in Protege doesn't allow reasoning. Hermit is a very good reasoner for classification but I don't think it is used for RL reasoning.

I normally build my ontology on Protege and test consistency and classification with Hermit. However, when I need to query a dataset with SPARQL I export the data and put it into a triplestore (Stardog is a good one in my opinion).

Upvotes: 1

Related Questions