|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.novell.xml.xpath.Parser
Class that parses XPath expressions and returns an
object that implements com.novell.xml.xpath.Expression
Constructor Summary | |
Parser(NamespaceContext namespaces)
Build a Parser object for parsing one or more expressions given the passed namespace context. |
|
Parser(VariableBindings variables,
FunctionLibrary library,
NamespaceContext namespaces)
Build a Parser object for parsing one or more expressions given the passed variable bindings, function library and namespace context. |
Method Summary | |
protected static FunctionLibrary |
getDefaultFunctionLibrary()
Return the default XPath function library. |
protected FunctionLibrary |
getLibrary()
Return the function library in use |
protected int |
getOperator(Token token)
Return the operator value of the passed token, if it is an operator token. |
Token[] |
getTokens()
Return the token array that tokenize() created |
protected VariableBindings |
getVariables()
Return the variable bindings in use |
protected void |
nextToken()
Advance the current token in the token stream by one. |
protected Expression |
parse()
Parse the token string. |
Expression |
parse(String source)
Parse a single expression. |
Expression |
parse(Token[] tokens)
Parse an already tokenized expression. |
protected Expression |
parseAdditiveExpr()
|
protected Expression |
parseAndExpr()
|
protected ArgumentList |
parseArgumentList()
|
protected Basis |
parseBasis()
|
protected Expression |
parseEqualityExpr()
|
protected Expression |
parseExpr()
|
protected Expression |
parseFilterExpr()
|
protected Expression |
parseFunctionCall()
Parse a function call. |
protected Expression |
parseLocationPath()
|
protected Expression |
parseMultiplicativeExpr()
|
protected NodeTest |
parseNodeTest()
|
protected Expression |
parseOrExpr()
|
protected Expression |
parsePathExpr()
|
protected Predicate |
parsePredicate()
|
protected Expression |
parsePrimaryExpr()
|
protected Expression |
parseRelationalExpr()
|
protected RelativeLocationPath |
parseRelativeLocationPath()
|
protected Step |
parseStep()
|
protected Expression |
parseUnaryExpr()
|
protected Expression |
parseUnionExpr()
|
protected Token |
peekToken()
Look at the next token without advancing in the token stream. |
boolean |
setBrokenMode(boolean doBroken)
Set this Parser object to behave in a backwards-compatible broken mode. |
void |
tokenize(String source)
Tokenize the passed string and place the tokens into the parser mechanism for examining tokens. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Parser(NamespaceContext namespaces)
namespaces
- The namespace context in effect for the expression.public Parser(VariableBindings variables, FunctionLibrary library, NamespaceContext namespaces)
variables
- The variable bindings in effect for the expression.library
- The function library in effect for the expression.namespaces
- The namespace context in effect for the expression.Method Detail |
public boolean setBrokenMode(boolean doBroken)
This is used for DirXML to default to a broken behavior for "!=" where only one of the operands is a node-set.
doBroken
- if true
do anything originally broken but later fixed
XPath operations in the original, broken fashion.
public Expression parse(String source) throws XPathParserException
source
- A string containing the XPath expression to parse.
XPathParserException
public Expression parse(Token[] tokens) throws XPathParserException
tokens
- The token stream.
XPathParserException
protected Expression parse() throws XPathParserException
XPathParserException
protected Expression parseExpr() throws XPathParserException
XPathParserException
protected Expression parseOrExpr() throws XPathParserException
XPathParserException
protected Expression parseAndExpr() throws XPathParserException
XPathParserException
protected Expression parseEqualityExpr() throws XPathParserException
XPathParserException
protected Expression parseRelationalExpr() throws XPathParserException
XPathParserException
protected Expression parseAdditiveExpr() throws XPathParserException
XPathParserException
protected Expression parseMultiplicativeExpr() throws XPathParserException
XPathParserException
protected Expression parseUnaryExpr() throws XPathParserException
XPathParserException
protected Expression parseUnionExpr() throws XPathParserException
XPathParserException
protected Expression parsePathExpr() throws XPathParserException
XPathParserException
protected Expression parseFilterExpr() throws XPathParserException
XPathParserException
protected Expression parsePrimaryExpr() throws XPathParserException
XPathParserException
protected Expression parseFunctionCall() throws XPathParserException
Expression
representing the function call
XPathParserException
- Thrown if the expression has incorrect syntaxprotected ArgumentList parseArgumentList() throws XPathParserException
XPathParserException
protected Expression parseLocationPath() throws XPathParserException
XPathParserException
protected RelativeLocationPath parseRelativeLocationPath() throws XPathParserException
XPathParserException
protected Step parseStep() throws XPathParserException
XPathParserException
protected Basis parseBasis() throws XPathParserException
XPathParserException
protected NodeTest parseNodeTest() throws XPathParserException
XPathParserException
protected Predicate parsePredicate() throws XPathParserException
XPathParserException
public void tokenize(String source) throws XPathParserException
source
- The string to tokenize.
XPathParserException
public Token[] getTokens()
tokenize()
created
tokenize()
createdprotected Token peekToken()
protected void nextToken()
protected int getOperator(Token token)
token
- The token to examine.
protected FunctionLibrary getLibrary()
protected static FunctionLibrary getDefaultFunctionLibrary()
protected VariableBindings getVariables()
VariableBindings
object in use
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |