Package adams.data.report
Class RemoveByName
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,ShallowCopySupporter
,SizeOfHandler
,Serializable
,Comparable
public class RemoveByName extends AbstractReportFilter
Removes all fields from the report which names match the specified regular expression. Matching can be inverted as well.
Valid options are:
-D <int> (property: debugLevel) The greater the number the more additional info the scheme may output to the console (0 = off). default: 0 minimum: 0
-reg-exp <adams.core.base.BaseRegExp> (property: regExp) The regular expression that the field names must match to get removed (or being kept, if matching is inverted). default: .*
-invert-matching (property: invertMatching) If enabled the fields that don't match are retained rather than deleted.
- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
m_InvertMatching
whether to invert the matching, ie keeping the fields that don't match.protected BaseRegExp
m_RegExp
the regular expression to match against the names.-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description RemoveByName()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
defineOptions()
Adds options to the internal list of options.boolean
getInvertMatching()
Returns whether to invert the matching sense.BaseRegExp
getRegExp()
Returns the regular expression in use.String
globalInfo()
Returns a string describing the object.String
invertMatchingTipText()
Returns the tip text for this property.protected DataContainer
processData(DataContainer data)
Performs the actual filtering.String
regExpTipText()
Returns the tip text for this property.void
setInvertMatching(boolean value)
Sets whether to invert the matching sense.void
setRegExp(BaseRegExp value)
Sets the regular expression to use.-
Methods inherited from class adams.data.report.AbstractReportFilter
checkData, cleanUp, compareTo, equals, filter, forCommandLine, forName, getFilters, reset, shallowCopy, shallowCopy
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Field Detail
-
m_RegExp
protected BaseRegExp m_RegExp
the regular expression to match against the names.
-
m_InvertMatching
protected boolean m_InvertMatching
whether to invert the matching, ie keeping the fields that don't match.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceGlobalInfoSupporter
- Specified by:
globalInfo
in classAbstractOptionHandler
- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractOptionHandler
-
setRegExp
public void setRegExp(BaseRegExp value)
Sets the regular expression to use.- Parameters:
value
- the regular expression
-
getRegExp
public BaseRegExp getRegExp()
Returns the regular expression in use.- Returns:
- the regular expression
-
regExpTipText
public String regExpTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the gui
-
setInvertMatching
public void setInvertMatching(boolean value)
Sets whether to invert the matching sense.- Parameters:
value
- true if to invert
-
getInvertMatching
public boolean getInvertMatching()
Returns whether to invert the matching sense.- Returns:
- true if inverted
-
invertMatchingTipText
public String invertMatchingTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the gui
-
processData
protected DataContainer processData(DataContainer data)
Performs the actual filtering.- Specified by:
processData
in classAbstractReportFilter
- Parameters:
data
- the data to filter- Returns:
- the filtered data
-
-