project35.io
Class FlatFileReader

java.lang.Object
  extended by project35.io.FlatFileReader

public class FlatFileReader
extends java.lang.Object

Parses tab-delimited file into a two dimensional array (String[][]) of terms.


Copyright (c) 2008 Kevin Garwood for Project35. The original code was developed by Kevin Garwood for the University of Manchester. Revisions have been made for Project35, a project that is independent of that institution. This code is licensed under the Academic Free License version 3.0. The code attribution for the original code is included here:

Copyright (c) Kevin Garwood and University of Manchester 2007. All rights reserved. Licensed under the Academic Free License version 3.0. For more information on the terms and conditions, please see the file "LICENSE" that is included in this distribution.


Version:
1.0
Author:
Kevin Garwood (kgarwood@users.sourceforge.net)

Constructor Summary
FlatFileReader()
           
 
Method Summary
 java.lang.String[][] getData()
          get a table of terms from the input file.
 java.lang.String[][] getData(java.util.ArrayList textLines)
          hopefully will replace the other getData method.
 void setFile(java.io.File inputFile)
          the file to be read
 void setFirstDataRow(int firstRowData)
          indicates when the first row of data appears.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FlatFileReader

public FlatFileReader()
Method Detail

getData

public java.lang.String[][] getData()
                             throws java.io.IOException,
                                    Project35Exception
get a table of terms from the input file. Rows are distinguished by end-of-line characters. Columns are distinguished by tabs

Returns:
array of terms
Throws:
java.io.IOException
Project35Exception

getData

public java.lang.String[][] getData(java.util.ArrayList textLines)
                             throws Project35Exception
hopefully will replace the other getData method. HeaderRemovalDialog already reads the file once and it probably shouldn't be read twice!

Throws:
Project35Exception

setFile

public void setFile(java.io.File inputFile)
the file to be read


setFirstDataRow

public void setFirstDataRow(int firstRowData)
indicates when the first row of data appears. This is useful when you try to skip past headers