uvi
Class Generator.XMLErrorHandler

java.lang.Object
  extended by uvi.Generator.XMLErrorHandler
All Implemented Interfaces:
ErrorHandler
Enclosing class:
Generator

private static class Generator.XMLErrorHandler
extends Object
implements ErrorHandler

Contains the methods called by the DocumentBuilder object in Generator.generateHTMLFiles() when an error is encountered with an XML file during the parsing thereof. The DB object is given an instance of this class and it calls the appropriate method if it encounters a problem. This object is also constantly being given the name of the current XML file being processed so it can provide that information along with the error text.

NOTE: Any reference to "HTML Files" should be taken as a synonym for "PHP Files." When this documentation was created, only *.html files were used. Later, they were converted to *.php files to facilitate dynamic content (i.e. comments).

See Also:
Generator.generateHTMLFiles()

Field Summary
private static String activeFile
          The current XML file being processed in the Generator.generateHTMLFiles() method.
 
Constructor Summary
Generator.XMLErrorHandler()
          Constructs a new error handler.
 
Method Summary
 void error(SAXParseException spe)
          Shows any error, along with file name and line number, found by the parser.
 void fatalError(SAXParseException spe)
          Shows any fatal error, along with file name and line number, found by the parser.
 void setActiveFile(String newFile)
          Sets the active file to the new file being processed.
 void warning(SAXParseException spe)
          Shows any warning, along with file name and line number, found by the parser.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

activeFile

private static String activeFile
The current XML file being processed in the Generator.generateHTMLFiles() method.

Constructor Detail

Generator.XMLErrorHandler

Generator.XMLErrorHandler()
Constructs a new error handler.

Method Detail

setActiveFile

public void setActiveFile(String newFile)
Sets the active file to the new file being processed.

Parameters:
newFile - the file currently being processed
See Also:
Generator.generateHTMLFiles()

error

public void error(SAXParseException spe)
Shows any error, along with file name and line number, found by the parser.

Specified by:
error in interface ErrorHandler
Parameters:
spe - the exception generated by the parser

fatalError

public void fatalError(SAXParseException spe)
Shows any fatal error, along with file name and line number, found by the parser.

Specified by:
fatalError in interface ErrorHandler
Parameters:
spe - the exception generated by the parser

warning

public void warning(SAXParseException spe)
Shows any warning, along with file name and line number, found by the parser.

Specified by:
warning in interface ErrorHandler
Parameters:
spe - the exception generated by the parser