de.unidu.is.text
Class AbstractSingleItemFilter

java.lang.Object
  extended byde.unidu.is.text.AbstractFilter
      extended byde.unidu.is.text.AbstractSingleItemFilter
All Implemented Interfaces:
Filter, SingleItemFilter
Direct Known Subclasses:
CodecSoundexFilter, GermanStemmerFilter, HTMLFilter, LowercaseFilter, SoundexFilter, StemmerFilter, StopwordFilter, UntagFilter

public abstract class AbstractSingleItemFilter
extends AbstractFilter
implements SingleItemFilter

This is an abstract filter implementation which converts every object into exactly one object (or into null), and which allows for chaining filters.

Subclasses have to implement the actual filtering method.

Since:
2003-07-04
Version:
$Revision: 1.6 $, $Date: 2005/02/21 17:29:28 $
Author:
Henrik Nottelmann

Field Summary
 
Fields inherited from class de.unidu.is.text.AbstractFilter
nextFilter
 
Constructor Summary
AbstractSingleItemFilter(Filter nextFilter)
          Creates a new instance and sets the next filter in the chain.
 
Method Summary
protected  java.util.Iterator filter(java.lang.Object value)
          Applies only this filter on the specified object, without considering the other filters from the filter chain.
 
Methods inherited from class de.unidu.is.text.AbstractFilter
apply, apply
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.unidu.is.text.SingleItemFilter
run
 

Constructor Detail

AbstractSingleItemFilter

public AbstractSingleItemFilter(Filter nextFilter)
Creates a new instance and sets the next filter in the chain.

Parameters:
nextFilter - next filter in the filter chain
Method Detail

filter

protected java.util.Iterator filter(java.lang.Object value)
Applies only this filter on the specified object, without considering the other filters from the filter chain.

This method applies run(String) on the specified object, and then returns a SingleItemIterator returning the resulting object. If run(String) returns null, a is returned.

Specified by:
filter in class AbstractFilter
Parameters:
value - value to be modified by this filter
Returns:
iterator over the resulting objects
See Also:
AbstractFilter.filter(java.lang.Object)