com.japisoft.xpath
Class TreeXPathResolver

java.lang.Object
  |
  +--com.japisoft.xpath.TreeXPathResolver
All Implemented Interfaces:
XPathResolver

public final class TreeXPathResolver
extends java.lang.Object
implements XPathResolver

Resolver for building a tree

Author:
(c) 2003 JAPISOFT

Field Summary
 
Fields inherited from interface com.japisoft.xpath.XPathResolver
ABBREVIATED_ANCESTOR, ABBREVIATED_ATTRIBUTE, ABBREVIATED_DESCENDANT, ABBREVIATED_NAMETEST, ABBREVIATED_SELF, ADD, AND, DIV, EQUAL, INF, INFE, MINUS, MOD, NOT_EQUAL, OR, STAR, SUP, SUPE, UNION
 
Constructor Summary
TreeXPathResolver()
           
 
Method Summary
 void abbreviatedAxis(java.lang.String axisName)
          '
 void axis(java.lang.String axisName)
          Reset the current axis : ancestor, ancestor-or-self, attribute, child, descendant, descendant-or-self, following, following-sibling, namespace parent, preceding, preceding-sibling, self.
 void binaryOperator(int type)
          Evaluate the current predicate with binary operator
 void binaryOperator(java.lang.String opExt)
          Evaluate the current predicate with this binary operator
 void functionName(java.lang.String qName)
          Current function name
 AbstractNode getRootParsedNode()
          At the end of the parsing process, this value contains the result set
 void literal(java.lang.String literal)
          Current literal
 void nameTest(java.lang.String nameTest, java.lang.String namespacePrefix)
          Reset the nameTest after the axis name.
 void nextExpression()
          Next expression for the predicate
 void nextFunction()
          Evaluate the current function
 void nextLocationPath()
          Prepare the current nodeSet
 void nextParam()
          Add a parameter
 void nextPredicate()
          Prepare the current nodeSet
 void nodeType(java.lang.String nodeType)
          Reset the nodeType : comment , text , processing-instruction , node
 void number(java.lang.String number)
          Current number
 void processingInstruction(java.lang.String name, java.lang.String argument)
          Reset the processing instruction after the axis name
 void root()
          Select the root node
 void unaryOperator(int type)
          Evaluate the current predicate expression with an unary operator
 void variable(java.lang.String name)
          Evaluate the current variable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreeXPathResolver

public TreeXPathResolver()
Method Detail

nextFunction

public void nextFunction()
Description copied from interface: XPathResolver
Evaluate the current function

Specified by:
nextFunction in interface XPathResolver

nextParam

public void nextParam()
Description copied from interface: XPathResolver
Add a parameter

Specified by:
nextParam in interface XPathResolver

functionName

public void functionName(java.lang.String qName)
Description copied from interface: XPathResolver
Current function name

Specified by:
functionName in interface XPathResolver

number

public void number(java.lang.String number)
Description copied from interface: XPathResolver
Current number

Specified by:
number in interface XPathResolver

literal

public void literal(java.lang.String literal)
Description copied from interface: XPathResolver
Current literal

Specified by:
literal in interface XPathResolver

variable

public void variable(java.lang.String name)
Description copied from interface: XPathResolver
Evaluate the current variable

Specified by:
variable in interface XPathResolver

unaryOperator

public void unaryOperator(int type)
Description copied from interface: XPathResolver
Evaluate the current predicate expression with an unary operator

Specified by:
unaryOperator in interface XPathResolver

binaryOperator

public void binaryOperator(java.lang.String opExt)
Description copied from interface: XPathResolver
Evaluate the current predicate with this binary operator

Specified by:
binaryOperator in interface XPathResolver
Parameters:
opExt - can be equal to 'div' or 'mod'

binaryOperator

public void binaryOperator(int type)
Description copied from interface: XPathResolver
Evaluate the current predicate with binary operator

Specified by:
binaryOperator in interface XPathResolver

nodeType

public void nodeType(java.lang.String nodeType)
Description copied from interface: XPathResolver
Reset the nodeType : comment , text , processing-instruction , node

Specified by:
nodeType in interface XPathResolver

processingInstruction

public void processingInstruction(java.lang.String name,
                                  java.lang.String argument)
Description copied from interface: XPathResolver
Reset the processing instruction after the axis name

Specified by:
processingInstruction in interface XPathResolver
Parameters:
name - Processing instruction
argument - Argument for the processing instruction, can be null

nameTest

public void nameTest(java.lang.String nameTest,
                     java.lang.String namespacePrefix)
Description copied from interface: XPathResolver
Reset the nameTest after the axis name. Can be '*'

Specified by:
nameTest in interface XPathResolver

abbreviatedAxis

public void abbreviatedAxis(java.lang.String axisName)
Description copied from interface: XPathResolver
'.', '..', '//'

Specified by:
abbreviatedAxis in interface XPathResolver

axis

public void axis(java.lang.String axisName)
Description copied from interface: XPathResolver
Reset the current axis : ancestor, ancestor-or-self, attribute, child, descendant, descendant-or-self, following, following-sibling, namespace parent, preceding, preceding-sibling, self.

Specified by:
axis in interface XPathResolver

nextPredicate

public void nextPredicate()
Description copied from interface: XPathResolver
Prepare the current nodeSet

Specified by:
nextPredicate in interface XPathResolver

nextExpression

public void nextExpression()
Description copied from interface: XPathResolver
Next expression for the predicate

Specified by:
nextExpression in interface XPathResolver

nextLocationPath

public void nextLocationPath()
Description copied from interface: XPathResolver
Prepare the current nodeSet

Specified by:
nextLocationPath in interface XPathResolver

root

public void root()
Description copied from interface: XPathResolver
Select the root node

Specified by:
root in interface XPathResolver

getRootParsedNode

public AbstractNode getRootParsedNode()
Description copied from interface: XPathResolver
At the end of the parsing process, this value contains the result set

Specified by:
getRootParsedNode in interface XPathResolver
Returns:
the current node set