org.objectweb.jorm.xml2mi.lib
Class ParserErrorHandler

java.lang.Object
  |
  +--org.xml.sax.helpers.DefaultHandler
        |
        +--org.objectweb.jorm.xml2mi.lib.ParserErrorHandler
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

public class ParserErrorHandler
extends org.xml.sax.helpers.DefaultHandler

The ParserErrorHandler object extends the DefaultHandler from sax. This object is given to the DOM parser to handle potential errors.

Author:
X. Spengler

Constructor Summary
ParserErrorHandler()
          Builds a new ParserErrorHandler for the DOM parser.
 
Method Summary
 void error(org.xml.sax.SAXParseException e)
          Adds a new exception to the current vector of exceptions.
 java.util.Vector getErrors()
          Returns the vector of errors.
 void initialize()
          Resets the vector of errors.
 int numErrors()
          Allows to know the number of handled errors.
 void warning(org.xml.sax.SAXParseException e)
          Adds a new exception to the current vector of exceptions.
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
characters, endDocument, endElement, endPrefixMapping, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping, unparsedEntityDecl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParserErrorHandler

public ParserErrorHandler()
Builds a new ParserErrorHandler for the DOM parser.

Method Detail

numErrors

public int numErrors()
Allows to know the number of handled errors.

Returns:
the current number of errors

getErrors

public java.util.Vector getErrors()
Returns the vector of errors.

Returns:
the current vector of errors

initialize

public void initialize()
Resets the vector of errors.


warning

public void warning(org.xml.sax.SAXParseException e)
             throws org.xml.sax.SAXException
Adds a new exception to the current vector of exceptions.

Specified by:
warning in interface org.xml.sax.ErrorHandler
Overrides:
warning in class org.xml.sax.helpers.DefaultHandler
Parameters:
e - a new SAXParseException to register
org.xml.sax.SAXException

error

public void error(org.xml.sax.SAXParseException e)
           throws org.xml.sax.SAXException
Adds a new exception to the current vector of exceptions.

Specified by:
error in interface org.xml.sax.ErrorHandler
Overrides:
error in class org.xml.sax.helpers.DefaultHandler
Parameters:
e - a new SAXParseException to register
org.xml.sax.SAXException