All Packages Class Hierarchy This Package Previous Next Index
Class ParkaClient.QueryResults
java.lang.Object
|
+----ParkaClient.QueryResults
- public class QueryResults
- extends Object
A batch of query results, when results are more than just 'true'
or 'false'.
-
QueryResults(boolean)
-
-
QueryResults(int, int)
- Construct a new result set with n rows and m columns.
-
getName(int)
- Returns the name of the variable in the pos column (starting
with 0).
-
getNameIndex(String)
- Returns column index of named variable, or -1 if error--
eg, name not there.
-
getNames()
- Return the names of all variables in the result.
-
getValue(int, int)
- Return the value at a particular row and column number.
-
getValueMatrix()
- Return the results as a matrix of strings.
-
getValues(int)
- Return the set of variable bindings for a single answer (a row
from the table).
-
numNames()
- Returns the number of variables (columns) used in the
result.
-
numResults()
- Returns the number of results that will fit in the object.
-
removeDuplicates()
- Remove duplicate answers(rows) from the results.
-
setName(int, String)
- Set the name of a variable in a specific position.
-
setNames(String[])
- Set the names of all variables.
-
setValueMatrix(String[])
- Set the result based on the array of strings, where the rows
have been linearized one after the other.
-
setValueMatrix(String[][])
- Set the results based on the input matrix.
-
toString()
- A debugging tool to print out the current results as a table.
QueryResults
public QueryResults(int n,
int m)
- Construct a new result set with n rows and m columns.
QueryResults
public QueryResults(boolean answer)
numResults
public int numResults()
- Returns the number of results that will fit in the object.
This is odd, but the prior reasoning was:
"Use the capacity, not size of the vector, since we need to be
able to know how many answers will fit. Make sure that we keep
the capacity trimmed to reflect the correct number of answers
if any are removed..."
May consider changing this. Will have to see how it is used
in code.
numNames
public int numNames()
- Returns the number of variables (columns) used in the
result.
getName
public String getName(int pos)
- Returns the name of the variable in the pos column (starting
with 0).
getNames
public String[] getNames()
- Return the names of all variables in the result.
getValue
public String getValue(int row,
int col)
- Return the value at a particular row and column number.
getValues
public String[] getValues(int pos)
- Return the set of variable bindings for a single answer (a row
from the table).
getValueMatrix
public String[][] getValueMatrix()
- Return the results as a matrix of strings.
getNameIndex
public int getNameIndex(String varName)
- Returns column index of named variable, or -1 if error--
eg, name not there.
setName
public void setName(int pos,
String n)
- Set the name of a variable in a specific position.
setNames
public void setNames(String nArray[])
- Set the names of all variables.
setValueMatrix
public void setValueMatrix(String vMat[][])
- Set the results based on the input matrix.
setValueMatrix
public void setValueMatrix(String answerList[])
- Set the result based on the array of strings, where the rows
have been linearized one after the other. This input form is the
way Parka returns answers.
removeDuplicates
public boolean removeDuplicates()
- Remove duplicate answers(rows) from the results.
toString
public String toString()
- A debugging tool to print out the current results as a table.
- Overrides:
- toString in class Object
All Packages Class Hierarchy This Package Previous Next Index