Hello,

Michelantonio Trizio wrote:
> Hi,
> 
> I'm a new dbpedia user.
> I'd like to know if it's possible to make a sparql query with
> Jena to dbpedia.
> And if it is possible, how can i do it?
> I'm trying to make query using ng4j library, I'm following
> the example at this page
> http://www4.wiwiss.fu-berlin.de/bizer/ng4j/semwebclient/index.html#using,
> but i have no results.

SPARQL is a W3C standard and DBpedia is hosted on OpenLink Virtuoso,
which complies to this standard. This means you can use DBpedia in the
same way as any other SPARQL endpoint in Jena (plus you also have the
options mentioned by Hugh). Something along those lines should do it
(not tested) if you want to query the official SPARQL endpoint:

QueryExecution qe = new QueryEngineHTTP("http://dbpedia.org/sparql";,
yourSparqlQuery);
qe.addDefaultGraph("http://dbpedia.org";);
ResultSet rs = qe.execSelect();
ResultSetFormatter.out(System.out, rs, yourSparqlQuery);
qe.close();

Kind regards,

Jens

-- 
Dipl. Inf. Jens Lehmann
Department of Computer Science, University of Leipzig
Homepage: http://www.jens-lehmann.org
GPG Key: http://jens-lehmann.org/jens_lehmann.asc


------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance & Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
Dbpedia-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion

Reply via email to