org.dbunit.dataset.xml
Class XmlProducer

java.lang.Object
  extended byorg.xml.sax.helpers.DefaultHandler
      extended byorg.dbunit.dataset.xml.XmlProducer
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler, IDataSetProducer

public class XmlProducer
extends org.xml.sax.helpers.DefaultHandler
implements IDataSetProducer, org.xml.sax.ContentHandler, org.xml.sax.ErrorHandler

Since:
Apr 30, 2003
Version:
$Revision: 1.6 $
Author:
Manuel Laflamme

Constructor Summary
XmlProducer(org.xml.sax.InputSource inputSource)
           
 
Method Summary
 void characters(char[] ch, int start, int length)
           
 void endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName)
           
 void error(org.xml.sax.SAXParseException e)
           
 void produce()
          Process this dataset source.
 org.xml.sax.InputSource resolveEntity(java.lang.String publicId, java.lang.String systemId)
           
 void setConsumer(IDataSetConsumer consumer)
           
 void setValidating(boolean validating)
           
 void startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attributes)
           
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, fatalError, ignorableWhitespace, notationDecl, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
 
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
endDocument, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping
 
Methods inherited from interface org.xml.sax.ErrorHandler
fatalError, warning
 

Constructor Detail

XmlProducer

public XmlProducer(org.xml.sax.InputSource inputSource)
Method Detail

setValidating

public void setValidating(boolean validating)

setConsumer

public void setConsumer(IDataSetConsumer consumer)
                 throws DataSetException
Specified by:
setConsumer in interface IDataSetProducer
Throws:
DataSetException

produce

public void produce()
             throws DataSetException
Description copied from interface: IDataSetProducer
Process this dataset source. During the processing, the IDataSetProducer will provide information about the dataset through the specified event listener.

This method is synchronous: it will not return until processing has ended. If a client application wants to terminate parsing early, it should throw an exception from the listener.

Specified by:
produce in interface IDataSetProducer
Throws:
DataSetException

resolveEntity

public org.xml.sax.InputSource resolveEntity(java.lang.String publicId,
                                             java.lang.String systemId)
                                      throws org.xml.sax.SAXException
Specified by:
resolveEntity in interface org.xml.sax.EntityResolver
Throws:
org.xml.sax.SAXException

startElement

public void startElement(java.lang.String uri,
                         java.lang.String localName,
                         java.lang.String qName,
                         org.xml.sax.Attributes attributes)
                  throws org.xml.sax.SAXException
Specified by:
startElement in interface org.xml.sax.ContentHandler
Throws:
org.xml.sax.SAXException

endElement

public void endElement(java.lang.String uri,
                       java.lang.String localName,
                       java.lang.String qName)
                throws org.xml.sax.SAXException
Specified by:
endElement in interface org.xml.sax.ContentHandler
Throws:
org.xml.sax.SAXException

characters

public void characters(char[] ch,
                       int start,
                       int length)
                throws org.xml.sax.SAXException
Specified by:
characters in interface org.xml.sax.ContentHandler
Throws:
org.xml.sax.SAXException

error

public void error(org.xml.sax.SAXParseException e)
           throws org.xml.sax.SAXException
Specified by:
error in interface org.xml.sax.ErrorHandler
Throws:
org.xml.sax.SAXException


Copyright © 2002-2004 DbUnit.org. All Rights Reserved.