KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > xml > binding > parser > JBossXBParser


1 /*
2  * JBoss, the OpenSource J2EE webOS
3  *
4  * Distributable under LGPL license.
5  * See terms of license at gnu.org.
6  */

7 package org.jboss.xml.binding.parser;
8
9 import org.xml.sax.Attributes JavaDoc;
10 import org.xml.sax.EntityResolver JavaDoc;
11 import org.jboss.xml.binding.JBossXBException;
12 import org.apache.xerces.xs.XSTypeDefinition;
13
14 import java.io.Reader JavaDoc;
15 import java.io.InputStream JavaDoc;
16
17 /**
18  * @author <a HREF="mailto:alex@jboss.org">Alexey Loubyansky</a>
19  * @version <tt>$Revision: 1.2.2.2 $</tt>
20  */

21 public interface JBossXBParser
22 {
23    interface ContentHandler
24    {
25       void characters(char[] ch, int start, int length);
26
27       void endElement(String JavaDoc namespaceURI, String JavaDoc localName, String JavaDoc qName);
28
29       void startElement(String JavaDoc namespaceURI, String JavaDoc localName, String JavaDoc qName, Attributes JavaDoc atts, XSTypeDefinition type);
30
31       void startPrefixMapping(String JavaDoc prefix, String JavaDoc uri);
32
33       void endPrefixMapping(String JavaDoc prefix);
34
35       Object JavaDoc getRoot();
36    }
37
38    void setEntityResolver(EntityResolver JavaDoc entityResolver) throws JBossXBException;
39
40    void setProperty(String JavaDoc name, Object JavaDoc value) throws JBossXBException;
41
42    void setFeature(String JavaDoc name, boolean value) throws JBossXBException;
43
44    void parse(String JavaDoc source, ContentHandler handler) throws JBossXBException;
45
46    void parse(InputStream JavaDoc is, ContentHandler handler) throws JBossXBException;
47
48    void parse(Reader JavaDoc reader, ContentHandler handler) throws JBossXBException;
49 }
50
Popular Tags