Package org.daisy.dotify.common.xml
Class NamespaceContextBuilder
- java.lang.Object
 - 
- org.daisy.dotify.common.xml.NamespaceContextBuilder
 
 
- 
public class NamespaceContextBuilder extends Object
Provides a builder for namespace contexts making it easy to provide namespace contexts to for example xpath evaluations. 
- 
- 
Constructor Summary
Constructors Constructor Description NamespaceContextBuilder()Creates a new instance.NamespaceContextBuilder(String defaultNsUri)Creates a new instance with the specified default namespace uri. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NamespaceContextBuilderadd(String prefix, String uri)Adds a new namespace binding with the specified prefix and uri.NamespaceContextbuild()Creates a new namespace context with the currently configured settings. 
 - 
 
- 
- 
Constructor Detail
- 
NamespaceContextBuilder
public NamespaceContextBuilder()
Creates a new instance. 
- 
NamespaceContextBuilder
public NamespaceContextBuilder(String defaultNsUri)
Creates a new instance with the specified default namespace uri.- Parameters:
 defaultNsUri- the default namespace uri
 
 - 
 
- 
Method Detail
- 
add
public NamespaceContextBuilder add(String prefix, String uri)
Adds a new namespace binding with the specified prefix and uri.- Parameters:
 prefix- the namespace prefixuri- the namespace uri- Returns:
 - returns this builder
 
 
- 
build
public NamespaceContext build()
Creates a new namespace context with the currently configured settings.- Returns:
 - returns a new namepsace context
 
 
 - 
 
 -