|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.ceryle.wiki.plugin.query.ExpressionParser
public class ExpressionParser
This is the first line of defense against bad query strings. Parses from the original string form into Terms, Operators and if the user explicitly had parenthesis, sub-Expressions.
| Field Summary |
|---|
| Fields inherited from interface org.ceryle.wiki.plugin.util.PluginConstants |
|---|
ACL, AOP, APOS_ENT, ASTERISK, BCL, BOP, BR, CAPCL, CAPOP, CLATT, COLON, COMMA, DIV_class, DIV_style, DIVCL, DOT, EQ, EQQUO, EQSQUO, FALSE, FORMCL, FORMOP, GET, ICL, INPUTOP, IOP, LABELCL, LABELFOR, LABELOP, LCURL, LICL, LIOP, LPAR, LSBR, MT, NBSP, NL, OLCL, OLOP, P_class, PCL, PLUGCL, PLUGO, POP, POST, QUO, QUOCL, QUOETCL, RCURL, RPAR, RSBR, SEMI, SP, SPAN_class, SPANCL, SPANOP, SQUO, TABLECL, TABLEOP, TDCL, TDOP, THCL, THOP, TRCL, TROP, TRUE, TTCL, TTOP, ULCL, ULOP, UNDER |
| Constructor Summary | |
|---|---|
ExpressionParser()
|
|
| Method Summary | |
|---|---|
protected List |
collapseBracketedTerms(List list)
Join back together the bracketed page names. |
protected List |
explicitExpressions(List list)
Create expressions based on use of explicit parentheses in the expression. |
protected int |
findLastOpen(List list)
|
protected int |
findNextClose(List list,
int startIndex)
|
Expression |
parse(String queryString)
Parse the string and return one top-level expression which if toString()'d would show the canonical form that the user should have given if his syntax was perfect. |
protected List |
replaceOperators(List list)
Replace string names of operators with Operator instances. |
protected void |
syntaxCheckBrackets(CharacterIterator iter)
Square brackets must exist balance and NOT nest... |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ExpressionParser()
| Method Detail |
|---|
public Expression parse(String queryString)
throws QueryException
queryString -
QueryExceptionprotected List collapseBracketedTerms(List list)
list -
protected List replaceOperators(List list)
throws QueryException
list - the input List
QueryException
protected List explicitExpressions(List list)
throws QueryException
list - the input List
QueryExceptionprotected int findLastOpen(List list)
protected int findNextClose(List list,
int startIndex)
protected void syntaxCheckBrackets(CharacterIterator iter)
throws QueryException
chars -
QueryException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||