com.ricebridge.xmlman.in
Class PathPart

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

public class PathPart
extends Object

Represents a node in search tree.


Field Summary
static PathPart NONE
          Empty node.
 
Constructor Summary
PathPart(String pLocalName, int pType)
          Convenience constructor.
PathPart(String pLocalName, int pType, int pTest)
          Convenience constructor.
PathPart(String pLocalName, String pPrefix, int pType, int pTest, boolean pNamespaceAware)
          Define a search node in the TargetPath.
 
Method Summary
 void clearPredicateSubPaths(DocContext pDocContext)
          Clear the TargetPath data values of paths that are in the condition predicate of this path part.
 Condition getCondition()
          Get the Condition that this node must satisfy.
 boolean getContinueAfterMatch()
          Get continue searching after match setting.
 String getLocalName()
          Get the localname of the nodes that this part matches.
 String getNamespaceURI()
          Get the URI of the namespace that this part requires.
 String getPrefix()
          Get the namespace prefix of the nodes that this part matches.
 String getQName()
          Get the qualified named (prefix:localname) of the nodes that this part matches.
 int getTest()
          Get the node test, for example CoreDef.ANY.
 int getType()
          Get the node match type, for example CoreDef.CHILD.
 boolean match(PartContext pPartContext, DocContext pDocContext)
          Check whether the condition of this part matches against the current parse context.
 void resolveURI(Map pNamespaceMap)
          Store namespace associated with prefix provided in constructor.
 void setCondition(Condition pCondition)
          Set the Condition that this node must satisfy, can be null.
 void setContinueAfterMatch(boolean pContinueAfterMatch)
          Continue searching after match found, used for descendant axis.
 String toString()
          Debugging description.
 PathPart unconditionalDuplicate()
          Create a new part with same match criteria as this one, but no conditions.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NONE

public static final PathPart NONE
Empty node.

Constructor Detail

PathPart

public PathPart(String pLocalName,
                int pType)
Convenience constructor.

See Also:
PathPart(String,String,int,int,boolean)

PathPart

public PathPart(String pLocalName,
                int pType,
                int pTest)
Convenience constructor.

See Also:
PathPart(String,String,int,int,boolean)

PathPart

public PathPart(String pLocalName,
                String pPrefix,
                int pType,
                int pTest,
                boolean pNamespaceAware)
Define a search node in the TargetPath.

Parameters:
pLocalName - element tag local name
pPrefix - element tag prefix
pType - node type (for example: CoreDef.CHILD)
pTest - node text (for example: CoreDef.ANY)
pNamespaceAware - localname is qname
Method Detail

resolveURI

public void resolveURI(Map pNamespaceMap)
Store namespace associated with prefix provided in constructor.


setContinueAfterMatch

public void setContinueAfterMatch(boolean pContinueAfterMatch)
Continue searching after match found, used for descendant axis.


getContinueAfterMatch

public boolean getContinueAfterMatch()
Get continue searching after match setting.

See Also:
setContinueAfterMatch(boolean)

unconditionalDuplicate

public PathPart unconditionalDuplicate()
Create a new part with same match criteria as this one, but no conditions.


getType

public int getType()
Get the node match type, for example CoreDef.CHILD.


getTest

public int getTest()
Get the node test, for example CoreDef.ANY.


getLocalName

public String getLocalName()
Get the localname of the nodes that this part matches.


getPrefix

public String getPrefix()
Get the namespace prefix of the nodes that this part matches.


getQName

public String getQName()
Get the qualified named (prefix:localname) of the nodes that this part matches.


getNamespaceURI

public String getNamespaceURI()
Get the URI of the namespace that this part requires.


setCondition

public void setCondition(Condition pCondition)
Set the Condition that this node must satisfy, can be null.


getCondition

public Condition getCondition()
Get the Condition that this node must satisfy.

NOTE: may be null if there is no condition.


clearPredicateSubPaths

public void clearPredicateSubPaths(DocContext pDocContext)
Clear the TargetPath data values of paths that are in the condition predicate of this path part.


match

public boolean match(PartContext pPartContext,
                     DocContext pDocContext)
Check whether the condition of this part matches against the current parse context.

If no condition, always match.


toString

public String toString()
Debugging description.



Copyright © 2004-2005 Ricebridge