SPARQL Query in Protege

I am trying to query my ontology using Protégé . But the result I am getting for my queries is "No match found".

My SPARQL query is below.

SELECT ?g
WHERE { ?g rdfs:subClassOf "#bomb" . }

      

Please give me a call why I am getting a result like this.

Thanks in advance.

+1


a source to share


2 answers


Graph chart

?g rdfs:subClassOf "#bomb" .

      



tries to execute an instruction with the literal string " #bomb

". Since a predicate rdfs:subClassOf

, you probably want to match the class URI. So change "#bomb"

to <your-full-uri-here>

.

+3


a source


Protege 4 does not have SPARQL support. Now you can use simple queries like this:

Person who hasChild some True



The result is a list of people who are the father.

+1


a source







All Articles