Class XMLSignatureInputDebugger
- java.lang.Object
-
- org.apache.xml.security.signature.XMLSignatureInputDebugger
-
public class XMLSignatureInputDebugger extends java.lang.ObjectClass XMLSignatureInputDebugger
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static AttrCompareATTR_COMPARE(package private) static java.lang.StringHTMLExcludedInclusiveNamespacePrefix(package private) static java.lang.StringHTMLExcludePrefix(package private) static java.lang.StringHTMLIncludedInclusiveNamespacePrefix(package private) static java.lang.StringHTMLIncludeOrExcludeSuffix(package private) static java.lang.StringHTMLIncludePrefix(package private) static java.lang.StringHTMLPrefixThe HTML Prefix*(package private) static java.lang.StringHTMLSuffixHTML Suffix *private java.util.Set<java.lang.String>inclusiveNamespacesprivate static intNODE_AFTER_DOCUMENT_ELEMENTprivate static intNODE_BEFORE_DOCUMENT_ELEMENTprivate static intNODE_NOT_BEFORE_OR_AFTER_DOCUMENT_ELEMENTprivate java.io.WriterwriterField writerprivate java.util.Set<org.w3c.dom.Node>xpathNodeSetField _xmlSignatureInput
-
Constructor Summary
Constructors Constructor Description XMLSignatureInputDebugger(XMLSignatureInput xmlSignatureInput)Constructor XMLSignatureInputDebuggerXMLSignatureInputDebugger(XMLSignatureInput xmlSignatureInput, java.util.Set<java.lang.String> inclusiveNamespace)Constructor XMLSignatureInputDebugger
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidcanonicalizeXPathNodeSet(org.w3c.dom.Node currentNode)Method canonicalizeXPathNodeSetjava.lang.StringgetHTMLRepresentation()Method getHTMLRepresentationprivate intgetPositionRelativeToDocumentElement(org.w3c.dom.Node currentNode)Checks whether a Comment or ProcessingInstruction is before or after the document element.private voidoutputAttrToWriter(java.lang.String name, java.lang.String value)Normalizes anAttribute value The string value of the node is modified by replacing all ampersands (&) with&all open angle brackets (<) with<all quotation mark characters with"and the whitespace characters#x9, #xA, and #xD, with character references.private voidoutputCommentToWriter(org.w3c.dom.Comment currentComment)Method outputCommentToWriterprivate voidoutputPItoWriter(org.w3c.dom.ProcessingInstruction currentPI)Normalizes aCommentvalueprivate voidoutputTextToWriter(java.lang.String text)Method outputTextToWriter
-
-
-
Field Detail
-
xpathNodeSet
private java.util.Set<org.w3c.dom.Node> xpathNodeSet
Field _xmlSignatureInput
-
inclusiveNamespaces
private java.util.Set<java.lang.String> inclusiveNamespaces
-
writer
private java.io.Writer writer
Field writer
-
HTMLPrefix
static final java.lang.String HTMLPrefix
The HTML Prefix*- See Also:
- Constant Field Values
-
HTMLSuffix
static final java.lang.String HTMLSuffix
HTML Suffix *- See Also:
- Constant Field Values
-
HTMLExcludePrefix
static final java.lang.String HTMLExcludePrefix
- See Also:
- Constant Field Values
-
HTMLIncludePrefix
static final java.lang.String HTMLIncludePrefix
- See Also:
- Constant Field Values
-
HTMLIncludeOrExcludeSuffix
static final java.lang.String HTMLIncludeOrExcludeSuffix
- See Also:
- Constant Field Values
-
HTMLIncludedInclusiveNamespacePrefix
static final java.lang.String HTMLIncludedInclusiveNamespacePrefix
- See Also:
- Constant Field Values
-
HTMLExcludedInclusiveNamespacePrefix
static final java.lang.String HTMLExcludedInclusiveNamespacePrefix
- See Also:
- Constant Field Values
-
NODE_BEFORE_DOCUMENT_ELEMENT
private static final int NODE_BEFORE_DOCUMENT_ELEMENT
- See Also:
- Constant Field Values
-
NODE_NOT_BEFORE_OR_AFTER_DOCUMENT_ELEMENT
private static final int NODE_NOT_BEFORE_OR_AFTER_DOCUMENT_ELEMENT
- See Also:
- Constant Field Values
-
NODE_AFTER_DOCUMENT_ELEMENT
private static final int NODE_AFTER_DOCUMENT_ELEMENT
- See Also:
- Constant Field Values
-
ATTR_COMPARE
static final AttrCompare ATTR_COMPARE
-
-
Constructor Detail
-
XMLSignatureInputDebugger
public XMLSignatureInputDebugger(XMLSignatureInput xmlSignatureInput)
Constructor XMLSignatureInputDebugger- Parameters:
xmlSignatureInput- the signature to pretty print
-
XMLSignatureInputDebugger
public XMLSignatureInputDebugger(XMLSignatureInput xmlSignatureInput, java.util.Set<java.lang.String> inclusiveNamespace)
Constructor XMLSignatureInputDebugger- Parameters:
xmlSignatureInput- the signatur to pretty printinclusiveNamespace-
-
-
Method Detail
-
getHTMLRepresentation
public java.lang.String getHTMLRepresentation() throws XMLSignatureExceptionMethod getHTMLRepresentation- Returns:
- The HTML Representation.
- Throws:
XMLSignatureException
-
canonicalizeXPathNodeSet
private void canonicalizeXPathNodeSet(org.w3c.dom.Node currentNode) throws XMLSignatureException, java.io.IOExceptionMethod canonicalizeXPathNodeSet- Parameters:
currentNode-- Throws:
XMLSignatureExceptionjava.io.IOException
-
getPositionRelativeToDocumentElement
private int getPositionRelativeToDocumentElement(org.w3c.dom.Node currentNode)
Checks whether a Comment or ProcessingInstruction is before or after the document element. This is needed for prepending or appending "\n"s.- Parameters:
currentNode- comment or pi to check- Returns:
- NODE_BEFORE_DOCUMENT_ELEMENT, NODE_NOT_BEFORE_OR_AFTER_DOCUMENT_ELEMENT or NODE_AFTER_DOCUMENT_ELEMENT
- See Also:
NODE_BEFORE_DOCUMENT_ELEMENT,NODE_NOT_BEFORE_OR_AFTER_DOCUMENT_ELEMENT,NODE_AFTER_DOCUMENT_ELEMENT
-
outputAttrToWriter
private void outputAttrToWriter(java.lang.String name, java.lang.String value) throws java.io.IOExceptionNormalizes anAttribute value The string value of the node is modified by replacing- all ampersands (&) with
& - all open angle brackets (<) with
< - all quotation mark characters with
" - and the whitespace characters
#x9, #xA, and #xD, with character references. The character references are written in uppercase hexadecimal with no leading zeroes (for example,#xDis represented by the character reference
)
- Parameters:
name-value-- Throws:
java.io.IOException
- all ampersands (&) with
-
outputPItoWriter
private void outputPItoWriter(org.w3c.dom.ProcessingInstruction currentPI) throws java.io.IOExceptionNormalizes aCommentvalue- Parameters:
currentPI-- Throws:
java.io.IOException
-
outputCommentToWriter
private void outputCommentToWriter(org.w3c.dom.Comment currentComment) throws java.io.IOExceptionMethod outputCommentToWriter- Parameters:
currentComment-- Throws:
java.io.IOException
-
outputTextToWriter
private void outputTextToWriter(java.lang.String text) throws java.io.IOExceptionMethod outputTextToWriter- Parameters:
text-- Throws:
java.io.IOException
-
-