com.rapidminer.operator.preprocessing.filter
Class AttributeValueTrim

java.lang.Object
  extended by com.rapidminer.tools.AbstractObservable<Operator>
      extended by com.rapidminer.operator.Operator
          extended by com.rapidminer.operator.AbstractExampleSetProcessing
              extended by com.rapidminer.operator.preprocessing.AbstractDataProcessing
                  extended by com.rapidminer.operator.preprocessing.filter.AbstractFilteredDataProcessing
                      extended by com.rapidminer.operator.preprocessing.AbstractValueProcessing
                          extended by com.rapidminer.operator.preprocessing.filter.AttributeValueTrim
All Implemented Interfaces:
ConfigurationListener, PreviewListener, ResourceConsumer, ParameterHandler, LoggingHandler, Observable<Operator>

public class AttributeValueTrim
extends AbstractValueProcessing

This operator creates new attributes from nominal attributes where the new attributes contain the trimmed original values, i.e. leading and trailing spaces will be removed.

Author:
Ingo Mierswa, Helge Homburg, Tobias Malbrecht

Constructor Summary
AttributeValueTrim(OperatorDescription description)
           
 
Method Summary
 ExampleSet applyOnFiltered(ExampleSet exampleSet)
          Subclasses have to implement this method in order to operate only on the selected attributes.
 ExampleSetMetaData applyOnFilteredMetaData(ExampleSetMetaData emd)
          This method has to be implemented in order to specify the changes of the meta data caused by the application of this operator.
protected  int[] getFilterValueTypes()
          Defines the value types of the attributes which are processed or affected by this operator.
 ResourceConsumptionEstimator getResourceConsumptionEstimator()
          Subclasses can override this method if they are able to estimate the consumed resources (CPU time and memory), based on their input.
 boolean writesIntoExistingData()
          This method indicates whether the operator will perform a write operation on a cell in an existing column of the example set's ExampleTable.
 
Methods inherited from class com.rapidminer.operator.preprocessing.filter.AbstractFilteredDataProcessing
apply, getParameterTypes, modifyMetaData
 
Methods inherited from class com.rapidminer.operator.AbstractExampleSetProcessing
doWork, getExampleSetInputPort, getExampleSetOutputPort, getInputPort, getRequiredMetaData, shouldAutoConnect
 
Methods inherited from class com.rapidminer.operator.Operator
acceptsInput, addError, addError, addValue, addWarning, apply, apply, assumePreconditionsSatisfied, checkAll, checkAllExcludingMetaData, checkDeprecations, checkForStop, checkIO, checkProperties, clear, clearErrorList, cloneOperator, collectErrors, createExperimentTree, createExperimentTree, createFromXML, createFromXML, createFromXML, createMarkedExperimentTree, createMarkedProcessTree, createProcessTree, createProcessTree, disconnectPorts, execute, fireUpdate, freeMemory, getAddOnlyAdditionalOutput, getApplyCount, getCompatibilityLevel, getDeliveredOutputClasses, getDeprecationInfo, getDesiredInputClasses, getDOMRepresentation, getEncoding, getErrorList, getExecutionUnit, getExperiment, getIncompatibleVersionChanges, getInput, getInput, getInput, getInputClasses, getInputDescription, getInputPorts, getIODescription, getLog, getLogger, getName, getNumberOfBreakpoints, getOperatorClassName, getOperatorDescription, getOutputClasses, getOutputPorts, getParameter, getParameterAsBoolean, getParameterAsChar, getParameterAsColor, getParameterAsDouble, getParameterAsFile, getParameterAsFile, getParameterAsInputStream, getParameterAsInt, getParameterAsMatrix, getParameterAsRepositoryLocation, getParameterAsString, getParameterHandler, getParameterList, getParameters, getParameterTupel, getParameterType, getParent, getPortOwner, getProcess, getRoot, getStartTime, getTransformer, getUserDescription, getValue, getValues, getXML, getXML, getXML, hasBreakpoint, hasBreakpoint, hasInput, inApplyLoop, isDebugMode, isDirty, isEnabled, isExpanded, isParallel, isParameterSet, isRunning, log, log, logError, logNote, logWarning, lookupOperator, makeDirty, makeDirtyOnUpdate, notifyRenaming, performAdditionalChecks, preAutoWire, processFinished, processStarts, producesOutput, propagateDirtyness, register, registerOperator, remove, removeAndKeepConnections, rename, resume, setBreakpoint, setCompatibilityLevel, setEnabled, setEnclosingProcess, setExpanded, setInput, setListParameter, setPairParameter, setParameter, setParameters, setUserDescription, shouldAutoConnect, shouldStopStandaloneExecution, toString, transformMetaData, unregisterOperator, updateExecutionOrder, walk, writeXML, writeXML
 
Methods inherited from class com.rapidminer.tools.AbstractObservable
addObserver, addObserverAsFirst, fireUpdate, removeObserver
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AttributeValueTrim

public AttributeValueTrim(OperatorDescription description)
Method Detail

applyOnFiltered

public ExampleSet applyOnFiltered(ExampleSet exampleSet)
                           throws OperatorException
Description copied from class: AbstractFilteredDataProcessing
Subclasses have to implement this method in order to operate only on the selected attributes. The results are merged back into the original example set.

Specified by:
applyOnFiltered in class AbstractFilteredDataProcessing
Throws:
OperatorException

applyOnFilteredMetaData

public ExampleSetMetaData applyOnFilteredMetaData(ExampleSetMetaData emd)
Description copied from class: AbstractFilteredDataProcessing
This method has to be implemented in order to specify the changes of the meta data caused by the application of this operator.

Specified by:
applyOnFilteredMetaData in class AbstractFilteredDataProcessing

getFilterValueTypes

protected int[] getFilterValueTypes()
Description copied from class: AbstractFilteredDataProcessing
Defines the value types of the attributes which are processed or affected by this operator. Has to be overridden to restrict the attributes which can be chosen by an AttributeSubsetSelector.

Specified by:
getFilterValueTypes in class AbstractFilteredDataProcessing
Returns:
array of value types

writesIntoExistingData

public boolean writesIntoExistingData()
Description copied from class: AbstractExampleSetProcessing
This method indicates whether the operator will perform a write operation on a cell in an existing column of the example set's ExampleTable. If yes, the original example will be completely copied in memory if the original port is used.

Specified by:
writesIntoExistingData in class AbstractExampleSetProcessing

getResourceConsumptionEstimator

public ResourceConsumptionEstimator getResourceConsumptionEstimator()
Description copied from class: Operator
Subclasses can override this method if they are able to estimate the consumed resources (CPU time and memory), based on their input. The default implementation returns null.

Specified by:
getResourceConsumptionEstimator in interface ResourceConsumer
Overrides:
getResourceConsumptionEstimator in class Operator


Copyright © 2001-2009 by Rapid-I