2 Replies Latest reply on Oct 8, 2011 6:00 PM by 880207

    Jena- Storing subject predicate and object returned from Query


      In the below code:

      1 .String queryString = SPARQL QUERY
      2. Query query = QueryFactory.create(queryString,Syntax.syntaxARQ);
      3. QueryExecution qexec = QueryExecutionFactory.create(query, model);
      4. ResultSet results = qexec.execSelect();
      5. ResultSetFormatter.out(System.out, results,query);

      Instead of using line 5. and printing output on console , I want to populate Subject, Predicate and Object returned from Query in my Userdefined Objects, Hw can i do that. I dont want to execute line number 5. Is there a way to get the resultset without executing line 5 and iterate through it and populate my userdefined objects.

      Can you share any sample example.

      Thanks and Regards,
      Manish Hardasmalani