public class Reference extends BaseElement
Reference is an element that may occur one or more times. It
specifies a digest algorithm and digest value, and optionally an identifier
of the object being signed, the type of the object, and/or a list of
transforms to be applied prior to digesting. The identification (URI) and
transforms describe how the digested content (i.e., the input to the digest
method) was created. The Type attribute facilitates the
processing of referenced data. For example, while this specification makes no
requirements over external data, an application may wish to signal that the
referent is a Manifest. An optional ID attribute permits a
Reference to be referenced from elsewhere.
The following schema fragment specifies the expected content contained within this class.
<complexType name="ReferenceType">
<complexContent>
<restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
<sequence>
<element ref="{http://www.w3.org/2000/09/xmldsig#}Transforms" minOccurs="0"/>
<element ref="{http://www.w3.org/2000/09/xmldsig#}DigestMethod"/>
<element ref="{http://www.w3.org/2000/09/xmldsig#}DigestValue"/>
</sequence>
<attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
<attribute name="URI" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
<attribute name="Type" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
</restriction>
</complexContent>
</complexType>
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
MANIFEST_URI |
Document |
mReferencedDocument |
Document |
mTransformedDocument |
mContext, mElement, mId| Constructor and Description |
|---|
Reference(Context aBaglam) |
Reference(org.w3c.dom.Element aElement,
Context aContext)
Construct Reference from existing
|
| Modifier and Type | Method and Description |
|---|---|
void |
generateDigestValue() |
DigestMethod |
getDigestMethod() |
byte[] |
getDigestValue() |
java.lang.String |
getLocalName() |
Document |
getReferencedDocument() |
Manifest |
getReferencedManifest() |
Document |
getTransformedDocument()
apply transforms, if resulting document is NodeSet canonicalize it using
default c14nMethod
|
Document |
getTransformedDocument(C14nMethod aC14nMethod) |
Transforms |
getTransforms() |
java.lang.String |
getType() |
java.lang.String |
getURI() |
void |
setDigestMethod(DigestMethod aDigestMethod) |
void |
setDigestValue(byte[] aDigestValue) |
void |
setTransforms(Transforms aTransforms) |
void |
setType(java.lang.String aType) |
void |
setURI(java.lang.String aURI) |
boolean |
validateDigestValue() |
addBigIntegerElement, addLineBreak, addLineBreak, checkNamespace, createElement, generateAndSetId, getAttribute, getBigIntegerFromElement, getChildText, getContext, getDocument, getElement, getId, getNamespace, insertBase64EncodedElement, insertElement, insertTextElement, selectChildElement, selectChildren, setIdpublic Document mReferencedDocument
public Document mTransformedDocument
public static final java.lang.String MANIFEST_URI
public Reference(Context aBaglam)
public Reference(org.w3c.dom.Element aElement,
Context aContext)
throws XMLSignatureException
aElement - xml elementaContext - according to contextXMLSignatureException - when structure is invalid or can not be
resolved appropriatelypublic Document getReferencedDocument() throws XMLSignatureException
XMLSignatureExceptionpublic Document getTransformedDocument() throws XMLSignatureException
XMLSignatureExceptionpublic Document getTransformedDocument(C14nMethod aC14nMethod) throws XMLSignatureException
XMLSignatureExceptionpublic Transforms getTransforms()
public void setTransforms(Transforms aTransforms)
public DigestMethod getDigestMethod()
public void setDigestMethod(DigestMethod aDigestMethod)
public byte[] getDigestValue()
public void setDigestValue(byte[] aDigestValue)
public void generateDigestValue()
throws XMLSignatureException
XMLSignatureExceptionpublic boolean validateDigestValue()
throws XMLSignatureException
XMLSignatureExceptionpublic java.lang.String getURI()
public void setURI(java.lang.String aURI)
public java.lang.String getType()
public void setType(java.lang.String aType)
public Manifest getReferencedManifest()
public java.lang.String getLocalName()
getLocalName in class BaseElementCopyright © 2025. All rights reserved.