IMPACT
Class ResultsView

java.lang.Object
  extended by IMPACT.ResultsView

public class ResultsView
extends java.lang.Object

Implementation of several methods to allow reading Comma Separating Values (CSV) files. Information read is prepared for table model. It accepts CSV files with separation by space(' '), tab (\t), comma(,) or semicolon(;) characters. Prepared for files with 1000000 rows and 10000 columns

Author:
Emanuel Maldonado
See Also:
GUIResultsView, CSVTableModel, csvCharAt(int, java.lang.String)

Field Summary
static int FILE0
          Choose File1
static int FILE1
          Choose File2
 
Constructor Summary
ResultsView()
          Constructor for instantiation of files later.
ResultsView(java.lang.String csvfile0, java.lang.String csvfile1)
          Constructor for file1 and file2 instantiation.
 
Method Summary
 int getColumnCount()
          Get number of columns for active file.
 int getMaxColumnSize(int col)
          Get maximum column size (for active file), between name of column and maximum length of its values.
 int getMaxColumnValueSize(int col)
          Get maximum size between values of specific column, for active file.
 int getRowCount()
          Get number of rows for active file.
 int getRSColorizeCount()
          Get number of sequential columns to colorize.
This is obtained from information in a ResultsSummary file.
 java.lang.String[] getTableColumnNames()
          Get table column names for active file.
 java.lang.Object[][] getTableDataValues()
          Get table values for active file.
 boolean readCSVFile()
          Read active CSV file.
 void setActiveFile(int whichfile)
          Set the file1 for use in all methods in this class.
 void setFstFile(java.lang.String csvfile0)
          Instantiate File1.
 void setSndFile(java.lang.String csvfile1)
          Instantiate File2.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FILE0

public static final int FILE0
Choose File1

See Also:
Constant Field Values

FILE1

public static final int FILE1
Choose File2

See Also:
Constant Field Values
Constructor Detail

ResultsView

public ResultsView()
Constructor for instantiation of files later. No file is set active.

See Also:
setActiveFile(int)

ResultsView

public ResultsView(java.lang.String csvfile0,
                   java.lang.String csvfile1)
Constructor for file1 and file2 instantiation. No file is set active.

Parameters:
csvfile0 - instantiate file1
csvfile1 - instantiate file2
See Also:
setActiveFile(int)
Method Detail

setFstFile

public void setFstFile(java.lang.String csvfile0)
Instantiate File1.

Parameters:
csvfile0 - absolute path.

setSndFile

public void setSndFile(java.lang.String csvfile1)
Instantiate File2.

Parameters:
csvfile1 - absolute path.
See Also:
setActiveFile(int)

setActiveFile

public void setActiveFile(int whichfile)
Set the file1 for use in all methods in this class. If false the file2 is on use.

Parameters:
whichfile - activate file1 if value FILE0; otherwise file2 is active if value FILE1.
See Also:
FILE0, FILE1

getColumnCount

public int getColumnCount()
Get number of columns for active file.

Returns:
number of columns.
See Also:
setActiveFile(int)

getRowCount

public int getRowCount()
Get number of rows for active file.

Returns:
number of rows.
See Also:
setActiveFile(int)

getTableColumnNames

public java.lang.String[] getTableColumnNames()
Get table column names for active file.

Returns:
table column names.
See Also:
setActiveFile(int)

getTableDataValues

public java.lang.Object[][] getTableDataValues()
Get table values for active file.

Returns:
table values.
See Also:
setActiveFile(int)

getMaxColumnValueSize

public int getMaxColumnValueSize(int col)
Get maximum size between values of specific column, for active file.

Parameters:
col - specific column index.
Returns:
largest size.
See Also:
setActiveFile(int)

getMaxColumnSize

public int getMaxColumnSize(int col)
Get maximum column size (for active file), between name of column and maximum length of its values.

Parameters:
col - specific column index.
Returns:
column largest size.
See Also:
setActiveFile(int)

getRSColorizeCount

public int getRSColorizeCount()
Get number of sequential columns to colorize.
This is obtained from information in a ResultsSummary file. If zero returned, is not a ResultsSummary file.

Returns:
number of columns per sequence; 2 if 3d location does not exist; otherwise 3.

readCSVFile

public boolean readCSVFile()
Read active CSV file.

Returns:
true if success; false, otherwise.
See Also:
setActiveFile(int)