This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


javax.xml.crypto.dom
class DOMCryptoContext

java.lang.Object extended by javax.xml.crypto.dom.DOMCryptoContext
All Implemented Interfaces:
XMLCryptoContext
Direct Known Subclasses:
DOMSignContext, DOMValidateContext

public class DOMCryptoContext
extends Object
implements XMLCryptoContext

This class provides a DOM-specific implementation of the {@link XMLCryptoContext} 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.


Constructor Summary
protected

          Default constructor.
 
Method Summary
 Object
get(Object key)

          This implementation uses an internal java.util.HashMap to get the object that the specified key maps to.
 String

          
 String

          
 Element

          Returns the Element with the specified ID attribute value.
 KeySelector

          
 String
getNamespacePrefix(String namespaceURI, String defaultPrefix)

          This implementation uses an internal java.util.HashMap to get the prefix that the specified URI maps to.
 Object

          This implementation uses an internal java.util.HashMap to get the object that the specified name maps to.
 URIDereferencer

          
 Iterator

          Returns a read-only iterator over the set of Id/Element mappings of this DOMCryptoContext.
 Object
put(Object key, Object value)

          This implementation uses an internal java.util.HashMap to map the key to the specified object.
 String
putNamespacePrefix(String namespaceURI, String prefix)

          This implementation uses an internal java.util.HashMap to map the URI to the specified prefix.
 void
setBaseURI(String baseURI)

          
 void

          
 void
setIdAttributeNS(Element element, String namespaceURI, String localName)

          Registers the element's attribute specified by the namespace URI and local name to be of type ID.
 void

          
 Object
setProperty(String name, Object value)

          This implementation uses an internal java.util.HashMap to map the name to the specified object.
 void

          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DOMCryptoContext

protected DOMCryptoContext()
Default constructor. (For invocation by subclass constructors).

Method Detail

get

public Object get(Object key)
This implementation uses an internal {@link HashMap} to get the object that the specified key maps to.

Parameters:
key

getBaseURI

public String getBaseURI()

getDefaultNamespacePrefix

public String getDefaultNamespacePrefix()

getElementById

public Element getElementById(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.

Parameters:
idValue - the value of the ID
Returns:
the Element with the specified ID attribute value, or null if none.

getKeySelector

public KeySelector getKeySelector()

getNamespacePrefix

public String getNamespacePrefix(String namespaceURI,
                                 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.

Parameters:
namespaceURI
defaultPrefix

getProperty

public Object getProperty(String name)
This implementation uses an internal {@link HashMap} to get the object that the specified name maps to.

Parameters:
name

getURIDereferencer

public URIDereferencer getURIDereferencer()

iterator

public 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.

Returns:
a read-only iterator over the set of mappings

put

public Object put(Object key,
                  Object value)
This implementation uses an internal {@link HashMap} to map the key to the specified object.

Parameters:
key
value

putNamespacePrefix

public String putNamespacePrefix(String namespaceURI,
                                 String prefix)
This implementation uses an internal {@link HashMap} to map the URI to the specified prefix.

Parameters:
namespaceURI
prefix

setBaseURI

public void setBaseURI(String baseURI)
Parameters:
baseURI

setDefaultNamespacePrefix

public void setDefaultNamespacePrefix(String defaultPrefix)
Parameters:
defaultPrefix

setIdAttributeNS

public void setIdAttributeNS(Element element,
                             String namespaceURI,
                             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.

Parameters:
element - the element
namespaceURI - the namespace URI of the attribute (specify null if not applicable)
localName - the local name of the attribute

setKeySelector

public void setKeySelector(KeySelector ks)
Parameters:
ks

setProperty

public Object setProperty(String name,
                          Object value)
This implementation uses an internal {@link HashMap} to map the name to the specified object.

Parameters:
name
value

setURIDereferencer

public void setURIDereferencer(URIDereferencer dereferencer)
Parameters:
dereferencer


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.