org.jaxen.pattern
Class PatternHandler

java.lang.Object
  extended byorg.jaxen.JaxenHandler
      extended byorg.jaxen.pattern.PatternHandler
All Implemented Interfaces:
org.saxpath.XPathHandler

public class PatternHandler
extends JaxenHandler

SAXPath XPathHandler implementation capable of building Jaxen expression trees which can walk various different object models.

Author:
bob mcwhirter (bob@werken.com)

Field Summary
 
Fields inherited from class org.jaxen.JaxenHandler
simplified, stack
 
Constructor Summary
PatternHandler()
           
 
Method Summary
protected  Pattern createAbsoluteLocationPath()
           
protected  Pattern createRelativeLocationPath()
           
 void endAbsoluteLocationPath()
           
protected  void endLocationPath()
           
 void endPathExpr()
           
 void endRelativeLocationPath()
           
protected  void endStep()
           
 void endUnionExpr(boolean create)
           
 void endXPath()
           
 Pattern getPattern()
          Retrieve the simplified Jaxen Pattern expression tree.
 Pattern getPattern(boolean shouldSimplify)
          Retrieve the Jaxen Pattern expression tree, optionally simplified.
 void startAbsoluteLocationPath()
           
 void startAllNodeStep(int axis)
           
 void startCommentNodeStep(int axis)
           
 void startNameStep(int axis, java.lang.String prefix, java.lang.String localName)
           
 void startProcessingInstructionNodeStep(int axis, java.lang.String name)
           
 void startRelativeLocationPath()
           
 void startTextNodeStep(int axis)
           
 void startUnionExpr()
           
 
Methods inherited from class org.jaxen.JaxenHandler
addParameters, addPredicates, addSteps, canPop, endAdditiveExpr, endAllNodeStep, endAndExpr, endCommentNodeStep, endEqualityExpr, endFilterExpr, endFunction, endMultiplicativeExpr, endNameStep, endOrExpr, endPredicate, endProcessingInstructionNodeStep, endRelationalExpr, endTextNodeStep, endUnaryExpr, getXPathExpr, getXPathExpr, getXPathFactory, literal, number, number, peekFrame, pop, popFrame, push, pushFrame, returnExpr, setXPathFactory, stackSize, startAdditiveExpr, startAndExpr, startEqualityExpr, startFilterExpr, startFunction, startMultiplicativeExpr, startOrExpr, startPathExpr, startPredicate, startRelationalExpr, startUnaryExpr, startXPath, variableReference
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PatternHandler

public PatternHandler()
Method Detail

getPattern

public Pattern getPattern()
Retrieve the simplified Jaxen Pattern expression tree.

This method is only valid once XPathReader.parse(...) successfully returned.

Returns:
The Pattern expression tree.

getPattern

public Pattern getPattern(boolean shouldSimplify)
Retrieve the Jaxen Pattern expression tree, optionally simplified.

This method is only valid once XPathReader.parse(...) successfully returned.

Returns:
The Pattern expression tree.

endXPath

public void endXPath()
              throws JaxenException
Specified by:
endXPath in interface org.saxpath.XPathHandler
Overrides:
endXPath in class JaxenHandler
Throws:
JaxenException

endPathExpr

public void endPathExpr()
                 throws JaxenException
Specified by:
endPathExpr in interface org.saxpath.XPathHandler
Overrides:
endPathExpr in class JaxenHandler
Throws:
JaxenException

startAbsoluteLocationPath

public void startAbsoluteLocationPath()
                               throws JaxenException
Specified by:
startAbsoluteLocationPath in interface org.saxpath.XPathHandler
Overrides:
startAbsoluteLocationPath in class JaxenHandler
Throws:
JaxenException

endAbsoluteLocationPath

public void endAbsoluteLocationPath()
                             throws JaxenException
Specified by:
endAbsoluteLocationPath in interface org.saxpath.XPathHandler
Overrides:
endAbsoluteLocationPath in class JaxenHandler
Throws:
JaxenException

startRelativeLocationPath

public void startRelativeLocationPath()
                               throws JaxenException
Specified by:
startRelativeLocationPath in interface org.saxpath.XPathHandler
Overrides:
startRelativeLocationPath in class JaxenHandler
Throws:
JaxenException

endRelativeLocationPath

public void endRelativeLocationPath()
                             throws JaxenException
Specified by:
endRelativeLocationPath in interface org.saxpath.XPathHandler
Overrides:
endRelativeLocationPath in class JaxenHandler
Throws:
JaxenException

endLocationPath

protected void endLocationPath()
                        throws JaxenException
Overrides:
endLocationPath in class JaxenHandler
Throws:
JaxenException

startNameStep

public void startNameStep(int axis,
                          java.lang.String prefix,
                          java.lang.String localName)
                   throws JaxenException
Specified by:
startNameStep in interface org.saxpath.XPathHandler
Overrides:
startNameStep in class JaxenHandler
Throws:
JaxenException

startTextNodeStep

public void startTextNodeStep(int axis)
                       throws JaxenException
Specified by:
startTextNodeStep in interface org.saxpath.XPathHandler
Overrides:
startTextNodeStep in class JaxenHandler
Throws:
JaxenException

startCommentNodeStep

public void startCommentNodeStep(int axis)
                          throws JaxenException
Specified by:
startCommentNodeStep in interface org.saxpath.XPathHandler
Overrides:
startCommentNodeStep in class JaxenHandler
Throws:
JaxenException

startAllNodeStep

public void startAllNodeStep(int axis)
                      throws JaxenException
Specified by:
startAllNodeStep in interface org.saxpath.XPathHandler
Overrides:
startAllNodeStep in class JaxenHandler
Throws:
JaxenException

startProcessingInstructionNodeStep

public void startProcessingInstructionNodeStep(int axis,
                                               java.lang.String name)
                                        throws JaxenException
Specified by:
startProcessingInstructionNodeStep in interface org.saxpath.XPathHandler
Overrides:
startProcessingInstructionNodeStep in class JaxenHandler
Throws:
JaxenException

endStep

protected void endStep()
Overrides:
endStep in class JaxenHandler

startUnionExpr

public void startUnionExpr()
                    throws JaxenException
Specified by:
startUnionExpr in interface org.saxpath.XPathHandler
Overrides:
startUnionExpr in class JaxenHandler
Throws:
JaxenException

endUnionExpr

public void endUnionExpr(boolean create)
                  throws JaxenException
Specified by:
endUnionExpr in interface org.saxpath.XPathHandler
Overrides:
endUnionExpr in class JaxenHandler
Throws:
JaxenException

createAbsoluteLocationPath

protected Pattern createAbsoluteLocationPath()

createRelativeLocationPath

protected Pattern createRelativeLocationPath()


Copyright © 2002 bob mcwhirter & James Strachan. All Rights Reserved. Hosted by

SourceForge Logo