com.ricebridge.xmlman.in
Class PathContext

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

public class PathContext
extends Object

Describes parse state of TargetPath.


Constructor Summary
PathContext(int pStartDepth, PathContext pPathContext)
          Create a copy with different start depth.
PathContext(TargetPath pTargetPath, int pDepth, DocContext pDocContext)
          Create from TargetPath for current document context.
 
Method Summary
 void ascend(TargetPath pTargetPath)
          Move to previous path part.
 void clear(TargetPath pTargetPath)
          Clear data values and match state.
 void clearPredicateSubPaths(DocContext pDocContext)
          Clear data values from sub paths that are in predicates.
 void clearValue()
          Clear the data value.
 void descend(TargetPath pTargetPath, int pDepth, DocContext pDocContext)
          Move to next search part.
 PathPart getChild(TargetPath pTargetPath)
          Get the path part following the current one.
 com.ricebridge.xmlman.tp.Context getContext()
          Get the current Jaxen Context.
 int getMatchCount()
          Get the number of times this path matched.
 int getMatchDepth()
          Get the depth at which a match was found.
 PathPart getParent()
          Get the previous path part.
 int getParentMatchDepth()
          Get the depth at which the previous part matched.
 int getPartPosition()
          get the current part position.
 PathPart getSearch()
          Get the currently searching path part.
 int getSearchMatchDepth()
          get the depth at which the current searching part matched.
 int getSearchStartDepth()
          get the depth at which the current searching part started searching.
 int getStartDepth()
          Get the depth at which searching started.
 TextAppender getTextAppender()
          Get the current TextAppender.
 Object getValue(TargetPath pTargetPath)
          Get the current data value.
 void handleTarget(TargetPath pTargetPath, EndPoint pEndPoint)
          On match of target element end tag, collect text value.
 void handleTarget(TargetPath pTargetPath, StartPoint pStartPoint, int pDepth, DocContext pDocContext)
          On match of target element start tag (final path part), collect values.
 boolean hasChild(TargetPath pTargetPath)
          Current path part has a following path part.
 boolean hasParent()
          Check for previous path part.
 boolean hasSearch()
          Check for current searching part.
 void incrementMatchCount()
          increment the match count.
 boolean matchConditions(TargetPath pTargetPath, DocContext pDocContext)
          Test for match of conditions on all path parts.
 void revokeValue(TargetPath pTargetPath)
          Reset data value to previous value.
 void setIgnoreClear(boolean pIgnoreClear)
          Ignore requests to clear data values and match state.
 void setMatchDepth(int pMatchDepth)
          Set the depth at which a match was found.
 void setStartDepth(int pStartDepth)
          Set the depth at which this path started searching.
 String toString()
          Debugging description.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PathContext

public PathContext(TargetPath pTargetPath,
                   int pDepth,
                   DocContext pDocContext)
Create from TargetPath for current document context.


PathContext

public PathContext(int pStartDepth,
                   PathContext pPathContext)
Create a copy with different start depth.

Method Detail

descend

public void descend(TargetPath pTargetPath,
                    int pDepth,
                    DocContext pDocContext)
Move to next search part.


ascend

public void ascend(TargetPath pTargetPath)
Move to previous path part.


clearPredicateSubPaths

public void clearPredicateSubPaths(DocContext pDocContext)
Clear data values from sub paths that are in predicates.


getMatchCount

public int getMatchCount()
Get the number of times this path matched.


incrementMatchCount

public void incrementMatchCount()
increment the match count.


setIgnoreClear

public void setIgnoreClear(boolean pIgnoreClear)
Ignore requests to clear data values and match state.


clear

public void clear(TargetPath pTargetPath)
Clear data values and match state.


revokeValue

public void revokeValue(TargetPath pTargetPath)
Reset data value to previous value.


setStartDepth

public void setStartDepth(int pStartDepth)
Set the depth at which this path started searching.


getPartPosition

public int getPartPosition()
get the current part position.


getParentMatchDepth

public int getParentMatchDepth()
Get the depth at which the previous part matched.


getSearchMatchDepth

public int getSearchMatchDepth()
get the depth at which the current searching part matched.


getSearchStartDepth

public int getSearchStartDepth()
get the depth at which the current searching part started searching.


getParent

public PathPart getParent()
Get the previous path part.


hasParent

public boolean hasParent()
Check for previous path part.


getSearch

public PathPart getSearch()
Get the currently searching path part.


hasSearch

public boolean hasSearch()
Check for current searching part.


hasChild

public boolean hasChild(TargetPath pTargetPath)
Current path part has a following path part.


getChild

public PathPart getChild(TargetPath pTargetPath)
Get the path part following the current one.


setMatchDepth

public void setMatchDepth(int pMatchDepth)
Set the depth at which a match was found.


getMatchDepth

public int getMatchDepth()
Get the depth at which a match was found.


getStartDepth

public int getStartDepth()
Get the depth at which searching started.


getValue

public Object getValue(TargetPath pTargetPath)
Get the current data value.


clearValue

public void clearValue()
Clear the data value.


getContext

public com.ricebridge.xmlman.tp.Context getContext()
Get the current Jaxen Context.


getTextAppender

public TextAppender getTextAppender()
Get the current TextAppender.


toString

public String toString()
Debugging description.


handleTarget

public void handleTarget(TargetPath pTargetPath,
                         StartPoint pStartPoint,
                         int pDepth,
                         DocContext pDocContext)
On match of target element start tag (final path part), collect values.


handleTarget

public void handleTarget(TargetPath pTargetPath,
                         EndPoint pEndPoint)
On match of target element end tag, collect text value.


matchConditions

public boolean matchConditions(TargetPath pTargetPath,
                               DocContext pDocContext)
Test for match of conditions on all path parts.



Copyright © 2004-2005 Ricebridge