de.unidu.is.text
Class WordSetConcatenatorFilter

java.lang.Object
  extended byde.unidu.is.text.WordSetConcatenatorFilter
All Implemented Interfaces:
Filter

public class WordSetConcatenatorFilter
extends java.lang.Object
implements Filter

This filter concatenes all values together (separated by a space), where each word only occurs once. The original order is not preserved.

Since:
2004-03-12
Version:
$Revision $, $Date: 2005/02/21 17:29:28 $
Author:
Henrik Nottelmann

Field Summary
protected  Filter nextFilter
          The next filter in the filter chain.
 
Constructor Summary
WordSetConcatenatorFilter(Filter nextFilter)
          Creates a new instance and sets the next filter in the chain.
 
Method Summary
 java.util.Iterator apply(java.util.Iterator iterator)
          Applies this filter on each object returned by the specified iterator.
 java.util.Iterator apply(java.lang.Object seed)
          Applies this filter on the specified single object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nextFilter

protected Filter nextFilter
The next filter in the filter chain.

Constructor Detail

WordSetConcatenatorFilter

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

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

apply

public java.util.Iterator apply(java.lang.Object seed)
Applies this filter on the specified single object.

Specified by:
apply in interface Filter
Parameters:
seed - object on which the filter is applied
Returns:
iterator over the resulting objects
See Also:
Filter.apply(java.lang.Object)

apply

public java.util.Iterator apply(java.util.Iterator iterator)
Applies this filter on each object returned by the specified iterator.

This method first calls the next filter in the filter chain (if existing), and then applies this filter on the specified iterator.

Specified by:
apply in interface Filter
Parameters:
iterator - iterator over objects on which the filter is applied
Returns:
iterator over the resulting objects
See Also:
Filter.apply(java.util.Iterator)