java.lang.Object
edu.stanford.genetics.treeview.model.FlatFileParser
- public class FlatFileParser
- extends java.lang.Object
parses a tab-delimitted file into a vector of String []. Each String [] represents a row of the file.
This object should be created and configured. None of the real action gets started until the
loadIntoTable() routine is called. After loading, the object can be reconfigured and reused to load
other files.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
progressTrackable
private ProgressTrackable progressTrackable
resource
private java.lang.String resource
FILE
public static final int FILE
- See Also:
- Constant Field Values
URL
public static final int URL
- See Also:
- Constant Field Values
resourceType
private int resourceType
cancelled
private boolean cancelled
FlatFileParser
public FlatFileParser()
getProgressTrackable
public ProgressTrackable getProgressTrackable()
setProgressTrackable
public void setProgressTrackable(ProgressTrackable progressTrackable)
getResource
public java.lang.String getResource()
setResource
public void setResource(java.lang.String resource)
getResourceType
public int getResourceType()
setResourceType
public void setResourceType(int resourceType)
getCancelled
public boolean getCancelled()
setCancelled
public void setCancelled(boolean cancelled)
loadIntoTable
public java.util.Vector loadIntoTable()
throws edu.stanford.genetics.treeview.LoadException,
java.io.IOException
setLength
private void setLength(int i)
setValue
private void setValue(int i)
getValue
private int getValue()
incrValue
private void incrValue(int i)
loadIntoTable
private java.util.Vector loadIntoTable(java.io.InputStream inputStream)
throws java.io.IOException,
edu.stanford.genetics.treeview.LoadException
- returns a list of vectors of String [], representing data from file.
loadLine
private void loadLine(java.util.Vector line,
FlatFileStreamTokenizer st)
throws edu.stanford.genetics.treeview.LoadException,
java.io.IOException
openStream
private java.io.InputStream openStream()
throws edu.stanford.genetics.treeview.LoadException
- opens a stream from the resource