SPARQL parse error with Jena, but DBpedia accepts the query
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm using Jena to launch a SPARQL query. I have this code, which produces an error. I don't understand the reason for this error, since putting the query into the DBpedia SPARQL endpoint works! I think that I wrote the query string correctly. What's the error? Code String sparqlQueryString= "PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> "+ "select ?sub ?super (count(?mid) as ?length) where {"+ "values ?sub { <http://dbpedia.org/ontology/Writer> }" + "?sub rdfs:subClassOf* ?mid ."+ "?mid rdfs:subClassOf+ ?super .}"+ "group by (?sub