org.apache.axiom.c14n
Class Canonicalizer

java.lang.Object
  extended by org.apache.axiom.c14n.Canonicalizer

public class Canonicalizer
extends Object


Field Summary
static String ALGO_ID_C14N_EXCL_OMIT_COMMENTS
          The URL defined in XML-SEC Rec for exclusive org.apache.axiom.c14n.impl without comments.
static String ALGO_ID_C14N_EXCL_WITH_COMMENTS
          The URL defined in XML-SEC Rec for exclusive org.apache.axiom.c14n.impl with comments.
static String ALGO_ID_C14N_OMIT_COMMENTS
          The URL defined in XML-SEC Rec for inclusive org.apache.axiom.c14n.impl without comments.
static String ALGO_ID_C14N_WITH_COMMENTS
          The URL defined in XML-SEC Rec for inclusive org.apache.axiom.c14n.impl with comments.
protected  CanonicalizerSpi canonicalizerSpi
           
 
Method Summary
 byte[] canonicalize(byte[] inputBytes)
          Method canonicalize
 byte[] canonicalizeSubtree(OMElement element)
          Canonicalizes the subtree rooted by element.
 byte[] canonicalizeSubtree(OMElement element, String inclusiveNamespaces)
          Canonicalizes the subtree rooted by element.
 String getImplementingCanonicalizerClass()
          Method getImplementingCanonicalizerClss
 boolean getIncludeComments()
          Method engineGetIncludeComments
static Canonicalizer getInstance(String algorithmURI)
          Method getInstance
 String getURI()
          Method engineGetURI()
static void init()
          Method init
 void notReset()
          Set the canonicalizator behaviour to not reset.
static void register(String algorithmURI, String implementingClass)
          Method register
 void setWriter(OutputStream os)
          Sets the writter where the cannocalization ends.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALGO_ID_C14N_OMIT_COMMENTS

public static final String ALGO_ID_C14N_OMIT_COMMENTS
The URL defined in XML-SEC Rec for inclusive org.apache.axiom.c14n.impl without comments.

See Also:
Constant Field Values

ALGO_ID_C14N_WITH_COMMENTS

public static final String ALGO_ID_C14N_WITH_COMMENTS
The URL defined in XML-SEC Rec for inclusive org.apache.axiom.c14n.impl with comments.

See Also:
Constant Field Values

ALGO_ID_C14N_EXCL_OMIT_COMMENTS

public static final String ALGO_ID_C14N_EXCL_OMIT_COMMENTS
The URL defined in XML-SEC Rec for exclusive org.apache.axiom.c14n.impl without comments.

See Also:
Constant Field Values

ALGO_ID_C14N_EXCL_WITH_COMMENTS

public static final String ALGO_ID_C14N_EXCL_WITH_COMMENTS
The URL defined in XML-SEC Rec for exclusive org.apache.axiom.c14n.impl with comments.

See Also:
Constant Field Values

canonicalizerSpi

protected CanonicalizerSpi canonicalizerSpi
Method Detail

init

public static void init()
Method init


getInstance

public static final Canonicalizer getInstance(String algorithmURI)
                                       throws InvalidCanonicalizerException
Method getInstance

Parameters:
algorithmURI -
Returns:
an appropriate Canonicalizer instance
Throws:
InvalidCanonicalizerException

register

public static void register(String algorithmURI,
                            String implementingClass)
                     throws AlgorithmAlreadyRegisteredException
Method register

Parameters:
algorithmURI -
implementingClass -
Throws:
AlgorithmAlreadyRegisteredException

getURI

public final String getURI()
Method engineGetURI()

Returns:
the URI of the canonicalization method

getIncludeComments

public boolean getIncludeComments()
Method engineGetIncludeComments

Returns:
true if comments are included or false otherwise

canonicalize

public byte[] canonicalize(byte[] inputBytes)
                    throws CanonicalizationException
Method canonicalize

Parameters:
inputBytes -
Returns:
the canonicalized array of bytes
Throws:
CanonicalizationException

canonicalizeSubtree

public byte[] canonicalizeSubtree(OMElement element)
                           throws CanonicalizationException
Canonicalizes the subtree rooted by element.

Parameters:
element - The element to canicalize
Returns:
the result of the org.apache.axiom.c14n.impl.
Throws:
CanonicalizationException

canonicalizeSubtree

public byte[] canonicalizeSubtree(OMElement element,
                                  String inclusiveNamespaces)
                           throws CanonicalizationException
Canonicalizes the subtree rooted by element.

Parameters:
element -
inclusiveNamespaces -
Returns:
the result of the org.apache.axiom.c14n.impl.
Throws:
CanonicalizationException

setWriter

public void setWriter(OutputStream os)
Sets the writter where the cannocalization ends. ByteArrayOutputStream if none is setted.

Parameters:
os -

getImplementingCanonicalizerClass

public String getImplementingCanonicalizerClass()
Method getImplementingCanonicalizerClss

Returns:
the name of the implementing CanonicalizerSpi class

notReset

public void notReset()
Set the canonicalizator behaviour to not reset.



Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.