adams.data.conversion
Class AbstractSpreadSheetConversion

java.lang.Object
  extended by adams.core.ConsoleObject
      extended by adams.core.option.AbstractOptionHandler
          extended by adams.data.conversion.AbstractConversion
              extended by adams.data.conversion.AbstractSpreadSheetConversion
All Implemented Interfaces:
CleanUpHandler, Debuggable, Destroyable, OptionHandler, QuickInfoSupporter, ShallowCopySupporter<AbstractConversion>, SizeOfHandler, Conversion, Serializable
Direct Known Subclasses:
AbstractInPlaceSpreadSheetConversion, AggregateSpreadSheet, ConvertSpreadSheetRows, MergeSpreadSheetColumns, TransposeSpreadSheet

public abstract class AbstractSpreadSheetConversion
extends AbstractConversion

Ancestor for conversion schemes that transform one spreadsheet into another one.

Version:
$Revision: 6078 $
Author:
fracpete (fracpete at waikato dot ac dot nz)
See Also:
Serialized Form

Field Summary
 
Fields inherited from class adams.data.conversion.AbstractConversion
m_Input, m_Output, m_Owner
 
Fields inherited from class adams.core.option.AbstractOptionHandler
m_DebugLevel, m_OptionManager
 
Constructor Summary
AbstractSpreadSheetConversion()
           
 
Method Summary
 Class accepts()
          Returns the class that is accepted as input.
protected abstract  SpreadSheet convert(SpreadSheet input)
          Generates the new spreadsheet from the input.
protected  Object doConvert()
          Performs the actual conversion.
 Class generates()
          Returns the class that is generated as output.
 
Methods inherited from class adams.data.conversion.AbstractConversion
checkData, cleanUp, convert, getInput, getOutput, getOwner, getQuickInfo, reset, setInput, setOwner, shallowCopy, shallowCopy
 
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, debug, debug, debugLevelTipText, defineOptions, destroy, finishInit, getDebugLevel, getOptionManager, globalInfo, initialize, isDebugOn, newOptionManager, setDebugLevel, toCommandLine, toString
 
Methods inherited from class adams.core.ConsoleObject
getDebugging, getSystemErr, getSystemOut, sizeOf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractSpreadSheetConversion

public AbstractSpreadSheetConversion()
Method Detail

accepts

public Class accepts()
Returns the class that is accepted as input.

Specified by:
accepts in interface Conversion
Specified by:
accepts in class AbstractConversion
Returns:
the class

generates

public Class generates()
Returns the class that is generated as output.

Specified by:
generates in interface Conversion
Specified by:
generates in class AbstractConversion
Returns:
the class

convert

protected abstract SpreadSheet convert(SpreadSheet input)
                                throws Exception
Generates the new spreadsheet from the input.

Parameters:
input - the incoming spreadsheet
Returns:
the generated spreadsheet
Throws:
Exception - if conversion fails for some reason

doConvert

protected Object doConvert()
                    throws Exception
Performs the actual conversion.

Specified by:
doConvert in class AbstractConversion
Returns:
the converted data
Throws:
Exception - if something goes wrong with the conversion


Copyright © 2013 University of Waikato, Hamilton, NZ. All Rights Reserved.