public class FlatXmlProducer extends org.xml.sax.helpers.DefaultHandler implements IDataSetProducer, ContentHandler
Constructor and Description |
---|
FlatXmlProducer(InputSource xmlSource) |
FlatXmlProducer(InputSource xmlSource,
boolean dtdMetadata) |
FlatXmlProducer(InputSource xmlSource,
boolean dtdMetadata,
boolean columnSensing) |
FlatXmlProducer(InputSource xmlSource,
boolean dtdMetadata,
boolean columnSensing,
boolean caseSensitiveTableNames) |
FlatXmlProducer(InputSource xmlSource,
EntityResolver resolver) |
FlatXmlProducer(InputSource xmlSource,
IDataSet metaDataSet) |
Modifier and Type | Method and Description |
---|---|
void |
endElement(String uri,
String localName,
String qName) |
void |
error(SAXParseException e) |
protected void |
handleMissingColumns(Attributes attributes)
parses the attributes in the current row, and checks whether a new column
is found.
|
void |
produce()
Process this dataset source.
|
InputSource |
resolveEntity(String publicId,
String systemId) |
void |
setColumnSensing(boolean columnSensing) |
void |
setConsumer(IDataSetConsumer consumer) |
void |
setValidating(boolean validating) |
void |
startElement(String uri,
String localName,
String qName,
Attributes attributes) |
characters, endDocument, endPrefixMapping, fatalError, ignorableWhitespace, notationDecl, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
characters, endDocument, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping
public FlatXmlProducer(InputSource xmlSource)
public FlatXmlProducer(InputSource xmlSource, boolean dtdMetadata)
public FlatXmlProducer(InputSource xmlSource, IDataSet metaDataSet)
public FlatXmlProducer(InputSource xmlSource, EntityResolver resolver)
public FlatXmlProducer(InputSource xmlSource, boolean dtdMetadata, boolean columnSensing)
xmlSource
- The input datasourcedtdMetadata
- Whether or not DTD metadata is available to parse via a DTD handlercolumnSensing
- Whether or not the column sensing feature should be used (see FAQ)public FlatXmlProducer(InputSource xmlSource, boolean dtdMetadata, boolean columnSensing, boolean caseSensitiveTableNames)
xmlSource
- The input datasourcedtdMetadata
- Whether or not DTD metadata is available to parse via a DTD handlercolumnSensing
- Whether or not the column sensing feature should be used (see FAQ)caseSensitiveTableNames
- Whether or not this dataset should use case sensitive table namesprotected void handleMissingColumns(Attributes attributes) throws DataSetException
Depending on the value of the columnSensing
flag, the appropriate
action is taken:
attributes
- Attributed for the current row.DataSetException
public void setColumnSensing(boolean columnSensing)
public void setValidating(boolean validating)
public void setConsumer(IDataSetConsumer consumer) throws DataSetException
setConsumer
in interface IDataSetProducer
DataSetException
public void produce() throws DataSetException
IDataSetProducer
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.
produce
in interface IDataSetProducer
DataSetException
public InputSource resolveEntity(String publicId, String systemId) throws SAXException
resolveEntity
in interface EntityResolver
resolveEntity
in class org.xml.sax.helpers.DefaultHandler
SAXException
public void error(SAXParseException e) throws SAXException
error
in interface ErrorHandler
error
in class org.xml.sax.helpers.DefaultHandler
SAXException
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException
startElement
in interface ContentHandler
startElement
in class org.xml.sax.helpers.DefaultHandler
SAXException
public void endElement(String uri, String localName, String qName) throws SAXException
endElement
in interface ContentHandler
endElement
in class org.xml.sax.helpers.DefaultHandler
SAXException
Copyright © 2002-2012. All Rights Reserved.