See ResultSetFormatter: https://jena.apache.org/documentation/javadoc/arq/org/apache/jena/query/ResultSetFormatter.html
On Thu, Nov 3, 2016 at 1:37 PM, neha gupta <[email protected]> wrote: > I have a query which has output of one single string line "My name is ---, > living in city -----, located in country ----. > > After query string , I have executed the query > > Query query = QueryFactory.create(queryString); > QueryExecution qexec = QueryExecutionFactory.create(query, model) ; > ResultSet rs = qexec.execSelect() ; > I want this string to be displayed as string: > JOptionPane.showMessageDialog(null, string); > > But I dont think I need while(rs.hasNext()) and convert it to string > because resultset only contain one string output at one time. > How can I display the resultset as string?
