Class DefaultXPathHandler
java.lang.Object
org.jaxen.saxpath.helpers.DefaultXPathHandler
- All Implemented Interfaces:
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 the XPathHandler
interface. Parser writers can instantiate
this class to provide default handlers when the application has not
supplied its own.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidReceive notification of the end of an absolute location path expression.voidendAdditiveExpr(int operator) Receive notification of the end of an additive ('+' or '-') expression.voidReceive notification of the end of a node() step.voidendAndExpr(boolean create) Receive notification of the end of an 'and' expression.voidReceive notification of the end of a comment() step.voidendEqualityExpr(int operator) Receive notification of the end of an equality ('=' or '!=') expression.voidReceive notification of the end of a filter expression.voidReceive notification of the end of a function callvoidendMultiplicativeExpr(int operator) Receive notification of the start of a multiplicative ('*', 'div' or 'mod') expression.voidReceive notification of the end of a NameStepvoidendOrExpr(boolean create) Receive notification of the end of an 'or' expression.voidReceive notification of the end of a path expression.voidReceive notification of the end of a predicate.voidReceive notification of the end of a processing-instruction(...) step.voidendRelationalExpr(int operator) Receive notification of the start of a relational ('<', '>', '<=', or '>=') expression.voidReceive notification of the end of a relative location path expression.voidReceive 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.voidReceive notification of a literal expression.voidnumber(double number) Receive notification of a number expression.voidnumber(int number) Receive notification of a number expression.voidReceive notification of the start of an absolute location path expression.voidReceive notification of the start of an additive ('+' or '-') expression.voidstartAllNodeStep(int axis) Receive notification of the start of a node() step.voidReceive notification of the start of an 'and' expression.voidstartCommentNodeStep(int axis) Receive notification of the start of a comment() step.voidReceive notification of the start of an equality ('=' or '!=') expression.voidReceive notification of the start of a filter expression.voidstartFunction(String prefix, String functionName) Receive notification of a function call.voidReceive notification of the start of a multiplicative ('*', 'div' or 'mod') expression.voidstartNameStep(int axis, String prefix, String localName) Receive notification of the start of a name step.voidReceive notification of the start of an 'or' expression.voidReceive notification of the start of a path expression.voidReceive notification of the start of a predicate.voidstartProcessingInstructionNodeStep(int axis, String name) Receive notification of the start of a processing-instruction(...) step.voidReceive notification of the start of a relational ('<', '>', '<=', or '>=') expression.voidReceive notification of the start of a relative location path expression.voidstartTextNodeStep(int axis) Receive notification of the start of a text() step.voidReceive notification of the start of a unary ('+' or '-') expression.voidReceive notification of the start of a union ('|') expression.voidReceive notification of the start of an XPath expression parse.voidvariableReference(String prefix, String variableName) Receive notification of a variable-reference expression.
-
Constructor Details
-
DefaultXPathHandler
public DefaultXPathHandler()
-
-
Method Details
-
startXPath
Description copied from interface:XPathHandlerReceive notification of the start of an XPath expression parse.- Specified by:
startXPathin interfaceXPathHandler- Throws:
SAXPathException
-
endXPath
Description copied from interface:XPathHandlerReceive notification of the end of an XPath expression parse.- Specified by:
endXPathin interfaceXPathHandler- Throws:
SAXPathException
-
startPathExpr
Description copied from interface:XPathHandlerReceive notification of the start of a path expression.- Specified by:
startPathExprin interfaceXPathHandler- Throws:
SAXPathException
-
endPathExpr
Description copied from interface:XPathHandlerReceive notification of the end of a path expression.- Specified by:
endPathExprin interfaceXPathHandler- Throws:
SAXPathException
-
startAbsoluteLocationPath
Description copied from interface:XPathHandlerReceive notification of the start of an absolute location path expression.- Specified by:
startAbsoluteLocationPathin interfaceXPathHandler- Throws:
SAXPathException
-
endAbsoluteLocationPath
Description copied from interface:XPathHandlerReceive notification of the end of an absolute location path expression.- Specified by:
endAbsoluteLocationPathin interfaceXPathHandler- Throws:
SAXPathException
-
startRelativeLocationPath
Description copied from interface:XPathHandlerReceive notification of the start of a relative location path expression.- Specified by:
startRelativeLocationPathin interfaceXPathHandler- Throws:
SAXPathException
-
endRelativeLocationPath
Description copied from interface:XPathHandlerReceive notification of the end of a relative location path expression.- Specified by:
endRelativeLocationPathin interfaceXPathHandler- Throws:
SAXPathException
-
startNameStep
Description 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
Description copied from interface:XPathHandlerReceive notification of the end of a NameStep- Specified by:
endNameStepin interfaceXPathHandler- Throws:
SAXPathException
-
startTextNodeStep
Description 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
Description copied from interface:XPathHandlerReceive notification of the end of a text() step.- Specified by:
endTextNodeStepin interfaceXPathHandler- Throws:
SAXPathException
-
startCommentNodeStep
Description 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
Description copied from interface:XPathHandlerReceive notification of the end of a comment() step.- Specified by:
endCommentNodeStepin interfaceXPathHandler- Throws:
SAXPathException
-
startAllNodeStep
Description 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
Description copied from interface:XPathHandlerReceive notification of the end of a node() step.- Specified by:
endAllNodeStepin interfaceXPathHandler- Throws:
SAXPathException
-
startProcessingInstructionNodeStep
Description 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
Description copied from interface:XPathHandlerReceive notification of the end of a processing-instruction(...) step.- Specified by:
endProcessingInstructionNodeStepin interfaceXPathHandler- Throws:
SAXPathException
-
startPredicate
Description copied from interface:XPathHandlerReceive notification of the start of a predicate.- Specified by:
startPredicatein interfaceXPathHandler- Throws:
SAXPathException
-
endPredicate
Description copied from interface:XPathHandlerReceive notification of the end of a predicate.- Specified by:
endPredicatein interfaceXPathHandler- Throws:
SAXPathException
-
startFilterExpr
Description copied from interface:XPathHandlerReceive notification of the start of a filter expression.- Specified by:
startFilterExprin interfaceXPathHandler- Throws:
SAXPathException
-
endFilterExpr
Description copied from interface:XPathHandlerReceive notification of the end of a filter expression.- Specified by:
endFilterExprin interfaceXPathHandler- Throws:
SAXPathException
-
startOrExpr
Description copied from interface:XPathHandlerReceive notification of the start of an 'or' expression.- Specified by:
startOrExprin interfaceXPathHandler- Throws:
SAXPathException
-
endOrExpr
Description 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
Description copied from interface:XPathHandlerReceive notification of the start of an 'and' expression.- Specified by:
startAndExprin interfaceXPathHandler- Throws:
SAXPathException
-
endAndExpr
Description 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
Description copied from interface:XPathHandlerReceive notification of the start of an equality ('=' or '!=') expression.- Specified by:
startEqualityExprin interfaceXPathHandler- Throws:
SAXPathException
-
endEqualityExpr
Description 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
Description copied from interface:XPathHandlerReceive notification of the start of a relational ('<', '>', '<=', or '>=') expression.- Specified by:
startRelationalExprin interfaceXPathHandler- Throws:
SAXPathException
-
endRelationalExpr
Description 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
Description copied from interface:XPathHandlerReceive notification of the start of an additive ('+' or '-') expression.- Specified by:
startAdditiveExprin interfaceXPathHandler- Throws:
SAXPathException
-
endAdditiveExpr
Description 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
Description copied from interface:XPathHandlerReceive notification of the start of a multiplicative ('*', 'div' or 'mod') expression.- Specified by:
startMultiplicativeExprin interfaceXPathHandler- Throws:
SAXPathException
-
endMultiplicativeExpr
Description 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
Description copied from interface:XPathHandlerReceive notification of the start of a unary ('+' or '-') expression.- Specified by:
startUnaryExprin interfaceXPathHandler- Throws:
SAXPathException
-
endUnaryExpr
Description 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
Description copied from interface:XPathHandlerReceive notification of the start of a union ('|') expression.- Specified by:
startUnionExprin interfaceXPathHandler- Throws:
SAXPathException
-
endUnionExpr
Description 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
Description copied from interface:XPathHandlerReceive notification of a number expression.- Specified by:
numberin interfaceXPathHandler- Parameters:
number- the number value- Throws:
SAXPathException
-
number
Description copied from interface:XPathHandlerReceive notification of a number expression.- Specified by:
numberin interfaceXPathHandler- Parameters:
number- the number value- Throws:
SAXPathException
-
literal
Description copied from interface:XPathHandlerReceive notification of a literal expression.- Specified by:
literalin interfaceXPathHandler- Parameters:
literal- the string literal value- Throws:
SAXPathException
-
variableReference
Description 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
Description 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
Description copied from interface:XPathHandlerReceive notification of the end of a function call- Specified by:
endFunctionin interfaceXPathHandler- Throws:
SAXPathException
-