adams.data.io.input
Class GnumericSpreadSheetReader

java.lang.Object
  extended by adams.core.ConsoleObject
      extended by adams.core.option.AbstractOptionHandler
          extended by adams.data.io.input.AbstractSpreadSheetReader
              extended by adams.data.io.input.AbstractMultiSheetSpreadSheetReader
                  extended by adams.data.io.input.AbstractMultiSheetSpreadSheetReaderWithMissingValueSupport
                      extended by adams.data.io.input.GnumericSpreadSheetReader
All Implemented Interfaces:
Debuggable, Destroyable, OptionHandler, SizeOfHandler, Stoppable, MultiSheetSpreadSheetReader, SpreadSheetReader, Serializable

public class GnumericSpreadSheetReader
extends AbstractMultiSheetSpreadSheetReaderWithMissingValueSupport

Reads Gnumeric workbook files (GZIP compressed or uncompressed XML), version 1.10.13.

Valid options are:

-D <int> (property: debugLevel)
    The greater the number the more additional info the scheme may output to 
    the console (0 = off).
    default: 0
    minimum: 0
 
-data-row-type <DENSE|SPARSE> (property: dataRowType)
    The type of row to use for the data.
    default: DENSE
 
-sheets <adams.core.Range> (property: sheetRange)
    The range of sheets to load; 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
    default: first
 
-missing <java.lang.String> (property: missingValue)
    The placeholder for missing values.
    default: ?
 
-uncompressed (property: uncompressedOutput)
    If enabled, file is assumed to be uncompressed XML rather than GZIP compressed.
 

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

Nested Class Summary
 
Nested classes/interfaces inherited from class adams.data.io.input.AbstractSpreadSheetReader
AbstractSpreadSheetReader.InputType
 
Field Summary
protected  boolean m_UncompressedOutput
          whether to use uncompressed output.
static String VERSION
          the version.
 
Fields inherited from class adams.data.io.input.AbstractMultiSheetSpreadSheetReaderWithMissingValueSupport
m_MissingValue
 
Fields inherited from class adams.data.io.input.AbstractMultiSheetSpreadSheetReader
m_SheetRange
 
Fields inherited from class adams.data.io.input.AbstractSpreadSheetReader
m_DataRowType, m_Stopped
 
Fields inherited from class adams.core.option.AbstractOptionHandler
m_DebugLevel, m_OptionManager
 
Constructor Summary
GnumericSpreadSheetReader()
           
 
Method Summary
 void defineOptions()
          Adds options to the internal list of options.
protected  List<SpreadSheet> doReadRange(InputStream in)
          Performs the actual reading.
 String getFormatDescription()
          Returns a string describing the format (used in the file chooser).
 String[] getFormatExtensions()
          Returns the extension(s) of the format.
protected  AbstractSpreadSheetReader.InputType getInputType()
          Returns how to read the data, from a file, stream or reader.
 boolean getUncompressedOutput()
          Returns whether to output uncompressed XML.
 String globalInfo()
          Returns a string describing the object.
 void setUncompressedOutput(boolean value)
          Sets whether to output uncompressed XML.
 String uncompressedOutputTipText()
          Returns the tip text for this property.
 
Methods inherited from class adams.data.io.input.AbstractMultiSheetSpreadSheetReaderWithMissingValueSupport
getMissingValue, missingValueTipText, setMissingValue
 
Methods inherited from class adams.data.io.input.AbstractMultiSheetSpreadSheetReader
doRead, doRead, doRead, doReadRange, doReadRange, getSheetRange, readRange, readRange, readRange, readRange, setSheetRange, sheetRangeTipText
 
Methods inherited from class adams.data.io.input.AbstractSpreadSheetReader
check, dataRowTypeTipText, getDataRowType, getDefaultDataRowType, getReaders, isStopped, read, read, read, read, setDataRowType, stopExecution
 
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, debug, debug, debugLevelTipText, destroy, finishInit, getDebugLevel, getOptionManager, initialize, isDebugOn, newOptionManager, reset, 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
 
Methods inherited from interface adams.data.io.input.SpreadSheetReader
dataRowTypeTipText, getDataRowType, isStopped, read, read, read, read, setDataRowType, stopExecution
 
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, getOptionManager
 
Methods inherited from interface adams.core.Destroyable
destroy
 

Field Detail

VERSION

public static final String VERSION
the version.

See Also:
Constant Field Values

m_UncompressedOutput

protected boolean m_UncompressedOutput
whether to use uncompressed output.

Constructor Detail

GnumericSpreadSheetReader

public GnumericSpreadSheetReader()
Method Detail

globalInfo

public String globalInfo()
Returns a string describing the object.

Specified by:
globalInfo in class 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 interface OptionHandler
Overrides:
defineOptions in class AbstractMultiSheetSpreadSheetReaderWithMissingValueSupport

setUncompressedOutput

public void setUncompressedOutput(boolean value)
Sets whether to output uncompressed XML.

Parameters:
value - if true uncompressed XML is generated

getUncompressedOutput

public boolean getUncompressedOutput()
Returns whether to output uncompressed XML.

Returns:
true if uncompressed XML is generated

uncompressedOutputTipText

public String uncompressedOutputTipText()
Returns the tip text for this property.

Returns:
tip text for this property suitable for displaying in the explorer/experimenter gui

getFormatDescription

public String getFormatDescription()
Returns a string describing the format (used in the file chooser).

Specified by:
getFormatDescription in interface SpreadSheetReader
Specified by:
getFormatDescription in class AbstractSpreadSheetReader
Returns:
a description suitable for displaying in the file chooser

getFormatExtensions

public String[] getFormatExtensions()
Returns the extension(s) of the format.

Specified by:
getFormatExtensions in interface SpreadSheetReader
Specified by:
getFormatExtensions in class AbstractSpreadSheetReader
Returns:
the extension (without the dot!)

getInputType

protected AbstractSpreadSheetReader.InputType getInputType()
Returns how to read the data, from a file, stream or reader.

Specified by:
getInputType in class AbstractSpreadSheetReader
Returns:
how to read the data

doReadRange

protected List<SpreadSheet> doReadRange(InputStream in)
Performs the actual reading.

Overrides:
doReadRange in class AbstractMultiSheetSpreadSheetReader
Parameters:
in - the input stream to read from
Returns:
the spreadsheets or null in case of an error
See Also:
getInputType()


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