As an aside if there is an issue with the end point you could try emailing 
Chris Gutteridge as it's likely he will have had something to do with it...


Dick

-------- Original message --------
From: "Carlo.Allocca" <[email protected]> 
Date: 01/03/2016  3:54 pm  (GMT+00:00) 
To: [email protected] 
Subject: querying a SPARQL endpoint 

Dear All,


I am using Jena to query a SPARQL endpoint but I got "==== No variables ====" 
as result. But, when I run the same query over the SPARQL endpoint, I get the 
expected results. Below, I reported the details of the query, sparql endpoint 
and jena code.


I tried to check other endpoints, but I got the same experience.


What am I doing wrong? Any help to make it right?


Many Thanks,

Best Regards,

Carlo



=== Query Southampton SPARQL endpoint


1) SPARQL EndPoint:


String sparqlEndPoint = "http://sparql.data.southampton.ac.uk/";;


2) SPARQL Query:


String qString3 = "prefix rdfs:<http://www.w3.org/2000/01/rdf-schema#> "

                + "prefix rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#> "

                + " SELECT DISTINCT ?o  where "

                + "{ "

                + " ?s ?prop ?o . "

                + " FILTER (isLiteral(?o)) "

                + "} LIMIT 1000";




3) Jena code:


        QueryExecution qexec = 
QueryExecutionFactory.sparqlService(sparqlEndPoint, qString3, "");

        qexec.setTimeout(10 * 60 * 1000); //10 min

        ResultSet results = qexec.execSelect();

        ResultSetFormatter.out(out, results);


4) Jena Result:

==== No variables ====

----

|  |

====


5) SPARQL endpoint Results:


http://www.w3.org/2000/01/rdf-schema#label

http://www.w3.org/2004/02/skos/core#prefLabel

http://www.w3.org/2000/01/rdf-schema#label

http://www.w3.org/2004/02/skos/core#prefLabel

http://www.w3.org/2000/01/rdf-schema#comment

http://www.w3.org/2000/01/rdf-schema#label

http://www.w3.org/2004/02/skos/core#prefLabel

http://www.w3.org/2000/01/rdf-schema#comment

http://www.w3.org/2000/01/rdf-schema#label

http://www.w3.org/2004/02/skos/core#prefLabel

Reply via email to