|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.overlord.sramp.common.query.xpath.XPathParser
public class XPathParser
Parses an XPath query string and creates an abstract syntax tree representation. The supported grammar is defined by the S-RAMP specification and is a subset of the XPath 2.0 grammar.
| Constructor Summary | |
|---|---|
XPathParser()
Default constructor. |
|
| Method Summary | |
|---|---|
String |
getDefaultPrefix()
|
NamespaceContext |
getNamespaceContext()
|
protected Query |
parseQuery(TokenStream tokens)
Parses a Query from the given token stream. |
Query |
parseXPath(String xpath)
Called to parse the XPath query into an S-RAMP XPath AST. |
protected String |
removeQuotes(String text)
Remove any leading and trailing single-quotes or double-quotes from the supplied text. |
void |
setDefaultPrefix(String defaultPrefix)
|
void |
setNamespaceContext(NamespaceContext namespaceContext)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XPathParser()
| Method Detail |
|---|
public NamespaceContext getNamespaceContext()
public void setNamespaceContext(NamespaceContext namespaceContext)
namespaceContext - the namespaceContext to setpublic String getDefaultPrefix()
public void setDefaultPrefix(String defaultPrefix)
defaultPrefix - the defaultPrefix to setpublic Query parseXPath(String xpath)
xpath - the S-RAMP Query being parsed
protected Query parseQuery(TokenStream tokens)
Query from the given token stream.
tokens - the X-Path token stream
Queryprotected String removeQuotes(String text)
text - the input text
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||