com.ibm.websphere.sib.wsn
Class QueryExpression
- java.lang.Object
com.ibm.websphere.sib.wsn.QueryExpression
- public class QueryExpression
- extends java.lang.Object
Field Summary
Modifier and Type | Field and Description |
---|---|
|
dialect
The Dialect for the expression
|
|
expression
The contents of the expression if a single element
|
|
mixedExpression
The contents of the expression if a mixed single element and text
|
|
prefixNSMappings
A map of prefixes to namespaces for prefixes used in the query expression.
|
|
textExpression
The contents of the expression if text
|
|
XPATH_VERSION_1
The Dialect value for a XPath version 1.0 language as defined by W3 Org
|
Constructor Summary
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.
|
Method Summary
Modifier and Type | Method and Description |
---|---|
|
addPrefixMapping(java.lang.String prefix,java.lang.String namespace)
Add a mapping between a prefix and a namespace.
|
|
getDialect()
Get the value of the Dialect attribute for the expression
|
|
getExpressionContents()
Get the contents of the expression as a SOAPElement.
|
getExpressionContentsIfMixed()
Get the contents of the expression as a mixture of text
and a single element.
|
|
|
getExpressionContentsIfText()
Get the contents of the expression as text.
|
|
getNamespaceForPrefix(java.lang.String prefix)
Get the namespace for a given prefix defined for this topic expression
|
|
getNamespacePrefixes()
Get an iterator over all the prefix values defined in the prefix to namespace
map
|
|
getNamespacePrefixesMap()
Get the prefix to namespace map
|
|
setDialect(java.net.URI dialect)
Set the value of the Dialect attribute for the expression.
|
|
setExpressionContents(javax.xml.soap.SOAPElement expression)
Set the contents of the expression as a SOAPElement.
|
|
setExpressionContentsAsMixed(ElementAndText mixed)
Set the contents of the expression as a SOAPElement.
|
|
setExpressionContentsAsText(java.lang.String text)
Set the contents of the expression as text.
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail
XPATH_VERSION_1
- public static final java.net.URI XPATH_VERSION_1
The Dialect value for a XPath version 1.0 language as defined by W3 Org
dialect
- protected java.net.URI dialect
The Dialect for the expression
expression
- protected javax.xml.soap.SOAPElement expression
The contents of the expression if a single element
textExpression
- protected java.lang.String textExpression
The contents of the expression if text
mixedExpression
- protected ElementAndText mixedExpression
The contents of the expression if a mixed single element and text
prefixNSMappings
- protected java.util.Map prefixNSMappings
A map of prefixes to namespaces for prefixes used in the query expression.
The keys and values in the map are Strings.
Constructor Detail
QueryExpression
- public QueryExpression()
Default constructor. If this constructor is used, it will be necessary
to make a subsequent call to
setDialect(URI)
to set
the required Dialect value.
QueryExpression
- public QueryExpression(java.net.URI dialect,
- java.lang.String text)
Construct an instance with the specified Dialect attribute value
and text only expression content.
Parameters:
dialect
- The Dialect attribute value for the expression text
- The text only expression content QueryExpression
- public 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.
Parameters:
dialect
- The Dialect attribute value for the expression text
- The text only expression content prefixToNamespaceMappings
- A String (key) to String (value) map of prefix names to their corresponding namespaces.
Such mappings may be required for text only expressions QueryExpression
- public 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
Parameters:
dialect
- The Dialect attribute value for the expression expression
- The expression content QueryExpression
- public 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
Parameters:
dialect
- The Dialect attribute value for the expression expression
- The expression content prefixToNamespaceMappings
- A String (key) to String (value) map of prefix names to their corresponding namespaces.
Such mappings may be required for text only expressions QueryExpression
- public QueryExpression(java.net.URI dialect,
- ElementAndText mixed)
Construct an instance with the specified Dialect attribute value
and mixed text and single element expression content
Parameters:
dialect
- The Dialect attribute value for the expression mixed
- The mixed expression content See Also:
QueryExpression
- public 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
Parameters:
dialect
- The Dialect attribute value for the expression mixed
- The mixed expression content prefixToNamespaceMappings
- A String (key) to String (value) map of prefix names to their corresponding namespaces.
Such mappings may be required for text only expressions See Also:
Method Detail
getDialect
- public java.net.URI getDialect( )
Get the value of the Dialect attribute for the expression
Returns:
The Dialect
setDialect
- public void setDialect(java.net.URI dialect)
Set the value of the Dialect attribute for the expression.
Parameters:
dialect
- The Dialect getExpressionContents
- public javax.xml.soap.SOAPElement getExpressionContents( )
Get the contents of the expression as a SOAPElement. If the content was specified
as text or as a mixture of text and element, this method will return null.
Returns:
The expression contents
setExpressionContents
- public void setExpressionContents( javax.xml.soap.SOAPElement expression)
Set the contents of the expression as a SOAPElement. Any content
previously set either as text, element or a mixture will be removed.
Parameters:
expression
- The contents of the expression as a single element getExpressionContentsIfText
- public java.lang.String getExpressionContentsIfText( )
Get the contents of the expression as text. If the content was specified
as an element or as a mixture of text and element, this method will return null.
Returns:
The expression contents as text
setExpressionContentsAsText
- public void setExpressionContentsAsText( java.lang.String text)
Set the contents of the expression as text. Any content
previously set either as text, element or a mixture will be removed.
Parameters:
text
- The contents of the expression as text only getExpressionContentsIfMixed
- public ElementAndText getExpressionContentsIfMixed( )
Get the contents of the expression as a mixture of text
and a single element. If the content was specified as text only
or element only, this method will return null.
setExpressionContentsAsMixed
- public void setExpressionContentsAsMixed( ElementAndText mixed)
Set the contents of the expression as a SOAPElement. Any content
previously set either as text, element or a mixture will be removed.
Parameters:
mixed
- The contents of the expression as mixed text and element See Also:
getNamespacePrefixes
- public java.util.Iterator getNamespacePrefixes( )
Get an iterator over all the prefix values defined in the prefix to namespace
map
Returns:
An iterator of the prefixes defined in the prefix to namespace map
getNamespacePrefixesMap
- public java.util.Map getNamespacePrefixesMap( )
Get the prefix to namespace map
Returns:
The prefix to namespace map
getNamespaceForPrefix
- public java.lang.String getNamespaceForPrefix( java.lang.String prefix)
Get the namespace for a given prefix defined for this topic expression
Parameters:
prefix
- The prefix for which the namespace is required Returns:
The namespace corresponding to the prefix or null if no corresponding namespace exists
addPrefixMapping
- public void addPrefixMapping(java.lang.String prefix,
- java.lang.String namespace)
Add a mapping between a prefix and a namespace.
Parameters:
prefix
- The prefix namespace
- The namespace corresponding to the prefix