Xindice API
version 1.1

org.apache.xindice.core.indexer
Class IndexQuery

java.lang.Object
  |
  +--org.apache.xindice.core.indexer.IndexQuery
Direct Known Subclasses:
IndexQueryANY, IndexQueryBW, IndexQueryBWX, IndexQueryEQ, IndexQueryGEQ, IndexQueryGT, IndexQueryIN, IndexQueryLEQ, IndexQueryLT, IndexQueryNBW, IndexQueryNBWX, IndexQueryNEQ, IndexQueryNIN, IndexQueryNSW, IndexQuerySW

public class IndexQuery
extends Object

IndexQuery represents the most primitive form of index querying. Instances of this object should be created by QueryResolvers and cached in Query instances.

Version:
$Revision: 511426 $, $Date: 2007-02-24 22:25:02 -0500 (Sat, 24 Feb 2007) $

Field Summary
static int ANY
           
static int BW
           
static int BWX
           
static int EQ
           
static int GEQ
           
static int GT
           
static int IN
           
static int LEQ
           
static int LT
           
static int NBW
           
static int NBWX
           
static int NEQ
           
static int NIN
           
static int NSW
           
protected  int op
           
protected  IndexPattern pattern
           
static int SW
           
protected  Value[] vals
           
 
Constructor Summary
IndexQuery(IndexPattern pattern)
          ANY operator index query
IndexQuery(IndexPattern pattern, int op, String val1)
          Unary operator index query
IndexQuery(IndexPattern pattern, int op, String val1, String val2)
          Binary operator index query
IndexQuery(IndexPattern pattern, int op, Value val)
          Unary operator index query
IndexQuery(IndexPattern pattern, int op, Value[] vals)
          Binary operator index query
IndexQuery(IndexPattern pattern, int op, Value val1, Value val2)
          Binary operator index query
IndexQuery(IndexPattern pattern, String val1)
          EQ operator index query
IndexQuery(IndexPattern pattern, String val1, String val2)
          IN operator index query
IndexQuery(IndexPattern pattern, Value val1)
          EQ operator index query
IndexQuery(IndexPattern pattern, Value[] vals)
          IN operator index query
IndexQuery(IndexPattern pattern, Value val1, Value val2)
          IN operator index query
 
Method Summary
 int getLength()
          getLength returns the length of the Value set associated with this query.
 int getOperator()
          getOperator returns the operator associated with this query.
 IndexPattern getPattern()
          getPattern returns the IndexPattern associated with this query.
 Value getValue(int index)
          getValue returns one of the Values associated with this query.
 Value[] getValues()
          getValues returns the Values associated with this query.
 boolean testValue(String value)
          testValue tests the specified value for validity against this IndexQuery.
 boolean testValue(Value value)
          testValue tests the specified value for validity against this IndexQuery.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ANY

public static final int ANY

EQ

public static final int EQ

NEQ

public static final int NEQ

GT

public static final int GT

LEQ

public static final int LEQ

LT

public static final int LT

GEQ

public static final int GEQ

BW

public static final int BW

NBW

public static final int NBW

BWX

public static final int BWX

NBWX

public static final int NBWX

IN

public static final int IN

NIN

public static final int NIN

SW

public static final int SW

NSW

public static final int NSW

pattern

protected final IndexPattern pattern

op

protected final int op

vals

protected final Value[] vals
Constructor Detail

IndexQuery

public IndexQuery(IndexPattern pattern)
ANY operator index query

IndexQuery

public IndexQuery(IndexPattern pattern,
                  Value[] vals)
IN operator index query

IndexQuery

public IndexQuery(IndexPattern pattern,
                  int op,
                  Value[] vals)
Binary operator index query

IndexQuery

public IndexQuery(IndexPattern pattern,
                  int op,
                  Value val)
Unary operator index query

IndexQuery

public IndexQuery(IndexPattern pattern,
                  Value val1)
EQ operator index query

IndexQuery

public IndexQuery(IndexPattern pattern,
                  int op,
                  Value val1,
                  Value val2)
Binary operator index query

IndexQuery

public IndexQuery(IndexPattern pattern,
                  Value val1,
                  Value val2)
IN operator index query

IndexQuery

public IndexQuery(IndexPattern pattern,
                  int op,
                  String val1)
Unary operator index query

IndexQuery

public IndexQuery(IndexPattern pattern,
                  String val1)
EQ operator index query

IndexQuery

public IndexQuery(IndexPattern pattern,
                  int op,
                  String val1,
                  String val2)
Binary operator index query

IndexQuery

public IndexQuery(IndexPattern pattern,
                  String val1,
                  String val2)
IN operator index query
Method Detail

getPattern

public IndexPattern getPattern()
getPattern returns the IndexPattern associated with this query.
Returns:
the IndexPattern

getOperator

public int getOperator()
getOperator returns the operator associated with this query.
Returns:
The operator

getValue

public final Value getValue(int index)
getValue returns one of the Values associated with this query.
Parameters:
index - The Value index
Returns:
The request Value

getValues

public Value[] getValues()
getValues returns the Values associated with this query.
Returns:
The Value set

getLength

public final int getLength()
getLength returns the length of the Value set associated with this query.
Returns:
The Value set length

testValue

public boolean testValue(Value value)
testValue tests the specified value for validity against this IndexQuery. The helper classes in org.apache.xindice.core.indexer.helpers should be used for optimized performance.
Parameters:
value - The Value to compare
Returns:
Whether or not the value matches

testValue

public final boolean testValue(String value)
testValue tests the specified value for validity against this IndexQuery. The helper classes in org.apache.xindice.core.indexer.helpers should be used for optimized performance.
Parameters:
value - The Value to compare
Returns:
Whether or not the value matches

Xindice API
version 1.1

Copyright (c) 1999-2007 The Apache Software Foundation. All Rights Reserved.