Andy Seaborne wrote:
> There is already a DBpedia example so we have included a
> service-specific examples before.  DBpedia is used by students and in
> student projects so we do get a stream of questions about using it,
> especially as it can be peculiar in its timeout behaviour.

Not very useful, but it shows users that you can specify query parameters
in the SERVICE <IRI>:

        String queryString =
            "SELECT * WHERE { " +
            "    SERVICE 
<http://dbpedia-live.openlinksw.com/sparql?timeout=10000> { " +
            "        SELECT DISTINCT ?company where {?company a 
<http://dbpedia.org/ontology/Company>} LIMIT 20" +
            "    }" +
            "}" ;
        Query query = QueryFactory.create(queryString) ;
        QueryExecution qexec = QueryExecutionFactory.create(query, 
ModelFactory.createDefaultModel()) ;
        try {
            ResultSet rs = qexec.execSelect() ;
            ResultSetFormatter.out(System.out, rs, query) ;
        } finally {
            qexec.close() ;
        }

Maybe something like this is better (and it should not increase the number
of questions.

I do not know if the DBPedia service supports other query parameters that
could make the example more useful/interesting.

Paolo

Reply via email to