project.biota.util
Class Keyword

java.lang.Object
  extended byproject.biota.util.Keyword

public class Keyword
extends Object

Keyword holds the DiGIR keywords. There are three types of keyword:

- COP includes equals, notEquals, greaterThan, greaterThanOrEquals, lessThan, lessThanOrEquals, like.
- MultiCOP includes IN.
- LOP includes and, or, andNot, orNot

Author:
Kimmy Lin

Field Summary
static int COP
          Comparitive OPerator
static int LOP
          Logical OPerator
static int MULTICOP
          MULTI-element Comparitive OPerator
 
Constructor Summary
Keyword(String value, int type)
          Constructs a Keyword object holding its value and type.
 
Method Summary
 int getKeyType()
          Gets the type of the keyword, COP, MULTICOP, or LOP.
 String getValue()
          Gets the string value of the keyword.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COP

public static int COP
Comparitive OPerator


MULTICOP

public static int MULTICOP
MULTI-element Comparitive OPerator


LOP

public static int LOP
Logical OPerator

Constructor Detail

Keyword

public Keyword(String value,
               int type)
Constructs a Keyword object holding its value and type.

Parameters:
value - the string value of the keyword
type - the type of the keyword
Method Detail

getValue

public String getValue()
Gets the string value of the keyword. Could be "=", "!=", "<", "<=", ">", ">=", "!=", "like", "and", "and not", "or", "or not". Note that keyword "IN" doesn't have a value because it has been replaced with multiple query statements combined by the logical operator "or".

Returns:
the string value of the keyword

getKeyType

public int getKeyType()
Gets the type of the keyword, COP, MULTICOP, or LOP.

Returns:
the type of the keyword (COP, MULTICOP, or LOP)


Copyright © 2004 University of Massachusetts at Boston. All Rights Reserved.