public abstract class AbstractDataReader extends java.lang.Object implements DataReader
This is an abstract class which implements the DataReader interface.
This implementation has defined most of the method in the interface. Subclass are responsible for implementing the next() method. The subclass should also override the method getSourcePosition().
Constructor and Description |
---|
AbstractDataReader() |
Modifier and Type | Method and Description |
---|---|
void | close()
Close the data source used for reading data.
|
ConfigProperties | getConfigProperties()
This method returns the configuration properties for this data reader.
|
protected org.w3c.dom.Node | getDataReaderDataNode()
This method returns the Node describing the data contained within the data source.
|
protected org.w3c.dom.Node | getDataReaderDynamicFieldsNode()
This method returns the Node describing the dynamicFields contained within the data source.
|
protected DataSourceLocation | getDataSourceLocation()
This method returns the location of the data source.
|
protected java.util.List<QueryProperties> | getQueryPropertiesList()
Gets the query properties list
|
java.lang.Integer | getSourcePosition()
It returns the source position of the data object returned by the next() method you called last time.
|
void | init()
It gets the input csv data file for a DataReader and gets limeDelimiter, tokenDelimeter and tokenValueDelimiter values.
|
ConfigProperties | initConfig(org.w3c.dom.Node dataReaderNode, ConfigProperties parentConfigProperties)
This method parses the DataReader xml node read in from the business object configuration file and stores the configuration in memory.
|
abstract java.lang.Object | next()
This method returns one chunk of data read from a data source.
|
void | setConfigProperties(ConfigProperties aConfigProperties)
This method sets the configuration properties for this data reader.
|
protected org.w3c.dom.Node getDataReaderDataNode()
This method returns the Node describing the data contained within the data source.
Each implementation of a DataReader must understand and maintain it's own set of data source information.
protected org.w3c.dom.Node getDataReaderDynamicFieldsNode()
This method returns the Node describing the dynamicFields contained within the data source.
protected DataSourceLocation getDataSourceLocation()
This method returns the location of the data source.
public ConfigProperties getConfigProperties()
This method returns the configuration properties for this data reader.
public void setConfigProperties(ConfigProperties aConfigProperties)
This method sets the configuration properties for this data reader.
public void init() throws DataLoadException
public ConfigProperties initConfig(org.w3c.dom.Node dataReaderNode, ConfigProperties parentConfigProperties) throws DataLoadException
This method parses the DataReader xml node read in from the business object configuration file and stores the configuration in memory.
public abstract java.lang.Object next() throws DataLoadException
public java.lang.Integer getSourcePosition()
public void close() throws DataLoadException
Close the data source used for reading data. It does nothing. The subclass can overwrite it to provide a specific implementation.
protected java.util.List<QueryProperties> getQueryPropertiesList()