Example usage for javax.xml.crypto URIDereferencer dereference

List of usage examples for javax.xml.crypto URIDereferencer dereference

Introduction

In this page you can find the example usage for javax.xml.crypto URIDereferencer dereference.

Prototype

Data dereference(URIReference uriReference, XMLCryptoContext context) throws URIReferenceException;

Source Link

Document

Dereferences the specified URIReference and returns the dereferenced data.

Usage

From source file:org.apache.jcp.xml.dsig.internal.dom.DOMReference.java

private Data dereference(XMLCryptoContext context) throws XMLSignatureException {
    Data data = null;//  ww  w . ja  v  a 2 s .c o m

    // use user-specified URIDereferencer if specified; otherwise use deflt
    URIDereferencer deref = context.getURIDereferencer();
    if (deref == null) {
        deref = DOMURIDereferencer.INSTANCE;
    }
    try {
        data = deref.dereference(this, context);
        if (log.isDebugEnabled()) {
            log.debug("URIDereferencer class name: " + deref.getClass().getName());
            log.debug("Data class name: " + data.getClass().getName());
        }
    } catch (URIReferenceException ure) {
        throw new XMLSignatureException(ure);
    }

    return data;
}