XFA4J

com.adobe.xfa.service.canonicalize
Class Canonicalize

java.lang.Object
  extended by com.adobe.xfa.service.canonicalize.Canonicalize

public class Canonicalize
extends java.lang.Object

A service class to canonicalize XML DOM nodes into their standard representations as defined by the Canonical XML and the Exclusive XML Canonicalization specifications.


Field Summary
static int CANONICALWITH
          Canonicalization type: generic canonicalization.
static int CANONICALWITHOUT
          Canonicalization type: generic canonicalization with all comments removed.
static int EXCLUSIVEWITH
          Canonicalization type: exclusive canonicalization.
static int EXCLUSIVEWITHOUT
          Canonicalization type: exclusive canonicalization with all comments removed.
 
Constructor Summary
Canonicalize(java.util.List<? extends Node> store, boolean bWithDescendants, boolean bLegacy_V32_Canonicalization)
          Instantiates a canonicalization service.
Canonicalize(Node node, boolean bInPlace, boolean bLegacy_V32_Canonicalization)
          Instantiates a canonicalization service.
 
Method Summary
 byte[] canonicalize(int eCanonicalType, java.util.List<java.lang.String> inclusiveNSPrefixList)
          Performs text normalization of a set of nodes.
 void canonicalize(java.io.OutputStream out, int eCanonicalType, java.util.List<java.lang.String> inclusiveNSPrefixList)
          Performs text normalization of a set of nodes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CANONICALWITH

public static final int CANONICALWITH
Canonicalization type: generic canonicalization.

See Also:
Constant Field Values

CANONICALWITHOUT

public static final int CANONICALWITHOUT
Canonicalization type: generic canonicalization with all comments removed.

See Also:
Constant Field Values

EXCLUSIVEWITH

public static final int EXCLUSIVEWITH
Canonicalization type: exclusive canonicalization.

See Also:
Constant Field Values

EXCLUSIVEWITHOUT

public static final int EXCLUSIVEWITHOUT
Canonicalization type: exclusive canonicalization with all comments removed.

See Also:
Constant Field Values
Constructor Detail

Canonicalize

public Canonicalize(Node node,
                    boolean bInPlace,
                    boolean bLegacy_V32_Canonicalization)
Instantiates a canonicalization service.

Parameters:
node - a node to be canonicalized along with its children.
bInPlace - whether to perform canonicalization on the node specified
bLegacy_V32_Canonicalization - legacy protected canonicalization flag * or on a copy.

Canonicalize

public Canonicalize(java.util.List<? extends Node> store,
                    boolean bWithDescendants,
                    boolean bLegacy_V32_Canonicalization)
Instantiates a canonicalization service.

Parameters:
store - a list of nodes to be canonicalized.
bWithDescendants - when true, canonicalize the descendants and
bLegacy_V32_Canonicalization - legacy protected canonicalization flag * attributes of each node in the list; otherwise, do not.
Method Detail

canonicalize

public byte[] canonicalize(int eCanonicalType,
                           java.util.List<java.lang.String> inclusiveNSPrefixList)
Performs text normalization of a set of nodes. This implies that:

Parameters:
eCanonicalType - the canonicalization type to use: one of CANONICALWITH, CANONICALWITHOUT, EXCLUSIVEWITH or EXCLUSIVEWITHOUT.
inclusiveNSPrefixList - a list of namespace prefixes that are handled as though performing non-exclusive canonicalization, when exclusive canonicalization type is specified.
Returns:
byte array containing the canonicalized, UTF-8 encoded, data.

canonicalize

public void canonicalize(java.io.OutputStream out,
                         int eCanonicalType,
                         java.util.List<java.lang.String> inclusiveNSPrefixList)
Performs text normalization of a set of nodes. This implies that:

Parameters:
out - the stream to be populated with the the canonicalized data. The stream will be UTF-8 encoded.
eCanonicalType - the canonicalization type to use: one of CANONICALWITH, CANONICALWITHOUT, EXCLUSIVEWITH or EXCLUSIVEWITHOUT.
inclusiveNSPrefixList - a list of namespace prefixes that are handled as though performing non-exclusive canonicalization, when exclusive canonicalization type is specified.

XFA4J

© 2005 Adobe Systems Incorporated. All Rights Reserved.