001 /* 002 // $Id: //open/mondrian/src/main/mondrian/xmla/SaxWriter.java#4 $ 003 // This software is subject to the terms of the Common Public License 004 // Agreement, available at the following URL: 005 // http://www.opensource.org/licenses/cpl.html. 006 // Copyright (C) 2003-2006 Julian Hyde 007 // All Rights Reserved. 008 // You must accept the terms of that agreement to use this software. 009 */ 010 package mondrian.xmla; 011 012 /** 013 * <code>SaxWriter</code> is similar to a SAX {@link org.xml.sax.ContentHandler} 014 * which, perversely, converts its events into an output document. 015 * 016 * @author jhyde 017 * @author Gang Chen 018 * @since 27 April, 2003 019 * @version $Id: //open/mondrian/src/main/mondrian/xmla/SaxWriter.java#4 $ 020 */ 021 public interface SaxWriter { 022 023 public void startDocument(); 024 025 public void endDocument(); 026 027 public void startElement(String name); 028 029 public void startElement(String name, String[] attrs); 030 031 public void endElement(); 032 033 public void element(String name, String[] attrs); 034 035 public void characters(String data); 036 037 public void completeBeforeElement(String tagName); 038 039 /** 040 * Sends a piece of text verbatim through the writer. It must be a piece 041 * of well-formed XML. 042 */ 043 public void verbatim(String text); 044 045 /** 046 * Flushes any unwritten output. 047 */ 048 public void flush(); 049 } 050 051 // End SaxWriter.java