|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectprefuse.data.io.AbstractTableReader
prefuse.data.io.AbstractTextTableReader
public abstract class AbstractTextTableReader
Abstract base class for TableReader instances that read in a table from a textual data file.
| Constructor Summary | |
|---|---|
AbstractTextTableReader()
Create a new AbstractTextTableReader using a default ParserFactory. |
|
AbstractTextTableReader(ParserFactory parserFactory)
Create a new AbstractTextTableReader. |
|
| Method Summary | |
|---|---|
protected java.util.ArrayList |
getColumnNames()
Subclasses can override this to provide column names through a custom mechanism. |
static java.lang.String |
getDefaultHeader(int idx)
Returns default column header names of the type "A", "B", ..., "Z", "AA", "AB", etc. |
protected abstract void |
read(java.io.InputStream is,
TableReadListener trl)
Scans the input stream, making call backs for each encountered entry on the provided TextReadListener. |
Table |
readTable(java.io.InputStream is)
Read in a table from the given InputStream. |
void |
setHasHeader(boolean hasHeaderRow)
Set whether or not the table data file includes a header row. |
| Methods inherited from class prefuse.data.io.AbstractTableReader |
|---|
readTable, readTable, readTable |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractTextTableReader()
public AbstractTextTableReader(ParserFactory parserFactory)
parserFactory - the ParserFactory to use for parsing text strings
into table values.| Method Detail |
|---|
public void setHasHeader(boolean hasHeaderRow)
hasHeaderRow - true if the the data file includes a header row,
false otherwise.
public Table readTable(java.io.InputStream is)
throws DataIOException
TableReader
is - the InputStream to read the table from
DataIOExceptionTableReader.readTable(java.io.InputStream)protected java.util.ArrayList getColumnNames()
public static java.lang.String getDefaultHeader(int idx)
idx - the index of the column header
protected abstract void read(java.io.InputStream is,
TableReadListener trl)
throws java.io.IOException,
DataParseException
is - the InputStream to readtrl - the TextReadListener that will receive callbacks
java.io.IOException
DataParseException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||