public class EditableNamespaceContext extends Object implements IterableNamespaceContext, Map<String,String>
Constructor and Description |
---|
EditableNamespaceContext()
Constructs a NamespaceContext.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Removes all namespace bindings.
|
boolean |
containsKey(Object key)
Checks whether a prefix has a binding.
|
boolean |
containsValue(Object value)
Checks whether a namespace URI has a binding.
|
Set<Map.Entry<String,String>> |
entrySet()
Gets the namespace bindings.
|
String |
get(Object key)
Returns the URI for a prefix.
|
Collection<String> |
getAllPrefixes()
Returns all bound prefixes.
|
String |
getDefaultNamespaceURI()
Returns the namespace URI bound to the empty prefix.
|
String |
getNamespaceURI(String prefix)
Returns the URI for a namespace binding.
|
String |
getPrefix(String namespaceURI)
Returns the prefix for a namespace binding.
|
Iterator<String> |
getPrefixes(String namespaceURI)
Returns all prefixes with a namespace binding.
|
boolean |
isEmpty()
Returns whether any namespace bindings exists.
|
Set<String> |
keySet()
Gets the set of prefixes from the namespace bindings.
|
String |
put(String key,
String value)
Adds a namespace binding between a prefix and a URI.
|
void |
putAll(Map<? extends String,? extends String> m)
Adds all namespace bindings from a map.
|
String |
remove(Object key)
Removes the namespace binding for a prefix.
|
void |
setDefaultNamespaceURI(String namespaceURI)
Specifies the namespace URI bound to the empty prefix.
|
void |
setNamespaceURI(String prefix,
String namespaceURI)
Specifies a binding between a prefix and a namespace URI.
|
int |
size()
Returns the number of namespace bindings.
|
Collection<String> |
values()
Gets the list of URIs from the namespace bindings.
|
public EditableNamespaceContext()
public String getDefaultNamespaceURI()
public void setDefaultNamespaceURI(String namespaceURI)
namespaceURI
- the namespace URIpublic String getNamespaceURI(String prefix)
getNamespaceURI
in interface NamespaceContext
public void setNamespaceURI(String prefix, String namespaceURI)
prefix
- the prefix for the bindingnamespaceURI
- the URI for the namespacepublic Collection<String> getAllPrefixes()
getAllPrefixes
in interface IterableNamespaceContext
public String getPrefix(String namespaceURI)
getPrefix
in interface NamespaceContext
public Iterator<String> getPrefixes(String namespaceURI)
getPrefixes
in interface NamespaceContext
public int size()
public boolean isEmpty()
public boolean containsKey(Object key)
containsKey
in interface Map<String,String>
public boolean containsValue(Object value)
containsValue
in interface Map<String,String>
public String put(String key, String value)
public void putAll(Map<? extends String,? extends String> m)
public void clear()
public Collection<String> values()
Copyright © 2013-2015 MarkLogic Corporation.