org.jscience.ml.cml.cmlimpl
Class SaxHandlerImpl

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by org.jscience.ml.cml.cmlimpl.SaxHandlerImpl
All Implemented Interfaces:
SaxHandler, org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

public class SaxHandlerImpl
extends org.xml.sax.helpers.DefaultHandler
implements SaxHandler

manages callbacks from SAX2 handler


Constructor Summary
SaxHandlerImpl(AbstractCMLDocument d, boolean debug)
          Creates a new SaxHandlerImpl object.
 
Method Summary
 void characters(char[] ch, int start, int length)
          DOCUMENT ME!
protected  void debug(java.lang.String s)
          DOCUMENT ME!
 void endDocument()
          DOCUMENT ME!
 void endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName)
          DOCUMENT ME!
 void error(org.xml.sax.SAXParseException e)
          DOCUMENT ME!
 void fatalError(org.xml.sax.SAXParseException e)
          DOCUMENT ME!
 boolean getDebug()
          DOCUMENT ME!
 java.util.Vector getErrorVector()
          DOCUMENT ME!
 boolean hasErrors()
          DOCUMENT ME!
 void ignorableWhitespace(char[] ch, int start, int length)
          DOCUMENT ME!
static void main(java.lang.String[] args)
          DOCUMENT ME!
 void processingInstruction(java.lang.String target, java.lang.String data)
          DOCUMENT ME!
 void setDebug(boolean debug)
          DOCUMENT ME!
 void setIgnoreWhite(boolean ignoreWhite)
          DOCUMENT ME!
 void startDocument()
          DOCUMENT ME!
 void startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attributes)
          DOCUMENT ME!
 void startPrefixMapping(java.lang.String prefix, java.lang.String uri)
          DOCUMENT ME!
 void unparsedEntityDecl(java.lang.String name, java.lang.String publicId, java.lang.String systemId, java.lang.String notationName)
          DOCUMENT ME!
 void warning(org.xml.sax.SAXParseException e)
          DOCUMENT ME!
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endPrefixMapping, notationDecl, resolveEntity, setDocumentLocator, skippedEntity
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.xml.sax.ContentHandler
endPrefixMapping, setDocumentLocator, skippedEntity
 
Methods inherited from interface org.xml.sax.DTDHandler
notationDecl
 
Methods inherited from interface org.xml.sax.EntityResolver
resolveEntity
 

Constructor Detail

SaxHandlerImpl

public SaxHandlerImpl(AbstractCMLDocument d,
                      boolean debug)
Creates a new SaxHandlerImpl object.

Parameters:
d - DOCUMENT ME!
debug - DOCUMENT ME!
Method Detail

setIgnoreWhite

public void setIgnoreWhite(boolean ignoreWhite)
DOCUMENT ME!

Specified by:
setIgnoreWhite in interface SaxHandler
Parameters:
ignoreWhite - DOCUMENT ME!

hasErrors

public boolean hasErrors()
DOCUMENT ME!

Specified by:
hasErrors in interface SaxHandler
Returns:
DOCUMENT ME!

getErrorVector

public java.util.Vector getErrorVector()
DOCUMENT ME!

Specified by:
getErrorVector in interface SaxHandler
Returns:
DOCUMENT ME!

setDebug

public void setDebug(boolean debug)
DOCUMENT ME!

Parameters:
debug - DOCUMENT ME!

getDebug

public boolean getDebug()
DOCUMENT ME!

Specified by:
getDebug in interface SaxHandler
Returns:
DOCUMENT ME!

debug

protected void debug(java.lang.String s)
DOCUMENT ME!

Parameters:
s - DOCUMENT ME!

characters

public void characters(char[] ch,
                       int start,
                       int length)
DOCUMENT ME!

Specified by:
characters in interface org.xml.sax.ContentHandler
Overrides:
characters in class org.xml.sax.helpers.DefaultHandler
Parameters:
ch - DOCUMENT ME!
start - DOCUMENT ME!
length - DOCUMENT ME!

endDocument

public void endDocument()
DOCUMENT ME!

Specified by:
endDocument in interface org.xml.sax.ContentHandler
Overrides:
endDocument in class org.xml.sax.helpers.DefaultHandler

endElement

public void endElement(java.lang.String uri,
                       java.lang.String localName,
                       java.lang.String qName)
DOCUMENT ME!

Specified by:
endElement in interface org.xml.sax.ContentHandler
Overrides:
endElement in class org.xml.sax.helpers.DefaultHandler
Parameters:
uri - DOCUMENT ME!
localName - DOCUMENT ME!
qName - DOCUMENT ME!

error

public void error(org.xml.sax.SAXParseException e)
DOCUMENT ME!

Specified by:
error in interface org.xml.sax.ErrorHandler
Overrides:
error in class org.xml.sax.helpers.DefaultHandler
Parameters:
e - DOCUMENT ME!

fatalError

public void fatalError(org.xml.sax.SAXParseException e)
DOCUMENT ME!

Specified by:
fatalError in interface org.xml.sax.ErrorHandler
Overrides:
fatalError in class org.xml.sax.helpers.DefaultHandler
Parameters:
e - DOCUMENT ME!

ignorableWhitespace

public void ignorableWhitespace(char[] ch,
                                int start,
                                int length)
DOCUMENT ME!

Specified by:
ignorableWhitespace in interface org.xml.sax.ContentHandler
Overrides:
ignorableWhitespace in class org.xml.sax.helpers.DefaultHandler
Parameters:
ch - DOCUMENT ME!
start - DOCUMENT ME!
length - DOCUMENT ME!

processingInstruction

public void processingInstruction(java.lang.String target,
                                  java.lang.String data)
DOCUMENT ME!

Specified by:
processingInstruction in interface org.xml.sax.ContentHandler
Overrides:
processingInstruction in class org.xml.sax.helpers.DefaultHandler
Parameters:
target - DOCUMENT ME!
data - DOCUMENT ME!

startDocument

public void startDocument()
DOCUMENT ME!

Specified by:
startDocument in interface org.xml.sax.ContentHandler
Overrides:
startDocument in class org.xml.sax.helpers.DefaultHandler

startElement

public void startElement(java.lang.String uri,
                         java.lang.String localName,
                         java.lang.String qName,
                         org.xml.sax.Attributes attributes)
DOCUMENT ME!

Specified by:
startElement in interface org.xml.sax.ContentHandler
Overrides:
startElement in class org.xml.sax.helpers.DefaultHandler
Parameters:
uri - DOCUMENT ME!
localName - DOCUMENT ME!
qName - DOCUMENT ME!
attributes - DOCUMENT ME!

startPrefixMapping

public void startPrefixMapping(java.lang.String prefix,
                               java.lang.String uri)
DOCUMENT ME!

Specified by:
startPrefixMapping in interface org.xml.sax.ContentHandler
Overrides:
startPrefixMapping in class org.xml.sax.helpers.DefaultHandler
Parameters:
prefix - DOCUMENT ME!
uri - DOCUMENT ME!

unparsedEntityDecl

public void unparsedEntityDecl(java.lang.String name,
                               java.lang.String publicId,
                               java.lang.String systemId,
                               java.lang.String notationName)
DOCUMENT ME!

Specified by:
unparsedEntityDecl in interface org.xml.sax.DTDHandler
Overrides:
unparsedEntityDecl in class org.xml.sax.helpers.DefaultHandler
Parameters:
name - DOCUMENT ME!
publicId - DOCUMENT ME!
systemId - DOCUMENT ME!
notationName - DOCUMENT ME!

warning

public void warning(org.xml.sax.SAXParseException e)
DOCUMENT ME!

Specified by:
warning in interface org.xml.sax.ErrorHandler
Overrides:
warning in class org.xml.sax.helpers.DefaultHandler
Parameters:
e - DOCUMENT ME!

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
DOCUMENT ME!

Parameters:
args - DOCUMENT ME!
Throws:
java.lang.Exception - DOCUMENT ME!