import org.apache.jena.query.Query;
public myClass{
public static void myMethod(Query querySparQL) {
List<String> A = querySparQL.getGraphURIs();
List<String> B = querySparQL.getNamedGraphURIs();
List<Node> C = querySparQL.getResultURIs();
}
假设查询如下所示:
SELECT DISTINCT ?ind1 ?ind2 ?ind3 WHERE {
GRAPH <http://Eixample1> {BIND('temporally_harcoded' AS ?XXX) . ?ind1
<http://www.example.com/A#example1> ?ind2 . ?ind2
<http://www.example.com/A#example2> ?ind3 . ?ind1
<http://www.example.com/A#example3> <http://www.example.com/A#example4> .
?ind2 <http://www.example.com/A#example5><http://www.example.com/A#example6> .
<?ind3 <http://www.example.com/A#example7 <http://www.example.com/A#example8> .
}}
我正在寻找获取所有URI的方法:http://www.example.com/A#example1,http://www.example.com/A#example2,....
我尝试过的以下方法都没有包含URI: