com.northconcepts.datapipeline.core
Class ParsingReader

java.lang.Object
  extended by com.northconcepts.datapipeline.core.DataEndpoint
      extended by com.northconcepts.datapipeline.core.DataReader
          extended by com.northconcepts.datapipeline.core.AbstractReader
              extended by com.northconcepts.datapipeline.core.ParsingReader
Direct Known Subclasses:
CombinedLogReader

public abstract class ParsingReader
extends AbstractReader


Nested Class Summary
 
Nested classes/interfaces inherited from class com.northconcepts.datapipeline.core.DataEndpoint
DataEndpoint.State
 
Field Summary
protected  Parser parser
           
protected  StringBuffer valueBuffer
           
 
Fields inherited from class com.northconcepts.datapipeline.core.AbstractReader
currentRecord, fieldNames, lastRow, startingRow
 
Fields inherited from class com.northconcepts.datapipeline.core.DataEndpoint
BUFFER_SIZE, log
 
Constructor Summary
ParsingReader(File file)
           
ParsingReader(Reader reader)
           
 
Method Summary
 DataException addExceptionProperties(DataException exception)
          Adds this endpoint's current state to a DataException.
 int available()
          Returns the number of records that can probably be read without blocking.
protected  boolean fillRecord(Record record)
           
protected  boolean isDigit(int c)
           
protected  boolean isLetter(int c)
           
protected  boolean isNewLine(int c)
           
protected  void match(int c)
           
protected  void matchCHARACTER()
           
protected  void matchDIGIT()
           
protected  void matchDIGITS()
           
protected  void matchDOUBLE()
           
protected  void matchINTEGER()
           
protected  void matchNEWLINE()
           
protected  void matchNEWLINES()
           
 
Methods inherited from class com.northconcepts.datapipeline.core.AbstractReader
getFieldNames, getLastRow, getStartingRow, isFieldNamesInFirstRow, open, read, readImpl, setFieldNames, setFieldNamesInFirstRow, setLastRow, setStartingRow
 
Methods inherited from class com.northconcepts.datapipeline.core.DataReader
getBufferSize, getNestedReader, getRootReader, peek, pop, push, skip
 
Methods inherited from class com.northconcepts.datapipeline.core.DataEndpoint
assertNotOpened, assertOpened, close, decrementRecordCount, exception, exception, exception, finalize, getRecordCount, getRecordCountAsBigInteger, getRecordCountAsString, getState, incrementRecordCount, isClosed, isOpen, isRecordCountBigInteger, resetRecordCount, toString
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

parser

protected final Parser parser

valueBuffer

protected StringBuffer valueBuffer
Constructor Detail

ParsingReader

public ParsingReader(File file)
              throws FileNotFoundException
Throws:
FileNotFoundException

ParsingReader

public ParsingReader(Reader reader)
Method Detail

available

public int available()
Description copied from class: DataReader
Returns the number of records that can probably be read without blocking.

Overrides:
available in class DataReader

addExceptionProperties

public DataException addExceptionProperties(DataException exception)
Description copied from class: DataEndpoint
Adds this endpoint's current state to a DataException. Since this method is called whenever an exception is thrown, subclasses should override it to add their specific information.

Overrides:
addExceptionProperties in class AbstractReader

fillRecord

protected boolean fillRecord(Record record)
                      throws Throwable
Specified by:
fillRecord in class AbstractReader
Throws:
Throwable

matchDOUBLE

protected void matchDOUBLE()

matchINTEGER

protected void matchINTEGER()

matchDIGITS

protected void matchDIGITS()

matchDIGIT

protected void matchDIGIT()

matchCHARACTER

protected void matchCHARACTER()

matchNEWLINES

protected void matchNEWLINES()

matchNEWLINE

protected void matchNEWLINE()

isLetter

protected boolean isLetter(int c)

isDigit

protected boolean isDigit(int c)

isNewLine

protected boolean isNewLine(int c)

match

protected void match(int c)


Copyright (c) 2007-2009 North Concepts Inc. All Rights Reserved.