CONSTRUCT
is an alternative SPARQL result clause to SELECT
. Instead of returning a table of result values, CONSTRUCT
returns an RDF gr
ResultSetFormatter.out(System.out, results, query) cannot find symbol and identifier expected error occurs at this point
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.