org.jscience.sociology.forms
Class FormParser

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by org.jscience.sociology.forms.FormParser
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

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

This class is used to parse the forms.xml file. In order to have this class work, you must provide a SAX2 compatible parser in the lib directory of your application.


Constructor Summary
FormParser(org.xml.sax.XMLReader xmlReader, java.io.InputStream formsInputStream)
          Creates a new FormParser object.
 
Method Summary
 void characters(char[] chars, int iStart, int iLen)
          Overrides the same method of DefaultHandler.
 void endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName)
          Overrides the same method of DefaultHandler.
 void error(org.xml.sax.SAXParseException e)
          Overrides the same method of DefaultHandler.
 void fatalError(org.xml.sax.SAXParseException e)
          Overrides the same method of DefaultHandler.
 void startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts)
          Overrides the same method of DefaultHandler.
 void warning(org.xml.sax.SAXParseException e)
          Overrides the same method of DefaultHandler.
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormParser

public FormParser(org.xml.sax.XMLReader xmlReader,
                  java.io.InputStream formsInputStream)
Creates a new FormParser object.

Parameters:
xmlReader - DOCUMENT ME!
formsInputStream - DOCUMENT ME!
Method Detail

startElement

public void startElement(java.lang.String namespaceURI,
                         java.lang.String localName,
                         java.lang.String qName,
                         org.xml.sax.Attributes atts)
                  throws org.xml.sax.SAXException
Overrides the same method of DefaultHandler.

Specified by:
startElement in interface org.xml.sax.ContentHandler
Overrides:
startElement in class org.xml.sax.helpers.DefaultHandler
Parameters:
namespaceURI - DOCUMENT ME!
localName - DOCUMENT ME!
qName - DOCUMENT ME!
atts - DOCUMENT ME!
Throws:
org.xml.sax.SAXException - DOCUMENT ME!

characters

public void characters(char[] chars,
                       int iStart,
                       int iLen)
                throws org.xml.sax.SAXException
Overrides the same method of DefaultHandler.

Specified by:
characters in interface org.xml.sax.ContentHandler
Overrides:
characters in class org.xml.sax.helpers.DefaultHandler
Parameters:
chars - DOCUMENT ME!
iStart - DOCUMENT ME!
iLen - DOCUMENT ME!
Throws:
org.xml.sax.SAXException - DOCUMENT ME!

endElement

public void endElement(java.lang.String namespaceURI,
                       java.lang.String localName,
                       java.lang.String qName)
Overrides the same method of DefaultHandler.

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

warning

public void warning(org.xml.sax.SAXParseException e)
Overrides the same method of DefaultHandler.

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

error

public void error(org.xml.sax.SAXParseException e)
           throws org.xml.sax.SAXException
Overrides the same method of DefaultHandler.

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

fatalError

public void fatalError(org.xml.sax.SAXParseException e)
                throws org.xml.sax.SAXException
Overrides the same method of DefaultHandler.

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