jimm.datavision.source.charsep
Class CharSepRow

java.lang.Object
  extended by jimm.datavision.source.DataCursor
      extended by jimm.datavision.source.charsep.CharSepRow

public class CharSepRow
extends DataCursor

A concrete subclass of DataCursor that wraps a delimited file parser.

Author:
Jim Menard, jimm@io.com

Field Summary
protected  boolean dateParseErrorReported
           
protected  java.util.HashMap dateParsers
           
protected  boolean noMoreData
           
protected  DelimParser parser
           
protected  Query query
           
protected  CharSepSource source
           
protected  Formula whereClauseFormula
           
 
Fields inherited from class jimm.datavision.source.DataCursor
currRowData, currRowNumber, lastRowData, lastRowNumber, nextRowData, prevRowData
 
Constructor Summary
CharSepRow(CharSepSource source, Query query)
           
 
Method Summary
 void close()
           
protected  java.util.Date parseDate(Column col, java.lang.String dateString)
           
 java.util.List readRowData()
          Returns the next row of data.
protected  java.util.List retrieveNextRow()
          Retrieve the next row of data and return it as a list of column values.
 
Methods inherited from class jimm.datavision.source.DataCursor
getObject, getRow, isFirst, isLast, last, next, previous
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

source

protected CharSepSource source

query

protected Query query

whereClauseFormula

protected Formula whereClauseFormula

noMoreData

protected boolean noMoreData

parser

protected DelimParser parser

dateParsers

protected java.util.HashMap dateParsers

dateParseErrorReported

protected boolean dateParseErrorReported
Constructor Detail

CharSepRow

CharSepRow(CharSepSource source,
           Query query)
Method Detail

readRowData

public java.util.List readRowData()
Returns the next row of data. If there is a where clause, use that to determine which rows we accept or reject.

Specified by:
readRowData in class DataCursor

retrieveNextRow

protected java.util.List retrieveNextRow()
Retrieve the next row of data and return it as a list of column values.

Returns:
a list of column values

parseDate

protected java.util.Date parseDate(Column col,
                                   java.lang.String dateString)

close

public void close()
Overrides:
close in class DataCursor