|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jaxen.JaxenHandler
SAXPath XPathHandler implementation capable
of building Jaxen expression trees which can walk various
different object models.
| Field Summary | |
protected boolean |
simplified
???? |
protected LinkedList |
stack
???? |
| Constructor Summary | |
JaxenHandler()
Constructor |
|
| Method Summary | |
protected void |
addParameters(FunctionCallExpr function,
Iterator paramIter)
|
protected void |
addPredicates(Predicated obj,
Iterator predIter)
|
protected void |
addSteps(LocationPath locationPath,
Iterator stepIter)
|
protected boolean |
canPop()
|
void |
endAbsoluteLocationPath()
Receive notification of the end of an absolute location path expression. |
void |
endAdditiveExpr(int operator)
Receive notification of the end of an additive ('+' or '-') expression. |
void |
endAllNodeStep()
Receive notification of the end of a node() step. |
void |
endAndExpr(boolean create)
Receive notification of the end of an 'and' expression. |
void |
endCommentNodeStep()
Receive notification of the end of a comment() step. |
void |
endEqualityExpr(int operator)
Receive notification of the end of an equality ('=' or '!=') expression. |
void |
endFilterExpr()
Receive notification of the end of a filter expression. |
void |
endFunction()
Receive notification of the end of a function call |
protected void |
endLocationPath()
|
void |
endMultiplicativeExpr(int operator)
Receive notification of the start of a multiplicative ('*', 'div' or 'mod') expression. |
void |
endNameStep()
Receive notification of the end of a NameStep |
void |
endOrExpr(boolean create)
Receive notification of the end of an 'or' expression. |
void |
endPathExpr()
Receive notification of the end of a path expression. |
void |
endPredicate()
Receive notification of the end of a predicate. |
void |
endProcessingInstructionNodeStep()
Receive notification of the end of a processing-instruction(...) step. |
void |
endRelationalExpr(int operator)
Receive notification of the start of a relational ('<', '>', '<=', or '>=') expression. |
void |
endRelativeLocationPath()
Receive notification of the end of a relative location path expression. |
protected void |
endStep()
|
void |
endTextNodeStep()
Receive notification of the end of a text() step. |
void |
endUnaryExpr(int operator)
Receive notification of the end of a unary ('+' or '-') expression. |
void |
endUnionExpr(boolean create)
Receive notification of the end of a union ('|') expression. |
void |
endXPath()
Receive notification of the end of an XPath expression parse. |
XPathExpr |
getXPathExpr()
Retrieve the simplified Jaxen XPath expression tree. |
XPathExpr |
getXPathExpr(boolean shouldSimplify)
Retrieve the Jaxen XPath expression tree, optionally simplified. |
XPathFactory |
getXPathFactory()
Retrieve the Jaxen XPathFactory used
during the parse to construct the XPath expression tree. |
void |
literal(String literal)
Receive notification of a literal expression. |
void |
number(double number)
Receive notification of a number expression. |
void |
number(int number)
Receive notification of a number expression. |
protected LinkedList |
peekFrame()
|
protected Object |
pop()
|
protected LinkedList |
popFrame()
|
protected void |
push(Object obj)
|
protected void |
pushFrame()
|
protected void |
returnExpr()
|
void |
setXPathFactory(XPathFactory xpathFactory)
Set the Jaxen XPathFactory to use
during the parse to construct the XPath expression tree. |
protected int |
stackSize()
|
void |
startAbsoluteLocationPath()
Receive notification of the start of an absolute location path expression. |
void |
startAdditiveExpr()
Receive notification of the start of an additive ('+' or '-') expression. |
void |
startAllNodeStep(int axis)
Receive notification of the start of a node() step. |
void |
startAndExpr()
Receive notification of the start of an 'and' expression. |
void |
startCommentNodeStep(int axis)
Receive notification of the start of a comment() step. |
void |
startEqualityExpr()
Receive notification of the start of an equality ('=' or '!=') expression. |
void |
startFilterExpr()
Receive notification of the start of a filter expression. |
void |
startFunction(String prefix,
String functionName)
Receive notification of a function call. |
void |
startMultiplicativeExpr()
Receive notification of the start of a multiplicative ('*', 'div' or 'mod') expression. |
void |
startNameStep(int axis,
String prefix,
String localName)
Receive notification of the start of a name step. |
void |
startOrExpr()
Receive notification of the start of an 'or' expression. |
void |
startPathExpr()
Receive notification of the start of a path expression. |
void |
startPredicate()
Receive notification of the start of a predicate. |
void |
startProcessingInstructionNodeStep(int axis,
String name)
Receive notification of the start of a processing-instruction(...) step. |
void |
startRelationalExpr()
Receive notification of the start of a relational ('<', '>', '<=', or '>=') expression. |
void |
startRelativeLocationPath()
Receive notification of the start of a relative location path expression. |
void |
startTextNodeStep(int axis)
Receive notification of the start of a text() step. |
void |
startUnaryExpr()
Receive notification of the start of a unary ('+' or '-') expression. |
void |
startUnionExpr()
Receive notification of the start of a union ('|') expression. |
void |
startXPath()
Receive notification of the start of an XPath expression parse. |
void |
variableReference(String prefix,
String variableName)
Receive notification of a variable-reference expression. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected boolean simplified
protected LinkedList stack
| Constructor Detail |
public JaxenHandler()
| Method Detail |
public void setXPathFactory(XPathFactory xpathFactory)
XPathFactory to use
during the parse to construct the XPath expression tree.
xpathFactory - the factory to use during the parsepublic XPathFactory getXPathFactory()
XPathFactory used
during the parse to construct the XPath expression tree.
XPathFactory used during the parse.public XPathExpr getXPathExpr()
This method is only valid once XPathReader.parse(...)
successfully returned.
public XPathExpr getXPathExpr(boolean shouldSimplify)
This method is only valid once XPathReader.parse(...)
successfully returned.
public void startXPath()
throws JaxenException
XPathHandler
startXPath in interface XPathHandlerJaxenException
public void endXPath()
throws JaxenException
XPathHandler
endXPath in interface XPathHandlerJaxenException
public void startPathExpr()
throws JaxenException
XPathHandler
startPathExpr in interface XPathHandlerJaxenException
public void endPathExpr()
throws JaxenException
XPathHandler
endPathExpr in interface XPathHandlerJaxenException
public void startAbsoluteLocationPath()
throws JaxenException
XPathHandler
startAbsoluteLocationPath in interface XPathHandlerJaxenException
public void endAbsoluteLocationPath()
throws JaxenException
XPathHandler
endAbsoluteLocationPath in interface XPathHandlerJaxenException
public void startRelativeLocationPath()
throws JaxenException
XPathHandler
startRelativeLocationPath in interface XPathHandlerJaxenException
public void endRelativeLocationPath()
throws JaxenException
XPathHandler
endRelativeLocationPath in interface XPathHandlerJaxenException
protected void endLocationPath()
throws JaxenException
JaxenException
protected void addSteps(LocationPath locationPath,
Iterator stepIter)
public void startNameStep(int axis,
String prefix,
String localName)
throws JaxenException
XPathHandler
startNameStep in interface XPathHandleraxis - the axis of this stepprefix - the namespace prefix for the name to test,
or the empty string if no prefix is specifiedlocalName - the local part of the name to test
JaxenException
public void endNameStep()
throws JaxenException
XPathHandler
endNameStep in interface XPathHandlerJaxenException
public void startTextNodeStep(int axis)
throws JaxenException
XPathHandler
startTextNodeStep in interface XPathHandleraxis - the axis of this step
JaxenException
public void endTextNodeStep()
throws JaxenException
XPathHandler
endTextNodeStep in interface XPathHandlerJaxenException
public void startCommentNodeStep(int axis)
throws JaxenException
XPathHandler
startCommentNodeStep in interface XPathHandleraxis - the axis of this step
JaxenException
public void endCommentNodeStep()
throws JaxenException
XPathHandler
endCommentNodeStep in interface XPathHandlerJaxenException
public void startAllNodeStep(int axis)
throws JaxenException
XPathHandler
startAllNodeStep in interface XPathHandleraxis - the axis of this step
JaxenException
public void endAllNodeStep()
throws JaxenException
XPathHandler
endAllNodeStep in interface XPathHandlerJaxenException
public void startProcessingInstructionNodeStep(int axis,
String name)
throws JaxenException
XPathHandler
startProcessingInstructionNodeStep in interface XPathHandleraxis - the axis of this stepname - the name of the processing-instruction, or
the empty string if none is specified
JaxenException
public void endProcessingInstructionNodeStep()
throws JaxenException
XPathHandler
endProcessingInstructionNodeStep in interface XPathHandlerJaxenExceptionprotected void endStep()
public void startPredicate()
throws JaxenException
XPathHandler
startPredicate in interface XPathHandlerJaxenException
public void endPredicate()
throws JaxenException
XPathHandler
endPredicate in interface XPathHandlerJaxenException
public void startFilterExpr()
throws JaxenException
XPathHandler
startFilterExpr in interface XPathHandlerJaxenException
public void endFilterExpr()
throws JaxenException
XPathHandler
endFilterExpr in interface XPathHandlerJaxenException
protected void addPredicates(Predicated obj,
Iterator predIter)
protected void returnExpr()
public void startOrExpr()
throws JaxenException
XPathHandler
startOrExpr in interface XPathHandlerJaxenException
public void endOrExpr(boolean create)
throws JaxenException
XPathHandler
endOrExpr in interface XPathHandlercreate - flag that indicates if this expression
should truly be instantiated, or if it was just
a pass-through, based upon the grammar productions
JaxenException
public void startAndExpr()
throws JaxenException
XPathHandler
startAndExpr in interface XPathHandlerJaxenException
public void endAndExpr(boolean create)
throws JaxenException
XPathHandler
endAndExpr in interface XPathHandlercreate - flag that indicates if this expression
should truly be instantiated, or if it was just
a pass-through, based upon the grammar productions
JaxenException
public void startEqualityExpr()
throws JaxenException
XPathHandler
startEqualityExpr in interface XPathHandlerJaxenException
public void endEqualityExpr(int operator)
throws JaxenException
XPathHandler
endEqualityExpr in interface XPathHandleroperator - the operator specific to this particular
equality expression. If null, this expression
is only a pass-through, and should not actually
be instantiated.
JaxenException
public void startRelationalExpr()
throws JaxenException
XPathHandler
startRelationalExpr in interface XPathHandlerJaxenException
public void endRelationalExpr(int operator)
throws JaxenException
XPathHandler
endRelationalExpr in interface XPathHandleroperator - the operator specific to this particular
relational expression. If NO_OP, this expression
is only a pass-through, and should not actually
be instantiated.
JaxenException
public void startAdditiveExpr()
throws JaxenException
XPathHandler
startAdditiveExpr in interface XPathHandlerJaxenException
public void endAdditiveExpr(int operator)
throws JaxenException
XPathHandler
endAdditiveExpr in interface XPathHandleroperator - the operator specific to this particular
additive expression. If NO_OP, this expression
is only a pass-through, and should not actually
be instantiated.
JaxenException
public void startMultiplicativeExpr()
throws JaxenException
XPathHandler
startMultiplicativeExpr in interface XPathHandlerJaxenException
public void endMultiplicativeExpr(int operator)
throws JaxenException
XPathHandler
endMultiplicativeExpr in interface XPathHandleroperator - the operator specific to this particular
multiplicative expression. If null, this expression
is only a pass-through, and should not actually
be instantiated.
JaxenException
public void startUnaryExpr()
throws JaxenException
XPathHandler
startUnaryExpr in interface XPathHandlerJaxenException
public void endUnaryExpr(int operator)
throws JaxenException
XPathHandler
endUnaryExpr in interface XPathHandleroperator - the operator specific to this particular
unary expression. If NO_OP, this expression is only
a pass-through, and should not actually be instantiated.
If not Operator.NO_OP, it will
always be Operator.NEGATIVE.
JaxenException
public void startUnionExpr()
throws JaxenException
XPathHandler
startUnionExpr in interface XPathHandlerJaxenException
public void endUnionExpr(boolean create)
throws JaxenException
XPathHandler
endUnionExpr in interface XPathHandlercreate - flag that indicates if this expression
should truly be instantiated, or if it was just
a pass-through, based upon the grammar productions
JaxenException
public void number(int number)
throws JaxenException
XPathHandler
number in interface XPathHandlernumber - the number value
JaxenException
public void number(double number)
throws JaxenException
XPathHandler
number in interface XPathHandlernumber - the number value
JaxenException
public void literal(String literal)
throws JaxenException
XPathHandler
literal in interface XPathHandlerliteral - the string literal value
JaxenException
public void variableReference(String prefix,
String variableName)
throws JaxenException
XPathHandler
variableReference in interface XPathHandlerprefix - the namespace prefix of the variablevariableName - the local name of the variable
JaxenException
public void startFunction(String prefix,
String functionName)
throws JaxenException
XPathHandler
startFunction in interface XPathHandlerprefix - the namespace prefix of the functionfunctionName - the local name of the function
JaxenException
public void endFunction()
throws JaxenException
XPathHandler
endFunction in interface XPathHandlerJaxenException
protected void addParameters(FunctionCallExpr function,
Iterator paramIter)
protected int stackSize()
protected void push(Object obj)
protected Object pop()
protected boolean canPop()
protected void pushFrame()
protected LinkedList popFrame()
protected LinkedList peekFrame()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||