KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jvnet > fastinfoset > FastInfosetParser


1 /*
2  * Fast Infoset ver. 0.1 software ("Software")
3  *
4  * Copyright, 2004-2005 Sun Microsystems, Inc. All Rights Reserved.
5  *
6  * Software is licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License. You may
8  * obtain a copy of the License at:
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15  * License for the specific language governing permissions and limitations.
16  *
17  * Sun supports and benefits from the global community of open source
18  * developers, and thanks the community for its important contributions and
19  * open standards-based technology, which Sun has adopted into many of its
20  * products.
21  *
22  * Please note that portions of Software may be provided with notices and
23  * open source licenses from such communities and third parties that govern the
24  * use of those portions, and any licenses granted hereunder do not alter any
25  * rights and obligations you may have under such open source licenses,
26  * however, the disclaimer of warranty and limitation of liability provisions
27  * in this License will apply to all Software in this distribution.
28  *
29  * You acknowledge that the Software is not designed, licensed or intended
30  * for use in the design, construction, operation or maintenance of any nuclear
31  * facility.
32  *
33  * Apache License
34  * Version 2.0, January 2004
35  * http://www.apache.org/licenses/
36  *
37  */

38
39 package org.jvnet.fastinfoset;
40
41 import java.util.Map JavaDoc;
42
43 /**
44  *
45  * @author Paul.Sandoz@Sun.Com
46  */

47 public interface FastInfosetParser {
48     /**
49      * The property name to be used for getting and setting the string
50      * interning property of a parser.
51      *
52      */

53     public static final String JavaDoc STRING_INTERNING_PROPERTY =
54         "http://jvnet.org/fastinfoset/parser/properties/string-interning";
55
56     /**
57      * The property name to be used for getting and setting the buffer size
58      * of a parser.
59      */

60     public static final String JavaDoc BUFFER_SIZE_PROPERTY =
61         "http://jvnet.org/fastinfoset/parser/properties/buffer-size";
62
63     /**
64      * The property name to be used for getting and setting the
65      * Map containing encoding algorithms.
66      *
67      */

68     public static final String JavaDoc REGISTERED_ENCODING_ALGORITHMS_PROPERTY =
69         "http://jvnet.org/fastinfoset/parser/properties/registered-encoding-algorithms";
70     
71    /**
72      * The property name to be used for getting and setting the
73      * Map containing external vocabularies.
74      *
75      */

76     public static final String JavaDoc EXTERNAL_VOCABULARIES_PROPERTY =
77         "http://jvnet.org/fastinfoset/parser/properties/external-vocabularies";
78     
79    
80     /**
81      * Set the string interning property.
82      *
83      * <p>If the string interning property is set to true then
84      * <code>String</code> objects instantiated for [namespace name], [prefix]
85      * and [local name] infoset properties will be interned using the method
86      * {@link String#intern()}.
87      *
88      * @param stringInterning The string interning property.
89      */

90     public void setStringInterning(boolean stringInterning);
91     
92     /**
93      * Return the string interning property.
94      *
95      * @return The string interning property.
96      */

97     public boolean getStringInterning();
98     
99     /**
100      * Set the buffer size.
101      *
102      * <p>The size of the buffer for parsing is set using this
103      * method. Requests for sizes smaller then the current size will be ignored.
104      * Otherwise the buffer will be resized when the next parse is performed.<p>
105      *
106      * @param bufferSize The requested buffer size.
107      */

108     public void setBufferSize(int bufferSize);
109     
110     
111     /**
112      * Get the buffer size.
113      *
114      * @return The buffer size.
115      */

116     public int getBufferSize();
117     
118
119     /**
120      * Sets the set of registered encoding algorithms.
121      *
122      * @param algorithms The set of registered algorithms.
123      */

124     public void setRegisteredEncodingAlgorithms(Map JavaDoc algorithms);
125     
126     /**
127      * Gets the set of registered encoding algorithms.
128      *
129      * @return The set of registered algorithms.
130      */

131     public Map JavaDoc getRegisteredEncodingAlgorithms();
132
133
134     
135     // Vocabulary methods
136

137     // Before parsing
138

139     public void setExternalVocabularies(Map JavaDoc referencedVocabualries);
140     
141     public void setDynamicVocabulary(Vocabulary v);
142     
143     
144     // After parsing
145

146     public ReferencedVocabulary getExternalVocabulary();
147     
148     public Vocabulary getIntitialVocabulary();
149
150     public Vocabulary getDynamicVocabulary();
151
152     public Vocabulary getFinalVocabulary();
153 }
154
Popular Tags