public class ExprParser extends ExprTokenizer
Constructor and Description |
---|
ExprParser(String expr,
int offset,
int length,
PrefixToNamespace prefixToNS)
Not part of the public, documented, API.
|
Modifier and Type | Method and Description |
---|---|
boolean |
getAllowDefaultNS()
Not part of the public, documented, API.
|
static SimpleFunctionTable |
getSimpleFunctionTable(Namespace ns)
Returns the simple function table corresponding to specified namespace,
if such table has been registered with the XPath implementation;
null otherwise. |
static boolean |
isFunctionAvailable(Name name)
Returns
true if a function having specified name
is available; false otherwise. |
BooleanExpr |
parseBooleanExpr()
Not part of the public, documented, API.
|
static BooleanExpr |
parseBooleanExpr(String expr,
PrefixToNamespace prefixToNS)
Creates a BooleanExpr from its string representation.
|
NodeSetExpr |
parseNodeSetExpr()
Not part of the public, documented, API.
|
static NodeSetExpr |
parseNodeSetExpr(String expr,
PrefixToNamespace prefixToNS)
Creates a NodeSetExpr from its string representation.
|
NumberExpr |
parseNumberExpr()
Not part of the public, documented, API.
|
static NumberExpr |
parseNumberExpr(String expr,
PrefixToNamespace prefixToNS)
Creates a NumberExpr from its string representation.
|
static PathPattern |
parsePattern(String pattern,
PrefixToNamespace prefixToNS)
Creates a Pattern from its string representation.
|
StringExpr |
parseStringExpr()
Not part of the public, documented, API.
|
static StringExpr |
parseStringExpr(String expr,
PrefixToNamespace prefixToNS)
Creates a StringExpr from its string representation.
|
PathPattern |
parseTopLevelPattern()
Not part of the public, documented, API.
|
VariantExpr |
parseVariantExpr()
Not part of the public, documented, API.
|
static VariantExpr |
parseVariantExpr(String expr,
PrefixToNamespace prefixToNS)
Creates a VariantExpr from its string representation.
|
void |
setAllowDefaultNS(boolean allow)
Not part of the public, documented, API.
|
static void |
setSimpleFunctionTable(Namespace ns,
SimpleFunctionTable table)
Registers specified simple function table with the XPath implementation.
|
getSource, getSourceEnd, getSourceFirst, getUnescapeLiterals, setUnescapeLiterals
public ExprParser(String expr, int offset, int length, PrefixToNamespace prefixToNS)
public static void setSimpleFunctionTable(Namespace ns, SimpleFunctionTable table)
ns
- namespace used to identify the simple function tabletable
- simple function table to be added or
replacing previously registered tablepublic static SimpleFunctionTable getSimpleFunctionTable(Namespace ns)
null
otherwise.public static boolean isFunctionAvailable(Name name)
true
if a function having specified name
is available; false
otherwise.public static NodeSetExpr parseNodeSetExpr(String expr, PrefixToNamespace prefixToNS) throws ParseException
expr
- string representation to be parsedprefixToNS
- used to find the Namespaces associated to the prefixes
of qualified names found in the string representationParseException
- if specified string representation cannot be
parsedpublic static StringExpr parseStringExpr(String expr, PrefixToNamespace prefixToNS) throws ParseException
expr
- string representation to be parsedprefixToNS
- used to find the Namespaces associated to the prefixes
of qualified names found in the string representationParseException
- if specified string representation cannot be
parsedpublic static NumberExpr parseNumberExpr(String expr, PrefixToNamespace prefixToNS) throws ParseException
expr
- string representation to be parsedprefixToNS
- used to find the Namespaces associated to the prefixes
of qualified names found in the string representationParseException
- if specified string representation cannot be
parsedpublic static BooleanExpr parseBooleanExpr(String expr, PrefixToNamespace prefixToNS) throws ParseException
expr
- string representation to be parsedprefixToNS
- used to find the Namespaces associated to the prefixes
of qualified names found in the string representationParseException
- if specified string representation cannot be
parsedpublic static VariantExpr parseVariantExpr(String expr, PrefixToNamespace prefixToNS) throws ParseException
expr
- string representation to be parsedprefixToNS
- used to find the Namespaces associated to the prefixes
of qualified names found in the string representationParseException
- if specified string representation cannot be
parsedpublic void setAllowDefaultNS(boolean allow)
public boolean getAllowDefaultNS()
public NodeSetExpr parseNodeSetExpr() throws ParseException
ParseException
public StringExpr parseStringExpr() throws ParseException
ParseException
public NumberExpr parseNumberExpr() throws ParseException
ParseException
public BooleanExpr parseBooleanExpr() throws ParseException
ParseException
public VariantExpr parseVariantExpr() throws ParseException
ParseException
public static PathPattern parsePattern(String pattern, PrefixToNamespace prefixToNS) throws ParseException
pattern
- string representation to be parsedprefixToNS
- used to find the Namespaces associated to the prefixes
of qualified names found in the string representationParseException
- if specified string representation cannot be
parsedpublic PathPattern parseTopLevelPattern() throws ParseException
ParseException