Sparql 关于Java中的Virtuoso Yago

Sparql 关于Java中的Virtuoso Yago,sparql,semantics,virtuoso,Sparql,Semantics,Virtuoso,我使用下面的代码从yago获取hasLength和hasLatitude,使用java use virtuoso,但我没有收到任何信息:((此代码中有任何问题吗?) VirtGraph set = new VirtGraph ("jdbc:virtuoso://localhost:1111", "dba", "dba"); Query sparql = QueryFactory.create("PREFIX yago: <http://yago-knowledge.org

我使用下面的代码从
yago
获取
hasLength
hasLatitude
,使用java use virtuoso,但我没有收到任何信息:((此代码中有任何问题吗?)

VirtGraph set = new VirtGraph ("jdbc:virtuoso://localhost:1111", "dba", "dba"); 
        Query sparql = QueryFactory.create("PREFIX yago: <http://yago-knowledge.org/resource/> " + 
             "SELECT DISTINCT ?long ?lat " + 
             " FROM <http://yago-knowledge.org/resource> " + 
             " WHERE {" + 
             " yago:London yago:hasLatitude ?long. " + 
             " yago:London yago:hasLongitude ?lat. " + 
             " }"); 
        VirtuosoQueryExecution vqe = VirtuosoQueryExecutionFactory.create (sparql, set); 
        ResultSet results = vqe.execSelect();
        while (results.hasNext()) { 
             QuerySolution rs = results.nextSolution(); 
             RDFNode s = rs.get("long"); 
             RDFNode p = rs.get("lat"); 
             System.out.println(" { " + s + " " + p + " . }"); }
VirtGraph set=newvirtgraph(“jdbc:virtuoso://localhost:1111“,“dba”,“dba”);
Query sparql=QueryFactory.create(“前缀yago:”+
“选择不同的长纬度”+
“从”+
“其中{”+
“雅戈:伦敦雅戈:纬度?长。”+
“雅戈:伦敦雅戈:经度?纬度”+
" }"); 
VirtuosoQueryExecution vqe=VirtuosoQueryExecutionFactory.create(sparql,set);
ResultSet results=vqe.execSelect();
而(results.hasNext()){
QuerySolution rs=results.nextSolution();
RDFNode s=rs.get(“长”);
RDFNode p=rs.get(“lat”);
System.out.println(“{+s+”“+p+}”);}

来自AKSW(没有足够的代表发表评论):请提供一些详细信息,您加载了哪些数据?名称空间正确吗?它在另一个端点上工作吗?我导入:-yagoGeonamesClasses-YAGOGEONAMESClassID-yagoGeonamesData-YAGOGEONAMESTITYIDS-YAGOGEONAMESGLOSS-yagoGeonamesOnlyData-当我在本地主机上的lSPARQL执行中尝试此查询时,我收到一个列表:long和拉特