发送到virtuoso端点的CONSTRUCT查询与发送给Jena端点的查询之间是否存在差异?

我试图根据以下CONSTRUCT查询推断一些新的三元组:

PREFIX rdf:  PREFIX dc:  PREFIX dcterms:  PREFIX gpml:  PREFIX wp:  PREFIX xsd:  CONSTRUCT { ?line rdf:type wp:DirectedInteraction . } WHERE { ?pathway dc:identifier ?wpIdentifier .{ SELECT DISTINCT * WHERE { ?datanode2 dc:identifier ?dn2Identifier . ?datanode2 rdf:type gpml:DataNode . ?datanode2 dcterms:isPartOf ?pathway . ?datanode2 gpml:graphid ?dn2GraphId . ?line gpml:graphref ?dn2GraphId . FILTER (?datanode2 != ?datanode1) FILTER (!regex(str(?datanode2), "noIdentifier")) . { SELECT DISTINCT * WHERE { ?datanode1 dc:identifier ?dn1Identifier . ?datanode1 gpml:graphid ?dn1GraphId . ?datanode1 rdf:type gpml:DataNode . ?datanode1 dcterms:isPartOf ?pathway . ?line gpml:graphref ?dn1GraphId . ?line rdf:type gpml:Interaction . ?line gpml:arrowTowards ?target . ?line gpml:arrowHead "Arrow"^^xsd:string . ?line gpml:graphid ?lineGraphId . ?line dcterms:isPartOf ?pathway .}} FILTER (!regex(str(?datanode1), "noIdentifier")) . } } } 

提交到基于virtuoso的SP​​ARQL端点时,它会返回预期的结果。 但是,如果针对基于Jena的端点提交相同的查询,则返回0个三元组。

 public static void main(String[] args) throws IOException { Model model = FileManager.get().loadModel("/tmp/wpContent_v0.0.72733_20131216.ttl"); BufferedReader constructQueryText = new BufferedReader(new FileReader("sparqlQueries/DirectedInteraction.construct")); StringBuilder sb = new StringBuilder(); String line = constructQueryText.readLine(); while (line != null) { sb.append(line); sb.append('\n'); line = constructQueryText.readLine(); } String queryText = sb.toString(); Query query = QueryFactory.create(queryText); QueryExecution queryExecution = QueryExecutionFactory.create(query, model); Model results = queryExecution.execConstruct(); basicCalls.saveRDF2File(results, "/tmp/directedInteractions.ttl", "TURTLE"); System.out.println(results.size()); System.out.println(model.size()); } 

我已经调试了两天以上,我似乎无法找到任何错误。

如何将CONSTRUCT查询写入基于virtuoso的端点和发送到Jena实现的端点是否有区别?