KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > mondrian > xmla > SaxWriter


1 /*
2 // $Id: //open/mondrian/src/main/mondrian/xmla/SaxWriter.java#4 $
3 // This software is subject to the terms of the Common Public License
4 // Agreement, available at the following URL:
5 // http://www.opensource.org/licenses/cpl.html.
6 // Copyright (C) 2003-2006 Julian Hyde
7 // All Rights Reserved.
8 // You must accept the terms of that agreement to use this software.
9 */

10 package mondrian.xmla;
11
12 /**
13  * <code>SaxWriter</code> is similar to a SAX {@link org.xml.sax.ContentHandler}
14  * which, perversely, converts its events into an output document.
15  *
16  * @author jhyde
17  * @author Gang Chen
18  * @since 27 April, 2003
19  * @version $Id: //open/mondrian/src/main/mondrian/xmla/SaxWriter.java#4 $
20  */

21 public interface SaxWriter {
22
23     public void startDocument();
24
25     public void endDocument();
26
27     public void startElement(String JavaDoc name);
28
29     public void startElement(String JavaDoc name, String JavaDoc[] attrs);
30
31     public void endElement();
32
33     public void element(String JavaDoc name, String JavaDoc[] attrs);
34
35     public void characters(String JavaDoc data);
36
37     public void completeBeforeElement(String JavaDoc tagName);
38
39     /**
40      * Sends a piece of text verbatim through the writer. It must be a piece
41      * of well-formed XML.
42      */

43     public void verbatim(String JavaDoc text);
44
45     /**
46      * Flushes any unwritten output.
47      */

48     public void flush();
49 }
50
51 // End SaxWriter.java
52
Popular Tags