XML Security, 1.6

com.ibm.xml.enc.dom
Class DOMReferenceType

java.lang.Object
  extended by com.ibm.xml.enc.dom.DOMStructure
      extended by com.ibm.xml.enc.dom.DOMReferenceType
All Implemented Interfaces:
DOMURIReference, ReferenceType, URIReference, XMLStructure
Direct Known Subclasses:
DOMDataReference, DOMKeyReference

abstract class DOMReferenceType
extends DOMStructure
implements ReferenceType, DOMURIReference

DOM-based implementation of DOMReferenceType.


Field Summary
(package private)  java.util.List content
           
(package private)  java.io.InputStream dis
           
(package private)  org.w3c.dom.Element refElem
           
(package private)  java.lang.String uri
           
 
Constructor Summary
DOMReferenceType(org.w3c.dom.Element refElem)
          Creates a DOMDOMReferenceType from an element.
DOMReferenceType(java.lang.String uri, java.util.List content)
          Creates a Reference from the specified parameters.
 
Method Summary
 boolean equals(java.lang.Object o)
           
 java.util.List getContent()
          Returns an unmodifiable list of XMLStructures representing the child elements of this ReferenceType.
 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.
abstract  void marshal(org.w3c.dom.Node parent, java.lang.String encPrefix, DOMCryptoContext context)
           
 
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
 
Methods inherited from interface javax.xml.crypto.dom.DOMURIReference
getHere
 

Field Detail

uri

final java.lang.String uri

content

java.util.List content

refElem

org.w3c.dom.Element refElem

dis

java.io.InputStream dis
Constructor Detail

DOMReferenceType

public DOMReferenceType(java.lang.String uri,
                        java.util.List content)
Creates a Reference from the specified parameters.

Parameters:
uri - the URI
content - optional child elements to aid the recipient in retrieving the EncryptedData (maybe null)
Throws:
java.lang.NullPointerException - if uri is null
java.lang.ClassCastException - if any of the content are not of type XMLStructure

DOMReferenceType

public DOMReferenceType(org.w3c.dom.Element refElem)
                 throws MarshalException
Creates a DOMDOMReferenceType from an element.

Parameters:
refElem - a Reference element
Throws:
MarshalException
Method Detail

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)

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)

getContent

public java.util.List getContent()
Description copied from interface: ReferenceType
Returns an unmodifiable list of XMLStructures representing the child elements of this ReferenceType.

Specified by:
getContent in interface ReferenceType
Returns:
an unmodifiable list of XMLStructures (may be empty but never null)

marshal

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

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.