|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.ceryle.wiki.plugin.query.Expression
public class Expression
Expressions can be nested, combined with Operators and contain Terms. An expression when evaluated against a candidate page, returns true if the candidate page and all of its nested parts are acceptable.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.ceryle.wiki.plugin.query.Operand |
|---|
Operand.NullOperand |
| Field Summary | |
|---|---|
static Expression |
EMPTY
An Empty expression accepts everything. |
protected Operand |
m_left
|
protected Operator |
m_operator
|
protected static ExpressionParser |
m_parser
This parser instance is used to do the string handling, it checks the string and builds up a list of logical elements that Expression attempts to disambiguate. |
protected Operand |
m_right
|
| Fields inherited from interface org.ceryle.wiki.plugin.query.Operand |
|---|
NULL |
| Constructor Summary | |
|---|---|
Expression(List list)
Constructor taking a List of Terms, Operators and sub-Expressions that make up this expression. |
|
Expression(Operand left,
Operator operator,
Operand right)
Constructor where the Operator and two Operands of the Expression are explicit and already known. |
|
| Method Summary | |
|---|---|
boolean |
accepts(String pageName,
ReferenceInfoProvider refInfoProvider)
Typically this method is only called by the QueryItem itsself to ask if the top-level expression would accept the pageName as being part of the result set. |
boolean |
evaluateOperand(Modifier modifier,
ReferenceInfoProvider refInfoProvider,
String pageName)
Evaluates the operand, returns the truth value. |
Operand |
getLeftOperand()
|
Operator |
getOperator()
|
Operand |
getRightOperand()
|
static Expression |
parse(String queryString)
Main parsing logic to turn a String into an Expression. |
String |
toString()
Returns formal form of this expression. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Expression EMPTY
protected static ExpressionParser m_parser
protected Operand m_left
protected Operator m_operator
protected Operand m_right
| Constructor Detail |
|---|
public Expression(Operand left,
Operator operator,
Operand right)
left - the left side ("subject") of the expressionoperator - the operator ("verb") of the expressionright - the right side ("object") of the expression
public Expression(List list)
throws QueryException
list -
QueryException| Method Detail |
|---|
public static Expression parse(String queryString)
throws QueryException
queryString -
QueryExceptionpublic Operand getLeftOperand()
public Operator getOperator()
public Operand getRightOperand()
public String toString()
toString in class Object
public boolean accepts(String pageName,
ReferenceInfoProvider refInfoProvider)
throws QueryException
pageName - refInfoProvider -
QueryException
public boolean evaluateOperand(Modifier modifier,
ReferenceInfoProvider refInfoProvider,
String pageName)
throws QueryException
Operand
evaluateOperand in interface OperandQueryExceptionOperand
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||