public class QueryExpression
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.net.URI |
dialect
The Dialect for the expression
|
protected javax.xml.soap.SOAPElement |
expression
The contents of the expression if a single element
|
protected ElementAndText |
mixedExpression
The contents of the expression if a mixed single element and text
|
protected java.util.Map |
prefixNSMappings
A map of prefixes to namespaces for prefixes used in the query expression.
|
protected java.lang.String |
textExpression
The contents of the expression if text
|
static java.net.URI |
XPATH_VERSION_1
The Dialect value for a XPath version 1.0 language as defined by W3 Org
|
Constructor and Description |
---|
QueryExpression()
Default constructor.
|
QueryExpression(java.net.URI dialect,
ElementAndText mixed)
Construct an instance with the specified Dialect attribute value
and mixed text and single element expression content
|
QueryExpression(java.net.URI dialect,
ElementAndText mixed,
java.util.Map prefixToNamespaceMappings)
Construct an instance with the specified Dialect attribute value
and mixed text and single element expression content
|
QueryExpression(java.net.URI dialect,
javax.xml.soap.SOAPElement expression)
Construct an instance with the specified Dialect attribute value
and single element only expression content
|
QueryExpression(java.net.URI dialect,
javax.xml.soap.SOAPElement expression,
java.util.Map prefixToNamespaceMappings)
Construct an instance with the specified Dialect attribute value
and single element only expression content
|
QueryExpression(java.net.URI dialect,
java.lang.String text)
Construct an instance with the specified Dialect attribute value
and text only expression content.
|
QueryExpression(java.net.URI dialect,
java.lang.String text,
java.util.Map prefixToNamespaceMappings)
Construct an instance with the specified Dialect attribute value
and text only expression content.
|
Modifier and Type | Method and Description |
---|---|
void |
addPrefixMapping(java.lang.String prefix,
java.lang.String namespace)
Add a mapping between a prefix and a namespace.
|
java.net.URI |
getDialect()
Get the value of the Dialect attribute for the expression
|
javax.xml.soap.SOAPElement |
getExpressionContents()
Get the contents of the expression as a SOAPElement.
|
ElementAndText |
getExpressionContentsIfMixed()
Get the contents of the expression as a mixture of text
and a single element.
|
java.lang.String |
getExpressionContentsIfText()
Get the contents of the expression as text.
|
java.lang.String |
getNamespaceForPrefix(java.lang.String prefix)
Get the namespace for a given prefix defined for this topic expression
|
java.util.Iterator |
getNamespacePrefixes()
Get an iterator over all the prefix values defined in the prefix to namespace
map
|
java.util.Map |
getNamespacePrefixesMap()
Get the prefix to namespace map
|
void |
setDialect(java.net.URI dialect)
Set the value of the Dialect attribute for the expression.
|
void |
setExpressionContents(javax.xml.soap.SOAPElement expression)
Set the contents of the expression as a SOAPElement.
|
void |
setExpressionContentsAsMixed(ElementAndText mixed)
Set the contents of the expression as a SOAPElement.
|
void |
setExpressionContentsAsText(java.lang.String text)
Set the contents of the expression as text.
|
public static final java.net.URI XPATH_VERSION_1
protected java.net.URI dialect
protected javax.xml.soap.SOAPElement expression
protected java.lang.String textExpression
protected ElementAndText mixedExpression
protected java.util.Map prefixNSMappings
public QueryExpression()
setDialect(URI)
to set
the required Dialect value.public QueryExpression(java.net.URI dialect, java.lang.String text)
dialect
- The Dialect attribute value for the expressiontext
- The text only expression contentpublic QueryExpression(java.net.URI dialect, java.lang.String text, java.util.Map prefixToNamespaceMappings)
dialect
- The Dialect attribute value for the expressiontext
- The text only expression contentprefixToNamespaceMappings
- A String (key) to String (value) map of prefix names to their corresponding namespaces.
Such mappings may be required for text only expressionspublic QueryExpression(java.net.URI dialect, javax.xml.soap.SOAPElement expression)
dialect
- The Dialect attribute value for the expressionexpression
- The expression contentpublic QueryExpression(java.net.URI dialect, javax.xml.soap.SOAPElement expression, java.util.Map prefixToNamespaceMappings)
dialect
- The Dialect attribute value for the expressionexpression
- The expression contentprefixToNamespaceMappings
- A String (key) to String (value) map of prefix names to their corresponding namespaces.
Such mappings may be required for text only expressionspublic QueryExpression(java.net.URI dialect, ElementAndText mixed)
dialect
- The Dialect attribute value for the expressionmixed
- The mixed expression contentElementAndText
public QueryExpression(java.net.URI dialect, ElementAndText mixed, java.util.Map prefixToNamespaceMappings)
dialect
- The Dialect attribute value for the expressionmixed
- The mixed expression contentprefixToNamespaceMappings
- A String (key) to String (value) map of prefix names to their corresponding namespaces.
Such mappings may be required for text only expressionsElementAndText
public java.net.URI getDialect()
public void setDialect(java.net.URI dialect)
dialect
- The Dialectpublic javax.xml.soap.SOAPElement getExpressionContents()
public void setExpressionContents(javax.xml.soap.SOAPElement expression)
expression
- The contents of the expression as a single elementpublic java.lang.String getExpressionContentsIfText()
public void setExpressionContentsAsText(java.lang.String text)
text
- The contents of the expression as text onlypublic ElementAndText getExpressionContentsIfMixed()
ElementAndText
public void setExpressionContentsAsMixed(ElementAndText mixed)
mixed
- The contents of the expression as mixed text and elementElementAndText
public java.util.Iterator getNamespacePrefixes()
public java.util.Map getNamespacePrefixesMap()
public java.lang.String getNamespaceForPrefix(java.lang.String prefix)
prefix
- The prefix for which the namespace is requiredpublic void addPrefixMapping(java.lang.String prefix, java.lang.String namespace)
prefix
- The prefixnamespace
- The namespace corresponding to the prefix