KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > xml > crypto > dsig > CanonicalizationMethod


1 /*
2  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
3  */

4 /*
5  * $Id: CanonicalizationMethod.java,v 1.6 2005/05/10 16:03:45 mullan Exp $
6  */

7 package javax.xml.crypto.dsig;
8
9 import java.security.spec.AlgorithmParameterSpec JavaDoc;
10 import javax.xml.crypto.dsig.spec.C14NMethodParameterSpec;
11
12 /**
13  * A representation of the XML <code>CanonicalizationMethod</code>
14  * element as defined in the
15  * <a HREF="http://www.w3.org/TR/xmldsig-core/">
16  * W3C Recommendation for XML-Signature Syntax and Processing</a>. The XML
17  * Schema Definition is defined as:
18  * <p>
19  * <pre>
20  * &lt;element name="CanonicalizationMethod" type="ds:CanonicalizationMethodType"/&gt;
21  * &lt;complexType name="CanonicalizationMethodType" mixed="true"&gt;
22  * &lt;sequence&gt;
23  * &lt;any namespace="##any" minOccurs="0" maxOccurs="unbounded"/&gt;
24  * &lt;!-- (0,unbounded) elements from (1,1) namespace --&gt;
25  * &lt;/sequence&gt;
26  * &lt;attribute name="Algorithm" type="anyURI" use="required"/&gt;
27  * &lt;/complexType&gt;
28  * </pre>
29  *
30  * A <code>CanonicalizationMethod</code> instance may be created by invoking
31  * the {@link XMLSignatureFactory#newCanonicalizationMethod
32  * newCanonicalizationMethod} method of the {@link XMLSignatureFactory} class.
33  *
34  * @author Sean Mullan
35  * @author JSR 105 Expert Group
36  * @since 1.6
37  * @see XMLSignatureFactory#newCanonicalizationMethod(String, C14NMethodParameterSpec)
38  */

39 public interface CanonicalizationMethod extends Transform {
40
41     /**
42      * The <a HREF="http://www.w3.org/TR/2001/REC-xml-c14n-20010315">Canonical
43      * XML (without comments)</a> canonicalization method algorithm URI.
44      */

45     final static String JavaDoc INCLUSIVE =
46     "http://www.w3.org/TR/2001/REC-xml-c14n-20010315";
47
48     /**
49      * The
50      * <a HREF="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments">
51      * Canonical XML with comments</a> canonicalization method algorithm URI.
52      */

53     final static String JavaDoc INCLUSIVE_WITH_COMMENTS =
54         "http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments";
55
56     /**
57      * The <a HREF="http://www.w3.org/2001/10/xml-exc-c14n#">Exclusive
58      * Canonical XML (without comments)</a> canonicalization method algorithm
59      * URI.
60      */

61     final static String JavaDoc EXCLUSIVE =
62         "http://www.w3.org/2001/10/xml-exc-c14n#";
63
64     /**
65      * The <a HREF="http://www.w3.org/2001/10/xml-exc-c14n#WithComments">
66      * Exclusive Canonical XML with comments</a> canonicalization method
67      * algorithm URI.
68      */

69     final static String JavaDoc EXCLUSIVE_WITH_COMMENTS =
70         "http://www.w3.org/2001/10/xml-exc-c14n#WithComments";
71
72     /**
73      * Returns the algorithm-specific input parameters associated with this
74      * <code>CanonicalizationMethod</code>.
75      *
76      * <p>The returned parameters can be typecast to a
77      * {@link C14NMethodParameterSpec} object.
78      *
79      * @return the algorithm-specific input parameters (may be
80      * <code>null</code> if not specified)
81      */

82     AlgorithmParameterSpec JavaDoc getParameterSpec();
83 }
84
Popular Tags