*** This class provides Binary Compatibility only, not Source Compatibility ***
Package com.sas.services.webdav
Class NamespaceMap
java.lang.Object
java.util.AbstractMap
java.util.HashMap
com.sas.services.webdav.NamespaceMap
- All Implemented Interfaces:
Serializable,Cloneable,Map
@SASScope("ALL")
@BinaryCompatibilityOnly
public class NamespaceMap
extends HashMap
Implements a specific map from prefixes to namespace URI's. Prefixes
will automatically be generated and a record maintained of the
namespace URI associated with it. One may also specify an explicit prefix
to namespace URI mapping to use.
- Since:
- 1.1
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionStringaddNSPrefix(String prefix, String namespaceURI) Sets a specific mapping from the prefix to the namespace URI.StringgetPrefixforURI(String namespaceURI) Returns a prefix that can be used for the given namespaceURI.Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, newHashMap, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuesMethods inherited from class java.util.AbstractMap
equals, hashCode, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
equals, hashCode
-
Constructor Details
-
NamespaceMap
public NamespaceMap()
-
-
Method Details
-
addNSPrefix
public String addNSPrefix(String prefix, String namespaceURI) Sets a specific mapping from the prefix to the namespace URI. This would be used if there was a preferred prefix (eg. predefined).- Parameters:
prefix- The preferred prefixnamespaceURI- The namespace URI- Returns:
- String Returns the prefix mapped to the namespace URI
-
getPrefixforURI
public String getPrefixforURI(String namespaceURI) Returns a prefix that can be used for the given namespaceURI. If a previous mapping did not exist then a new prefix is created for this namespace URI and returned.- Parameters:
namespaceURI- The namespace URI for which a prefix is required- Returns:
- String The prefix to be used for the specified namespace URI
-