Package adams.flow.standalone.rats
Class SaveSpectrumFileOutput
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.flow.standalone.rats.output.AbstractRatOutput
-
- adams.flow.standalone.rats.SaveSpectrumFileOutput
-
- 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.flow.standalone.rats.output.AbstractRatOutput>
,adams.core.SizeOfHandler
,adams.core.Stoppable
,adams.core.StoppableWithFeedback
,adams.event.VariableChangeListener
,adams.flow.standalone.rats.output.RatOutput
,Serializable
public class SaveSpectrumFileOutput extends adams.flow.standalone.rats.output.AbstractRatOutput
Writes the input spectrum to the file that the filename generator produces.
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-filename-generator <adams.core.io.AbstractFilenameGenerator> (property: filenameGenerator) The generator to use for generating the output filename. default: adams.core.io.DefaultFilenameGenerator
-writer <knir.data.output.AbstractSpectrumWriter> (property: writer) The writer to use for writing the spectra to disk. default: knir.data.output.SimpleSpectrumWriter
- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected adams.core.io.AbstractFilenameGenerator
m_FilenameGenerator
the filename generator to use.protected AbstractSpectrumWriter
m_Writer
the sprectrum writer to use.
-
Constructor Summary
Constructors Constructor Description SaveSpectrumFileOutput()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class[]
accepts()
Returns the type of data that gets accepted.void
defineOptions()
Adds options to the internal list of options.protected String
doTransmit()
Performs the actual transmission.String
filenameGeneratorTipText()
Returns the tip text for this property.protected adams.core.io.AbstractFilenameGenerator
getDefaultFilenameGenerator()
Returns the default filename generator to use.protected AbstractSpectrumWriter
getDefaultWriter()
Returns the default writer to use.adams.core.io.AbstractFilenameGenerator
getFilenameGenerator()
Returns the filename generator in use.String
getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI.AbstractSpectrumWriter
getWriter()
Returns the writer in use.String
globalInfo()
Returns a string describing the object.void
setFilenameGenerator(adams.core.io.AbstractFilenameGenerator value)
Sets the filename generator to use.void
setWriter(AbstractSpectrumWriter value)
Sets the writer to use.String
writerTipText()
Returns the tip text for this property.-
Methods inherited from class adams.flow.standalone.rats.output.AbstractRatOutput
backupState, canInput, check, cleanUp, configureLogger, doWait, findVariables, getAdditionalInformation, getFullName, getOwner, getQueue, getVariables, handleException, initialize, initTransmission, input, isBackedUp, isStopped, pruneBackup, pruneBackup, restoreState, setOwner, setUp, shallowCopy, shallowCopy, stopExecution, transmit, updateDetectedVariables, updatePrefix, updateVariables, variableChanged
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
Field Detail
-
m_FilenameGenerator
protected adams.core.io.AbstractFilenameGenerator m_FilenameGenerator
the filename generator to use.
-
m_Writer
protected AbstractSpectrumWriter m_Writer
the sprectrum writer to use.
-
-
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 classadams.core.option.AbstractOptionHandler
-
getDefaultFilenameGenerator
protected adams.core.io.AbstractFilenameGenerator getDefaultFilenameGenerator()
Returns the default filename generator to use.- Returns:
- the default generator
-
setFilenameGenerator
public void setFilenameGenerator(adams.core.io.AbstractFilenameGenerator value)
Sets the filename generator to use.- Parameters:
value
- the generator
-
getFilenameGenerator
public adams.core.io.AbstractFilenameGenerator getFilenameGenerator()
Returns the filename generator in use.- Returns:
- the generator
-
filenameGeneratorTipText
public String filenameGeneratorTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getDefaultWriter
protected AbstractSpectrumWriter getDefaultWriter()
Returns the default writer to use.- Returns:
- the default writer
-
setWriter
public void setWriter(AbstractSpectrumWriter value)
Sets the writer to use.- Parameters:
value
- the filter
-
getWriter
public AbstractSpectrumWriter getWriter()
Returns the writer in use.- Returns:
- the writer
-
writerTipText
public String writerTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getQuickInfo
public String getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI.- Specified by:
getQuickInfo
in interfaceadams.core.QuickInfoSupporter
- Overrides:
getQuickInfo
in classadams.flow.standalone.rats.output.AbstractRatOutput
- Returns:
- null if no info available, otherwise short string
-
accepts
public Class[] accepts()
Returns the type of data that gets accepted.- Specified by:
accepts
in interfaceadams.flow.standalone.rats.output.RatOutput
- Specified by:
accepts
in classadams.flow.standalone.rats.output.AbstractRatOutput
- Returns:
- the type of data
-
doTransmit
protected String doTransmit()
Performs the actual transmission.- Specified by:
doTransmit
in classadams.flow.standalone.rats.output.AbstractRatOutput
- Returns:
- null if successful, otherwise error message
-
-