Package adams.data.conversion
Class MultiSpectrumToSpectra
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.conversion.AbstractConversion
-
- adams.data.conversion.MultiSpectrumToSpectra
-
- All Implemented Interfaces:
adams.core.AdditionalInformationHandler
,adams.core.ClassCrossReference
,adams.core.CleanUpHandler
,adams.core.CrossReference
,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 MultiSpectrumToSpectra extends adams.data.conversion.AbstractConversion implements adams.core.ClassCrossReference
Generates an array of knir.data.spectrum.Spectrum from the incoming knir.data.spectrum.MultiSpectrum.
One can either transfer the data (all or partial) from the 'global' report to the sub-spectra or output the 'global' report as a separate (= first) spectrum with no spectral data points.
See also:
knir.data.conversion.SpectraToMultiSpectrum
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-transfer-report <boolean> (property: transferReport) If enabled, the report values from the multi-spectrum get transferred into the sub-spectra. default: false
-transfer-prefix <java.lang.String> (property: transferPrefix) The (optional) prefix for report fields that get transferred. default:
-transfer-regexp <adams.core.base.BaseRegExp> (property: transferRegExp) The regular expression that the field names must match in order to get transferred. default: .*
-output-report <boolean> (property: outputReport) If enabled, the 'global' report is output as well in an empty spectrum ( ie report-only, no spectral data points; first spectrum in array). default: false
- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
m_OutputReport
whether to output the "global" report in an empty spectrum.protected String
m_TransferPrefix
the (optional) prefix for fields from the multi-spectrum.protected adams.core.base.BaseRegExp
m_TransferRegExp
the regular expression for field names to transfer.protected boolean
m_TransferReport
whether to transfer the multi-spectrum's report into the sub-spectra.
-
Constructor Summary
Constructors Constructor Description MultiSpectrumToSpectra()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class
accepts()
Returns the class that is accepted as input.void
defineOptions()
Adds options to the internal list of options.protected Object
doConvert()
Performs the actual conversion.Class
generates()
Returns the class that is generated as output.Class[]
getClassCrossReferences()
Returns the cross-referenced classes.boolean
getOutputReport()
Returns whether to output the global report of the multi-spectrum as separate (= first) report-only spectrum (ie no spectral data).String
getTransferPrefix()
Returns the (optional) prefix for report fields that get transferred.adams.core.base.BaseRegExp
getTransferRegExp()
Returns the regular expression that the field names must match in order to get transferred.boolean
getTransferReport()
Returns whether to transfer the report values from the multi-spectrum into the sub-spectra.String
globalInfo()
Returns a string describing the object.String
outputReportTipText()
Returns the tip text for this property.void
setOutputReport(boolean value)
Sets whether to output the global report of the multi-spectrum as separate (= first) report-only spectrum (ie no spectral data).void
setTransferPrefix(String value)
Sets the (optional) prefix for report fields that get transferred.void
setTransferRegExp(adams.core.base.BaseRegExp value)
Sets the regular expression that the field names must match in order to get transferred.void
setTransferReport(boolean value)
Sets whether to transfer the report values from the multi-spectrum into the sub-spectra.String
transferPrefixTipText()
Returns the tip text for this property.String
transferRegExpTipText()
Returns the tip text for this property.String
transferReportTipText()
Returns the tip text for this property.-
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_TransferReport
protected boolean m_TransferReport
whether to transfer the multi-spectrum's report into the sub-spectra.
-
m_TransferPrefix
protected String m_TransferPrefix
the (optional) prefix for fields from the multi-spectrum.
-
m_TransferRegExp
protected adams.core.base.BaseRegExp m_TransferRegExp
the regular expression for field names to transfer.
-
m_OutputReport
protected boolean m_OutputReport
whether to output the "global" report in an empty spectrum.
-
-
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
-
setTransferReport
public void setTransferReport(boolean value)
Sets whether to transfer the report values from the multi-spectrum into the sub-spectra.- Parameters:
value
- true if to transfer
-
getTransferReport
public boolean getTransferReport()
Returns whether to transfer the report values from the multi-spectrum into the sub-spectra.- Returns:
- true if to transfer
-
transferReportTipText
public String transferReportTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setTransferPrefix
public void setTransferPrefix(String value)
Sets the (optional) prefix for report fields that get transferred.- Parameters:
value
- the prefix
-
getTransferPrefix
public String getTransferPrefix()
Returns the (optional) prefix for report fields that get transferred.- Returns:
- the prefix
-
transferPrefixTipText
public String transferPrefixTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setTransferRegExp
public void setTransferRegExp(adams.core.base.BaseRegExp value)
Sets the regular expression that the field names must match in order to get transferred.- Parameters:
value
- the regular expression
-
getTransferRegExp
public adams.core.base.BaseRegExp getTransferRegExp()
Returns the regular expression that the field names must match in order to get transferred.- Returns:
- the regular expression
-
transferRegExpTipText
public String transferRegExpTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setOutputReport
public void setOutputReport(boolean value)
Sets whether to output the global report of the multi-spectrum as separate (= first) report-only spectrum (ie no spectral data).- Parameters:
value
- true if to output
-
getOutputReport
public boolean getOutputReport()
Returns whether to output the global report of the multi-spectrum as separate (= first) report-only spectrum (ie no spectral data).- Returns:
- true if to output
-
outputReportTipText
public String outputReportTipText()
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:
accepts
in interfaceadams.data.conversion.Conversion
- Specified by:
accepts
in classadams.data.conversion.AbstractConversion
- Returns:
- the class
-
generates
public Class generates()
Returns the class that is generated as output.- Specified by:
generates
in interfaceadams.data.conversion.Conversion
- Specified by:
generates
in classadams.data.conversion.AbstractConversion
- Returns:
- the class
-
getClassCrossReferences
public Class[] getClassCrossReferences()
Returns the cross-referenced classes.- Specified by:
getClassCrossReferences
in interfaceadams.core.ClassCrossReference
- Returns:
- the classes
-
-