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