interface. It also includes additional
methods that are specific to a DOM-based implementation for registering
and retrieving elements that contain attributes of type ID.
Method from javax.xml.crypto.dom.DOMCryptoContext Detail: |
public Object get(Object key) {
return objMap.get(key);
}
This implementation uses an internal HashMap to get the object
that the specified key maps to. |
public String getBaseURI() {
return baseURI;
}
|
public String getDefaultNamespacePrefix() {
return defaultPrefix;
}
|
public Element getElementById(String idValue) {
if (idValue == null) {
throw new NullPointerException("idValue is null");
}
return (Element) idMap.get(idValue);
}
Returns the Element with the specified ID attribute value.
This implementation uses an internal HashMap to get the
element that the specified attribute value maps to. |
public KeySelector getKeySelector() {
return ks;
}
|
public String getNamespacePrefix(String namespaceURI,
String defaultPrefix) {
if (namespaceURI == null) {
throw new NullPointerException("namespaceURI cannot be null");
}
String prefix = (String) nsMap.get(namespaceURI);
return (prefix != null ? prefix : defaultPrefix);
}
This implementation uses an internal HashMap to get the prefix
that the specified URI maps to. It returns the defaultPrefix
if it maps to null . |
public Object getProperty(String name) {
if (name == null) {
throw new NullPointerException("name is null");
}
return propMap.get(name);
}
This implementation uses an internal HashMap to get the object
that the specified name maps to. |
public URIDereferencer getURIDereferencer() {
return dereferencer;
}
|
public Iterator iterator() {
return Collections.unmodifiableMap(idMap).entrySet().iterator();
}
Returns a read-only iterator over the set of Id/Element mappings of
this DOMCryptoContext . Attempts to modify the set via the
Iterator#remove method throw an
UnsupportedOperationException . The mappings are returned
in no particular order. Each element in the iteration is represented as a
java.util.Map.Entry . If the DOMCryptoContext is
modified while an iteration is in progress, the results of the
iteration are undefined. |
public Object put(Object key,
Object value) {
return objMap.put(key, value);
}
This implementation uses an internal HashMap to map the key
to the specified object. |
public String putNamespacePrefix(String namespaceURI,
String prefix) {
if (namespaceURI == null) {
throw new NullPointerException("namespaceURI is null");
}
return (String) nsMap.put(namespaceURI, prefix);
}
This implementation uses an internal HashMap to map the URI
to the specified prefix. |
public void setBaseURI(String baseURI) {
if (baseURI != null) {
java.net.URI.create(baseURI);
}
this.baseURI = baseURI;
}
|
public void setDefaultNamespacePrefix(String defaultPrefix) {
this.defaultPrefix = defaultPrefix;
}
|
public void setIdAttributeNS(Element element,
String namespaceURI,
String localName) {
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(KeySelector ks) {
this.ks = ks;
}
|
public Object setProperty(String name,
Object value) {
if (name == null) {
throw new NullPointerException("name is null");
}
return propMap.put(name, value);
}
This implementation uses an internal HashMap to map the name
to the specified object. |
public void setURIDereferencer(URIDereferencer dereferencer) {
this.dereferencer = dereferencer;
}
|