|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.ontopia.topicmaps.query.impl.basic.QueryMatches
public class QueryMatches
INTERNAL: Object used to hold query results during computation.
Field Summary | |
---|---|
int |
colcount
|
java.lang.Object[] |
columnDefinitions
|
java.lang.Object[][] |
data
|
static int |
initialSize
|
int |
last
|
int |
size
|
Constructor Summary | |
---|---|
QueryMatches(java.util.Collection columnDefs,
QueryContext context)
INTERNAL: Creates a new matches object with the given column definitions. |
|
QueryMatches(QueryMatches matches)
INTERNAL: Creates a new (empty) matches object with the same column definitions as the QueryMatches object passed in the parameter. |
Method Summary | |
---|---|
void |
add(java.lang.Object[][] newdata,
int length)
EXPERIMENTAL: Adds input array to this table. |
void |
add(QueryMatches extra)
INTERNAL: Adds all the matches in the given table to this table. |
void |
add(QueryResultIF extra)
EXPERIMENTAL: Adds QueryResultIF matches to this table. |
protected void |
addNonRedundant(QueryMatches matches)
INTERNAL: Adds all rows which do not already exist. |
boolean |
bound(int colix)
INTERNAL: Checks whether the variable represented by the indexed column is bound. |
void |
clear()
INTERNAL: Empties the table. |
java.lang.String |
dump()
|
void |
ensureCapacity(int requirement)
INTERNAL: Ensures that the table has at least the given size. |
java.lang.Object |
getColumnDefinition(int ix)
INTERNAL: Returns definition of column. |
int |
getIndex(java.lang.Float num)
INTERNAL: Returns the index of the given float constant in the table. |
int |
getIndex(java.lang.Integer num)
INTERNAL: Returns the index of the given integer constant in the table. |
int |
getIndex(java.lang.Object argument)
INTERNAL: Returns the column index of the given object in the table. |
int |
getIndex(java.lang.String str)
INTERNAL: Returns the index of the given string constant in the table. |
int |
getIndex(TMObjectIF constant)
INTERNAL: Returns the index of the given constant in the table. |
int |
getIndex(Variable var)
INTERNAL: Returns the index of the given variable in the table. |
QueryContext |
getQueryContext()
INTERNAL: Returns the query context. |
int[][] |
getTranslationSpec(java.lang.Object[] intarguments,
QueryMatches extmatches,
java.lang.Object[] extarguments)
INTERNAL: Computes the translation specification array, which gives the connection between this and the other match table. |
int |
getVariableIndex(java.lang.String varname)
INTERNAL: Returns the index of the given variable in the table. |
boolean |
hasLiteralColumns()
INTERNAL: Checks whether any of the columns are literal columns representing a literal in the query. |
void |
increaseCapacity()
INTERNAL: Used to increase the size of the table when full. |
void |
insertConstants()
INTERNAL: Inserts the constant values in the constant columns. |
boolean |
isEmpty()
INTERNAL: Returns true if there are no matches. |
QueryMatches |
merge(int[] intspec,
QueryMatches extmatches,
int[] extspec,
int[] equalpairs)
INTERNAL: Merges this match table (from inside a rule) with another match table (from the calling context), producing a new set of matches (corresponding to the result of the rule, as viewed from the outside). |
protected void |
remove(QueryMatches matches)
INTERNAL: Removes the rows which have matching counterparts in the argument. |
QueryMatches |
removeDuplicates()
|
void |
translate(int[] fromCols,
QueryMatches toQM,
int[] toCols)
INTERNAL: Translates matches in this table into corresponding matches in the other. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static int initialSize
public int last
public int size
public java.lang.Object[][] data
public java.lang.Object[] columnDefinitions
public int colcount
Constructor Detail |
---|
public QueryMatches(java.util.Collection columnDefs, QueryContext context)
public QueryMatches(QueryMatches matches)
Method Detail |
---|
public int getVariableIndex(java.lang.String varname)
public int getIndex(TMObjectIF constant)
public int getIndex(Variable var)
public int getIndex(java.lang.String str)
public int getIndex(java.lang.Integer num)
public int getIndex(java.lang.Float num)
public int getIndex(java.lang.Object argument)
public java.lang.Object getColumnDefinition(int ix)
public void increaseCapacity()
public void ensureCapacity(int requirement)
public void clear()
public QueryContext getQueryContext()
public boolean hasLiteralColumns()
public boolean isEmpty()
public void insertConstants()
public boolean bound(int colix)
public void add(QueryMatches extra)
public void add(java.lang.Object[][] newdata, int length)
public void add(QueryResultIF extra)
protected void remove(QueryMatches matches)
protected void addNonRedundant(QueryMatches matches)
public int[][] getTranslationSpec(java.lang.Object[] intarguments, QueryMatches extmatches, java.lang.Object[] extarguments) throws InvalidQueryException
intarguments
- Actual received parameters in rule invocation.extarguments
- Declared parameters in rule declaration.
InvalidQueryException
public void translate(int[] fromCols, QueryMatches toQM, int[] toCols)
public QueryMatches merge(int[] intspec, QueryMatches extmatches, int[] extspec, int[] equalpairs)
intspec
- Mapping from general column no (?) to column no in
this QM object.extspec
- Mapping from general column no (?) to column no in
extmatches.equalpairs
- See RulePredicate.getEqualPairs() for explanation.
Numbers are argument numbers.public QueryMatches removeDuplicates()
public java.lang.String dump()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |