net.sourceforge.jdbcimporter
Interface DelimiterParser

All Known Implementing Classes:
CSVDelimiterParser, FixedDelimiterParser, PatternDelimiterParser, XMLDelimiterParser

public interface DelimiterParser

The DelimiterParser interface defines a set of methods used to parse a file into a set of rows to be added to the database.

Version:
0.6
Author:
Chris Nagy

Method Summary
 java.lang.String getNextRow()
          Returns the next row to be imported as a String.
 ColumnValue[] getValues(java.lang.String nextRow)
          Returns the column values for the row specified.
 void setReader(java.io.Reader input)
          Sets the input source for the parser.
 

Method Detail

setReader

public void setReader(java.io.Reader input)
Sets the input source for the parser.

Parameters:
input - the source of the data to import.

getNextRow

public java.lang.String getNextRow()
                            throws java.io.IOException
Returns the next row to be imported as a String.

Returns:
the next row to import
Throws:
java.io.IOException - if an error occurs while retrieving the next row

getValues

public ColumnValue[] getValues(java.lang.String nextRow)
                        throws MalformedDataException
Returns the column values for the row specified.

Parameters:
nextRow - the row to be parsed into column values
Returns:
the column values
Throws:
MalformedDataException - if the row is not formatted properly