Class SimpleRowGenerator
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.spreadsheetrowgenerator.AbstractSpreadSheetRowGenerator
-
- adams.data.spreadsheetrowgenerator.SimpleRowGenerator
-
- 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<AbstractSpreadSheetRowGenerator>
,adams.core.SizeOfHandler
,Serializable
,Comparable
public class SimpleRowGenerator extends AbstractSpreadSheetRowGenerator
Outputs spectral and sample data.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected String
m_AmplitudePrefix
the amplitude column prefix.protected adams.data.report.Field[]
m_MetaDataFields
meta-data fields to add to the output data.protected String
m_MetaDataPrefix
the meta-data field prefix.protected String
m_ReferenceValuePrefix
the reference value field prefix.protected adams.data.report.Field[]
m_ReferenceValues
reference value fields to add to the output data.protected boolean
m_WaveNumbersInHeader
whether to use the wave numbers in the header.-
Fields inherited from class adams.data.spreadsheetrowgenerator.AbstractSpreadSheetRowGenerator
COL_DBID, COL_SAMPLEID, m_AddDatabaseID, m_AddSampleID, m_OutputHeader, m_TolerateHeaderChanges
-
-
Constructor Summary
Constructors Constructor Description SimpleRowGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
amplitudePrefixTipText()
Returns the tip text for this property.protected void
checkHeader(Spectrum data)
Checks whether the number of waves are the same.void
defineOptions()
Adds options to the internal list of options.protected void
generateHeader(Spectrum data)
Generates the header of the output data.protected adams.data.spreadsheet.Row
generateOutput(Spectrum data)
Generates the actual data.String
getAmplitudePrefix()
Returns the column prefix for the amplitudes.adams.data.report.Field[]
getMetaDataFields()
Returns the meta-data fields to add.String
getMetaDataPrefix()
Returns the column prefix for the meta-data values.String
getReferenceValuePrefix()
Returns the column prefix for the reference values.adams.data.report.Field[]
getReferenceValues()
Returns the reference value fields to add.boolean
getWaveNumbersInHeader()
Returns whether to use the wave numbers in the header.String
globalInfo()
Returns a string describing the object.String
metaDataFieldsTipText()
Returns the tip text for this property.String
metaDataPrefixTipText()
Returns the tip text for this property.String
referenceValuePrefixTipText()
Returns the tip text for this property.String
referenceValuesTipText()
Returns the tip text for this property.void
setAmplitudePrefix(String value)
Sets the column prefix for the amplitudes.void
setMetaDataFields(adams.data.report.Field[] value)
Sets the meta-data fields to add.void
setMetaDataPrefix(String value)
Sets the column prefix for the meta-data values.void
setReferenceValuePrefix(String value)
Sets the column prefix for the reference values.void
setReferenceValues(adams.data.report.Field[] value)
Sets the reference value fields to add.void
setWaveNumbersInHeader(boolean value)
Sets whether to use the wave numbers in the header.String
waveNumbersInHeaderTipText()
Returns the tip text for this property.-
Methods inherited from class adams.data.spreadsheetrowgenerator.AbstractSpreadSheetRowGenerator
addDatabaseIDTipText, addSampleIDTipText, checkInput, checkSetup, cleanUp, compareTo, destroy, equals, generate, getAddDatabaseID, getAddSampleID, getOutputHeader, getTolerateHeaderChanges, interpretePosition, postProcessHeader, postProcessOutput, reset, setAddDatabaseID, setAddSampleID, setTolerateHeaderChanges, shallowCopy, shallowCopy, tolerateHeaderChangesTipText
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, 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_WaveNumbersInHeader
protected boolean m_WaveNumbersInHeader
whether to use the wave numbers in the header.
-
m_AmplitudePrefix
protected String m_AmplitudePrefix
the amplitude column prefix.
-
m_ReferenceValues
protected adams.data.report.Field[] m_ReferenceValues
reference value fields to add to the output data.
-
m_ReferenceValuePrefix
protected String m_ReferenceValuePrefix
the reference value field prefix.
-
m_MetaDataFields
protected adams.data.report.Field[] m_MetaDataFields
meta-data fields to add to the output data.
-
m_MetaDataPrefix
protected String m_MetaDataPrefix
the meta-data field prefix.
-
-
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 classAbstractSpreadSheetRowGenerator
-
setWaveNumbersInHeader
public void setWaveNumbersInHeader(boolean value)
Sets whether to use the wave numbers in the header.- Parameters:
value
- true if in header
-
getWaveNumbersInHeader
public boolean getWaveNumbersInHeader()
Returns whether to use the wave numbers in the header.- Returns:
- true if in header
-
waveNumbersInHeaderTipText
public String waveNumbersInHeaderTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setAmplitudePrefix
public void setAmplitudePrefix(String value)
Sets the column prefix for the amplitudes.- Parameters:
value
- the prefix
-
getAmplitudePrefix
public String getAmplitudePrefix()
Returns the column prefix for the amplitudes.- Returns:
- the prefix
-
amplitudePrefixTipText
public String amplitudePrefixTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setReferenceValues
public void setReferenceValues(adams.data.report.Field[] value)
Sets the reference value fields to add.- Parameters:
value
- the fields
-
getReferenceValues
public adams.data.report.Field[] getReferenceValues()
Returns the reference value fields to add.- Returns:
- the fields
-
referenceValuesTipText
public String referenceValuesTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setReferenceValuePrefix
public void setReferenceValuePrefix(String value)
Sets the column prefix for the reference values.- Parameters:
value
- the prefix
-
getReferenceValuePrefix
public String getReferenceValuePrefix()
Returns the column prefix for the reference values.- Returns:
- the prefix
-
referenceValuePrefixTipText
public String referenceValuePrefixTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setMetaDataFields
public void setMetaDataFields(adams.data.report.Field[] value)
Sets the meta-data fields to add.- Parameters:
value
- the fields
-
getMetaDataFields
public adams.data.report.Field[] getMetaDataFields()
Returns the meta-data fields to add.- Returns:
- the fields
-
metaDataFieldsTipText
public String metaDataFieldsTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setMetaDataPrefix
public void setMetaDataPrefix(String value)
Sets the column prefix for the meta-data values.- Parameters:
value
- the prefix
-
getMetaDataPrefix
public String getMetaDataPrefix()
Returns the column prefix for the meta-data values.- Returns:
- the prefix
-
metaDataPrefixTipText
public String metaDataPrefixTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
checkHeader
protected void checkHeader(Spectrum data)
Checks whether the number of waves are the same.- Specified by:
checkHeader
in classAbstractSpreadSheetRowGenerator
- Parameters:
data
- the input data
-
generateHeader
protected void generateHeader(Spectrum data)
Generates the header of the output data.- Specified by:
generateHeader
in classAbstractSpreadSheetRowGenerator
- Parameters:
data
- the input data
-
generateOutput
protected adams.data.spreadsheet.Row generateOutput(Spectrum data)
Generates the actual data.- Specified by:
generateOutput
in classAbstractSpreadSheetRowGenerator
- Parameters:
data
- the input data to transform- Returns:
- the generated data
-
-