org.ceryle.wiki.plugin.query.operators
Class Operator

java.lang.Object
  extended by org.ceryle.wiki.plugin.query.operators.Operator
Direct Known Subclasses:
AllOperator, AndOperator, AnyOperator, ByModifier, FromModifier, IsModifier, NotOperator, NullOperator, OrOperator, Predicate, ToModifier

public abstract class Operator
extends Object

The abstract class of query expression Operators. Includes: AllOperator, AndOperator, AnyOperator, FromModifier (AKA ByModifier), ExpressionKeyword, IsModifier, Modifier, NotOperator, NullOperator, Operator, OrOperator, and ToModifier.

Author:
Murray Altheim, John Volkar (john.volkar at gmail.com)

Field Summary
static String _ALL
          The String token for the ALL operator.
static String _AND
          The String token for the AND operator.
static String _ANY
          The String token for the ANY operator.
static String _BY
          The String token for the BY operator.
static String _FROM
          The String token for the FROM operator.
static String _IS
          The String token for the IS operator.
static String _NOT
          The String token for the NOT operator.
static String _NULL
          The String token for the NULL operator.
static String _OR
          The String token for the OR operator.
static String _TO
          The String token for the TO operator.
 
Constructor Summary
protected Operator(String name)
          Hide constructor from public, allow subclass access.
 
Method Summary
abstract  boolean evaluateOperator(Operand left, Operand right, Modifier modifier, ReferenceInfoProvider refInfoProvider, String pageName)
           
 String getName()
          Returns the name of this Operator (returns the same thing as toString()).
 boolean isInfix()
           
 boolean isPrefix()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_NULL

public static final String _NULL
The String token for the NULL operator.

See Also:
Constant Field Values

_ALL

public static final String _ALL
The String token for the ALL operator.

See Also:
Constant Field Values

_AND

public static final String _AND
The String token for the AND operator.

See Also:
Constant Field Values

_ANY

public static final String _ANY
The String token for the ANY operator.

See Also:
Constant Field Values

_BY

public static final String _BY
The String token for the BY operator. This is equivalent to (and replaced by) the _FROM operator.

See Also:
Constant Field Values

_FROM

public static final String _FROM
The String token for the FROM operator. This is equivalent to (and replaces) the _BY operator.

See Also:
Constant Field Values

_IS

public static final String _IS
The String token for the IS operator.

See Also:
Constant Field Values

_NOT

public static final String _NOT
The String token for the NOT operator.

See Also:
Constant Field Values

_OR

public static final String _OR
The String token for the OR operator.

See Also:
Constant Field Values

_TO

public static final String _TO
The String token for the TO operator.

See Also:
Constant Field Values
Constructor Detail

Operator

protected Operator(String name)
Hide constructor from public, allow subclass access.

Parameters:
name -
Method Detail

isInfix

public boolean isInfix()

isPrefix

public final boolean isPrefix()

evaluateOperator

public abstract boolean evaluateOperator(Operand left,
                                         Operand right,
                                         Modifier modifier,
                                         ReferenceInfoProvider refInfoProvider,
                                         String pageName)
                                  throws QueryException
Throws:
QueryException

getName

public String getName()
Returns the name of this Operator (returns the same thing as toString()).


toString

public String toString()
Overrides:
toString in class Object


The Ceryle Project. Copyright ©2001-2007 Murray Altheim, All Rights Reserved. See LICENSE included with distribution.