|
Hi People, How do you query DBPedia using sesame's SparqlRepository Class? I am able to get it to work in the absence of a proxy. But unfortunately I am behind a proxy in office and am not able to hit it. Get a Connect Exception. Any solution? Thanks in Advance :) Found a Link that gives an answer to this. A source code change is required apparently. Weird ain't it? anybody else faced a similar problem?? if so did you get around to solving it?? Edit: tried with it with the following code Tried it .....couldn't get it to work at all.... System.getProperties().put("http.proxyHost", "someproxy"); System.getProperties().put("http.proxyPort", "someport"); System.getProperties().put("http.proxyUser", "myId"); System.getProperties().put("http.proxyPassword", "password"); String endpointURL = "http://dbpedia.org/sparql"; dbpediaEndpoint = new HTTPRepository(endpointURL, ""); dbpediaEndpoint.initialize(); conn = dbpediaEndpoint.getConnection(); String sparqlQuery = " SELECT ?X ?P ?Y WHERE {?X ?P ?Y}"; TupleQuery query = conn.prepareTupleQuery(QueryLanguage.SPARQL, sparqlQuery); TupleQueryResult result = query.evaluate(); // do something linked and open Doesn't want to connect :( Am i doing something wrong? |


The discussion you found is quite old, there have been some improvements since then, see my answer for details.