Package adams.data.instances
Class AbstractFieldInstanceGeneratorWithClass
- 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.AbstractFieldInstanceGeneratorWithClass
-
- 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
,InstanceGeneratorWithClassLabels
,adams.data.instances.InstanceGeneratorWithFields
,InstanceGeneratorWithSampleID
,InstanceGeneratorWithTargetField
,adams.db.DatabaseConnectionHandler
,adams.db.DatabaseConnectionProvider
,adams.db.DatabaseConnectionUser
,adams.db.OptionalDatabaseConnectionUser
,Serializable
,Comparable
- Direct Known Subclasses:
FieldInstanceGeneratorWithClass
public abstract class AbstractFieldInstanceGeneratorWithClass extends AbstractFieldInstanceGenerator implements InstanceGeneratorWithTargetField, InstanceGeneratorWithClassLabels
Ancestor for generators that use fields and a target to generate the instance.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected adams.core.base.BaseString[]
m_ClassLabels
the nominal labels to use, in case of a nominal class.protected adams.data.report.Field
m_Field
the field that acts as class attribute.-
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 AbstractFieldInstanceGeneratorWithClass()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
checkHeader(Spectrum data)
Checks whether the number of waves are the same.String
classLabelsTipText()
Returns the tip text for this property.void
defineOptions()
Adds options to the internal list of options.String
fieldTipText()
Returns the tip text for this property.adams.core.base.BaseString[]
getClassLabels()
Returns the labels for a nominal class attribute.adams.data.report.Field
getField()
Returns the field that acts as class attribute.void
setClassLabels(adams.core.base.BaseString[] value)
Sets the labels for a nominal class attribute.void
setField(adams.data.report.Field value)
Sets the field to act as class attribute.-
Methods inherited from class adams.data.instances.AbstractFieldInstanceGenerator
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, generateHeader, generateOutput, 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, globalInfo, loggingLevelTipText, newOptionManager, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
Method Detail
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceadams.core.option.OptionHandler
- Overrides:
defineOptions
in classAbstractFieldInstanceGenerator
-
setField
public void setField(adams.data.report.Field value)
Sets the field to act as class attribute.- Specified by:
setField
in interfaceInstanceGeneratorWithTargetField
- Parameters:
value
- the field
-
getField
public adams.data.report.Field getField()
Returns the field that acts as class attribute.- Specified by:
getField
in interfaceInstanceGeneratorWithTargetField
- Returns:
- the field
-
fieldTipText
public String fieldTipText()
Returns the tip text for this property.- Specified by:
fieldTipText
in interfaceInstanceGeneratorWithTargetField
- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setClassLabels
public void setClassLabels(adams.core.base.BaseString[] value)
Sets the labels for a nominal class attribute.- Specified by:
setClassLabels
in interfaceInstanceGeneratorWithClassLabels
- Parameters:
value
- the labels
-
getClassLabels
public adams.core.base.BaseString[] getClassLabels()
Returns the labels for a nominal class attribute.- Specified by:
getClassLabels
in interfaceInstanceGeneratorWithClassLabels
- Returns:
- the labels
-
classLabelsTipText
public String classLabelsTipText()
Returns the tip text for this property.- Specified by:
classLabelsTipText
in interfaceInstanceGeneratorWithClassLabels
- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
checkHeader
protected void checkHeader(Spectrum data)
Checks whether the number of waves are the same.- Overrides:
checkHeader
in classAbstractFieldInstanceGenerator
- Parameters:
data
- the input data
-
-