Methods Summary |
---|
public java.lang.Object | get(java.lang.Object key)This implementation uses an internal {@link HashMap} to get the object
that the specified key maps to.
return objMap.get(key);
|
public java.lang.String | getBaseURI()
return baseURI;
|
public java.lang.String | getDefaultNamespacePrefix()
return defaultPrefix;
|
public org.w3c.dom.Element | getElementById(java.lang.String idValue)Returns the Element with the specified ID attribute value.
This implementation uses an internal {@link HashMap} to get the
element that the specified attribute value maps to.
if (idValue == null) {
throw new NullPointerException("idValue is null");
}
return (Element) idMap.get(idValue);
|
public javax.xml.crypto.KeySelector | getKeySelector()
return ks;
|
public java.lang.String | getNamespacePrefix(java.lang.String namespaceURI, java.lang.String defaultPrefix)This implementation uses an internal {@link HashMap} to get the prefix
that the specified URI maps to. It returns the defaultPrefix
if it maps to null .
if (namespaceURI == null) {
throw new NullPointerException("namespaceURI cannot be null");
}
String prefix = (String) nsMap.get(namespaceURI);
return (prefix != null ? prefix : defaultPrefix);
|
public java.lang.Object | getProperty(java.lang.String name)This implementation uses an internal {@link HashMap} to get the object
that the specified name maps to.
if (name == null) {
throw new NullPointerException("name is null");
}
return propMap.get(name);
|
public javax.xml.crypto.URIDereferencer | getURIDereferencer()
return dereferencer;
|
public java.util.Iterator | iterator()Returns a read-only iterator over the set of Id/Element mappings of
this DOMCryptoContext . Attempts to modify the set via the
{@link Iterator#remove} method throw an
UnsupportedOperationException . The mappings are returned
in no particular order. Each element in the iteration is represented as a
{@link java.util.Map.Entry}. If the DOMCryptoContext is
modified while an iteration is in progress, the results of the
iteration are undefined.
return Collections.unmodifiableMap(idMap).entrySet().iterator();
|
public java.lang.Object | put(java.lang.Object key, java.lang.Object value)This implementation uses an internal {@link HashMap} to map the key
to the specified object.
return objMap.put(key, value);
|
public java.lang.String | putNamespacePrefix(java.lang.String namespaceURI, java.lang.String prefix)This implementation uses an internal {@link HashMap} to map the URI
to the specified prefix.
if (namespaceURI == null) {
throw new NullPointerException("namespaceURI is null");
}
return (String) nsMap.put(namespaceURI, prefix);
|
public void | setBaseURI(java.lang.String baseURI)
if (baseURI != null) {
java.net.URI.create(baseURI);
}
this.baseURI = baseURI;
|
public void | setDefaultNamespacePrefix(java.lang.String defaultPrefix)
this.defaultPrefix = defaultPrefix;
|
public void | setIdAttributeNS(org.w3c.dom.Element element, java.lang.String namespaceURI, java.lang.String localName)Registers the element's attribute specified by the namespace URI and
local name to be of type ID. The attribute must have a non-empty value.
This implementation uses an internal {@link HashMap} to map the
attribute's value to the specified element.
if (element == null) {
throw new NullPointerException("element is null");
}
if (localName == null) {
throw new NullPointerException("localName is null");
}
String idValue = element.getAttributeNS(namespaceURI, localName);
if (idValue == null || idValue.length() == 0) {
throw new IllegalArgumentException(localName + " is not an " +
"attribute");
}
idMap.put(idValue, element);
|
public void | setKeySelector(javax.xml.crypto.KeySelector ks)
this.ks = ks;
|
public java.lang.Object | setProperty(java.lang.String name, java.lang.Object value)This implementation uses an internal {@link HashMap} to map the name
to the specified object.
if (name == null) {
throw new NullPointerException("name is null");
}
return propMap.put(name, value);
|
public void | setURIDereferencer(javax.xml.crypto.URIDereferencer dereferencer)
this.dereferencer = dereferencer;
|