KickJava   Java API By Example, From Geeks To Geeks.

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


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.xml.sax.Attributes JavaDoc;
20 import org.xml.sax.ContentHandler JavaDoc;
21 import org.xml.sax.Locator JavaDoc;
22 import org.xml.sax.SAXException JavaDoc;
23
24 /**
25  * This class provides default implementation of the methods specified
26  * by the <code>ContentHandler</code> interface.
27  *
28  * @author <a HREF="mailto:dev@avalon.apache.org">Avalon Development Team</a>
29  * @version CVS $Revision: 1.4 $ $Date: 2004/02/28 11:47:20 $
30  */

31 public class NOPContentHandler
32     implements ContentHandler JavaDoc
33 {
34     /**
35      * Receive an object for locating the origin of SAX document events.
36      * @param locator An object that can return the location of any SAX
37      * document event.
38      */

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

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

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

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

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

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

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

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

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

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

167     public void skippedEntity( final String JavaDoc name )
168         throws SAXException JavaDoc
169     {
170     }
171 }
172
Popular Tags