Jena Sparql and construct

前端 未结 2 607
面向向阳花
面向向阳花 2021-01-14 00:42

CONSTRUCT is an alternative SPARQL result clause to SELECT. Instead of returning a table of result values, CONSTRUCT returns an RDF gr

相关标签:
2条回答
  • 2021-01-14 01:15

    ResultSetFormatter.out(System.out, results, query) cannot find symbol and identifier expected error occurs at this point

    0 讨论(0)
  • 2021-01-14 01:35

    Jena supports CONSTRUCT, but to get the result you need to call a different method, because execSelect and ResultSet are only for SELECT queries. Use this instead:

    Model results = qexec.execConstruct();
    results.write(System.out, "TURTLE");
    

    Model is Jena's interface for accessing RDF graphs, see the javadocs for details.

    0 讨论(0)
提交回复
热议问题