This discussion is archived
1 Reply Latest reply: Nov 7, 2011 9:24 AM by alwu RSS

Print results

887107 Newbie
Currently Being Moderated
there is way to print the data from Describe and Construct queries in a table view like the data are printed from select query?
In Select Query we use
ResultSet results = qexec.execSelect();
ResultSetFormatter.out(System.out, results, query);
In Describe for example if we try to use we take back error!
Results results = qexec.execDescribe();
ResultSetFormatter.out(System.out, results, query);

if we use System.out.println("describe result = " + m.toString() ); it works but i don't want the results in a line
can anyone help?
thx a lpt
  • 1. Re: Print results
    alwu Pro
    Currently Being Moderated

    A describe or construct query returns a Jena Model object.
    You can invoke the listStatements API against the Jena Model object and that method will return a


    It is straightforward to print all the statements from the iterator.

    Hope it helps,

    Zhe Wu


  • Correct Answers - 10 points
  • Helpful Answers - 5 points