Package adams.data.instances
Class FieldInstanceGenerator
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.instances.AbstractInstanceGenerator<Spectrum>
-
- adams.data.instances.AbstractSpectrumBasedInstanceGenerator
-
- adams.data.instances.AbstractFieldInstanceGenerator
-
- adams.data.instances.FieldInstanceGenerator
-
- All Implemented Interfaces:
adams.core.CleanUpHandler,adams.core.Destroyable,adams.core.GlobalInfoSupporter,adams.core.logging.LoggingLevelHandler,adams.core.logging.LoggingSupporter,adams.core.option.OptionHandler,adams.core.ShallowCopySupporter<adams.data.instances.AbstractInstanceGenerator>,adams.core.SizeOfHandler,adams.data.instances.InstanceGeneratorWithFields,InstanceGeneratorWithSampleID,adams.db.DatabaseConnectionHandler,adams.db.DatabaseConnectionProvider,adams.db.DatabaseConnectionUser,adams.db.OptionalDatabaseConnectionUser,Serializable,Comparable
public class FieldInstanceGenerator extends AbstractFieldInstanceGenerator
A generator for turning fields of the sample data of a spectrum into weka.core.Instance objects.
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
-add-db-id (property: addDatabaseID) If set to true, then the database ID will be added to the output.
-add-sample-id (property: addSampleID) If set to true, then the sample ID will be added to the output.
-notes <adams.core.base.BaseString> [-notes ...] (property: notes) The notes to add as attributes to the generated data, eg 'PROCESS INFORMATION' . default:
-load-sample-data (property: loadSampleData) If set to true, then the sample data will be loaded if only dummy report available, using the sample ID.
-store (property: useStoreTable) If set to true, then the sample data will get read from the store table, otherwise the active one.
-field <adams.data.report.Field> [-field ...] (property: fields) The sample data fields to add to the output. default:
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Stringm_Prefixthe prefix to use.-
Fields inherited from class adams.data.instances.AbstractFieldInstanceGenerator
m_Fields
-
Fields inherited from class adams.data.instances.AbstractSpectrumBasedInstanceGenerator
m_AddSampleID, m_LoadSampleData, m_Notes
-
-
Constructor Summary
Constructors Constructor Description FieldInstanceGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddefineOptions()Adds options to the internal list of options.protected voidgenerateHeader(Spectrum data)Generates the header of the output data.protected weka.core.InstancegenerateOutput(Spectrum data)Generates the actual data.StringgetPrefix()Returns the prefix for the attribute names.StringglobalInfo()Returns a string describing the object.StringprefixTipText()Returns the tip text for this property.voidsetPrefix(String value)Sets the prefix for the attribute names.-
Methods inherited from class adams.data.instances.AbstractFieldInstanceGenerator
checkHeader, fieldsTipText, getFields, setFields
-
Methods inherited from class adams.data.instances.AbstractSpectrumBasedInstanceGenerator
addSampleIDTipText, checkInput, getAddSampleID, getDefaultDatabaseConnection, getLoadSampleData, getNotes, loadSampleDataTipText, notesTipText, postProcessHeader, postProcessOutput, setAddSampleID, setLoadSampleData, setNotes
-
Methods inherited from class adams.data.instances.AbstractInstanceGenerator
addDatabaseIDTipText, checkSetup, cleanUp, compareTo, destroy, equals, forCommandLine, forName, generate, getAddDatabaseID, getDatabaseConnection, getGenerators, getOffline, getOutputHeader, getTolerateHeaderChanges, initialize, interpretePosition, offlineTipText, reset, setAddDatabaseID, setDatabaseConnection, setOffline, setTolerateHeaderChanges, shallowCopy, shallowCopy, tolerateHeaderChangesTipText
-
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
-
-
-
-
Field Detail
-
m_Prefix
protected String m_Prefix
the prefix to use.
-
-
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 classAbstractFieldInstanceGenerator
-
setPrefix
public void setPrefix(String value)
Sets the prefix for the attribute names.- Parameters:
value- the name prefix
-
getPrefix
public String getPrefix()
Returns the prefix for the attribute names.- Returns:
- the name prefix
-
prefixTipText
public String prefixTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
generateHeader
protected void generateHeader(Spectrum data)
Generates the header of the output data.- Specified by:
generateHeaderin classadams.data.instances.AbstractInstanceGenerator<Spectrum>- Parameters:
data- the input data
-
-