Package adams.data.conversion
Class SpreadSheetMaterializeFormulas
-
- All Implemented Interfaces:
AdditionalInformationHandler
,CleanUpHandler
,Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,QuickInfoSupporter
,ShallowCopySupporter<AbstractConversion>
,SizeOfHandler
,Stoppable
,Conversion
,InPlaceProcessing
,Serializable
public class SpreadSheetMaterializeFormulas extends AbstractInPlaceSpreadSheetConversion
Finds cells with formulas in a spreadsheet and replaces the cell content with the value calculated by the formula.
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-no-copy <boolean> (property: noCopy) If enabled, no copy of the spreadsheet is created before processing it. default: false
-finder <adams.data.spreadsheet.cellfinder.CellFinder> (property: finder) The cell finder to use. default: adams.data.spreadsheet.cellfinder.CellRange
- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected CellFinder
m_Finder
for locating the cells.-
Fields inherited from class adams.data.conversion.AbstractInPlaceSpreadSheetConversion
m_NoCopy
-
Fields inherited from class adams.data.conversion.AbstractConversion
m_Input, m_Output, m_Owner, m_Stopped
-
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 SpreadSheetMaterializeFormulas()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected SpreadSheet
convert(SpreadSheet input)
Generates the new spreadsheet from the input.void
defineOptions()
Adds options to the internal list of options.String
finderTipText()
Returns the tip text for this property.CellFinder
getFinder()
Returns the cell finder to use.String
getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI.String
globalInfo()
Returns a string describing the object.void
setFinder(CellFinder value)
Sets the cell finder to use.-
Methods inherited from class adams.data.conversion.AbstractInPlaceSpreadSheetConversion
getNoCopy, noCopyTipText, setNoCopy
-
Methods inherited from class adams.data.conversion.AbstractSpreadSheetConversion
accepts, doConvert, generates
-
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
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Field Detail
-
m_Finder
protected CellFinder m_Finder
for locating the cells.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceGlobalInfoSupporter
- Specified by:
globalInfo
in classAbstractOptionHandler
- 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 interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractInPlaceSpreadSheetConversion
-
getQuickInfo
public String getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI.- Specified by:
getQuickInfo
in interfaceQuickInfoSupporter
- Overrides:
getQuickInfo
in classAbstractConversion
- Returns:
- null if no info available, otherwise short string
-
setFinder
public void setFinder(CellFinder value)
Sets the cell finder to use.- Parameters:
value
- the finder
-
getFinder
public CellFinder getFinder()
Returns the cell finder to use.- Returns:
- the finder
-
finderTipText
public String finderTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
convert
protected SpreadSheet convert(SpreadSheet input) throws Exception
Generates the new spreadsheet from the input.- Specified by:
convert
in classAbstractSpreadSheetConversion
- Parameters:
input
- the incoming spreadsheet- Returns:
- the generated spreadsheet
- Throws:
Exception
- if conversion fails for some reason
-
-