Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

edu.stanford.genetics.treeview.model
Class FlatFileParser  view FlatFileParser download FlatFileParser.java

java.lang.Object
  extended byedu.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.


Nested Class Summary
(package private)  class FlatFileParser.MeteredStream
           
 
Field Summary
private  boolean cancelled
           
static int FILE
           
private  ProgressTrackable progressTrackable
           
private  java.lang.String resource
           
private  int resourceType
           
static int URL
           
 
Constructor Summary
FlatFileParser()
           
 
Method Summary
 boolean getCancelled()
           
 ProgressTrackable getProgressTrackable()
           
 java.lang.String getResource()
           
 int getResourceType()
           
private  int getValue()
           
private  void incrValue(int i)
           
 java.util.Vector loadIntoTable()
           
private  java.util.Vector loadIntoTable(java.io.InputStream inputStream)
          returns a list of vectors of String [], representing data from file.
private  void loadLine(java.util.Vector line, FlatFileStreamTokenizer st)
           
private  java.io.InputStream openStream()
          opens a stream from the resource
 void setCancelled(boolean cancelled)
           
private  void setLength(int i)
           
 void setProgressTrackable(ProgressTrackable progressTrackable)
           
 void setResource(java.lang.String resource)
           
 void setResourceType(int resourceType)
           
private  void setValue(int i)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

FlatFileParser

public FlatFileParser()
Method Detail

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