edu.jhu.ece.iacl.jist.io
Class XMLErrorHandler

java.lang.Object
  extended by edu.jhu.ece.iacl.jist.io.XMLErrorHandler
All Implemented Interfaces:
org.xml.sax.ErrorHandler

public class XMLErrorHandler
extends java.lang.Object
implements org.xml.sax.ErrorHandler

Error handler to report errors and warnings from the XML parser. Implements standard SAX ErrorHandler methods, see SAX docs for more info.

See Also:
FileOME, FileProject, MipavFileVOI, FileXML

Constructor Summary
XMLErrorHandler()
           
 
Method Summary
 void error(org.xml.sax.SAXParseException spe)
          Handles parse exception errors by passing the parse exception up as a SAXException.
 void fatalError(org.xml.sax.SAXParseException spe)
          Handles parse exception fatal errors by passing the parse exception up as a SAXException.
 void warning(org.xml.sax.SAXParseException spe)
          Handles parse exception warnings by outputting them to the debug window.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLErrorHandler

public XMLErrorHandler()
Method Detail

error

public void error(org.xml.sax.SAXParseException spe)
           throws org.xml.sax.SAXException
Handles parse exception errors by passing the parse exception up as a SAXException.

Specified by:
error in interface org.xml.sax.ErrorHandler
Parameters:
spe - the spe
Throws:
org.xml.sax.SAXException - passed up with the parse exception info
org.xml.sax.SAXException - the SAX exception

fatalError

public void fatalError(org.xml.sax.SAXParseException spe)
                throws org.xml.sax.SAXException
Handles parse exception fatal errors by passing the parse exception up as a SAXException.

Specified by:
fatalError in interface org.xml.sax.ErrorHandler
Parameters:
spe - the spe
Throws:
org.xml.sax.SAXException - passed up with the parse exception info
org.xml.sax.SAXException - the SAX exception

warning

public void warning(org.xml.sax.SAXParseException spe)
             throws org.xml.sax.SAXException
Handles parse exception warnings by outputting them to the debug window.

Specified by:
warning in interface org.xml.sax.ErrorHandler
Parameters:
spe - the spe
Throws:
org.xml.sax.SAXException - not reported for warnings
org.xml.sax.SAXException - the SAX exception