com.ricebridge.xmlman.in
Class ExprWalker

java.lang.Object
  extended bycom.ricebridge.xmlman.in.ExprWalker

public class ExprWalker
extends Object

Walk the XPath expression data structure created by Jaxen and turn it into a list of TargetPaths.


Constructor Summary
ExprWalker(Map pNamespaceMap, Map pFunctionMap, String pRicebridgePrefix, boolean pNamespaceAware)
          Create an ExprWalker with specified settings originally from XmlSpec.
 
Method Summary
 void makeAnyNode(com.ricebridge.xmlman.tp.expr.AllNodeStep pAllNodeStep, int pType)
          Create path part that matches any name.
 void makeAttribute(com.ricebridge.xmlman.tp.expr.NameStep pNameStep)
          Specify that current TargetPath matches an attribute.
 void makeChild(com.ricebridge.xmlman.tp.expr.NameStep pNameStep)
          Create a path path that matches a child name.
 void makeDescendant(com.ricebridge.xmlman.tp.expr.NameStep pNameStep, boolean pTransfered)
          Create a path part that matches descendants.
 void makeDescendantOrSelf(com.ricebridge.xmlman.tp.expr.NameStep pNameStep, boolean pTransfered)
          Create a path part that matches descendants or self.
 void makeNamespace(com.ricebridge.xmlman.tp.expr.NameStep pNameStep)
          Specify that current TargetPath matches a namespace.
 List makePaths(com.ricebridge.xmlman.tp.expr.Expr pExpr, boolean pSplitOnDescend)
          Create the TargetPath list.
 void makeText(com.ricebridge.xmlman.tp.expr.TextNodeStep pTextNodeStep)
          Specify that current TargetPath matches text.
 void walkBinary(com.ricebridge.xmlman.tp.expr.BinaryExpr pBinaryExpr, boolean pTopLevel, Condition pCondition)
          Handle a binary expression.
 void walkExpr(com.ricebridge.xmlman.tp.expr.Expr pExpr, boolean pTopLevel)
          Start walking at the top.
 void walkExpr(com.ricebridge.xmlman.tp.expr.Expr pExpr, boolean pTopLevel, boolean pTargetIsXml, Condition pCondition)
          Generic expression handler.
 void walkExpr(com.ricebridge.xmlman.tp.expr.Expr pExpr, Condition pCondition)
           
 void walkFunction(com.ricebridge.xmlman.tp.expr.FunctionCallExpr pFunctionCallExpr, boolean pTopLevel, Condition pCondition)
          Handle a function.
 void walkLocationPath(com.ricebridge.xmlman.tp.expr.LocationPath pLocationPath, boolean pTopLevel, boolean pTargetIsXml, Condition pCondition)
          Walk a location path - this creates a TargetPath.
 void walkNameStep(com.ricebridge.xmlman.tp.expr.NameStep pNameStep, int pAxis)
          Handle a generic name step.
 void walkPredicate(com.ricebridge.xmlman.tp.expr.Predicate pPredicate, Condition pCondition)
          Handle a predicate expression.
 void walkPredicates(com.ricebridge.xmlman.tp.expr.Predicated pPredicated, PathPart pPathPart)
          Dive into the predicate expressions.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExprWalker

public ExprWalker(Map pNamespaceMap,
                  Map pFunctionMap,
                  String pRicebridgePrefix,
                  boolean pNamespaceAware)
Create an ExprWalker with specified settings originally from XmlSpec.

Method Detail

makePaths

public List makePaths(com.ricebridge.xmlman.tp.expr.Expr pExpr,
                      boolean pSplitOnDescend)
Create the TargetPath list.

Splitting the TargetPaths on descend parts allows the preceding parts to continue matching.

Parameters:
pExpr - Jaxen expression
pSplitOnDescend - split TargetPaths that contain descend parts

walkExpr

public void walkExpr(com.ricebridge.xmlman.tp.expr.Expr pExpr,
                     boolean pTopLevel)
Start walking at the top.


walkExpr

public void walkExpr(com.ricebridge.xmlman.tp.expr.Expr pExpr,
                     Condition pCondition)

walkExpr

public void walkExpr(com.ricebridge.xmlman.tp.expr.Expr pExpr,
                     boolean pTopLevel,
                     boolean pTargetIsXml,
                     Condition pCondition)
Generic expression handler.


walkLocationPath

public void walkLocationPath(com.ricebridge.xmlman.tp.expr.LocationPath pLocationPath,
                             boolean pTopLevel,
                             boolean pTargetIsXml,
                             Condition pCondition)
Walk a location path - this creates a TargetPath.


walkNameStep

public void walkNameStep(com.ricebridge.xmlman.tp.expr.NameStep pNameStep,
                         int pAxis)
Handle a generic name step.


walkPredicates

public void walkPredicates(com.ricebridge.xmlman.tp.expr.Predicated pPredicated,
                           PathPart pPathPart)
Dive into the predicate expressions.


walkPredicate

public void walkPredicate(com.ricebridge.xmlman.tp.expr.Predicate pPredicate,
                          Condition pCondition)
Handle a predicate expression.


walkBinary

public void walkBinary(com.ricebridge.xmlman.tp.expr.BinaryExpr pBinaryExpr,
                       boolean pTopLevel,
                       Condition pCondition)
Handle a binary expression.


walkFunction

public void walkFunction(com.ricebridge.xmlman.tp.expr.FunctionCallExpr pFunctionCallExpr,
                         boolean pTopLevel,
                         Condition pCondition)
Handle a function.


makeAnyNode

public void makeAnyNode(com.ricebridge.xmlman.tp.expr.AllNodeStep pAllNodeStep,
                        int pType)
Create path part that matches any name.


makeChild

public void makeChild(com.ricebridge.xmlman.tp.expr.NameStep pNameStep)
Create a path path that matches a child name.


makeDescendantOrSelf

public void makeDescendantOrSelf(com.ricebridge.xmlman.tp.expr.NameStep pNameStep,
                                 boolean pTransfered)
Create a path part that matches descendants or self.


makeDescendant

public void makeDescendant(com.ricebridge.xmlman.tp.expr.NameStep pNameStep,
                           boolean pTransfered)
Create a path part that matches descendants.


makeAttribute

public void makeAttribute(com.ricebridge.xmlman.tp.expr.NameStep pNameStep)
Specify that current TargetPath matches an attribute.


makeNamespace

public void makeNamespace(com.ricebridge.xmlman.tp.expr.NameStep pNameStep)
Specify that current TargetPath matches a namespace.


makeText

public void makeText(com.ricebridge.xmlman.tp.expr.TextNodeStep pTextNodeStep)
Specify that current TargetPath matches text.



Copyright © 2004-2005 Ricebridge