Package org.jaxen.saxpath.helpers
Class DefaultXPathHandler
- java.lang.Object
-
- org.jaxen.saxpath.helpers.DefaultXPathHandler
-
- All Implemented Interfaces:
XPathHandler
public class DefaultXPathHandler extends java.lang.Object implements XPathHandler
Default base class for SAXPath event handlers. This class is available as a convenience base class for SAXPath applications: it provides a default do-nothing implementation for all of the callbacks in the core SAXPath handler class,XPathHandler. Application writers can extend this class when they need to implement only part of theXPathHandlerinterface. Parser writers can instantiate this class to provide default handlers when the application has not supplied its own.
-
-
Constructor Summary
Constructors Constructor Description DefaultXPathHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidendAbsoluteLocationPath()Receive notification of the end of an absolute location path expression.voidendAdditiveExpr(int operator)Receive notification of the end of an additive ('+' or '-') expression.voidendAllNodeStep()Receive notification of the end of a node() step.voidendAndExpr(boolean create)Receive notification of the end of an 'and' expression.voidendCommentNodeStep()Receive notification of the end of a comment() step.voidendEqualityExpr(int operator)Receive notification of the end of an equality ('=' or '!=') expression.voidendFilterExpr()Receive notification of the end of a filter expression.voidendFunction()Receive notification of the end of a function callvoidendMultiplicativeExpr(int operator)Receive notification of the start of a multiplicative ('*', 'div' or 'mod') expression.voidendNameStep()Receive notification of the end of a NameStepvoidendOrExpr(boolean create)Receive notification of the end of an 'or' expression.voidendPathExpr()Receive notification of the end of a path expression.voidendPredicate()Receive notification of the end of a predicate.voidendProcessingInstructionNodeStep()Receive notification of the end of a processing-instruction(...) step.voidendRelationalExpr(int operator)Receive notification of the start of a relational ('<', '>', '<=', or '>=') expression.voidendRelativeLocationPath()Receive notification of the end of a relative location path expression.voidendTextNodeStep()Receive notification of the end of a text() step.voidendUnaryExpr(int operator)Receive notification of the end of a unary ('+' or '-') expression.voidendUnionExpr(boolean create)Receive notification of the end of a union ('|') expression.voidendXPath()Receive notification of the end of an XPath expression parse.voidliteral(java.lang.String literal)Receive notification of a literal expression.voidnumber(double number)Receive notification of a number expression.voidnumber(int number)Receive notification of a number expression.voidstartAbsoluteLocationPath()Receive notification of the start of an absolute location path expression.voidstartAdditiveExpr()Receive notification of the start of an additive ('+' or '-') expression.voidstartAllNodeStep(int axis)Receive notification of the start of a node() step.voidstartAndExpr()Receive notification of the start of an 'and' expression.voidstartCommentNodeStep(int axis)Receive notification of the start of a comment() step.voidstartEqualityExpr()Receive notification of the start of an equality ('=' or '!=') expression.voidstartFilterExpr()Receive notification of the start of a filter expression.voidstartFunction(java.lang.String prefix, java.lang.String functionName)Receive notification of a function call.voidstartMultiplicativeExpr()Receive notification of the start of a multiplicative ('*', 'div' or 'mod') expression.voidstartNameStep(int axis, java.lang.String prefix, java.lang.String localName)Receive notification of the start of a name step.voidstartOrExpr()Receive notification of the start of an 'or' expression.voidstartPathExpr()Receive notification of the start of a path expression.voidstartPredicate()Receive notification of the start of a predicate.voidstartProcessingInstructionNodeStep(int axis, java.lang.String name)Receive notification of the start of a processing-instruction(...) step.voidstartRelationalExpr()Receive notification of the start of a relational ('<', '>', '<=', or '>=') expression.voidstartRelativeLocationPath()Receive notification of the start of a relative location path expression.voidstartTextNodeStep(int axis)Receive notification of the start of a text() step.voidstartUnaryExpr()Receive notification of the start of a unary ('+' or '-') expression.voidstartUnionExpr()Receive notification of the start of a union ('|') expression.voidstartXPath()Receive notification of the start of an XPath expression parse.voidvariableReference(java.lang.String prefix, java.lang.String variableName)Receive notification of a variable-reference expression.
-
-
-
Method Detail
-
startXPath
public void startXPath() throws SAXPathExceptionDescription copied from interface:XPathHandlerReceive notification of the start of an XPath expression parse.- Specified by:
startXPathin interfaceXPathHandler- Throws:
SAXPathException
-
endXPath
public void endXPath() throws SAXPathExceptionDescription copied from interface:XPathHandlerReceive notification of the end of an XPath expression parse.- Specified by:
endXPathin interfaceXPathHandler- Throws:
SAXPathException
-
startPathExpr
public void startPathExpr() throws SAXPathExceptionDescription copied from interface:XPathHandlerReceive notification of the start of a path expression.- Specified by:
startPathExprin interfaceXPathHandler- Throws:
SAXPathException
-
endPathExpr
public void endPathExpr() throws SAXPathExceptionDescription copied from interface:XPathHandlerReceive notification of the end of a path expression.- Specified by:
endPathExprin interfaceXPathHandler- Throws:
SAXPathException
-
startAbsoluteLocationPath
public void startAbsoluteLocationPath() throws SAXPathExceptionDescription copied from interface:XPathHandlerReceive notification of the start of an absolute location path expression.- Specified by:
startAbsoluteLocationPathin interfaceXPathHandler- Throws:
SAXPathException
-
endAbsoluteLocationPath
public void endAbsoluteLocationPath() throws SAXPathExceptionDescription copied from interface:XPathHandlerReceive notification of the end of an absolute location path expression.- Specified by:
endAbsoluteLocationPathin interfaceXPathHandler- Throws:
SAXPathException
-
startRelativeLocationPath
public void startRelativeLocationPath() throws SAXPathExceptionDescription copied from interface:XPathHandlerReceive notification of the start of a relative location path expression.- Specified by:
startRelativeLocationPathin interfaceXPathHandler- Throws:
SAXPathException
-
endRelativeLocationPath
public void endRelativeLocationPath() throws SAXPathExceptionDescription copied from interface:XPathHandlerReceive notification of the end of a relative location path expression.- Specified by:
endRelativeLocationPathin interfaceXPathHandler- Throws:
SAXPathException
-
startNameStep
public void startNameStep(int axis, java.lang.String prefix, java.lang.String localName) throws SAXPathExceptionDescription copied from interface:XPathHandlerReceive notification of the start of a name step.- Specified by:
startNameStepin interfaceXPathHandler- Parameters:
axis- 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- Throws:
SAXPathException
-
endNameStep
public void endNameStep() throws SAXPathExceptionDescription copied from interface:XPathHandlerReceive notification of the end of a NameStep- Specified by:
endNameStepin interfaceXPathHandler- Throws:
SAXPathException
-
startTextNodeStep
public void startTextNodeStep(int axis) throws SAXPathExceptionDescription copied from interface:XPathHandlerReceive notification of the start of a text() step.- Specified by:
startTextNodeStepin interfaceXPathHandler- Parameters:
axis- the axis of this step- Throws:
SAXPathException
-
endTextNodeStep
public void endTextNodeStep() throws SAXPathExceptionDescription copied from interface:XPathHandlerReceive notification of the end of a text() step.- Specified by:
endTextNodeStepin interfaceXPathHandler- Throws:
SAXPathException
-
startCommentNodeStep
public void startCommentNodeStep(int axis) throws SAXPathExceptionDescription copied from interface:XPathHandlerReceive notification of the start of a comment() step.- Specified by:
startCommentNodeStepin interfaceXPathHandler- Parameters:
axis- the axis of this step- Throws:
SAXPathException
-
endCommentNodeStep
public void endCommentNodeStep() throws SAXPathExceptionDescription copied from interface:XPathHandlerReceive notification of the end of a comment() step.- Specified by:
endCommentNodeStepin interfaceXPathHandler- Throws:
SAXPathException
-
startAllNodeStep
public void startAllNodeStep(int axis) throws SAXPathExceptionDescription copied from interface:XPathHandlerReceive notification of the start of a node() step.- Specified by:
startAllNodeStepin interfaceXPathHandler- Parameters:
axis- the axis of this step- Throws:
SAXPathException
-
endAllNodeStep
public void endAllNodeStep() throws SAXPathExceptionDescription copied from interface:XPathHandlerReceive notification of the end of a node() step.- Specified by:
endAllNodeStepin interfaceXPathHandler- Throws:
SAXPathException
-
startProcessingInstructionNodeStep
public void startProcessingInstructionNodeStep(int axis, java.lang.String name) throws SAXPathExceptionDescription copied from interface:XPathHandlerReceive notification of the start of a processing-instruction(...) step.- Specified by:
startProcessingInstructionNodeStepin interfaceXPathHandler- Parameters:
axis- the axis of this stepname- the name of the processing-instruction, or the empty string if none is specified- Throws:
SAXPathException
-
endProcessingInstructionNodeStep
public void endProcessingInstructionNodeStep() throws SAXPathExceptionDescription copied from interface:XPathHandlerReceive notification of the end of a processing-instruction(...) step.- Specified by:
endProcessingInstructionNodeStepin interfaceXPathHandler- Throws:
SAXPathException
-
startPredicate
public void startPredicate() throws SAXPathExceptionDescription copied from interface:XPathHandlerReceive notification of the start of a predicate.- Specified by:
startPredicatein interfaceXPathHandler- Throws:
SAXPathException
-
endPredicate
public void endPredicate() throws SAXPathExceptionDescription copied from interface:XPathHandlerReceive notification of the end of a predicate.- Specified by:
endPredicatein interfaceXPathHandler- Throws:
SAXPathException
-
startFilterExpr
public void startFilterExpr() throws SAXPathExceptionDescription copied from interface:XPathHandlerReceive notification of the start of a filter expression.- Specified by:
startFilterExprin interfaceXPathHandler- Throws:
SAXPathException
-
endFilterExpr
public void endFilterExpr() throws SAXPathExceptionDescription copied from interface:XPathHandlerReceive notification of the end of a filter expression.- Specified by:
endFilterExprin interfaceXPathHandler- Throws:
SAXPathException
-
startOrExpr
public void startOrExpr() throws SAXPathExceptionDescription copied from interface:XPathHandlerReceive notification of the start of an 'or' expression.- Specified by:
startOrExprin interfaceXPathHandler- Throws:
SAXPathException
-
endOrExpr
public void endOrExpr(boolean create) throws SAXPathExceptionDescription copied from interface:XPathHandlerReceive notification of the end of an 'or' expression.- Specified by:
endOrExprin interfaceXPathHandler- Parameters:
create- flag that indicates if this expression should truly be instantiated, or if it was just a pass-through, based upon the grammar productions- Throws:
SAXPathException
-
startAndExpr
public void startAndExpr() throws SAXPathExceptionDescription copied from interface:XPathHandlerReceive notification of the start of an 'and' expression.- Specified by:
startAndExprin interfaceXPathHandler- Throws:
SAXPathException
-
endAndExpr
public void endAndExpr(boolean create) throws SAXPathExceptionDescription copied from interface:XPathHandlerReceive notification of the end of an 'and' expression.- Specified by:
endAndExprin interfaceXPathHandler- Parameters:
create- flag that indicates if this expression should truly be instantiated, or if it was just a pass-through, based upon the grammar productions- Throws:
SAXPathException
-
startEqualityExpr
public void startEqualityExpr() throws SAXPathExceptionDescription copied from interface:XPathHandlerReceive notification of the start of an equality ('=' or '!=') expression.- Specified by:
startEqualityExprin interfaceXPathHandler- Throws:
SAXPathException
-
endEqualityExpr
public void endEqualityExpr(int operator) throws SAXPathExceptionDescription copied from interface:XPathHandlerReceive notification of the end of an equality ('=' or '!=') expression.- Specified by:
endEqualityExprin interfaceXPathHandler- Parameters:
operator- the operator specific to this particular equality expression. If null, this expression is only a pass-through, and should not actually be instantiated.- Throws:
SAXPathException
-
startRelationalExpr
public void startRelationalExpr() throws SAXPathExceptionDescription copied from interface:XPathHandlerReceive notification of the start of a relational ('<', '>', '<=', or '>=') expression.- Specified by:
startRelationalExprin interfaceXPathHandler- Throws:
SAXPathException
-
endRelationalExpr
public void endRelationalExpr(int operator) throws SAXPathExceptionDescription copied from interface:XPathHandlerReceive notification of the start of a relational ('<', '>', '<=', or '>=') expression.- Specified by:
endRelationalExprin interfaceXPathHandler- Parameters:
operator- the operator specific to this particular relational expression. If NO_OP, this expression is only a pass-through, and should not actually be instantiated.- Throws:
SAXPathException
-
startAdditiveExpr
public void startAdditiveExpr() throws SAXPathExceptionDescription copied from interface:XPathHandlerReceive notification of the start of an additive ('+' or '-') expression.- Specified by:
startAdditiveExprin interfaceXPathHandler- Throws:
SAXPathException
-
endAdditiveExpr
public void endAdditiveExpr(int operator) throws SAXPathExceptionDescription copied from interface:XPathHandlerReceive notification of the end of an additive ('+' or '-') expression.- Specified by:
endAdditiveExprin interfaceXPathHandler- Parameters:
operator- the operator specific to this particular additive expression. If NO_OP, this expression is only a pass-through, and should not actually be instantiated.- Throws:
SAXPathException
-
startMultiplicativeExpr
public void startMultiplicativeExpr() throws SAXPathExceptionDescription copied from interface:XPathHandlerReceive notification of the start of a multiplicative ('*', 'div' or 'mod') expression.- Specified by:
startMultiplicativeExprin interfaceXPathHandler- Throws:
SAXPathException
-
endMultiplicativeExpr
public void endMultiplicativeExpr(int operator) throws SAXPathExceptionDescription copied from interface:XPathHandlerReceive notification of the start of a multiplicative ('*', 'div' or 'mod') expression.- Specified by:
endMultiplicativeExprin interfaceXPathHandler- Parameters:
operator- the operator specific to this particular multiplicative expression. If null, this expression is only a pass-through, and should not actually be instantiated.- Throws:
SAXPathException
-
startUnaryExpr
public void startUnaryExpr() throws SAXPathExceptionDescription copied from interface:XPathHandlerReceive notification of the start of a unary ('+' or '-') expression.- Specified by:
startUnaryExprin interfaceXPathHandler- Throws:
SAXPathException
-
endUnaryExpr
public void endUnaryExpr(int operator) throws SAXPathExceptionDescription copied from interface:XPathHandlerReceive notification of the end of a unary ('+' or '-') expression.- Specified by:
endUnaryExprin interfaceXPathHandler- Parameters:
operator- 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 notOperator.NO_OP, it will always beOperator.NEGATIVE.- Throws:
SAXPathException
-
startUnionExpr
public void startUnionExpr() throws SAXPathExceptionDescription copied from interface:XPathHandlerReceive notification of the start of a union ('|') expression.- Specified by:
startUnionExprin interfaceXPathHandler- Throws:
SAXPathException
-
endUnionExpr
public void endUnionExpr(boolean create) throws SAXPathExceptionDescription copied from interface:XPathHandlerReceive notification of the end of a union ('|') expression.- Specified by:
endUnionExprin interfaceXPathHandler- Parameters:
create- flag that indicates if this expression should truly be instantiated, or if it was just a pass-through, based upon the grammar productions- Throws:
SAXPathException
-
number
public void number(int number) throws SAXPathExceptionDescription copied from interface:XPathHandlerReceive notification of a number expression.- Specified by:
numberin interfaceXPathHandler- Parameters:
number- the number value- Throws:
SAXPathException
-
number
public void number(double number) throws SAXPathExceptionDescription copied from interface:XPathHandlerReceive notification of a number expression.- Specified by:
numberin interfaceXPathHandler- Parameters:
number- the number value- Throws:
SAXPathException
-
literal
public void literal(java.lang.String literal) throws SAXPathExceptionDescription copied from interface:XPathHandlerReceive notification of a literal expression.- Specified by:
literalin interfaceXPathHandler- Parameters:
literal- the string literal value- Throws:
SAXPathException
-
variableReference
public void variableReference(java.lang.String prefix, java.lang.String variableName) throws SAXPathExceptionDescription copied from interface:XPathHandlerReceive notification of a variable-reference expression.- Specified by:
variableReferencein interfaceXPathHandler- Parameters:
prefix- the namespace prefix of the variablevariableName- the local name of the variable- Throws:
SAXPathException
-
startFunction
public void startFunction(java.lang.String prefix, java.lang.String functionName) throws SAXPathExceptionDescription copied from interface:XPathHandlerReceive notification of a function call.- Specified by:
startFunctionin interfaceXPathHandler- Parameters:
prefix- the namespace prefix of the functionfunctionName- the local name of the function- Throws:
SAXPathException
-
endFunction
public void endFunction() throws SAXPathExceptionDescription copied from interface:XPathHandlerReceive notification of the end of a function call- Specified by:
endFunctionin interfaceXPathHandler- Throws:
SAXPathException
-
-