public class DefaultNamespaceContext extends Object implements NamespaceContext, org.apache.camel.spi.NamespaceAware
NamespaceContext which uses a simple Map where
the keys are the prefixes and the values are the URIs| Constructor and Description |
|---|
DefaultNamespaceContext() |
DefaultNamespaceContext(NamespaceContext parent,
Map<String,String> map) |
DefaultNamespaceContext(XPathFactory factory) |
| Modifier and Type | Method and Description |
|---|---|
DefaultNamespaceContext |
add(String prefix,
String uri)
A helper method to make it easy to create newly populated instances
|
Map<String,String> |
getNamespaces() |
String |
getNamespaceURI(String prefix) |
String |
getPrefix(String namespaceURI) |
Iterator<String> |
getPrefixes(String namespaceURI) |
void |
setNamespaces(Map<String,String> namespaces) |
String |
toString()
toString() implementation that outputs the namespace mappings with the following format: "[me: {prefix -> value}, {prefix -> value}], [parent: {prefix -> value}, {prefix -> value}].
|
public DefaultNamespaceContext()
public DefaultNamespaceContext(XPathFactory factory)
public DefaultNamespaceContext(NamespaceContext parent, Map<String,String> map)
public DefaultNamespaceContext add(String prefix, String uri)
public String getNamespaceURI(String prefix)
getNamespaceURI in interface NamespaceContextpublic String getPrefix(String namespaceURI)
getPrefix in interface NamespaceContextpublic Iterator<String> getPrefixes(String namespaceURI)
getPrefixes in interface NamespaceContextpublic void setNamespaces(Map<String,String> namespaces)
setNamespaces in interface org.apache.camel.spi.NamespaceAwarepublic Map<String,String> getNamespaces()
getNamespaces in interface org.apache.camel.spi.NamespaceAwareApache Camel