Package org.dbunit.dataset.xml
Class FlatDtdProducer
java.lang.Object
org.dbunit.dataset.xml.FlatDtdProducer
- All Implemented Interfaces:
IDataSetProducer,EntityResolver,DeclHandler,LexicalHandler
public class FlatDtdProducer
extends Object
implements IDataSetProducer, EntityResolver, DeclHandler, LexicalHandler
Produces a DataSet from a flat DTD.
Only external DTDs are supported and for the root element only the following
declarations are supported.
- ANY: like <!Element dataset ANY>
- sequences: like <!Element dataset (first*,second,third?)gt;
- choices: like <!Element dataset (first|second+|third)>
- Since:
- Apr 27, 2003
- Version:
- $Revision$ $Date$
- Author:
- Manuel Laflamme, Last changed by: $Author$
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected StringcleanupTableName(String tableName) voidcomment(char[] ch, int start, int length) voidelementDecl(String name, String model) voidendCDATA()voidendDTD()voidvoidexternalEntityDecl(String name, String publicId, String systemId) voidinternalEntityDecl(String name, String value) voidproduce()Process this dataset source.resolveEntity(String publicId, String systemId) voidsetConsumer(IDataSetConsumer consumer) static voidsetDeclHandler(XMLReader xmlReader, DeclHandler handler) static voidsetLexicalHandler(XMLReader xmlReader, LexicalHandler handler) voidvoidvoidstartEntity(String name)
-
Field Details
-
REQUIRED
Constant for the value "#REQUIRED"- See Also:
-
IMPLIED
Constant for the value "#IMPLIED"- See Also:
-
ANY
Constant for the value "ANY"- See Also:
-
-
Constructor Details
-
FlatDtdProducer
public FlatDtdProducer() -
FlatDtdProducer
-
-
Method Details
-
setDeclHandler
public static void setDeclHandler(XMLReader xmlReader, DeclHandler handler) throws SAXNotRecognizedException, SAXNotSupportedException -
setLexicalHandler
public static void setLexicalHandler(XMLReader xmlReader, LexicalHandler handler) throws SAXNotRecognizedException, SAXNotSupportedException -
setConsumer
- Specified by:
setConsumerin interfaceIDataSetProducer- Throws:
DataSetException
-
produce
Description copied from interface:IDataSetProducerProcess 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:
producein interfaceIDataSetProducer- Throws:
DataSetException
-
resolveEntity
- Specified by:
resolveEntityin interfaceEntityResolver- Throws:
SAXException
-
elementDecl
- Specified by:
elementDeclin interfaceDeclHandler- Throws:
SAXException
-
attributeDecl
public void attributeDecl(String elementName, String attributeName, String type, String mode, String value) throws SAXException - Specified by:
attributeDeclin interfaceDeclHandler- Throws:
SAXException
-
internalEntityDecl
- Specified by:
internalEntityDeclin interfaceDeclHandler- Throws:
SAXException
-
externalEntityDecl
- Specified by:
externalEntityDeclin interfaceDeclHandler- Throws:
SAXException
-
startDTD
- Specified by:
startDTDin interfaceLexicalHandler- Throws:
SAXException
-
endDTD
- Specified by:
endDTDin interfaceLexicalHandler- Throws:
SAXException
-
cleanupTableName
-
startEntity
- Specified by:
startEntityin interfaceLexicalHandler- Throws:
SAXException
-
endEntity
- Specified by:
endEntityin interfaceLexicalHandler- Throws:
SAXException
-
startCDATA
- Specified by:
startCDATAin interfaceLexicalHandler- Throws:
SAXException
-
endCDATA
- Specified by:
endCDATAin interfaceLexicalHandler- Throws:
SAXException
-
comment
- Specified by:
commentin interfaceLexicalHandler- Throws:
SAXException
-