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.ClassCrossReferenceGenerates 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 booleanm_OutputReportwhether to output the "global" report in an empty spectrum.protected Stringm_TransferPrefixthe (optional) prefix for fields from the multi-spectrum.protected adams.core.base.BaseRegExpm_TransferRegExpthe regular expression for field names to transfer.protected booleanm_TransferReportwhether 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 Classaccepts()Returns the class that is accepted as input.voiddefineOptions()Adds options to the internal list of options.protected ObjectdoConvert()Performs the actual conversion.Classgenerates()Returns the class that is generated as output.Class[]getClassCrossReferences()Returns the cross-referenced classes.booleangetOutputReport()Returns whether to output the global report of the multi-spectrum as separate (= first) report-only spectrum (ie no spectral data).StringgetTransferPrefix()Returns the (optional) prefix for report fields that get transferred.adams.core.base.BaseRegExpgetTransferRegExp()Returns the regular expression that the field names must match in order to get transferred.booleangetTransferReport()Returns whether to transfer the report values from the multi-spectrum into the sub-spectra.StringglobalInfo()Returns a string describing the object.StringoutputReportTipText()Returns the tip text for this property.voidsetOutputReport(boolean value)Sets whether to output the global report of the multi-spectrum as separate (= first) report-only spectrum (ie no spectral data).voidsetTransferPrefix(String value)Sets the (optional) prefix for report fields that get transferred.voidsetTransferRegExp(adams.core.base.BaseRegExp value)Sets the regular expression that the field names must match in order to get transferred.voidsetTransferReport(boolean value)Sets whether to transfer the report values from the multi-spectrum into the sub-spectra.StringtransferPrefixTipText()Returns the tip text for this property.StringtransferRegExpTipText()Returns the tip text for this property.StringtransferReportTipText()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:
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
-
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:
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
-
getClassCrossReferences
public Class[] getClassCrossReferences()
Returns the cross-referenced classes.- Specified by:
getClassCrossReferencesin interfaceadams.core.ClassCrossReference- Returns:
- the classes
-
-