Package adams.data.featuregenerator
Class MultiGenerator
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.featuregenerator.AbstractFeatureGenerator
-
- adams.data.featuregenerator.AbstractDatabaseConnectionFeatureGenerator
-
- adams.data.featuregenerator.MultiGenerator
-
- All Implemented Interfaces:
adams.core.Destroyable,adams.core.GlobalInfoSupporter,adams.core.logging.LoggingLevelHandler,adams.core.logging.LoggingSupporter,adams.core.option.OptionHandler,adams.core.ShallowCopySupporter<AbstractFeatureGenerator>,adams.core.SizeOfHandler,adams.db.DatabaseConnectionHandler,adams.db.DatabaseConnectionProvider,adams.db.DatabaseConnectionUser,Serializable,Comparable
public class MultiGenerator extends AbstractDatabaseConnectionFeatureGenerator
A meta-generator that applies multiple feature generators to the data.
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
-prefix <java.lang.String> (property: prefix) The prefix to use in the field for the generated features. default: Feature
-generator <adams.data.featuregenerator.AbstractFeatureGenerator> [-generator ...] (property: subGenerators) The array of generators to use. default: adams.data.featuregenerator.PassThrough
-override-prefix (property: overridePrefix) If enabled, then this prefix will override the ones specified by the sub-generators.
- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected AbstractFeatureGenerator[]m_Generatorsthe generators.protected booleanm_OverridePrefixwhether to override the sub-generators' prefix.-
Fields inherited from class adams.data.featuregenerator.AbstractDatabaseConnectionFeatureGenerator
m_DatabaseConnection
-
Fields inherited from class adams.data.featuregenerator.AbstractFeatureGenerator
m_Prefix, PREFIX_FEATURE
-
-
Constructor Summary
Constructors Constructor Description MultiGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddefineOptions()Adds options to the internal list of options.protected adams.db.AbstractDatabaseConnectiongetDefaultDatabaseConnection()Returns the default database connection.booleangetOverridePrefix()Returns whether the prefix of the generators are overridden.AbstractFeatureGenerator[]getSubGenerators()Returns the generators in use.StringglobalInfo()Returns a string describing the object.StringoverridePrefixTipText()Returns the tip text for this property.protected HeatmapprocessData(Heatmap data)Performs the actual feature generation.voidsetOverridePrefix(boolean value)Sets whether to override the generators' prefix.voidsetSubGenerators(AbstractFeatureGenerator[] value)Sets the generators to use.StringsubGeneratorsTipText()Returns the tip text for this property.protected voidupdateDatabaseConnection()Updates the database connection in the sub-generators.-
Methods inherited from class adams.data.featuregenerator.AbstractDatabaseConnectionFeatureGenerator
getDatabaseConnection, initialize, setDatabaseConnection
-
Methods inherited from class adams.data.featuregenerator.AbstractFeatureGenerator
addFeature, addFeature, checkData, cleanUp, compareTo, equals, forCommandLine, forName, generate, getDefaultPrefix, getGenerators, getPrefix, prefixTipText, reset, setPrefix, shallowCopy, shallowCopy
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, loggingLevelTipText, newOptionManager, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
Field Detail
-
m_Generators
protected AbstractFeatureGenerator[] m_Generators
the generators.
-
m_OverridePrefix
protected boolean m_OverridePrefix
whether to override the sub-generators' prefix.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfoin interfaceadams.core.GlobalInfoSupporter- Specified by:
globalInfoin classadams.core.option.AbstractOptionHandler- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceadams.core.option.OptionHandler- Overrides:
defineOptionsin classAbstractFeatureGenerator
-
getDefaultDatabaseConnection
protected adams.db.AbstractDatabaseConnection getDefaultDatabaseConnection()
Returns the default database connection.- Specified by:
getDefaultDatabaseConnectionin classAbstractDatabaseConnectionFeatureGenerator- Returns:
- the default database connection
-
setSubGenerators
public void setSubGenerators(AbstractFeatureGenerator[] value)
Sets the generators to use.- Parameters:
value- the generators to use
-
getSubGenerators
public AbstractFeatureGenerator[] getSubGenerators()
Returns the generators in use.- Returns:
- the generators
-
subGeneratorsTipText
public String subGeneratorsTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the gui
-
setOverridePrefix
public void setOverridePrefix(boolean value)
Sets whether to override the generators' prefix.- Parameters:
value- if true then the prefix of the sub-generators will be overridden
-
getOverridePrefix
public boolean getOverridePrefix()
Returns whether the prefix of the generators are overridden.- Returns:
- true if the prefix of the sub-generators gets overridden
-
overridePrefixTipText
public String overridePrefixTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the gui
-
updateDatabaseConnection
protected void updateDatabaseConnection()
Updates the database connection in the sub-generators.- Overrides:
updateDatabaseConnectionin classAbstractDatabaseConnectionFeatureGenerator
-
processData
protected Heatmap processData(Heatmap data)
Performs the actual feature generation.- Specified by:
processDatain classAbstractFeatureGenerator- Parameters:
data- the data to process- Returns:
- the processed data
-
-