Package adams.data.conversion
Class SpreadSheetColumnsToSampleData
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.conversion.AbstractConversion
-
- adams.data.conversion.SpreadSheetColumnsToSampleData
-
- All Implemented Interfaces:
adams.core.AdditionalInformationHandler,adams.core.CleanUpHandler,adams.core.Destroyable,adams.core.GlobalInfoSupporter,adams.core.LenientModeSupporter,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 SpreadSheetColumnsToSampleData extends adams.data.conversion.AbstractConversion implements adams.core.LenientModeSupporterTurns spreadsheet columns into sample data.
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-col-sampledata-names <adams.data.spreadsheet.SpreadSheetColumnIndex> (property: colSampleDataNames) The (optional) column that contains the sample data names. default: example: An index is a number starting with 1; column names (case-sensitive) as well as the following placeholders can be used: first, second, third, last_2, last_1, last; numeric indices can be enforced by preceding them with '#' (eg '#12'); column names can be surrounded by double quotes.
-cols-sampledata-values <adams.data.spreadsheet.SpreadSheetColumnRange> (property: colsSampleDataValues) The columns to get the sample data values from. default: example: A range is a comma-separated list of single 1-based indices or sub-ranges of indices ('start-end'); 'inv(...)' inverts the range '...'; column names (case-sensitive) as well as the following placeholders can be used: first, second, third, last_2, last_1, last; numeric indices can be enforced by preceding them with '#' (eg '#12'); column names can be surrounded by double quotes.-rows-sampledata <adams.data.spreadsheet.SpreadSheetRowRange> (property: rowsSampleData) The rows that contain sampledata. default: example: A range is a comma-separated list of single 1-based indices or sub-ranges of indices ('start-end'); 'inv(...)' inverts the range '...'; the following placeholders can be used as well: first, second, third, last_2, last_1, last-row-id <adams.data.spreadsheet.SpreadSheetRowIndex> (property: rowID) The (optional) row that contains the sample ID. default: example: An index is a number starting with 1; the following placeholders can be used as well: first, second, third, last_2, last_1, last
-lenient <boolean> (property: lenient) If enabled, then errors (e.g., due to corrupt data) will not cause exceptions. default: false
- 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_ColSampleDataNamesthe column with the sample data names.protected adams.data.spreadsheet.SpreadSheetColumnRangem_ColsSampleDataValuesthe columns with the sample data values.protected booleanm_Lenientwhether to skip over errors.protected adams.data.spreadsheet.SpreadSheetRowIndexm_RowIDthe (optional) row with the sample ID.protected adams.data.spreadsheet.SpreadSheetRowRangem_RowsSampleDatathe rows to get the sample data from.
-
Constructor Summary
Constructors Constructor Description SpreadSheetColumnsToSampleData()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Classaccepts()Returns the class that is accepted as input.StringcolSampleDataNamesTipText()Returns the tip text for this property.StringcolsSampleDataValuesTipText()Returns the tip text for this property.voiddefineOptions()Adds options to the internal list of options.protected ObjectdoConvert()Performs the actual conversion.Classgenerates()Returns the class that is generated as output.adams.data.spreadsheet.SpreadSheetColumnIndexgetColSampleDataNames()Returns the column that contains the sample data names.adams.data.spreadsheet.SpreadSheetColumnRangegetColsSampleDataValues()Returns the columns to get the sample data values from.booleangetLenient()Returns whether whether to skip over errors.StringgetQuickInfo()Returns a quick info about the object, which can be displayed in the GUI.adams.data.spreadsheet.SpreadSheetRowIndexgetRowID()Returns the (optional) row that contains the sample ID.adams.data.spreadsheet.SpreadSheetRowRangegetRowsSampleData()Returns the rows with sampledata.StringglobalInfo()Returns a string describing the object.StringlenientTipText()Returns the tip text for this property.StringrowIDTipText()Returns the tip text for this property.StringrowsSampleDataTipText()Returns the tip text for this property.voidsetColSampleDataNames(adams.data.spreadsheet.SpreadSheetColumnIndex value)Sets the column that contains the sample data names.voidsetColsSampleDataValues(adams.data.spreadsheet.SpreadSheetColumnRange value)Sets the columns to get the sample data values from.voidsetLenient(boolean value)Sets whether to skip over errors.voidsetRowID(adams.data.spreadsheet.SpreadSheetRowIndex value)Sets the (optional) row that contains the sample ID.voidsetRowsSampleData(adams.data.spreadsheet.SpreadSheetRowRange value)Sets the rows with sampledata.-
Methods inherited from class adams.data.conversion.AbstractConversion
checkData, cleanUp, convert, getAdditionalInformation, getInput, getInput, getOutput, getOutput, getOwner, 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_ColSampleDataNames
protected adams.data.spreadsheet.SpreadSheetColumnIndex m_ColSampleDataNames
the column with the sample data names.
-
m_ColsSampleDataValues
protected adams.data.spreadsheet.SpreadSheetColumnRange m_ColsSampleDataValues
the columns with the sample data values.
-
m_RowsSampleData
protected adams.data.spreadsheet.SpreadSheetRowRange m_RowsSampleData
the rows to get the sample data from.
-
m_RowID
protected adams.data.spreadsheet.SpreadSheetRowIndex m_RowID
the (optional) row with the sample ID.
-
m_Lenient
protected boolean m_Lenient
whether to skip over errors.
-
-
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
-
setRowID
public void setRowID(adams.data.spreadsheet.SpreadSheetRowIndex value)
Sets the (optional) row that contains the sample ID.- Parameters:
value- the row
-
getRowID
public adams.data.spreadsheet.SpreadSheetRowIndex getRowID()
Returns the (optional) row that contains the sample ID.- Returns:
- the row
-
rowIDTipText
public String rowIDTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setColSampleDataNames
public void setColSampleDataNames(adams.data.spreadsheet.SpreadSheetColumnIndex value)
Sets the column that contains the sample data names.- Parameters:
value- the column
-
getColSampleDataNames
public adams.data.spreadsheet.SpreadSheetColumnIndex getColSampleDataNames()
Returns the column that contains the sample data names.- Returns:
- the column
-
colSampleDataNamesTipText
public String colSampleDataNamesTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setRowsSampleData
public void setRowsSampleData(adams.data.spreadsheet.SpreadSheetRowRange value)
Sets the rows with sampledata.- Parameters:
value- the rows
-
getRowsSampleData
public adams.data.spreadsheet.SpreadSheetRowRange getRowsSampleData()
Returns the rows with sampledata.- Returns:
- the rows
-
rowsSampleDataTipText
public String rowsSampleDataTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setColsSampleDataValues
public void setColsSampleDataValues(adams.data.spreadsheet.SpreadSheetColumnRange value)
Sets the columns to get the sample data values from.- Parameters:
value- the columns
-
getColsSampleDataValues
public adams.data.spreadsheet.SpreadSheetColumnRange getColsSampleDataValues()
Returns the columns to get the sample data values from.- Returns:
- the columns
-
colsSampleDataValuesTipText
public String colsSampleDataValuesTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setLenient
public void setLenient(boolean value)
Sets whether to skip over errors.- Specified by:
setLenientin interfaceadams.core.LenientModeSupporter- Parameters:
value- true if to skip
-
getLenient
public boolean getLenient()
Returns whether whether to skip over errors.- Specified by:
getLenientin interfaceadams.core.LenientModeSupporter- Returns:
- true if to skip
-
lenientTipText
public String lenientTipText()
Returns the tip text for this property.- Specified by:
lenientTipTextin interfaceadams.core.LenientModeSupporter- 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
-
getQuickInfo
public String getQuickInfo()
Returns a quick info about the object, which can be displayed in the GUI.- Specified by:
getQuickInfoin interfaceadams.core.QuickInfoSupporter- Overrides:
getQuickInfoin classadams.data.conversion.AbstractConversion- Returns:
- null if no info available, otherwise short string
-
-