Package adams.data.spectrumfilter
Class ChangeFormat
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.filter.AbstractFilter<T>
-
- adams.data.filter.AbstractDatabaseConnectionFilter<Spectrum>
-
- adams.data.spectrumfilter.AbstractDatabaseFilter
-
- adams.data.spectrumfilter.ChangeFormat
-
- 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.filter.Filter>
,adams.core.SizeOfHandler
,adams.data.filter.Filter<Spectrum>
,adams.db.DatabaseConnectionHandler
,adams.db.DatabaseConnectionProvider
,adams.db.DatabaseConnectionUser
,Serializable
,Comparable
public class ChangeFormat extends AbstractDatabaseFilter
A filter that uses the sample ID to retrieve different formats from the database. The sample data can be retrieved from a different source.
Valid options are:
-D (property: debug) If set to true, scheme may output additional info to the console.
-store (property: useStoreTable) If set to true, then the data is retrieved from the 'store' tables instead of the 'active' ones.
-spectrum <java.lang.String> (property: spectrumFormat) The format of the spectrum data to retrieve from the database. default: NIR
-sample-data <java.lang.String> (property: sampleDataFormat) The format of the sampleData data to retrieve from the database. default: NIR
- Version:
- $Revision: 2242 $
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected String
m_SampleDataFormat
the format to get the sample data from.protected String
m_SpectrumFormat
the format of the spectrum to load from the database.-
Fields inherited from class adams.data.spectrumfilter.AbstractDatabaseFilter
m_UseStoreTable
-
-
Constructor Summary
Constructors Constructor Description ChangeFormat()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
defineOptions()
Adds options to the internal list of options.String
getSampleDataFormat()
Returns the format for the sample data.String
getSpectrumFormat()
Returns the format for the spectrum.String
globalInfo()
Returns a string describing the object.protected Spectrum
processData(Spectrum data)
Performs the actual filtering.String
sampleDataFormatTipText()
Returns the tip text for this property.void
setSampleDataFormat(String value)
Sets the format for the sample data.void
setSpectrumFormat(String value)
Sets the format for the spectrum.String
spectrumFormatTipText()
Returns the tip text for this property.String
useStoreTableTipText()
Returns the tip text for this property.-
Methods inherited from class adams.data.spectrumfilter.AbstractDatabaseFilter
getDefaultDatabaseConnection, getSampleDataTable, getSpectrumTable, getUseStoreTable, setUseStoreTable
-
Methods inherited from class adams.data.filter.AbstractDatabaseConnectionFilter
getDatabaseConnection, initialize, setDatabaseConnection, updateDatabaseConnection
-
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
-
-
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceadams.core.GlobalInfoSupporter
- Specified by:
globalInfo
in 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:
defineOptions
in interfaceadams.core.option.OptionHandler
- Overrides:
defineOptions
in classAbstractDatabaseFilter
-
useStoreTableTipText
public String useStoreTableTipText()
Returns the tip text for this property.- Specified by:
useStoreTableTipText
in classAbstractDatabaseFilter
- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setSpectrumFormat
public void setSpectrumFormat(String value)
Sets the format for the spectrum.- Parameters:
value
- the format
-
getSpectrumFormat
public String getSpectrumFormat()
Returns the format for the spectrum.- Returns:
- the format
-
spectrumFormatTipText
public String spectrumFormatTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setSampleDataFormat
public void setSampleDataFormat(String value)
Sets the format for the sample data.- Parameters:
value
- the format
-
getSampleDataFormat
public String getSampleDataFormat()
Returns the format for the sample data.- Returns:
- the format
-
sampleDataFormatTipText
public String sampleDataFormatTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
-