org.imemex.operators
Class AbstractFilterPullOperator<E>

java.lang.Object
  extended by org.imemex.operators.AbstractPullOperator<E>
      extended by org.imemex.operators.AbstractFilterPullOperator<E>
All Implemented Interfaces:
java.util.Iterator<E>, Operator, PullOperator<E>
Direct Known Subclasses:
RVFilterPullOperator

public abstract class AbstractFilterPullOperator<E>
extends AbstractPullOperator<E>

New Filter model.

Author:
Marcos, Lukas

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.imemex.operators.Operator
Operator.ExecTimeType
 
Field Summary
 
Fields inherited from class org.imemex.operators.AbstractPullOperator
measureNext
 
Constructor Summary
AbstractFilterPullOperator(PullOperator<E> input, Predicate predicate)
          Instantiate this filter.
 
Method Summary
 void close()
          Does nothing.
abstract  java.util.Map<java.lang.String,java.lang.Object> getBindings(Predicate predicate, E input)
           
 java.util.List<PullOperator> getInputOperators()
          Get input operators of this operator.
 void open()
          Does nothing.
 
Methods inherited from class org.imemex.operators.AbstractPullOperator
addExecTime, getDesc, getExecTime, getMetaData, getNumberOfElementsPassed, hasNext, next, peek, remove, setDesc, toObjectPullOperator, toString, toXML
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractFilterPullOperator

public AbstractFilterPullOperator(PullOperator<E> input,
                                  Predicate predicate)
Instantiate this filter.

Parameters:
input - a pull operator of anything. How the input is processed only depends on the getBindings() method.
predicate - the predicate to evaluate against the input.
Method Detail

open

public void open()
Description copied from class: AbstractPullOperator
Does nothing.

Specified by:
open in interface Operator
Overrides:
open in class AbstractPullOperator<E>

getBindings

public abstract java.util.Map<java.lang.String,java.lang.Object> getBindings(Predicate predicate,
                                                                             E input)

close

public void close()
Description copied from class: AbstractPullOperator
Does nothing.

Specified by:
close in interface Operator
Overrides:
close in class AbstractPullOperator<E>

getInputOperators

public java.util.List<PullOperator> getInputOperators()
Description copied from interface: PullOperator
Get input operators of this operator. This is mainly used to recursively generate an XML representation of an operator tree.

Specified by:
getInputOperators in interface PullOperator<E>
Overrides:
getInputOperators in class AbstractPullOperator<E>
Returns:
list of operators