12

I open the SPARQL Query tab in Protege but the result is this:

enter image description here

How can I write my query?

Stanislav Kralin
  • 11,070
  • 4
  • 35
  • 58
Michele Buzzoni
  • 167
  • 1
  • 13

4 Answers4

16

It happens in version 2.0.1 of Protégé SPARQL Plugin, bundled with Protege 5.2, after any ontology is loaded.

 

Update the the "OWLAPI RDF Library" and "Protege SPARQL Plugin" to the latest version with the auto-update mechanism (which appears when starting up Protege or can be activated through the File > Check for plugins… menu):

 

autoupdate

Source: https://github.com/protegeproject/sparql-query-plugin/issues/10.

Stanislav Kralin
  • 11,070
  • 4
  • 35
  • 58
  • 3
    I checked that the plug-ins are updated and restarted Protégé, and it still doesn't worked. The trick was to write a first SPARQL query (without executing it) *before* loading the ontology. – yannis Nov 27 '18 at 09:52
1

For Protege 5.5.0, you may also need to add query view from menu:

Window--> View-> Query View-> SPARQL Query

And drop it into the SPARQL Query tab.

0

try to enlarge the heap size for Protégé. I have had the same problem for SPARQL Query and others. Plugin update never worked for me and each time I just delete the new plugins and Protégé works as If nothing happens.

So the solution I have found till now is to not update plugins but to enlarge heap size.

How to do it?

There is a wiki for Protégé 3 and 4 here: https://protegewiki.stanford.edu/wiki/Setting_Heap_Size but not for Protégé 5 so I was supposed to figure it myself.

Well, you should just open the Protege.l4j.ini file and change the heap size limits from {200,500} to {2000,5000} (I am not sure If your computer will stand that, you must read the wiki above to know more about it).

It should be like this:

    -Xms2000M
    -Xmx5000M
    -Xss16M

Hope this can help someone there. Best regards, AmelieSpark.

0

Another way around is downloading the "Snap SPARQL Query" plugin and adding the view on the SPARQL tab.