org.jcoderz.phoenix.chart2d
Class Chart2DParser

java.lang.Object
  extended by org.jcoderz.phoenix.chart2d.Chart2DParser
All Implemented Interfaces:
ContentHandler

public class Chart2DParser
extends Object
implements ContentHandler

The class reads XML documents according to specified DTD and translates all related events into Chart2DHandler events.

Usage sample:

         Chart2DParser parser = new Chart2DParser(...);
         parser.parse(new InputSource("..."));
 

Warning: the class is machine generated. DO NOT MODIFY


Constructor Summary
Chart2DParser(Chart2DHandler hdlr, EntityResolver rslvr)
          Creates a parser instance.
 
Method Summary
 void characters(char[] chars, int start, int len)
          
 void endDocument()
          
 void endElement(String ns, String name, String qname)
          
 void endPrefixMapping(String prefix)
          
protected  ErrorHandler getDefaultErrorHandler()
          Creates default error handler used by this parser.
 void ignorableWhitespace(char[] chars, int start, int len)
          
 void parse(InputSource input)
          The recognizer entry method taking an InputSource.
static void parse(InputSource input, Chart2DHandler handler)
          The recognizer entry method taking an Inputsource.
 void parse(URL url)
          The recognizer entry method taking a URL.
static void parse(URL url, Chart2DHandler handler)
          The recognizer entry method taking a URL.
 void processingInstruction(String target, String data)
          
 void setDocumentLocator(Locator locator)
          
 void skippedEntity(String name)
          
 void startDocument()
          
 void startElement(String ns, String name, String qname, Attributes attrs)
          
 void startPrefixMapping(String prefix, String uri)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Chart2DParser

public Chart2DParser(Chart2DHandler hdlr,
                     EntityResolver rslvr)
Creates a parser instance.

Parameters:
hdlr - handler interface implementation (never null
rslvr - SAX entity resolver implementation or null. It is recommended that it could be able to resolve at least the DTD.
Method Detail

setDocumentLocator

public final void setDocumentLocator(Locator locator)

Specified by:
setDocumentLocator in interface ContentHandler

startDocument

public final void startDocument()
                         throws SAXException

Specified by:
startDocument in interface ContentHandler
Throws:
SAXException

endDocument

public final void endDocument()
                       throws SAXException

Specified by:
endDocument in interface ContentHandler
Throws:
SAXException

startElement

public final void startElement(String ns,
                               String name,
                               String qname,
                               Attributes attrs)
                        throws SAXException

Specified by:
startElement in interface ContentHandler
Throws:
SAXException

endElement

public final void endElement(String ns,
                             String name,
                             String qname)
                      throws SAXException

Specified by:
endElement in interface ContentHandler
Throws:
SAXException

characters

public final void characters(char[] chars,
                             int start,
                             int len)
                      throws SAXException

Specified by:
characters in interface ContentHandler
Throws:
SAXException

ignorableWhitespace

public final void ignorableWhitespace(char[] chars,
                                      int start,
                                      int len)
                               throws SAXException

Specified by:
ignorableWhitespace in interface ContentHandler
Throws:
SAXException

processingInstruction

public final void processingInstruction(String target,
                                        String data)
                                 throws SAXException

Specified by:
processingInstruction in interface ContentHandler
Throws:
SAXException

startPrefixMapping

public final void startPrefixMapping(String prefix,
                                     String uri)
                              throws SAXException

Specified by:
startPrefixMapping in interface ContentHandler
Throws:
SAXException

endPrefixMapping

public final void endPrefixMapping(String prefix)
                            throws SAXException

Specified by:
endPrefixMapping in interface ContentHandler
Throws:
SAXException

skippedEntity

public final void skippedEntity(String name)
                         throws SAXException

Specified by:
skippedEntity in interface ContentHandler
Throws:
SAXException

parse

public void parse(InputSource input)
           throws SAXException,
                  ParserConfigurationException,
                  IOException
The recognizer entry method taking an InputSource.

Parameters:
input - InputSource to be parsed.
Throws:
IOException - on I/O error.
SAXException - propagated exception thrown by a DocumentHandler.
ParserConfigurationException - a parser satisfining requested configuration can not be created.
FactoryConfigurationError - if the implementation can not be instantiated.

parse

public void parse(URL url)
           throws SAXException,
                  ParserConfigurationException,
                  IOException
The recognizer entry method taking a URL.

Parameters:
url - URL source to be parsed.
Throws:
IOException - on I/O error.
SAXException - propagated exception thrown by a DocumentHandler.
ParserConfigurationException - a parser satisfining requested configuration can not be created.
FactoryConfigurationError - if the implementation can not be instantiated.

parse

public static void parse(InputSource input,
                         Chart2DHandler handler)
                  throws SAXException,
                         ParserConfigurationException,
                         IOException
The recognizer entry method taking an Inputsource.

Parameters:
input - InputSource to be parsed.
Throws:
IOException - on I/O error.
SAXException - propagated exception thrown by a DocumentHandler.
ParserConfigurationException - a parser satisfining requested configuration can not be created.
FactoryConfigurationError - if the implementation can not be instantiated.

parse

public static void parse(URL url,
                         Chart2DHandler handler)
                  throws SAXException,
                         ParserConfigurationException,
                         IOException
The recognizer entry method taking a URL.

Parameters:
url - URL source to be parsed.
Throws:
IOException - on I/O error.
SAXException - propagated exception thrown by a DocumentHandler.
ParserConfigurationException - a parser satisfining requested configuration can not be created.
FactoryConfigurationError - if the implementation can not be instantiated.

getDefaultErrorHandler

protected ErrorHandler getDefaultErrorHandler()
Creates default error handler used by this parser.

Returns:
org.xml.sax.ErrorHandler implementation


Copyright 2007 The jCoderZ Project.