author | mkos |
Sun, 30 Dec 2012 00:00:00 +0100 | |
changeset 22678 | ac1ea46be942 |
parent 12009 | 4abb694f273a |
permissions | -rw-r--r-- |
12009 | 1 |
/* |
22678
ac1ea46be942
8029237: Update copyright year to match last edit in jaxws repository for 2012
mkos
parents:
12009
diff
changeset
|
2 |
* Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved. |
12009 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
7 |
* published by the Free Software Foundation. Oracle designates this |
|
8 |
* particular file as subject to the "Classpath" exception as provided |
|
9 |
* by Oracle in the LICENSE file that accompanied this code. |
|
10 |
* |
|
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
* accompanied this code). |
|
16 |
* |
|
17 |
* You should have received a copy of the GNU General Public License version |
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
* |
|
21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
|
22 |
* or visit www.oracle.com if you need additional information or have any |
|
23 |
* questions. |
|
24 |
* |
|
25 |
* THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC. |
|
26 |
*/ |
|
27 |
||
28 |
package com.sun.xml.internal.org.jvnet.fastinfoset.sax; |
|
29 |
||
30 |
import org.xml.sax.Attributes; |
|
31 |
||
32 |
||
33 |
/** |
|
34 |
* Interface for a list of XML attributes that may contain encoding algorithm |
|
35 |
* data. |
|
36 |
* <p> |
|
37 |
* Implementations shall ensure that the {@link Attributes#getValue(int)} method |
|
38 |
* correctly returns a String object even if the attribute is represented |
|
39 |
* as algorithm data. |
|
40 |
* <p> |
|
41 |
* If an attribute has algorithm data then the {@link #getAlgorithmData} method |
|
42 |
* shall return a non <code>null</code> value. |
|
43 |
* |
|
44 |
* @see com.sun.xml.internal.org.jvnet.fastinfoset.sax.FastInfosetReader |
|
45 |
* @see org.xml.sax.XMLReader |
|
46 |
*/ |
|
47 |
public interface EncodingAlgorithmAttributes extends Attributes { |
|
48 |
||
49 |
/** |
|
50 |
* Return the URI of the encoding algorithm. |
|
51 |
* |
|
52 |
* <p>If the algorithm data corresponds to a built-in encoding algorithm |
|
53 |
* then the null is returned.</p> |
|
54 |
* |
|
55 |
* <p>If the algorithm data corresponds to an application-defined encoding |
|
56 |
* algorithm then the URI of the algorithm is returned.</p> |
|
57 |
* |
|
58 |
* <p>If {@link #getAlgorithmData(int)} returns null then the result of |
|
59 |
* this method is undefined.<p> |
|
60 |
* |
|
61 |
* @param index The attribute index (zero-based). |
|
62 |
* @return The URI. If the index is out of range then null is returned. |
|
63 |
*/ |
|
64 |
public String getAlgorithmURI(int index); |
|
65 |
||
66 |
/** |
|
67 |
* Return the index of the encoding algorithm. |
|
68 |
* |
|
69 |
* <p>If {@link #getAlgorithmData(int)} returns null then the result of |
|
70 |
* this method is undefined.<p> |
|
71 |
* |
|
72 |
* @param index The attribute index (zero-based). |
|
73 |
* @return The algorithm index. If index is out of range then -1 is returned. |
|
74 |
* @see com.sun.xml.internal.org.jvnet.fastinfoset.EncodingAlgorithmIndexes |
|
75 |
*/ |
|
76 |
public int getAlgorithmIndex(int index); |
|
77 |
||
78 |
/** |
|
79 |
* Return the data of the encoding algorithm. |
|
80 |
* |
|
81 |
* <p>If the algorithm data corresponds to a built-in encoding algorithm |
|
82 |
* then an Object corresponding to the Java primitive type is returned.</p> |
|
83 |
* |
|
84 |
* <p>If the algorithm data corresponds to an application-defined encoding |
|
85 |
* algorithm then an Object that is an instance of <code>byte[]</code> |
|
86 |
* is returned if there is no EncodingAlgorithm registered for the |
|
87 |
* application-defined encoding algorithm URI. Otherwise, an Object produced |
|
88 |
* from the registeredEncodingAlgorithm is returned.</p> |
|
89 |
* |
|
90 |
* <p>If there no encoding algorithm data associated an attribute then |
|
91 |
* <code>null</code> is returned.<p> |
|
92 |
* |
|
93 |
* @param index The attribute index (zero-based). |
|
94 |
* @return The data. If the index is out of range then null is returned. |
|
95 |
*/ |
|
96 |
public Object getAlgorithmData(int index); |
|
97 |
||
98 |
/** |
|
99 |
* Return the alphabet associated with the attribute value. |
|
100 |
* |
|
101 |
* @param index The attribute index (zero-based). |
|
102 |
* @return The alphabet. |
|
103 |
* If the index is out of range then null is returned. |
|
104 |
* If there is is no alphabet then null is returned. |
|
105 |
*/ |
|
106 |
public String getAlpababet(int index); |
|
107 |
||
108 |
/** |
|
109 |
* Return the whether the attribute value should be indexed or not. |
|
110 |
* |
|
111 |
* @param index The attribute index (zero-based). |
|
112 |
* @return True if attribute value should be indexed, otherwise false. |
|
113 |
*/ |
|
114 |
public boolean getToIndex(int index); |
|
115 |
} |