com.hp.hpl.jena.sparql.util
Class ResultSetUtils

java.lang.Object
  extended by com.hp.hpl.jena.sparql.util.ResultSetUtils

public class ResultSetUtils
extends Object


Constructor Summary
ResultSetUtils()
           
 
Method Summary
static List<com.hp.hpl.jena.rdf.model.RDFNode> resultSetToList(ResultSet rs, String selectElement)
          Extracts a List filled with the binding of selectElement variable for each query solution as RDFNodes (Resources or Literals).
static List<String> resultSetToStringList(ResultSet rs, String selectElement, String literalOrResource)
          Extracts a List filled with the binding of selectElement variable for each query solution, turned into a string (URIs or lexical forms).
static ResultSet union(ResultSet... sets)
          Create an in-memory result set from an array of ResulSets.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResultSetUtils

public ResultSetUtils()
Method Detail

resultSetToList

public static List<com.hp.hpl.jena.rdf.model.RDFNode> resultSetToList(ResultSet rs,
                                                                      String selectElement)
Extracts a List filled with the binding of selectElement variable for each query solution as RDFNodes (Resources or Literals). Exhausts the result set. Create a rewindable one to use multiple times.

See Also:
ResultSetFactory

resultSetToStringList

public static List<String> resultSetToStringList(ResultSet rs,
                                                 String selectElement,
                                                 String literalOrResource)
Extracts a List filled with the binding of selectElement variable for each query solution, turned into a string (URIs or lexical forms). Exhausts the result set. Create a rewindable one to use multiple times.

See Also:
ResultSetFactory

union

public static ResultSet union(ResultSet... sets)
Create an in-memory result set from an array of ResulSets. It is assumed that all the ResultSets from the array have the same variables.

Parameters:
sets - the ResultSets to concatenate.


Licenced under the Apache License, Version 2.0