Package org.apache.camel.language.xpath
Class DefaultNamespaceContext
java.lang.Object
org.apache.camel.language.xpath.DefaultNamespaceContext
- All Implemented Interfaces:
NamespaceContext
,org.apache.camel.spi.NamespaceAware
public class DefaultNamespaceContext
extends Object
implements NamespaceContext, org.apache.camel.spi.NamespaceAware
An implementation of
NamespaceContext
which uses a simple Map where the keys are the prefixes and the values
are the URIs-
Constructor Summary
ConstructorDescriptionDefaultNamespaceContext
(NamespaceContext parent, Map<String, String> map) DefaultNamespaceContext
(XPathFactory factory) -
Method Summary
Modifier and TypeMethodDescriptionA helper method to make it easy to create newly populated instancesgetNamespaceURI
(String prefix) getPrefixes
(String namespaceURI) void
setNamespaces
(Map<String, String> namespaces) toString()
toString() implementation that outputs the namespace mappings with the following format: "[me: {prefix -> value}, {prefix -> value}], [parent: {prefix -> value}, {prefix -> value}].
-
Constructor Details
-
DefaultNamespaceContext
public DefaultNamespaceContext() -
DefaultNamespaceContext
-
DefaultNamespaceContext
-
-
Method Details
-
add
A helper method to make it easy to create newly populated instances -
getNamespaceURI
- Specified by:
getNamespaceURI
in interfaceNamespaceContext
-
getPrefix
- Specified by:
getPrefix
in interfaceNamespaceContext
-
getPrefixes
- Specified by:
getPrefixes
in interfaceNamespaceContext
-
setNamespaces
- Specified by:
setNamespaces
in interfaceorg.apache.camel.spi.NamespaceAware
-
getNamespaces
- Specified by:
getNamespaces
in interfaceorg.apache.camel.spi.NamespaceAware
-
toString
toString() implementation that outputs the namespace mappings with the following format: "[me: {prefix -> value}, {prefix -> value}], [parent: {prefix -> value}, {prefix -> value}]. Recurses up the parent's chain.
-