KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > excalibur > xml > sax > AbstractXMLConsumer


1 /*
2  * Copyright 2002-2004 The Apache Software Foundation
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
12  * implied.
13  *
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */

17 package org.apache.excalibur.xml.sax;
18
19 import org.apache.avalon.framework.logger.AbstractLogEnabled;
20 import org.xml.sax.Attributes JavaDoc;
21 import org.xml.sax.Locator JavaDoc;
22 import org.xml.sax.SAXException JavaDoc;
23
24 /**
25  * This abstract class provides default implementation of the methods specified
26  * by the <code>XMLConsumer</code> interface.
27  *
28  * @deprecated Can be constructed using no operation handlers.
29  * @author <a HREF="mailto:dev@avalon.apache.org">Avalon Development Team</a>
30  * @version CVS $Revision: 1.4 $ $Date: 2004/02/28 11:47:20 $
31  */

32 public abstract class AbstractXMLConsumer
33     extends AbstractLogEnabled
34     implements XMLConsumer
35 {
36     /**
37      * Receive an object for locating the origin of SAX document events.
38      *
39      * @param locator An object that can return the location of any SAX
40      * document event.
41      */

42     public void setDocumentLocator( final Locator JavaDoc locator )
43     {
44     }
45
46     /**
47      * Receive notification of the beginning of a document.
48      */

49     public void startDocument()
50         throws SAXException JavaDoc
51     {
52     }
53
54     /**
55      * Receive notification of the end of a document.
56      */

57     public void endDocument()
58         throws SAXException JavaDoc
59     {
60     }
61
62     /**
63      * Begin the scope of a prefix-URI Namespace mapping.
64      *
65      * @param prefix The Namespace prefix being declared.
66      * @param uri The Namespace URI the prefix is mapped to.
67      */

68     public void startPrefixMapping( final String JavaDoc prefix,
69                                     final String JavaDoc uri )
70         throws SAXException JavaDoc
71     {
72     }
73
74     /**
75      * End the scope of a prefix-URI mapping.
76      *
77      * @param prefix The prefix that was being mapping.
78      */

79     public void endPrefixMapping( final String JavaDoc prefix )
80         throws SAXException JavaDoc
81     {
82     }
83
84     /**
85      * Receive notification of the beginning of an element.
86      *
87      * @param uri The Namespace URI, or the empty string if the element has no
88      * Namespace URI or if Namespace
89      * processing is not being performed.
90      * @param loc The local name (without prefix), or the empty string if
91      * Namespace processing is not being performed.
92      * @param raw The raw XML 1.0 name (with prefix), or the empty string if
93      * raw names are not available.
94      * @param a The attributes attached to the element. If there are no
95      * attributes, it shall be an empty Attributes object.
96      */

97     public void startElement( final String JavaDoc uri,
98                               final String JavaDoc loc,
99                               final String JavaDoc raw,
100                               final Attributes JavaDoc a )
101         throws SAXException JavaDoc
102     {
103     }
104
105     /**
106      * Receive notification of the end of an element.
107      *
108      * @param uri The Namespace URI, or the empty string if the element has no
109      * Namespace URI or if Namespace
110      * processing is not being performed.
111      * @param loc The local name (without prefix), or the empty string if
112      * Namespace processing is not being performed.
113      * @param raw The raw XML 1.0 name (with prefix), or the empty string if
114      * raw names are not available.
115      */

116     public void endElement( final String JavaDoc uri,
117                             final String JavaDoc loc,
118                             final String JavaDoc raw )
119         throws SAXException JavaDoc
120     {
121     }
122
123     /**
124      * Receive notification of character data.
125      *
126      * @param ch The characters from the XML document.
127      * @param start The start position in the array.
128      * @param len The number of characters to read from the array.
129      */

130     public void characters( final char[] ch,
131                             final int start,
132                             final int len )
133         throws SAXException JavaDoc
134     {
135     }
136
137     /**
138      * Receive notification of ignorable whitespace in element content.
139      *
140      * @param ch The characters from the XML document.
141      * @param start The start position in the array.
142      * @param len The number of characters to read from the array.
143      */

144     public void ignorableWhitespace( final char[] ch,
145                                      final int start,
146                                      final int len )
147         throws SAXException JavaDoc
148     {
149     }
150
151     /**
152      * Receive notification of a processing instruction.
153      *
154      * @param target The processing instruction target.
155      * @param data The processing instruction data, or null if none was
156      * supplied.
157      */

158     public void processingInstruction( final String JavaDoc target,
159                                        final String JavaDoc data )
160         throws SAXException JavaDoc
161     {
162     }
163
164     /**
165      * Receive notification of a skipped entity.
166      *
167      * @param name The name of the skipped entity. If it is a parameter
168      * entity, the name will begin with '%'.
169      */

170     public void skippedEntity( final String JavaDoc name )
171         throws SAXException JavaDoc
172     {
173     }
174
175     /**
176      * Report the start of DTD declarations, if any.
177      *
178      * @param name The document type name.
179      * @param publicId The declared public identifier for the external DTD
180      * subset, or null if none was declared.
181      * @param systemId The declared system identifier for the external DTD
182      * subset, or null if none was declared.
183      */

184     public void startDTD( final String JavaDoc name,
185                           final String JavaDoc publicId,
186                           final String JavaDoc systemId )
187         throws SAXException JavaDoc
188     {
189     }
190
191     /**
192      * Report the end of DTD declarations.
193      */

194     public void endDTD()
195         throws SAXException JavaDoc
196     {
197     }
198
199     /**
200      * Report the beginning of an entity.
201      *
202      * @param name The name of the entity. If it is a parameter entity, the
203      * name will begin with '%'.
204      */

205     public void startEntity( final String JavaDoc name )
206         throws SAXException JavaDoc
207     {
208     }
209
210     /**
211      * Report the end of an entity.
212      *
213      * @param name The name of the entity that is ending.
214      */

215     public void endEntity( final String JavaDoc name )
216         throws SAXException JavaDoc
217     {
218     }
219
220     /**
221      * Report the start of a CDATA section.
222      */

223     public void startCDATA()
224         throws SAXException JavaDoc
225     {
226     }
227
228     /**
229      * Report the end of a CDATA section.
230      */

231     public void endCDATA()
232         throws SAXException JavaDoc
233     {
234     }
235
236     /**
237      * Report an XML comment anywhere in the document.
238      *
239      * @param ch An array holding the characters in the comment.
240      * @param start The starting position in the array.
241      * @param len The number of characters to use from the array.
242      */

243     public void comment( final char[] ch,
244                          final int start,
245                          final int len )
246         throws SAXException JavaDoc
247     {
248     }
249 }
250
Popular Tags