org.jaxen.saxpath.base
Class XPathReader

java.lang.Object
  |
  +--org.jaxen.saxpath.base.XPathReader
All Implemented Interfaces:
SAXPathEventSource, org.jaxen.saxpath.base.TokenTypes, XPathReader

public class XPathReader
extends Object
implements XPathReader, org.jaxen.saxpath.base.TokenTypes

Implementation of SAXPath's XPathReader which generates callbacks to an XPathHandler.

Author:
bob mcwhirter (bob@werken.com)

Field Summary
static int AND
           
static int AT
           
static int COLON
           
static int COMMA
           
static int DIV
           
static int DOLLAR
           
static int DOT
           
static int DOT_DOT
           
static int DOUBLE
           
static int DOUBLE_COLON
           
static int DOUBLE_SLASH
           
static int EOF
           
static int EQUALS
           
static int GREATER_THAN
           
static int GREATER_THAN_EQUALS
           
static int IDENTIFIER
           
static int INTEGER
           
static int LEFT_BRACKET
           
static int LEFT_PAREN
           
static int LESS_THAN
           
static int LESS_THAN_EQUALS
           
static int LITERAL
           
static int MINUS
           
static int MOD
           
static int NOT
           
static int NOT_EQUALS
           
static int OR
           
static int PIPE
           
static int PLUS
           
static int RIGHT_BRACKET
           
static int RIGHT_PAREN
           
static int SKIP
           
static int SLASH
           
static int STAR
           
 
Constructor Summary
XPathReader()
           
 
Method Summary
 XPathHandler getXPathHandler()
          Retrieve the current XPathHandler which receives the event callbacks.
 void parse(String xpath)
          Perform parsing of the textual XPath expression, and produce event callbacks to an XPathHandler.
 void setXPathHandler(XPathHandler handler)
          Set the XPathHandler to receive event callbacks during the parse.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LEFT_PAREN

public static final int LEFT_PAREN
See Also:
Constant Field Values

RIGHT_PAREN

public static final int RIGHT_PAREN
See Also:
Constant Field Values

LEFT_BRACKET

public static final int LEFT_BRACKET
See Also:
Constant Field Values

RIGHT_BRACKET

public static final int RIGHT_BRACKET
See Also:
Constant Field Values

PLUS

public static final int PLUS
See Also:
Constant Field Values

MINUS

public static final int MINUS
See Also:
Constant Field Values

LESS_THAN

public static final int LESS_THAN
See Also:
Constant Field Values

LESS_THAN_EQUALS

public static final int LESS_THAN_EQUALS
See Also:
Constant Field Values

GREATER_THAN

public static final int GREATER_THAN
See Also:
Constant Field Values

GREATER_THAN_EQUALS

public static final int GREATER_THAN_EQUALS
See Also:
Constant Field Values

SLASH

public static final int SLASH
See Also:
Constant Field Values

DOUBLE_SLASH

public static final int DOUBLE_SLASH
See Also:
Constant Field Values

DOT

public static final int DOT
See Also:
Constant Field Values

DOT_DOT

public static final int DOT_DOT
See Also:
Constant Field Values

IDENTIFIER

public static final int IDENTIFIER
See Also:
Constant Field Values

AT

public static final int AT
See Also:
Constant Field Values

PIPE

public static final int PIPE
See Also:
Constant Field Values

COLON

public static final int COLON
See Also:
Constant Field Values

DOUBLE_COLON

public static final int DOUBLE_COLON
See Also:
Constant Field Values

STAR

public static final int STAR
See Also:
Constant Field Values

EQUALS

public static final int EQUALS
See Also:
Constant Field Values

NOT_EQUALS

public static final int NOT_EQUALS
See Also:
Constant Field Values

NOT

public static final int NOT
See Also:
Constant Field Values

DIV

public static final int DIV
See Also:
Constant Field Values

MOD

public static final int MOD
See Also:
Constant Field Values

DOLLAR

public static final int DOLLAR
See Also:
Constant Field Values

LITERAL

public static final int LITERAL
See Also:
Constant Field Values

AND

public static final int AND
See Also:
Constant Field Values

OR

public static final int OR
See Also:
Constant Field Values

INTEGER

public static final int INTEGER
See Also:
Constant Field Values

DOUBLE

public static final int DOUBLE
See Also:
Constant Field Values

COMMA

public static final int COMMA
See Also:
Constant Field Values

SKIP

public static final int SKIP
See Also:
Constant Field Values

EOF

public static final int EOF
See Also:
Constant Field Values
Constructor Detail

XPathReader

public XPathReader()
Method Detail

setXPathHandler

public void setXPathHandler(XPathHandler handler)
Description copied from interface: SAXPathEventSource
Set the XPathHandler to receive event callbacks during the parse.

Specified by:
setXPathHandler in interface SAXPathEventSource
Parameters:
handler - The handler to receive callbacks.

getXPathHandler

public XPathHandler getXPathHandler()
Description copied from interface: SAXPathEventSource
Retrieve the current XPathHandler which receives the event callbacks.

Specified by:
getXPathHandler in interface SAXPathEventSource
Returns:
The currently installed XPathHandler.

parse

public void parse(String xpath)
           throws SAXPathException
Description copied from interface: XPathReader
Perform parsing of the textual XPath expression, and produce event callbacks to an XPathHandler.

Specified by:
parse in interface XPathReader
Parameters:
xpath - The textual XPath expression to parse.
Throws:
SAXPathException - In the event an error occurs.


Copyright © 2001-2003 Codehaus. All Rights Reserved.