|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectedu.psu.geovista.app.parvis.model.SimpleParallelSpaceModel
edu.psu.geovista.app.parvis.file.STFFile
A Simple file parser for reading STF (Simple Table Fomrat) files from URLs. The STF File format is defined as follows:
# test.stf # Comments have # in the first column. # Type the number of fields, on a line by itself. 3 # Then type field names and types. Field names must not contain # spaces. # PersonName String Age Integer HourlyWage Real # # Data type is case-insensitive. # Default data delimiters are tabs and spaces. # Here's the data, tab-delimited. Notice that the data columns are # in the order they are listed above. # Joe 23 5.75 Mary 18 4.75 Fred 54 100.00 Ginger 48 100.00 # # Nothing special is required to end the file.Once the file is read and parsed, the data can be accessed with the methods defined in the ParallelSpaceModel interface.
| Field Summary |
| Fields inherited from class edu.psu.geovista.app.parvis.model.SimpleParallelSpaceModel |
axisLabels, listeners, numDimensions, recordLabels, valueLabels, values |
| Constructor Summary | |
STFFile(java.net.URL url)
Creates a new STFFile with the given url. |
|
| Method Summary | |
void |
addProgressListener(ProgressListener l)
|
void |
fireProgressEvent(ProgressEvent e)
|
static void |
main(java.lang.String[] args)
Main method for testing purposes. |
void |
readContents()
Reads the contents of the file and exposes them vis the ParallelSpaceModel interface of the class. |
protected void |
readData(java.io.Reader in)
Reads the data lines. |
protected void |
readFirstLine(java.io.Reader in)
Reads the first data line of the file and sets up the number of dimensions. |
protected void |
readHeaderLines(java.io.Reader in)
Reads the header lines and sets up the variable types. |
protected java.lang.String |
readLine(java.io.Reader in)
Reads on line, skipping comments and empty lines. |
void |
removeProgressListener(ProgressListener l)
|
| Methods inherited from class edu.psu.geovista.app.parvis.model.SimpleParallelSpaceModel |
addChangeListener, addRecord, addRecord, getAxisLabel, getMaxValue, getMinValue, getNumDimensions, getNumRecords, getRecordLabel, getValue, getValueLabel, getValueLabels, getValues, initNumDimensions, removeChangeListener, setAxisLabel, setAxisLabels, setValueLabel, setValueLabels |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public STFFile(java.net.URL url)
url - The url of the file to read.| Method Detail |
public void readContents()
throws java.io.IOException
java.io.IOException
protected void readFirstLine(java.io.Reader in)
throws java.io.IOException
java.io.IOException
protected void readHeaderLines(java.io.Reader in)
throws java.io.IOException
java.io.IOException
protected void readData(java.io.Reader in)
throws java.io.IOException
java.io.IOException
protected java.lang.String readLine(java.io.Reader in)
throws java.io.IOException
java.io.IOExceptionpublic void addProgressListener(ProgressListener l)
public void removeProgressListener(ProgressListener l)
public void fireProgressEvent(ProgressEvent e)
public static void main(java.lang.String[] args)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||