| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| StandardStep |
|
| 0.0;0 |
| 1 | // BSD License (http://www.galagosearch.org/license) | |
| 2 | ||
| 3 | package org.galagosearch.tupleflow; | |
| 4 | ||
| 5 | import java.io.IOException; | |
| 6 | ||
| 7 | /** | |
| 8 | * This is the base class for most TupleFlow steps. Most TupleFlow steps convert | |
| 9 | * data from some type T to some type U, then call the process method on some other | |
| 10 | * processor. This class abstracts the details of implementing that kind of class. | |
| 11 | * | |
| 12 | * @author trevor | |
| 13 | */ | |
| 14 | 10 | public abstract class StandardStep<T, U> implements Processor<T>, Source<U> { |
| 15 | public Processor<U> processor; | |
| 16 | ||
| 17 | public abstract void process(T object) throws IOException; | |
| 18 | public void setProcessor(Step next) throws IncompatibleProcessorException { | |
| 19 | 4 | Linkage.link(this, next); |
| 20 | 4 | } |
| 21 | public void close() throws IOException { | |
| 22 | 0 | processor.close(); |
| 23 | 0 | } |
| 24 | } |