public abstract class CanonicalizerBase extends CanonicalizerSpi
| Modifier and Type | Field and Description |
|---|---|
protected static AttrCompare |
COMPARE |
protected static int |
NODE_AFTER_DOCUMENT_ELEMENT |
protected static int |
NODE_BEFORE_DOCUMENT_ELEMENT |
protected static int |
NODE_NOT_BEFORE_OR_AFTER_DOCUMENT_ELEMENT |
static java.lang.String |
XML |
static java.lang.String |
XMLNS |
reset, secureValidation| Constructor and Description |
|---|
CanonicalizerBase(boolean includeComments)
Constructor CanonicalizerBase
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
canonicalizeSubTree(org.w3c.dom.Node currentNode,
NameSpaceSymbTable ns,
org.w3c.dom.Node endnode,
int documentLevel)
Method canonicalizeSubTree, this function is a recursive one.
|
protected void |
canonicalizeXPathNodeSet(org.w3c.dom.Node currentNode,
org.w3c.dom.Node endnode)
Canonicalizes all the nodes included in the currentNode and contained in the
xpathNodeSet field.
|
byte[] |
engineCanonicalize(XMLSignatureInput input)
Canonicalizes a Subtree node.
|
byte[] |
engineCanonicalizeSubTree(org.w3c.dom.Node rootNode)
Method engineCanonicalizeSubTree
|
protected byte[] |
engineCanonicalizeSubTree(org.w3c.dom.Node rootNode,
org.w3c.dom.Node excludeNode)
Canonicalizes a Subtree node.
|
byte[] |
engineCanonicalizeXPathNodeSet(java.util.Set<org.w3c.dom.Node> xpathNodeSet)
Method engineCanonicalizeXPathNodeSet
|
protected org.w3c.dom.Attr |
getNullNode(org.w3c.dom.Document ownerDocument) |
protected void |
getParentNameSpaces(org.w3c.dom.Element el,
NameSpaceSymbTable ns)
Adds to ns the definitions from the parent elements of el
|
protected void |
handleParent(org.w3c.dom.Element e,
NameSpaceSymbTable ns) |
protected boolean |
isVisible(org.w3c.dom.Node currentNode) |
protected int |
isVisibleDO(org.w3c.dom.Node currentNode,
int level) |
protected int |
isVisibleInt(org.w3c.dom.Node currentNode) |
protected static void |
outputAttrToWriter(java.lang.String name,
java.lang.String value,
java.io.OutputStream writer,
java.util.Map<java.lang.String,byte[]> cache)
Outputs an Attribute to the internal Writer.
|
protected void |
outputCommentToWriter(org.w3c.dom.Comment currentComment,
java.io.OutputStream writer,
int position)
Method outputCommentToWriter
|
protected void |
outputPItoWriter(org.w3c.dom.ProcessingInstruction currentPI,
java.io.OutputStream writer,
int position)
Outputs a PI to the internal Writer.
|
protected static void |
outputTextToWriter(java.lang.String text,
java.io.OutputStream writer)
Outputs a Text of CDATA section to the internal Writer.
|
void |
setWriter(java.io.OutputStream writer)
Sets the writer where the canonicalization ends.
|
engineCanonicalize, engineCanonicalizeSubTree, engineCanonicalizeSubTree, engineCanonicalizeXPathNodeSet, engineCanonicalizeXPathNodeSet, engineCanonicalizeXPathNodeSet, engineGetIncludeComments, engineGetURI, isSecureValidation, setSecureValidationpublic static final java.lang.String XML
public static final java.lang.String XMLNS
protected static final AttrCompare COMPARE
protected static final int NODE_BEFORE_DOCUMENT_ELEMENT
protected static final int NODE_NOT_BEFORE_OR_AFTER_DOCUMENT_ELEMENT
protected static final int NODE_AFTER_DOCUMENT_ELEMENT
public CanonicalizerBase(boolean includeComments)
includeComments - public byte[] engineCanonicalizeSubTree(org.w3c.dom.Node rootNode)
throws CanonicalizationException
engineCanonicalizeSubTree in class CanonicalizerSpirootNode - CanonicalizationExceptionpublic byte[] engineCanonicalizeXPathNodeSet(java.util.Set<org.w3c.dom.Node> xpathNodeSet)
throws CanonicalizationException
engineCanonicalizeXPathNodeSet in class CanonicalizerSpixpathNodeSet - CanonicalizationExceptionpublic byte[] engineCanonicalize(XMLSignatureInput input) throws CanonicalizationException
input - the root of the subtree to canicalizeCanonicalizationExceptionpublic void setWriter(java.io.OutputStream writer)
CanonicalizerSpisetWriter in class CanonicalizerSpiwriter - The writer to set.protected byte[] engineCanonicalizeSubTree(org.w3c.dom.Node rootNode,
org.w3c.dom.Node excludeNode)
throws CanonicalizationException
rootNode - the root of the subtree to canonicalizeexcludeNode - a node to be excluded from the canonicalize operationCanonicalizationExceptionprotected final void canonicalizeSubTree(org.w3c.dom.Node currentNode,
NameSpaceSymbTable ns,
org.w3c.dom.Node endnode,
int documentLevel)
throws CanonicalizationException,
java.io.IOException
currentNode - ns - endnode - CanonicalizationExceptionjava.io.IOExceptionprotected final void canonicalizeXPathNodeSet(org.w3c.dom.Node currentNode,
org.w3c.dom.Node endnode)
throws CanonicalizationException,
java.io.IOException
currentNode - endnode - CanonicalizationExceptionjava.io.IOExceptionprotected int isVisibleDO(org.w3c.dom.Node currentNode,
int level)
protected int isVisibleInt(org.w3c.dom.Node currentNode)
protected boolean isVisible(org.w3c.dom.Node currentNode)
protected void handleParent(org.w3c.dom.Element e,
NameSpaceSymbTable ns)
protected final void getParentNameSpaces(org.w3c.dom.Element el,
NameSpaceSymbTable ns)
el - ns - protected static final void outputAttrToWriter(java.lang.String name,
java.lang.String value,
java.io.OutputStream writer,
java.util.Map<java.lang.String,byte[]> cache)
throws java.io.IOException
&<"#x9, #xA, and #xD, with character
references. The character references are written in uppercase
hexadecimal with no leading zeroes (for example, #xD is represented
by the character reference 
)name - value - writer - java.io.IOExceptionprotected void outputPItoWriter(org.w3c.dom.ProcessingInstruction currentPI,
java.io.OutputStream writer,
int position)
throws java.io.IOException
currentPI - writer - where to write the thingsjava.io.IOExceptionprotected void outputCommentToWriter(org.w3c.dom.Comment currentComment,
java.io.OutputStream writer,
int position)
throws java.io.IOException
currentComment - writer - writer where to write the thingsjava.io.IOExceptionprotected static final void outputTextToWriter(java.lang.String text,
java.io.OutputStream writer)
throws java.io.IOException
text - writer - writer where to write the thingsjava.io.IOExceptionprotected org.w3c.dom.Attr getNullNode(org.w3c.dom.Document ownerDocument)
Copyright © 2007–2023. All rights reserved.