All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class ShoeKb.ResultSet

java.lang.Object
   |
   +----ShoeKb.ResultSet

public class ResultSet
extends Object
A set of results that is returned by a query.


Constructor Index

 o ResultSet(String[])
Constructs a new result set for the variables in varnames.
 o ResultSet(String[], int)
Constructs a new result set to hold rowCapacity rows of varNum variable bindings.
 o ResultSet(String[], String[][])
Constructs a new result set given an ordering of the variables and a matrix of variable bindings.

Method Index

 o addResult(String[])
Adds a single set of variable bindings to the result set.
 o getColNameIndex(String)
Returns column index of named variable, or -1 if error-- eg, name not there.
 o getColVar(int)
Returns the variable name associated with the requested column.
 o getColVars()
Returns an array of the variable names used in the query, using the order that the results occur in.
 o getNumColumns()
Returns the number of variables in the result set.
 o getNumResults()
Returns the number of results in the set.
 o getResult(int)
Returns one set of bindings for the query as an array.
 o getValue(int, int)
Returns a single binding for a single variable.
 o getValueMatrix()
Returns a matrix of the result set, where each column represents a different variable and each row represents a different set of bindings.
 o removeDuplicates()
Removes duplicate rows from the result set.
 o selectColumn(int)
Selects a particular variable (based on its order in the results) and returns its set of bindings as an array.
 o toString()

Constructors

 o ResultSet
 public ResultSet(String varNames[])
Constructs a new result set for the variables in varnames.

 o ResultSet
 public ResultSet(String varNames[],
                  int rowCapacity)
Constructs a new result set to hold rowCapacity rows of varNum variable bindings.

 o ResultSet
 public ResultSet(String varOrder[],
                  String bindings[][])
Constructs a new result set given an ordering of the variables and a matrix of variable bindings.

Methods

 o getNumResults
 public int getNumResults()
Returns the number of results in the set.

 o getNumColumns
 public int getNumColumns()
Returns the number of variables in the result set.

 o getColVar
 public String getColVar(int col)
Returns the variable name associated with the requested column.

 o getColVars
 public String[] getColVars()
Returns an array of the variable names used in the query, using the order that the results occur in.

 o getColNameIndex
 public int getColNameIndex(String varName)
Returns column index of named variable, or -1 if error-- eg, name not there.

 o getValue
 public String getValue(int row,
                        int col)
Returns a single binding for a single variable.

 o getResult
 public String[] getResult(int pos)
Returns one set of bindings for the query as an array.

 o getValueMatrix
 public String[][] getValueMatrix()
Returns a matrix of the result set, where each column represents a different variable and each row represents a different set of bindings.

 o selectColumn
 public String[] selectColumn(int cnum)
Selects a particular variable (based on its order in the results) and returns its set of bindings as an array.

 o removeDuplicates
 public boolean removeDuplicates()
Removes duplicate rows from the result set.

 o toString
 public String toString()
Overrides:
toString in class Object
 o addResult
 public void addResult(String res[])
Adds a single set of variable bindings to the result set. This function is used to construct result sets incrementally.


All Packages  Class Hierarchy  This Package  Previous  Next  Index