Class FromSpreadSheet
-
- All Implemented Interfaces:
Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,OptionHandler,QuickInfoSupporter,SizeOfHandler,VariableLoader,Serializable
public class FromSpreadSheet extends AbstractFileBasedVariableLoader
Loads the variables from the spreadsheet using the specified reader.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected SpreadSheetColumnIndexm_ColumnKeythe column with the key.protected SpreadSheetColumnIndexm_ColumnValuethe column with the value.protected SpreadSheetReaderm_Readerthe spreadsheet reader to use.-
Fields inherited from class adams.flow.standalone.loadvariables.AbstractFileBasedVariableLoader
m_InputFile
-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description FromSpreadSheet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringcolumnKeyTipText()Returns the tip text for this property.StringcolumnValueTipText()Returns the tip text for this property.voiddefineOptions()Adds options to the internal list of options.protected VariablesdoLoadVariables(MessageCollection errors)Loads the variables.SpreadSheetColumnIndexgetColumnKey()Returns the column containing the variable name.SpreadSheetColumnIndexgetColumnValue()Returns the column containing the variable name.SpreadSheetReadergetReader()Returns the spreadsheet reader in use.StringglobalInfo()Returns a string describing the object.StringreaderTipText()Returns the tip text for this property.voidsetColumnKey(SpreadSheetColumnIndex value)Sets the column containing the variable name.voidsetColumnValue(SpreadSheetColumnIndex value)Sets the column containing the variable name.voidsetReader(SpreadSheetReader value)Sets the spreadsheet reader to use.-
Methods inherited from class adams.flow.standalone.loadvariables.AbstractFileBasedVariableLoader
check, getInputFile, getQuickInfo, inputFileTipText, setInputFile
-
Methods inherited from class adams.flow.standalone.loadvariables.AbstractVariableLoader
loadVariables
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, reset, toCommandLine, toString
-
Methods inherited from class adams.core.logging.CustomLoggingLevelObject
setLoggingLevel
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.Destroyable
destroy
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, getOptionManager, toCommandLine
-
-
-
-
Field Detail
-
m_Reader
protected SpreadSheetReader m_Reader
the spreadsheet reader to use.
-
m_ColumnKey
protected SpreadSheetColumnIndex m_ColumnKey
the column with the key.
-
m_ColumnValue
protected SpreadSheetColumnIndex m_ColumnValue
the column with the value.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfoin interfaceGlobalInfoSupporter- Specified by:
globalInfoin classAbstractOptionHandler- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceOptionHandler- Overrides:
defineOptionsin classAbstractFileBasedVariableLoader
-
setReader
public void setReader(SpreadSheetReader value)
Sets the spreadsheet reader to use.- Parameters:
value- the reader
-
getReader
public SpreadSheetReader getReader()
Returns the spreadsheet reader in use.- Returns:
- the reader
-
readerTipText
public String readerTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setColumnKey
public void setColumnKey(SpreadSheetColumnIndex value)
Sets the column containing the variable name.- Parameters:
value- the column
-
getColumnKey
public SpreadSheetColumnIndex getColumnKey()
Returns the column containing the variable name.- Returns:
- the column
-
columnKeyTipText
public String columnKeyTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setColumnValue
public void setColumnValue(SpreadSheetColumnIndex value)
Sets the column containing the variable name.- Parameters:
value- the column
-
getColumnValue
public SpreadSheetColumnIndex getColumnValue()
Returns the column containing the variable name.- Returns:
- the column
-
columnValueTipText
public String columnValueTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
doLoadVariables
protected Variables doLoadVariables(MessageCollection errors)
Loads the variables.- Specified by:
doLoadVariablesin classAbstractVariableLoader- Parameters:
errors- for collecting errors- Returns:
- the variables, null if failed to load
-
-