Package adams.data.report
Class RemoveByDataType
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.report.AbstractReportFilter
-
- adams.data.report.RemoveByDataType
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,ShallowCopySupporter
,SizeOfHandler
,Serializable
,Comparable
public class RemoveByDataType extends AbstractReportFilter
Removes all fields from the report that match the defined data types. If matching is inverted, the filter keeps all defined data types instead and removes all others.
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
-data-type <S|N|B|U> [-data-type ...] (property: dataTypes) The data types to remove (or keep, if matching is inverted). default:
-invert-matching (property: invertMatching) If enabled the data types are retained rather than deleted, all that aren't listed are then removed instead.
- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected DataType[]
m_DataTypes
the data types to remove.protected boolean
m_InvertMatching
whether to invert the matching, ie keeping the types and remove all others.-
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 RemoveByDataType()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
dataTypesTipText()
Returns the tip text for this property.void
defineOptions()
Adds options to the internal list of options.DataType[]
getDataTypes()
Returns the data types to remove.boolean
getInvertMatching()
Returns whether to invert the matching sense.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.void
setDataTypes(DataType[] value)
Sets the data types to remove.void
setInvertMatching(boolean value)
Sets whether to invert the matching sense.-
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_DataTypes
protected DataType[] m_DataTypes
the data types to remove.
-
m_InvertMatching
protected boolean m_InvertMatching
whether to invert the matching, ie keeping the types and remove all others.
-
-
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
-
setDataTypes
public void setDataTypes(DataType[] value)
Sets the data types to remove.- Parameters:
value
- the data types
-
getDataTypes
public DataType[] getDataTypes()
Returns the data types to remove.- Returns:
- the data types
-
dataTypesTipText
public String dataTypesTipText()
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
-
-