KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jfree > xml > ElementDefinitionHandler


1 /* ========================================================================
2  * JCommon : a free general purpose class library for the Java(tm) platform
3  * ========================================================================
4  *
5  * (C) Copyright 2000-2005, by Object Refinery Limited and Contributors.
6  *
7  * Project Info: http://www.jfree.org/jcommon/index.html
8  *
9  * This library is free software; you can redistribute it and/or modify it
10  * under the terms of the GNU Lesser General Public License as published by
11  * the Free Software Foundation; either version 2.1 of the License, or
12  * (at your option) any later version.
13  *
14  * This library is distributed in the hope that it will be useful, but
15  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
17  * License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with this library; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
22  * USA.
23  *
24  * [Java is a trademark or registered trademark of Sun Microsystems, Inc.
25  * in the United States and other countries.]
26  *
27  * ----------------------------
28  * ElementDefinitionHandler.java
29  * ----------------------------
30  * (C)opyright 2003-2005, by Thomas Morgner and Contributors.
31  *
32  * Original Author: Thomas Morgner;
33  * Contributor(s): David Gilbert (for Object Refinery Limited);
34  *
35  * $Id: ElementDefinitionHandler.java,v 1.4 2005/11/14 10:57:22 mungady Exp $
36  *
37  * Changes
38  * -------
39  * 21-Feb-2003 : Added standard header and Javadocs (DG);
40  * 29-Apr-2003 : Distilled from the JFreeReport project and moved into JCommon
41  *
42  */

43
44 package org.jfree.xml;
45
46 import org.xml.sax.Attributes JavaDoc;
47 import org.xml.sax.SAXException JavaDoc;
48
49 /**
50  * A element definition handler. The element definition handler is used to
51  * represent a certain parser state. The current state is set in the parser
52  * using the pushFactory() method. The parser forwards any incoming SAXEvent
53  * to the current handler, until the handler is removed with popFactory().
54  *
55  * @author Thomas Morgner
56  */

57 public interface ElementDefinitionHandler {
58
59     /**
60      * Callback to indicate that an XML element start tag has been read by the parser.
61      *
62      * @param tagName the tag name.
63      * @param attrs the attributes.
64      *
65      * @throws SAXException if a parser error occurs or the validation failed.
66      */

67     public void startElement(String JavaDoc tagName, Attributes JavaDoc attrs) throws SAXException JavaDoc;
68
69     /**
70      * Callback to indicate that some character data has been read.
71      *
72      * @param ch the character array.
73      * @param start the start index for the characters.
74      * @param length the length of the character sequence.
75      * @throws SAXException if a parser error occurs or the validation failed.
76      */

77     public void characters(char[] ch, int start, int length) throws SAXException JavaDoc;
78
79     /**
80      * Callback to indicate that an XML element end tag has been read by the parser.
81      *
82      * @param tagName the tag name.
83      *
84      * @throws SAXException if a parser error occurs or the validation failed.
85      */

86     public void endElement(String JavaDoc tagName) throws SAXException JavaDoc;
87
88     /**
89      * Returns the parser.
90      *
91      * @return The parser.
92      */

93     public Parser getParser();
94
95 }
96
Popular Tags