com.ibm.websphere.sib.wsn

Class QueryExpression

  1. java.lang.Object
  2. extended bycom.ibm.websphere.sib.wsn.QueryExpression

  1. public class QueryExpression
  2. extends java.lang.Object
This class represents the QueryExpressionType type from the WS-Notification Base Notification schema

Field Summary

Modifier and Type Field and Description
  1. protected
  2. java.net.URI
dialect
The Dialect for the expression
  1. protected
  2. javax.xml.soap.SOAPElement
expression
The contents of the expression if a single element
  1. protected
  2. ElementAndText
mixedExpression
The contents of the expression if a mixed single element and text
  1. protected
  2. java.util.Map
prefixNSMappings
A map of prefixes to namespaces for prefixes used in the query expression.
  1. protected
  2. java.lang.String
textExpression
The contents of the expression if text
  1. static
  2. java.net.URI
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
  1. void
addPrefixMapping(java.lang.String prefix,java.lang.String namespace)
Add a mapping between a prefix and a namespace.
  1. java.net.URI
getDialect()
Get the value of the Dialect attribute for the expression
  1. javax.xml.soap.SOAPElement
getExpressionContents()
Get the contents of the expression as a SOAPElement.
  1. ElementAndText
getExpressionContentsIfMixed()
Get the contents of the expression as a mixture of text and a single element.
  1. java.lang.String
getExpressionContentsIfText()
Get the contents of the expression as text.
  1. java.lang.String
getNamespaceForPrefix(java.lang.String prefix)
Get the namespace for a given prefix defined for this topic expression
  1. java.util.Iterator
getNamespacePrefixes()
Get an iterator over all the prefix values defined in the prefix to namespace map
  1. java.util.Map
getNamespacePrefixesMap()
Get the prefix to namespace map
  1. void
setDialect(java.net.URI dialect)
Set the value of the Dialect attribute for the expression.
  1. void
setExpressionContents(javax.xml.soap.SOAPElement expression)
Set the contents of the expression as a SOAPElement.
  1. void
setExpressionContentsAsMixed(ElementAndText mixed)
Set the contents of the expression as a SOAPElement.
  1. void
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

  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

  1. protected java.net.URI dialect
The Dialect for the expression

expression

  1. protected javax.xml.soap.SOAPElement expression
The contents of the expression if a single element

textExpression

  1. protected java.lang.String textExpression
The contents of the expression if text

mixedExpression

  1. protected ElementAndText mixedExpression
The contents of the expression if a mixed single element and text

prefixNSMappings

  1. 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

  1. 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

  1. public QueryExpression(java.net.URI dialect,
  2. 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

  1. public QueryExpression(java.net.URI dialect,
  2. java.lang.String text,
  3. 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

  1. public QueryExpression(java.net.URI dialect,
  2. 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

  1. public QueryExpression(java.net.URI dialect,
  2. javax.xml.soap.SOAPElement expression,
  3. 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

  1. public QueryExpression(java.net.URI dialect,
  2. 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

  1. public QueryExpression(java.net.URI dialect,
  2. ElementAndText mixed,
  3. 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

  1. public java.net.URI getDialect( )
Get the value of the Dialect attribute for the expression
Returns:
The Dialect

setDialect

  1. public void setDialect(java.net.URI dialect)
Set the value of the Dialect attribute for the expression.
Parameters:
dialect - The Dialect

getExpressionContents

  1. 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

  1. 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

  1. 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

  1. 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

  1. 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.
Returns:
The expression contents as mixed text and element
See Also:

setExpressionContentsAsMixed

  1. 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

  1. 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

  1. public java.util.Map getNamespacePrefixesMap( )
Get the prefix to namespace map
Returns:
The prefix to namespace map

getNamespaceForPrefix

  1. 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

  1. public void addPrefixMapping(java.lang.String prefix,
  2. java.lang.String namespace)
Add a mapping between a prefix and a namespace.
Parameters:
prefix - The prefix
namespace - The namespace corresponding to the prefix