com.rapidminer.operator.preprocessing.filter.attributes
Class AbstractAttributeFilterCondition

java.lang.Object
  extended by com.rapidminer.operator.preprocessing.filter.attributes.AbstractAttributeFilterCondition
All Implemented Interfaces:
AttributeFilterCondition
Direct Known Subclasses:
DateAttributeFilter, MissingValuesAttributeFilter, NameAttributeFilter, NominalAttributeFilter, NoMissingValuesAttributeFilter, NumericalAttributeFilter, NumericValueAttributeFilter

public abstract class AbstractAttributeFilterCondition
extends java.lang.Object
implements AttributeFilterCondition

Author:
Sebastian Land

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.rapidminer.operator.preprocessing.filter.attributes.AttributeFilterCondition
AttributeFilterCondition.ScanResult
 
Constructor Summary
AbstractAttributeFilterCondition()
          All implementing filter conditions have to have an empty constructor.
 
Method Summary
 AttributeFilterCondition.ScanResult check(Attribute attribute, Example example)
          This method checks the given example.
 AttributeFilterCondition.ScanResult checkAfterFullScan()
          This method has to be invoked after a full scan has been performed if the isNeedingFullScan method returns true.
 java.util.List<ParameterType> getParameterTypes(Operator operator)
          Just returns an empty list.
 void init(Operator operator)
          Initializes the condition before checking anything.
 boolean isNeedingFullScan()
          Indicates that this filter needs a full data scan and can evaluate its condition only after the full scan has been performed.
 boolean isNeedingScan()
          Indicates if this filter needs a data scan, i.e. an invocation of the check method for each example.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.rapidminer.operator.preprocessing.filter.attributes.AttributeFilterCondition
beforeScanCheck
 

Constructor Detail

AbstractAttributeFilterCondition

public AbstractAttributeFilterCondition()
All implementing filter conditions have to have an empty constructor.

Method Detail

check

public AttributeFilterCondition.ScanResult check(Attribute attribute,
                                                 Example example)
Description copied from interface: AttributeFilterCondition
This method checks the given example. During this method the filter might check data to decide if attribute should be filtered out. If the condition needs a full scan before it can decide, this result is ignored.

Specified by:
check in interface AttributeFilterCondition

checkAfterFullScan

public AttributeFilterCondition.ScanResult checkAfterFullScan()
Description copied from interface: AttributeFilterCondition
This method has to be invoked after a full scan has been performed if the isNeedingFullScan method returns true.

Specified by:
checkAfterFullScan in interface AttributeFilterCondition
Returns:
This method has to be restricted to return KEEP or REMOVED, but not unchecked

init

public void init(Operator operator)
          throws UserError
Description copied from interface: AttributeFilterCondition
Initializes the condition before checking anything. If checking depends on parameters, their values might be retrieved in this method.

Specified by:
init in interface AttributeFilterCondition
Throws:
UserError

isNeedingScan

public boolean isNeedingScan()
Description copied from interface: AttributeFilterCondition
Indicates if this filter needs a data scan, i.e. an invocation of the check method for each example.

Specified by:
isNeedingScan in interface AttributeFilterCondition

isNeedingFullScan

public boolean isNeedingFullScan()
Description copied from interface: AttributeFilterCondition
Indicates that this filter needs a full data scan and can evaluate its condition only after the full scan has been performed. If this method returns true, isNeedingScan must have returned true either.

Specified by:
isNeedingFullScan in interface AttributeFilterCondition

getParameterTypes

public java.util.List<ParameterType> getParameterTypes(Operator operator)
Just returns an empty list. Subclasses might add parameters

Specified by:
getParameterTypes in interface AttributeFilterCondition


Copyright © 2001-2009 by Rapid-I