Xindice API
version 1.2m1

org.apache.xindice.core.indexer
Class IndexQuery

java.lang.Object
  extended byorg.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: 564424 $, $Date: 2007-08-09 19:40:03 -0400 (Thu, 09 Aug 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
           
static int TQ
           
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
See Also:
Constant Field Values

EQ

public static final int EQ
See Also:
Constant Field Values

NEQ

public static final int NEQ
See Also:
Constant Field Values

GT

public static final int GT
See Also:
Constant Field Values

LEQ

public static final int LEQ
See Also:
Constant Field Values

LT

public static final int LT
See Also:
Constant Field Values

GEQ

public static final int GEQ
See Also:
Constant Field Values

BW

public static final int BW
See Also:
Constant Field Values

NBW

public static final int NBW
See Also:
Constant Field Values

BWX

public static final int BWX
See Also:
Constant Field Values

NBWX

public static final int NBWX
See Also:
Constant Field Values

IN

public static final int IN
See Also:
Constant Field Values

NIN

public static final int NIN
See Also:
Constant Field Values

SW

public static final int SW
See Also:
Constant Field Values

NSW

public static final int NSW
See Also:
Constant Field Values

TQ

public static final int TQ
See Also:
Constant Field Values

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.2m1

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