Tag: dbpedia httpexception

在Java代码中调用SPARQL查询(在DBPedia上)时出现HttpException错误

我使用Java代码的SPARQL端点有问题。 特别是,我有这个Java类: public class example { public static void main(String[] args) { String value = “http://dbpedia.org/resource/Fred_Guy”; example exam = example(); QueryExecution qe = exam.query(value); ResultSet results = ResultSetFactory.copyResults( qe.execSelect() ); } public QueryExecution query(String stringa){ ParameterizedSparqlString qs = new ParameterizedSparqlString( “” + “prefix dbpediaont: \n” + “prefix rdf: \n” + “\n” + “select ?resource where […]