APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.org.apache.xml.internal.security.c14n.implementations

public Class CanonicalizerPhysical

extends CanonicalizerBase
Class Inheritance
Imports
java.io.IOException, .OutputStream, java.util.Map, .Set, .SortedSet, .TreeSet, com.sun.org.apache.xml.internal.security.c14n.CanonicalizationException, .Canonicalizer, com.sun.org.apache.xml.internal.security.parser.XMLParserException, com.sun.org.apache.xml.internal.security.signature.XMLSignatureInput, org.w3c.dom.Attr, .Comment, .DOMException, .Element, .NamedNodeMap, .Node, .ProcessingInstruction

Serializes the physical representation of the subtree. All the attributes present in the subtree are emitted. The attributes are sorted within an element, with the namespace declarations appearing before the regular attributes. This algorithm is not a true canonicalization since equivalent subtrees may produce different output. It is therefore unsuitable for digital signatures. This same property makes it ideal for XML Encryption Syntax and Processing, because the decrypted XML content will share the same physical representation as the original XML content that was encrypted.

Field Summary

Inherited from com.sun.org.apache.xml.internal.security.c14n.implementations.CanonicalizerBase:
COMPARENODE_AFTER_DOCUMENT_ELEMENTNODE_BEFORE_DOCUMENT_ELEMENTNODE_NOT_BEFORE_OR_AFTER_DOCUMENT_ELEMENTXMLXML_LANG_URIXMLNSXMLNS_URI

Constructor Summary

AccessConstructor and Description
public
CanonicalizerPhysical()

Constructor Canonicalizer20010315

Method Summary

Modifier and TypeMethod and Description
protected void
public void
engineCanonicalizeSubTree(Node rootNode, String inclusiveNamespaces, OutputStream
OutputStream to write the canonicalization result
writer
)

Implements abstract com.sun.org.apache.xml.internal.security.c14n.CanonicalizerSpi.engineCanonicalizeSubTree.

Always throws a CanonicalizationException.

public void
engineCanonicalizeSubTree(Node rootNode, String inclusiveNamespaces, boolean propagateDefaultNamespace, OutputStream
OutputStream to write the canonicalization result
writer
)

Implements abstract com.sun.org.apache.xml.internal.security.c14n.CanonicalizerSpi.engineCanonicalizeSubTree.

Always throws a CanonicalizationException.

public void
engineCanonicalizeXPathNodeSet(Set<Node> xpathNodeSet, String inclusiveNamespaces, OutputStream
OutputStream to write the canonicalization result
writer
)

Implements abstract com.sun.org.apache.xml.internal.security.c14n.CanonicalizerSpi.engineCanonicalizeXPathNodeSet.

Always throws a CanonicalizationException.

public final String
protected void
protected void
outputAttributes(Element element, NameSpaceSymbTable ns, Map<String, byte[]> cache, OutputStream writer)

Implements abstract com.sun.org.apache.xml.internal.security.c14n.implementations.CanonicalizerBase.outputAttributes.

Output the attributes for this node in XPathNodeSet c14n.

protected void
outputAttributesSubtree(Element element, NameSpaceSymbTable ns, Map<String, byte[]> cache, OutputStream
OutputStream to write the canonicalization result
writer
)

Implements abstract com.sun.org.apache.xml.internal.security.c14n.implementations.CanonicalizerBase.outputAttributesSubtree.

Output the Attr[]s for the given element.

protected void
protected void
Inherited from com.sun.org.apache.xml.internal.security.c14n.implementations.CanonicalizerBase:
engineCanonicalizeengineCanonicalizeSubTreeengineCanonicalizeSubTreeengineCanonicalizeXPathNodeSetgetNullNodeisVisibleisVisibleDOisVisibleIntoutputAttrToWriter

Constructor Detail

CanonicalizerPhysicalback to summary
public CanonicalizerPhysical()

Constructor Canonicalizer20010315

Method Detail

circumventBugIfNeededback to summary
protected void circumventBugIfNeeded(XMLSignatureInput input) throws XMLParserException, IOException

Implements abstract com.sun.org.apache.xml.internal.security.c14n.implementations.CanonicalizerBase.circumventBugIfNeeded.

Annotations
@Override
engineCanonicalizeSubTreeback to summary
public void engineCanonicalizeSubTree(Node rootNode, String inclusiveNamespaces, OutputStream writer) throws CanonicalizationException

Implements abstract com.sun.org.apache.xml.internal.security.c14n.CanonicalizerSpi.engineCanonicalizeSubTree.

Always throws a CanonicalizationException.

Parameters
writer:OutputStream

OutputStream to write the canonicalization result

Annotations
@Override
engineCanonicalizeSubTreeback to summary
public void engineCanonicalizeSubTree(Node rootNode, String inclusiveNamespaces, boolean propagateDefaultNamespace, OutputStream writer) throws CanonicalizationException

Implements abstract com.sun.org.apache.xml.internal.security.c14n.CanonicalizerSpi.engineCanonicalizeSubTree.

Always throws a CanonicalizationException.

Parameters
writer:OutputStream

OutputStream to write the canonicalization result

Annotations
@Override
engineCanonicalizeXPathNodeSetback to summary
public void engineCanonicalizeXPathNodeSet(Set<Node> xpathNodeSet, String inclusiveNamespaces, OutputStream writer) throws CanonicalizationException

Implements abstract com.sun.org.apache.xml.internal.security.c14n.CanonicalizerSpi.engineCanonicalizeXPathNodeSet.

Always throws a CanonicalizationException.

Parameters
writer:OutputStream

OutputStream to write the canonicalization result

Annotations
@Override
Exceptions
CanonicalizationException:
always
engineGetURIback to summary
public final String engineGetURI()

Implements abstract com.sun.org.apache.xml.internal.security.c14n.CanonicalizerSpi.engineGetURI.

Doc from com.sun.org.apache.xml.internal.security.c14n.CanonicalizerSpi.engineGetURI.

Returns the URI of this engine.

Annotations
@Override
handleParentback to summary
protected void handleParent(Element e, NameSpaceSymbTable ns)

Overrides com.sun.org.apache.xml.internal.security.c14n.implementations.CanonicalizerBase.handleParent.

Annotations
@Override
outputAttributesback to summary
protected void outputAttributes(Element element, NameSpaceSymbTable ns, Map<String, byte[]> cache, OutputStream writer) throws CanonicalizationException, DOMException, IOException

Implements abstract com.sun.org.apache.xml.internal.security.c14n.implementations.CanonicalizerBase.outputAttributes.

Doc from com.sun.org.apache.xml.internal.security.c14n.implementations.CanonicalizerBase.outputAttributes.

Output the attributes for this node in XPathNodeSet c14n.

Annotations
@Override
outputAttributesSubtreeback to summary
protected void outputAttributesSubtree(Element element, NameSpaceSymbTable ns, Map<String, byte[]> cache, OutputStream writer) throws CanonicalizationException, DOMException, IOException

Implements abstract com.sun.org.apache.xml.internal.security.c14n.implementations.CanonicalizerBase.outputAttributesSubtree.

Output the Attr[]s for the given element.
The code of this method is a copy of outputAttributes(Element, NameSpaceSymbTable, Map, OutputStream), whereas it takes into account that subtree-c14n is -- well -- subtree-based. So if the element in question isRoot of c14n, it's parent is not in the node set, as well as all other ancestors.

Parameters
writer:OutputStream

OutputStream to write the canonicalization result

Annotations
@Override
outputCommentToWriterback to summary
protected void outputCommentToWriter(Comment currentComment, OutputStream writer, int position) throws IOException

Overrides com.sun.org.apache.xml.internal.security.c14n.implementations.CanonicalizerBase.outputCommentToWriter.

Doc from com.sun.org.apache.xml.internal.security.c14n.implementations.CanonicalizerBase.outputCommentToWriter.

Method outputCommentToWriter

Annotations
@Override
outputPItoWriterback to summary
protected void outputPItoWriter(ProcessingInstruction currentPI, OutputStream writer, int position) throws IOException

Overrides com.sun.org.apache.xml.internal.security.c14n.implementations.CanonicalizerBase.outputPItoWriter.

Doc from com.sun.org.apache.xml.internal.security.c14n.implementations.CanonicalizerBase.outputPItoWriter.

Outputs a PI to the internal Writer.

Annotations
@Override