org.apache.camel.builder.xml
Class Namespaces

java.lang.Object
  extended by org.apache.camel.builder.xml.Namespaces

public class Namespaces
extends Object

A helper class for working with namespaces or creating namespace based expressions

Version:

Field Summary
static String DEFAULT_NAMESPACE
           
static String ENVIRONMENT_VARIABLES
           
static String EXCHANGE_PROPERTY
           
static String FUNCTION_NAMESPACE
           
static String IN_NAMESPACE
           
static String OUT_NAMESPACE
           
static String SYSTEM_PROPERTIES_NAMESPACE
           
 
Constructor Summary
Namespaces(Element element)
          Creates a namespaces object from the given XML element
Namespaces(String prefix, String uri)
          Creates a namespace context with a single prefix and URI
 
Method Summary
 Namespaces add(Element element)
           
 Namespaces add(String prefix, String uri)
           
 void configure(NamespaceAware namespaceAware)
          Configures the namespace aware object
 Map<String,String> getNamespaces()
           
static boolean isMatchingNamespaceOrEmptyNamespace(String namespaceURI, String expectedNamespace)
          Returns true if the given namespaceURI is empty or if it matches the given expected namespace
 XPathExpression xpath(String expression)
          Creates the XPath expression using the current namespace context
 XPathExpression xpath(String expression, Class<?> resultType)
          Creates the XPath expression using the current namespace context
 XQueryExpression xquery(String expression)
          Creates the XQuery expression using the current namespace context
 XQueryExpression xquery(String expression, Class<?> resultType)
          Creates the XQuery expression using the current namespace context and the given expected return type
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_NAMESPACE

public static final String DEFAULT_NAMESPACE
See Also:
Constant Field Values

IN_NAMESPACE

public static final String IN_NAMESPACE
See Also:
Constant Field Values

OUT_NAMESPACE

public static final String OUT_NAMESPACE
See Also:
Constant Field Values

FUNCTION_NAMESPACE

public static final String FUNCTION_NAMESPACE
See Also:
Constant Field Values

SYSTEM_PROPERTIES_NAMESPACE

public static final String SYSTEM_PROPERTIES_NAMESPACE
See Also:
Constant Field Values

ENVIRONMENT_VARIABLES

public static final String ENVIRONMENT_VARIABLES
See Also:
Constant Field Values

EXCHANGE_PROPERTY

public static final String EXCHANGE_PROPERTY
See Also:
Constant Field Values
Constructor Detail

Namespaces

public Namespaces(Element element)
Creates a namespaces object from the given XML element

Parameters:
element - the XML element representing the XPath namespace context

Namespaces

public Namespaces(String prefix,
                  String uri)
Creates a namespace context with a single prefix and URI

Method Detail

isMatchingNamespaceOrEmptyNamespace

public static boolean isMatchingNamespaceOrEmptyNamespace(String namespaceURI,
                                                          String expectedNamespace)
Returns true if the given namespaceURI is empty or if it matches the given expected namespace


add

public Namespaces add(String prefix,
                      String uri)

add

public Namespaces add(Element element)

xpath

public XPathExpression xpath(String expression)
Creates the XPath expression using the current namespace context


xpath

public XPathExpression xpath(String expression,
                             Class<?> resultType)
Creates the XPath expression using the current namespace context


xquery

public XQueryExpression xquery(String expression)
Creates the XQuery expression using the current namespace context


xquery

public XQueryExpression xquery(String expression,
                               Class<?> resultType)
Creates the XQuery expression using the current namespace context and the given expected return type


getNamespaces

public Map<String,String> getNamespaces()

configure

public void configure(NamespaceAware namespaceAware)
Configures the namespace aware object



Apache CAMEL