wt.adapter
Class IeWhereParser

java.lang.Object
  extended bywt.adapter.IeWhereParser

public class IeWhereParser
extends Object

This class parses an Info*Engine where clause into a vector of IeSearch conditions. Each search condition has the elements of "attribute", "operator", and "value".


Field Summary
private  int nestedLevel
           
private static String RESOURCE
           
private  Vector searchConditions
          Vector of parsed where conditions
private static boolean VERBOSE
           
private static String versionID
           
private  int whereCursor
          Current index into where clause tokens
private  Vector whereTokens
          Parsed tokens from the where clause.
 
Constructor Summary
IeWhereParser()
           
 
Method Summary
private  Object buildSearchConditions()
          Scan where clause tokens and collect individual search conditions.
 void IeWhereParser()
          Constructor.
static void main(String[] args)
          Main method for testing.
 Vector parseWhere(String whereClause)
          Translates a string IE where filter to a vector of search conditions.
private  IeCondition translateTerm()
          Translate a term of an Info*Engine where clause into a vector of "attribute", "operator", and "value" search filter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

versionID

private static final String versionID
See Also:
Constant Field Values

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

whereCursor

private int whereCursor
Current index into where clause tokens


nestedLevel

private int nestedLevel

whereTokens

private Vector whereTokens
Parsed tokens from the where clause.


searchConditions

private Vector searchConditions
Vector of parsed where conditions


VERBOSE

private static boolean VERBOSE
Constructor Detail

IeWhereParser

public IeWhereParser()
Method Detail

IeWhereParser

public void IeWhereParser()
Constructor.


parseWhere

public Vector parseWhere(String whereClause)
                  throws WebjectServiceException
Translates a string IE where filter to a vector of search conditions.

Parameters:
whereClause - A string Info*Engine where clause.
Returns:
Vector containing where clause elements.
Throws:
WebjectServiceException

buildSearchConditions

private Object buildSearchConditions()
Scan where clause tokens and collect individual search conditions.

Returns:
Vector search conditions.

translateTerm

private IeCondition translateTerm()
Translate a term of an Info*Engine where clause into a vector of "attribute", "operator", and "value" search filter.

Returns:
IeCondition, null if term can not be translated

main

public static void main(String[] args)
Main method for testing. Call Parameters Example: java wt.adapter.IeWhereParser "a1=v1&a2=v2&a3=v3"

Parameters:
args -