XML Security, 1.6

com.ibm.xml.enc.dom
Class DOMCipherReference

java.lang.Object
  extended by com.ibm.xml.enc.dom.DOMStructure
      extended by com.ibm.xml.enc.dom.DOMCipherData
          extended by com.ibm.xml.enc.dom.DOMCipherReference
All Implemented Interfaces:
DOMURIReference, CipherData, CipherReference, URIReference, XMLStructure

public final class DOMCipherReference
extends DOMCipherData
implements CipherReference, DOMURIReference

DOM-based implementation of CipherReference.


Constructor Summary
DOMCipherReference(org.w3c.dom.Element parent, org.w3c.dom.Element elem, XMLCryptoContext context)
          Creates a DOMCipherReference from an element.
DOMCipherReference(java.lang.String uri, java.util.List tfs)
          Creates a CiphereReference from the specified parameters.
 
Method Summary
 boolean equals(java.lang.Object o)
           
 java.io.InputStream getCipherValue()
           
 java.io.InputStream getCipherValue(XMLCryptoContext ctx)
           
 org.w3c.dom.Node getHere()
          Returns the here node.
 java.util.List getTransforms()
          Returns an unmodifiable list of Transforms that describe how to transform the referenced cipher data into an octet sequence.
 java.lang.String getType()
          Returns the type of data referenced by this URI.
 java.lang.String getURI()
          Returns the URI of the referenced data object.
 void marshal(org.w3c.dom.Node parent, java.lang.String encPrefix, DOMCryptoContext context)
           
 
Methods inherited from class com.ibm.xml.enc.dom.DOMCipherData
getInstance
 
Methods inherited from class com.ibm.xml.enc.dom.DOMStructure
isFeatureSupported
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.xml.crypto.XMLStructure
isFeatureSupported
 

Constructor Detail

DOMCipherReference

public DOMCipherReference(java.lang.String uri,
                          java.util.List tfs)
Creates a CiphereReference from the specified parameters.

Parameters:
uri - the URI
tfs - a list of Transforms. The list is defensively copied to protect against subsequent modification. May be null or empty.
Throws:
java.lang.NullPointerException - if dm is null
java.lang.ClassCastException - if any of the transforms are not of type Transform

DOMCipherReference

public DOMCipherReference(org.w3c.dom.Element parent,
                          org.w3c.dom.Element elem,
                          XMLCryptoContext context)
                   throws MarshalException
Creates a DOMCipherReference from an element.

Parameters:
elem - a CipherReference element
Throws:
MarshalException
Method Detail

getType

public java.lang.String getType()
Description copied from interface: URIReference
Returns the type of data referenced by this URI.

Specified by:
getType in interface URIReference
Returns:
the type (a URI) of the data object (may be null if not specified)

getURI

public java.lang.String getURI()
Description copied from interface: URIReference
Returns the URI of the referenced data object.

Specified by:
getURI in interface URIReference
Returns:
the URI of the data object in RFC 2396 format (may be null if not specified)

getTransforms

public java.util.List getTransforms()
Description copied from interface: CipherReference
Returns an unmodifiable list of Transforms that describe how to transform the referenced cipher data into an octet sequence.

Specified by:
getTransforms in interface CipherReference
Returns:
an unmodifiable list of Transforms (may be empty but never null)

getCipherValue

public java.io.InputStream getCipherValue()
                                   throws XMLEncryptionException
Throws:
XMLEncryptionException

getCipherValue

public java.io.InputStream getCipherValue(XMLCryptoContext ctx)
                                   throws XMLEncryptionException
Throws:
XMLEncryptionException

marshal

public void marshal(org.w3c.dom.Node parent,
                    java.lang.String encPrefix,
                    DOMCryptoContext context)
             throws MarshalException
Specified by:
marshal in class DOMStructure
Throws:
MarshalException

getHere

public org.w3c.dom.Node getHere()
Description copied from interface: DOMURIReference
Returns the here node.

Specified by:
getHere in interface DOMURIReference
Returns:
the attribute or processing instruction node or the parent element of the text node that directly contains the URI

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

XML Security, 1.6

Portions Copyright 2003, 2012 IBM Corporation.
Portions Copyright 2003, 2012 Oracle and/or its affiliates.