uk.ac.ic.doc.automed.wrappers
Class AutoMedQuery

java.lang.Object
  extended by uk.ac.ic.doc.automed.wrappers.AutoMedQuery
Direct Known Subclasses:
SQLQuery, YattaQuery

public abstract class AutoMedQuery
extends java.lang.Object

A generic representation of query expressions as trees, where each AutoMedQuery has an operator type, and 0 or more fields that have a field type

Author:
Peter McBrien (pjm@doc.ic.ac.uk)

Field Summary
static int BINARY_CLASS
           
static AutoMedQueryToken BOOLEAN
           
static int BOOLEAN_TOKEN
           
static int CLAUSE_CLASS
           
static AutoMedQueryToken CONSTANT
           
static int CONSTANT_TOKEN
           
static int DATE_TOKEN
           
static int DOUBLE_TOKEN
           
static int FIELD_TYPE_AUTOMEDQUERY
          A field that can hold a AutoMedQuery
static int FIELD_TYPE_INTEGER
          A field that can hold an Integer constant
static int FIELD_TYPE_ONE_OR_MORE
          Used when the previous field type may be repeated any number of times.
static int FIELD_TYPE_STRING
          A field that can hold a String constant
static AutoMedQueryToken FLOAT
           
static int FLOAT_TOKEN
           
static int IDENTIFIER_TOKEN
           
static AutoMedQueryToken INTEGER
          Token to represent the AutoMedWrapper.INTEGER atomic type
static int INTEGER_TOKEN
           
static int LONG_TOKEN
           
static AutoMedQueryToken STRING
           
static int STRING_TOKEN
           
static int SYMBOL_TOKEN
           
static AutoMedQueryToken TIME
           
static int TIME_TOKEN
           
static int UNARY_CLASS
           
static int VALUE_CLASS
          A class of token that represents an atomic value in an expression
 
Constructor Summary
AutoMedQuery(AutoMedQueryToken id, java.lang.Object o)
           
AutoMedQuery(AutoMedQueryToken id, java.lang.Object[] field)
           
 
Method Summary
 AutoMedQueryToken getAutoMedQueryToken()
          Return the AutoMedQueryToken of this node; ie the type of object query node represents.
 java.lang.Object getField(int fieldNumber)
          Return a field from the query node, where fields are counted from zero.
 java.lang.String getString(int fieldNumber)
          Return a field as a String value.
 void setField(int fieldNumber, java.lang.Object value)
          Return a field in the query node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VALUE_CLASS

public static final int VALUE_CLASS
A class of token that represents an atomic value in an expression

See Also:
Constant Field Values

UNARY_CLASS

public static final int UNARY_CLASS
See Also:
Constant Field Values

BINARY_CLASS

public static final int BINARY_CLASS
See Also:
Constant Field Values

CLAUSE_CLASS

public static final int CLAUSE_CLASS
See Also:
Constant Field Values

INTEGER_TOKEN

public static final int INTEGER_TOKEN
See Also:
Constant Field Values

LONG_TOKEN

public static final int LONG_TOKEN
See Also:
Constant Field Values

FLOAT_TOKEN

public static final int FLOAT_TOKEN
See Also:
Constant Field Values

DOUBLE_TOKEN

public static final int DOUBLE_TOKEN
See Also:
Constant Field Values

TIME_TOKEN

public static final int TIME_TOKEN
See Also:
Constant Field Values

DATE_TOKEN

public static final int DATE_TOKEN
See Also:
Constant Field Values

STRING_TOKEN

public static final int STRING_TOKEN
See Also:
Constant Field Values

BOOLEAN_TOKEN

public static final int BOOLEAN_TOKEN
See Also:
Constant Field Values

IDENTIFIER_TOKEN

public static final int IDENTIFIER_TOKEN
See Also:
Constant Field Values

SYMBOL_TOKEN

public static final int SYMBOL_TOKEN
See Also:
Constant Field Values

CONSTANT_TOKEN

public static final int CONSTANT_TOKEN
See Also:
Constant Field Values

INTEGER

public static final AutoMedQueryToken INTEGER
Token to represent the AutoMedWrapper.INTEGER atomic type


FLOAT

public static final AutoMedQueryToken FLOAT

TIME

public static final AutoMedQueryToken TIME

STRING

public static final AutoMedQueryToken STRING

BOOLEAN

public static final AutoMedQueryToken BOOLEAN

CONSTANT

public static final AutoMedQueryToken CONSTANT

FIELD_TYPE_STRING

public static final int FIELD_TYPE_STRING
A field that can hold a String constant

See Also:
Constant Field Values

FIELD_TYPE_INTEGER

public static final int FIELD_TYPE_INTEGER
A field that can hold an Integer constant

See Also:
Constant Field Values

FIELD_TYPE_AUTOMEDQUERY

public static final int FIELD_TYPE_AUTOMEDQUERY
A field that can hold a AutoMedQuery

See Also:
Constant Field Values

FIELD_TYPE_ONE_OR_MORE

public static final int FIELD_TYPE_ONE_OR_MORE
Used when the previous field type may be repeated any number of times. This must always be the last field type in a node.

See Also:
Constant Field Values
Constructor Detail

AutoMedQuery

public AutoMedQuery(AutoMedQueryToken id,
                    java.lang.Object[] field)

AutoMedQuery

public AutoMedQuery(AutoMedQueryToken id,
                    java.lang.Object o)
Method Detail

getAutoMedQueryToken

public final AutoMedQueryToken getAutoMedQueryToken()
Return the AutoMedQueryToken of this node; ie the type of object query node represents.


getField

public final java.lang.Object getField(int fieldNumber)
Return a field from the query node, where fields are counted from zero.

Parameters:
fieldNumber - the field to return.

getString

public final java.lang.String getString(int fieldNumber)
Return a field as a String value.

Parameters:
fieldNumber - the field to return.

setField

public final void setField(int fieldNumber,
                           java.lang.Object value)
Return a field in the query node.