edu.washington.cs.knowitall.extractor.mapper
Class FilterMapper<T>

java.lang.Object
  extended by edu.washington.cs.knowitall.extractor.mapper.Mapper<T>
      extended by edu.washington.cs.knowitall.extractor.mapper.FilterMapper<T>
Type Parameters:
T -
Direct Known Subclasses:
AdjacentToRelationFilter, ChunkedBinaryExtractionStringLengthFilter, ChunkedBinaryExtractionWordCountFilter, ConjunctionCommaArgumentFilter, NormalizedRelationDictionaryFilter, PronounArgumentFilter, ReVerbRelationDictionaryFilter, SentenceEndFilter, SentenceLengthFilter, SentenceStartFilter, StopListFilter

public abstract class FilterMapper<T>
extends Mapper<T>

A type of mapper that filters each object in the stream independently. Subclasses extending this class only have to implement the doFilter(T object) method, which should return true if object should remain in the stream, and false if the object should be removed from the stream.

Author:
afader

Constructor Summary
FilterMapper()
           
 
Method Summary
abstract  boolean doFilter(T object)
           
protected  java.lang.Iterable<T> doMap(java.lang.Iterable<T> objects)
           
 
Methods inherited from class edu.washington.cs.knowitall.extractor.mapper.Mapper
disable, enable, isEnabled, map
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilterMapper

public FilterMapper()
Method Detail

doFilter

public abstract boolean doFilter(T object)

doMap

protected java.lang.Iterable<T> doMap(java.lang.Iterable<T> objects)
Specified by:
doMap in class Mapper<T>
Parameters:
objects - a stream of objects
Returns:
a modified stream of objects