|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectadams.core.ConsoleObject
adams.core.option.AbstractOptionHandler
adams.data.io.input.AbstractSpreadSheetReader
adams.data.io.input.SqlDumpSpreadSheetReader
public class SqlDumpSpreadSheetReader
Reads in SQL dump files.
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
-custom-column-headers <java.lang.String> (property: customColumnHeaders) The custom headers to use for the columns (comma-separated list). default:
-time-zone <java.util.TimeZone> (property: timeZone) The time zone to use for interpreting dates/times; default is the system-wide defined one.
-use-backslashes (property: useBackslashes) If enabled, any output file that exists when the writer is executed for the first time won't get replaced with the current header; useful when outputting data in multiple locations in the flow, but one needs to be cautious as to not stored mixed content (eg varying number of columns, etc).
-chunk-size <int> (property: chunkSize) The maximum number of rows per chunk; using -1 will read put all data into a single spreadsheet object. default: -1 minimum: -1
| Nested Class Summary | |
|---|---|
static class |
SqlDumpSpreadSheetReader.ChunkReader
Reads CSV files chunk by chunk. |
| Nested classes/interfaces inherited from class adams.data.io.input.AbstractSpreadSheetReader |
|---|
AbstractSpreadSheetReader.InputType |
| Field Summary | |
|---|---|
protected int |
m_ChunkSize
the chunk size to use. |
protected String |
m_CustomColumnHeaders
the comma-separated list of column header names. |
protected SqlDumpSpreadSheetReader.ChunkReader |
m_Reader
for reading the actual data. |
protected TimeZone |
m_TimeZone
the timezone to use. |
protected boolean |
m_UseBackslashes
whether to use backslashes for escaping. |
| 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 | |
|---|---|
SqlDumpSpreadSheetReader()
|
|
| Method Summary | |
|---|---|
String |
chunkSizeTipText()
Returns the tip text for this property. |
String |
customColumnHeadersTipText()
Returns the tip text for this property. |
void |
defineOptions()
Adds options to the internal list of options. |
protected SpreadSheet |
doRead(Reader r)
Performs the actual reading. |
int |
getChunkSize()
Returns the current chunk size. |
String |
getCustomColumnHeaders()
Returns whether the file contains a header row or not. |
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. |
TimeZone |
getTimeZone()
Returns the time zone in use. |
boolean |
getUseBackslashes()
Returns whether to use backslashes for escaping quotes rather than doubling them. |
String |
globalInfo()
Returns a string describing the object. |
boolean |
hasMoreChunks()
Checks whether there is more data to read. |
SpreadSheet |
nextChunk()
Returns the next chunk. |
void |
setChunkSize(int value)
Sets the maximum chunk size. |
void |
setCustomColumnHeaders(String value)
Sets the custom headers to use. |
void |
setTimeZone(TimeZone value)
Sets the time zone to use. |
void |
setUseBackslashes(boolean value)
Sets whether to use backslashes for escaping quotes rather than doubling them. |
String |
timeZoneTipText()
Returns the tip text for this property. |
String |
useBackslashesTipText()
Returns the tip text for this property. |
| Methods inherited from class adams.data.io.input.AbstractSpreadSheetReader |
|---|
check, dataRowTypeTipText, doRead, doRead, 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.core.option.OptionHandler |
|---|
cleanUpOptions, getOptionManager |
| Methods inherited from interface adams.core.Destroyable |
|---|
destroy |
| Field Detail |
|---|
protected String m_CustomColumnHeaders
protected TimeZone m_TimeZone
protected int m_ChunkSize
protected boolean m_UseBackslashes
protected SqlDumpSpreadSheetReader.ChunkReader m_Reader
| Constructor Detail |
|---|
public SqlDumpSpreadSheetReader()
| Method Detail |
|---|
public String globalInfo()
globalInfo in class AbstractOptionHandlerpublic void defineOptions()
defineOptions in interface OptionHandlerdefineOptions in class AbstractSpreadSheetReaderpublic String getFormatDescription()
getFormatDescription in interface SpreadSheetReadergetFormatDescription in class AbstractSpreadSheetReaderpublic String[] getFormatExtensions()
getFormatExtensions in interface SpreadSheetReadergetFormatExtensions in class AbstractSpreadSheetReaderpublic void setCustomColumnHeaders(String value)
value - the comma-separated listpublic String getCustomColumnHeaders()
public String customColumnHeadersTipText()
public void setTimeZone(TimeZone value)
value - the time zonepublic TimeZone getTimeZone()
public String timeZoneTipText()
public void setUseBackslashes(boolean value)
value - if true then backslashes are usedpublic boolean getUseBackslashes()
public String useBackslashesTipText()
public void setChunkSize(int value)
setChunkSize in interface ChunkedSpreadSheetReadervalue - the size of the chunks, < 1 denotes infinitypublic int getChunkSize()
getChunkSize in interface ChunkedSpreadSheetReadervalue - the size of the chunks, < 1 denotes infinitypublic String chunkSizeTipText()
chunkSizeTipText in interface ChunkedSpreadSheetReaderprotected AbstractSpreadSheetReader.InputType getInputType()
getInputType in class AbstractSpreadSheetReaderprotected SpreadSheet doRead(Reader r)
doRead in class AbstractSpreadSheetReaderr - the reader to read from
public boolean hasMoreChunks()
hasMoreChunks in interface ChunkedSpreadSheetReaderpublic SpreadSheet nextChunk()
nextChunk in interface ChunkedSpreadSheetReader
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||