Package adams.data.conversion
Class SpreadSheetToSpectrum
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.conversion.AbstractConversion
-
- adams.data.conversion.SpreadSheetToSpectrum
-
- All Implemented Interfaces:
adams.core.AdditionalInformationHandler,adams.core.CleanUpHandler,adams.core.Destroyable,adams.core.GlobalInfoSupporter,adams.core.logging.LoggingLevelHandler,adams.core.logging.LoggingSupporter,adams.core.option.OptionHandler,adams.core.QuickInfoSupporter,adams.core.ShallowCopySupporter<adams.data.conversion.AbstractConversion>,adams.core.SizeOfHandler,adams.core.Stoppable,adams.data.conversion.Conversion,Serializable
public class SpreadSheetToSpectrum extends adams.data.conversion.AbstractConversionTurns a spreadsheet into a spectrum. The columns that act as wavenumber and amplitude must be specified.
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-col-wave-number <adams.data.spreadsheet.SpreadSheetColumnIndex> (property: columnWaveNumber) The column in the spreadsheet that contains the wavenumber information. default: 1 example: An index is a number starting with 1; apart from column names (case-sensitive), the following placeholders can be used as well: first, second, third, last_2, last_1, last
-col-amplitude <adams.data.spreadsheet.SpreadSheetColumnIndex> (property: columnAmplitude) The column in the spreadsheet that contains the amplitude information. default: 2 example: An index is a number starting with 1; apart from column names (case-sensitive), the following placeholders can be used as well: first, second, third, last_2, last_1, last
-id <java.lang.String> (property: ID) The ID for the spectrum. default:
-format <java.lang.String> (property: format) The format for the spectrum. default: NIR
-instrument <java.lang.String> (property: instrument) The instrument for the spectrum. default: unknown
- 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 adams.data.spreadsheet.SpreadSheetColumnIndexm_ColumnAmplitudethe amplitude column.protected adams.data.spreadsheet.SpreadSheetColumnIndexm_ColumnWaveNumberthe wavenumber column.protected Stringm_Formatthe format to use for the spectrum.protected Stringm_IDthe ID to use for the spectrum.protected Stringm_Instrumentthe instrument to use for the spectrum.
-
Constructor Summary
Constructors Constructor Description SpreadSheetToSpectrum()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Classaccepts()Returns the class that is accepted as input.StringcolumnAmplitudeTipText()Returns the tip text for this property.StringcolumnWaveNumberTipText()Returns the tip text for this property.voiddefineOptions()Adds options to the internal list of options.protected ObjectdoConvert()Performs the actual conversion.StringformatTipText()Returns the tip text for this property.Classgenerates()Returns the class that is generated as output.adams.data.spreadsheet.SpreadSheetColumnIndexgetColumnAmplitude()Returns the column with the amplitude information.adams.data.spreadsheet.SpreadSheetColumnIndexgetColumnWaveNumber()Returns the column with the wavenumber information.StringgetFormat()Returns the format to use for the spectrum.StringgetID()Returns the ID to use for the spectrum.StringgetInstrument()Returns the instrument to use for the spectrum.StringglobalInfo()Returns a string describing the object.StringIDTipText()Returns the tip text for this property.StringinstrumentTipText()Returns the tip text for this property.voidsetColumnAmplitude(adams.data.spreadsheet.SpreadSheetColumnIndex value)Sets the column with the amplitude information.voidsetColumnWaveNumber(adams.data.spreadsheet.SpreadSheetColumnIndex value)Sets the column with the wavenumber information.voidsetFormat(String value)Sets the format to use for the spectrum.voidsetID(String value)Sets the ID to use for the spectrum.voidsetInstrument(String value)Sets the instrument to use for the spectrum.-
Methods inherited from class adams.data.conversion.AbstractConversion
checkData, cleanUp, convert, getAdditionalInformation, getInput, getInput, getOutput, getOutput, getOwner, getQuickInfo, reset, setInput, setOwner, shallowCopy, shallowCopy, stopExecution
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
Field Detail
-
m_ColumnWaveNumber
protected adams.data.spreadsheet.SpreadSheetColumnIndex m_ColumnWaveNumber
the wavenumber column.
-
m_ColumnAmplitude
protected adams.data.spreadsheet.SpreadSheetColumnIndex m_ColumnAmplitude
the amplitude column.
-
m_ID
protected String m_ID
the ID to use for the spectrum.
-
m_Format
protected String m_Format
the format to use for the spectrum.
-
m_Instrument
protected String m_Instrument
the instrument to use for the spectrum.
-
-
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 classadams.core.option.AbstractOptionHandler
-
setColumnWaveNumber
public void setColumnWaveNumber(adams.data.spreadsheet.SpreadSheetColumnIndex value)
Sets the column with the wavenumber information.- Parameters:
value- the column
-
getColumnWaveNumber
public adams.data.spreadsheet.SpreadSheetColumnIndex getColumnWaveNumber()
Returns the column with the wavenumber information.- Returns:
- the column
-
columnWaveNumberTipText
public String columnWaveNumberTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setColumnAmplitude
public void setColumnAmplitude(adams.data.spreadsheet.SpreadSheetColumnIndex value)
Sets the column with the amplitude information.- Parameters:
value- the column
-
getColumnAmplitude
public adams.data.spreadsheet.SpreadSheetColumnIndex getColumnAmplitude()
Returns the column with the amplitude information.- Returns:
- the column
-
columnAmplitudeTipText
public String columnAmplitudeTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setID
public void setID(String value)
Sets the ID to use for the spectrum.- Parameters:
value- the ID
-
getID
public String getID()
Returns the ID to use for the spectrum.- Returns:
- the ID
-
IDTipText
public String IDTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setFormat
public void setFormat(String value)
Sets the format to use for the spectrum.- Parameters:
value- the format
-
getFormat
public String getFormat()
Returns the format to use for the spectrum.- Returns:
- the format
-
formatTipText
public String formatTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setInstrument
public void setInstrument(String value)
Sets the instrument to use for the spectrum.- Parameters:
value- the instrument
-
getInstrument
public String getInstrument()
Returns the instrument to use for the spectrum.- Returns:
- the instrument
-
instrumentTipText
public String instrumentTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
accepts
public Class accepts()
Returns the class that is accepted as input.- Specified by:
acceptsin interfaceadams.data.conversion.Conversion- Specified by:
acceptsin classadams.data.conversion.AbstractConversion- Returns:
- the class
-
generates
public Class generates()
Returns the class that is generated as output.- Specified by:
generatesin interfaceadams.data.conversion.Conversion- Specified by:
generatesin classadams.data.conversion.AbstractConversion- Returns:
- the class
-
-