Package adams.data.filter
Class MultiFilter<T extends DataContainer>
-
- Type Parameters:
T
- the type of data to pass through the filter
- All Implemented Interfaces:
CleanUpHandler
,Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,ShallowCopySupporter<Filter>
,SizeOfHandler
,Filter<T>
,DatabaseConnectionHandler
,DatabaseConnectionProvider
,DatabaseConnectionUser
,Serializable
,Comparable
public class MultiFilter<T extends DataContainer> extends AbstractDatabaseConnectionFilter<T>
A meta-filter that runs multiple filters over the data.
Valid options are:
-D (property: debug) If set to true, scheme may output additional info to the console.
-filter <adams.data.filter.AbstractFilter [options]> [-filter ...] (property: subFilters) The array of filters to use.
- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class adams.data.filter.AbstractFilter
AbstractFilter.FilterJob<T extends DataContainer>
-
-
Field Summary
Fields Modifier and Type Field Description protected Filter<T>[]
m_Filters
the filters.-
Fields inherited from class adams.data.filter.AbstractDatabaseConnectionFilter
m_DatabaseConnection
-
Fields inherited from class adams.data.filter.AbstractFilter
m_DontUpdateID
-
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 MultiFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
defineOptions()
Adds options to the internal list of options.protected AbstractDatabaseConnection
getDefaultDatabaseConnection()
Returns the default database connection.Filter<T>[]
getSubFilters()
Returns the filters in use.String
globalInfo()
Returns a string describing the object.protected T
processData(T data)
Performs the actual filtering.void
setSubFilters(Filter<T>[] value)
Sets the filters to use.String
subFiltersTipText()
Returns the tip text for this property.protected void
updateDatabaseConnection()
Updates the database connection in the sub-filters.-
Methods inherited from class adams.data.filter.AbstractDatabaseConnectionFilter
getDatabaseConnection, initialize, setDatabaseConnection
-
Methods inherited from class adams.data.filter.AbstractFilter
checkData, cleanUp, compareTo, destroy, dontUpdateIDTipText, equals, filter, forCommandLine, getDontUpdateID, reset, setDontUpdateID, shallowCopy, shallowCopy
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, finishInit, getDefaultLoggingLevel, getOptionManager, 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, setLoggingLevel
-
Methods inherited from interface adams.core.logging.LoggingSupporter
getLogger, isLoggingEnabled
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, getOptionManager, toCommandLine
-
-
-
-
Field Detail
-
m_Filters
protected Filter<T extends DataContainer>[] m_Filters
the filters.
-
-
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 classAbstractFilter<T extends DataContainer>
-
getDefaultDatabaseConnection
protected AbstractDatabaseConnection getDefaultDatabaseConnection()
Returns the default database connection.- Specified by:
getDefaultDatabaseConnection
in classAbstractDatabaseConnectionFilter<T extends DataContainer>
- Returns:
- the default database connection
-
subFiltersTipText
public String subFiltersTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the gui
-
setSubFilters
public void setSubFilters(Filter<T>[] value)
Sets the filters to use.- Parameters:
value
- the filters to use
-
updateDatabaseConnection
protected void updateDatabaseConnection()
Updates the database connection in the sub-filters.- Overrides:
updateDatabaseConnection
in classAbstractDatabaseConnectionFilter<T extends DataContainer>
-
processData
protected T processData(T data)
Performs the actual filtering.- Specified by:
processData
in classAbstractFilter<T extends DataContainer>
- Parameters:
data
- the data to filter- Returns:
- the filtered data
-
-