com.northconcepts.datapipeline.filter
Class FilteringReader

java.lang.Object
  extended by com.northconcepts.datapipeline.core.DataEndpoint
      extended by com.northconcepts.datapipeline.core.DataReader
          extended by com.northconcepts.datapipeline.core.ProxyReader
              extended by com.northconcepts.datapipeline.filter.FilteringReader
Direct Known Subclasses:
ValidatingReader

public class FilteringReader
extends ProxyReader

A proxy that applies filters to determine which records passes through.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.northconcepts.datapipeline.core.DataEndpoint
DataEndpoint.State
 
Field Summary
 
Fields inherited from class com.northconcepts.datapipeline.core.DataEndpoint
BUFFER_SIZE, log
 
Constructor Summary
FilteringReader(DataReader reader)
           
 
Method Summary
 FilteringReader add(Filter... filters)
           
 DataException addExceptionProperties(DataException exception)
          Adds this endpoint's current state to a DataException.
protected  Record discard(Record record, Filter filter)
           
 Filter get(int index)
           
 int getCount()
           
 Filter getCurrentFilter()
           
protected  Record interceptRecord(Record record)
           
 FilteringReader remove(int index)
           
 FilteringReader removeAll()
           
 
Methods inherited from class com.northconcepts.datapipeline.core.ProxyReader
available, close, getNestedReader, open, readImpl, setNestedDataReader, setNestedDataReader
 
Methods inherited from class com.northconcepts.datapipeline.core.DataReader
getBufferSize, getRootReader, peek, pop, push, read, skip
 
Methods inherited from class com.northconcepts.datapipeline.core.DataEndpoint
assertNotOpened, assertOpened, 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
 

Constructor Detail

FilteringReader

public FilteringReader(DataReader reader)
Method Detail

add

public FilteringReader add(Filter... filters)

getCurrentFilter

public Filter getCurrentFilter()

getCount

public int getCount()

get

public Filter get(int index)

remove

public FilteringReader remove(int index)

removeAll

public FilteringReader removeAll()

interceptRecord

protected Record interceptRecord(Record record)
                          throws Throwable
Overrides:
interceptRecord in class ProxyReader
Throws:
Throwable

discard

protected Record discard(Record record,
                         Filter filter)

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 ProxyReader


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