OSDN Git Service

PR target/19680
[pf3gnuchains/gcc-fork.git] / libjava / org / xml / sax / XMLFilter.java
1 // XMLFilter.java - filter SAX2 events.
2 // http://www.saxproject.org
3 // Written by David Megginson
4 // NO WARRANTY!  This class is in the Public Domain.
5
6 // $Id: XMLFilter.java,v 1.3.2.3 2002/01/29 21:34:14 dbrownell Exp $
7
8
9 package org.xml.sax;
10
11
12 /**
13  * Interface for an XML filter.
14  *
15  * <blockquote>
16  * <em>This module, both source code and documentation, is in the
17  * Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
18  * See <a href='http://www.saxproject.org'>http://www.saxproject.org</a>
19  * for further information.
20  * </blockquote>
21  *
22  * <p>An XML filter is like an XML reader, except that it obtains its
23  * events from another XML reader rather than a primary source like
24  * an XML document or database.  Filters can modify a stream of
25  * events as they pass on to the final application.</p>
26  *
27  * <p>The XMLFilterImpl helper class provides a convenient base
28  * for creating SAX2 filters, by passing on all {@link org.xml.sax.EntityResolver
29  * EntityResolver}, {@link org.xml.sax.DTDHandler DTDHandler},
30  * {@link org.xml.sax.ContentHandler ContentHandler} and {@link org.xml.sax.ErrorHandler
31  * ErrorHandler} events automatically.</p>
32  *
33  * @since SAX 2.0
34  * @author David Megginson
35  * @version 2.0.1 (sax2r2)
36  * @see org.xml.sax.helpers.XMLFilterImpl
37  */
38 public interface XMLFilter extends XMLReader
39 {
40
41     /**
42      * Set the parent reader.
43      *
44      * <p>This method allows the application to link the filter to
45      * a parent reader (which may be another filter).  The argument
46      * may not be null.</p>
47      *
48      * @param parent The parent reader.
49      */
50     public abstract void setParent (XMLReader parent);
51
52
53     /**
54      * Get the parent reader.
55      *
56      * <p>This method allows the application to query the parent
57      * reader (which may be another filter).  It is generally a
58      * bad idea to perform any operations on the parent reader
59      * directly: they should all pass through this filter.</p>
60      *
61      * @return The parent filter, or null if none has been set.
62      */
63     public abstract XMLReader getParent ();
64
65 }
66
67 // end of XMLFilter.java