APIdia Launch Partner
Top Description Fields Constructors Methods
org.jcp.xml.dsig.internal.dom

public final Class DOMRetrievalMethod

extends DOMStructure
implements RetrievalMethod, DOMURIReference
Class Inheritance
All Implemented Interfaces
javax.xml.crypto.dom.DOMURIReference, javax.xml.crypto.URIReference, javax.xml.crypto.dsig.keyinfo.RetrievalMethod, javax.xml.crypto.XMLStructure
Imports
java.io.ByteArrayInputStream, .InputStream, java.net.URI, .URISyntaxException, java.security.Provider, java.util.ArrayList, .Collections, .Iterator, .List, javax.xml.crypto.Data, .MarshalException, .NodeSetData, .URIDereferencer, .URIReferenceException, .XMLCryptoContext, .XMLStructure, javax.xml.crypto.dom.DOMCryptoContext, .DOMURIReference, javax.xml.crypto.dsig.Transform, .XMLSignature, javax.xml.crypto.dsig.keyinfo.RetrievalMethod, com.sun.org.apache.xml.internal.security.utils.XMLUtils, org.w3c.dom.Attr, .Document, .Element, .Node

DOM-based implementation of RetrievalMethod.

Field Summary

Modifier and TypeField and Description
private Attr
private final List<Transform>
private String
private String

Constructor Summary

AccessConstructor and Description
public
DOMRetrievalMethod(String
the URI
uri
,
String
the type
type
,
List<? extends Transform>
a list of Transforms. The list is defensively copied to prevent subsequent modification. May be null or empty.
transforms
)

Creates a DOMRetrievalMethod containing the specified URIReference and List of Transforms.

public
DOMRetrievalMethod(Element
a RetrievalMethod element
rmElem
,
XMLCryptoContext context, Provider provider)

Creates a DOMRetrievalMethod from an element.

Method Summary

Modifier and TypeMethod and Description
public Data
dereference(XMLCryptoContext context)

Implements javax.xml.crypto.dsig.keyinfo.RetrievalMethod.dereference.

Dereferences the KeyInfo information referenced by this RetrievalMethod and applies the specified Transforms.

public XMLStructure
public boolean
equals(Object obj)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

public Node
getHere()

Implements javax.xml.crypto.dom.DOMURIReference.getHere.

Returns the here node.

public List<Transform>
public String
getType()

Implements javax.xml.crypto.URIReference.getType.

Returns the type of data referenced by this URI.

public String
getURI()

Implements javax.xml.crypto.dsig.keyinfo.RetrievalMethod.getURI, javax.xml.crypto.URIReference.getURI.

Returns the URI of the referenced KeyInfo information.

public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.

public void
Inherited from org.jcp.xml.dsig.internal.dom.DOMStructure:
equalsContentisFeatureSupported

Field Detail

hereback to summary
private Attr here
transformsback to summary
private final List<Transform> transforms
typeback to summary
private String type
uriback to summary
private String uri

Constructor Detail

DOMRetrievalMethodback to summary
public DOMRetrievalMethod(String uri, String type, List<? extends Transform> transforms)

Creates a DOMRetrievalMethod containing the specified URIReference and List of Transforms.

Parameters
uri:String

the URI

type:String

the type

transforms:List<? extends Transform>

a list of Transforms. The list is defensively copied to prevent subsequent modification. May be null or empty.

Exceptions
IllegalArgumentException:
if the format of uri is invalid, as specified by Reference's URI attribute in the W3C specification for XML-Signature Syntax and Processing
NullPointerException:
if uriReference is null
ClassCastException:
if transforms contains any entries that are not of type Transform
DOMRetrievalMethodback to summary
public DOMRetrievalMethod(Element rmElem, XMLCryptoContext context, Provider provider) throws MarshalException

Creates a DOMRetrievalMethod from an element.

Parameters
rmElem:Element

a RetrievalMethod element

Method Detail

dereferenceback to summary
public Data dereference(XMLCryptoContext context) throws URIReferenceException

Implements javax.xml.crypto.dsig.keyinfo.RetrievalMethod.dereference.

Doc from javax.xml.crypto.dsig.keyinfo.RetrievalMethod.dereference.

Dereferences the KeyInfo information referenced by this RetrievalMethod and applies the specified Transforms.

Annotations
@Override
Exceptions
URIReferenceException:
if there is an error while dereferencing
dereferenceAsXMLStructureback to summary
public XMLStructure dereferenceAsXMLStructure(XMLCryptoContext context) throws URIReferenceException
equalsback to summary
public boolean equals(Object obj)

Overrides java.lang.Object.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Annotations
@Override
getHereback to summary
public Node getHere()

Implements javax.xml.crypto.dom.DOMURIReference.getHere.

Doc from javax.xml.crypto.dom.DOMURIReference.getHere.

Returns the here node.

Annotations
@Override
getTransformsback to summary
public List<Transform> getTransforms()

Implements javax.xml.crypto.dsig.keyinfo.RetrievalMethod.getTransforms.

Doc from javax.xml.crypto.dsig.keyinfo.RetrievalMethod.getTransforms.

Returns an unmodifiable list of Transforms of this RetrievalMethod.

Annotations
@Override
getTypeback to summary
public String getType()

Implements javax.xml.crypto.URIReference.getType.

Doc from javax.xml.crypto.URIReference.getType.

Returns the type of data referenced by this URI.

Annotations
@Override
getURIback to summary
public String getURI()

Implements javax.xml.crypto.dsig.keyinfo.RetrievalMethod.getURI, javax.xml.crypto.URIReference.getURI.

Doc from javax.xml.crypto.dsig.keyinfo.RetrievalMethod.getURI.

Returns the URI of the referenced KeyInfo information.

Annotations
@Override
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Annotations
@Override
marshalback to summary
public void marshal(Node parent, String dsPrefix, DOMCryptoContext context) throws MarshalException

Implements abstract org.jcp.xml.dsig.internal.dom.DOMStructure.marshal.

Annotations
@Override