org::gel::mauve::summary::output::AbstractTabbedDataWriter Class Reference

Used to provide base functionality to print files largely made up of rows of tab- separated data. More...

Inheritance diagram for org::gel::mauve::summary::output::AbstractTabbedDataWriter:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 AbstractTabbedDataWriter (String file, Hashtable args)
 Provides basic structure for outputting data from.

void doneWritingFile ()
String[] getColumnHeaders ()
void printData ()
void printDataRow ()
 Gathers and prints a row of data.

void printHeaderInfoForFile ()
 convenience method if there is data that should automatically be printed at the beginning of a file

void printHeaders ()
 Prints the headers.

void printRow (String[] data)
 Prints a row of data to the output file, each field tab separated.

void setColumnHeaders (Vector columns)
 sets how many columns there are and what their headers should be


Protected Member Functions

abstract String getData (int column, int row)
 Returns the data that should be printed in the specified row and column.

void initSubClassParticulars (Hashtable args)
 Convenience method for inheriting classes to set variables necessary from the constructor.

abstract boolean moreRowsToPrint ()
 called from printData.

abstract Vector setColumnHeaders ()
 Gets the names of the columns.

abstract boolean shouldPrintRow (int row)

Protected Attributes

String[] current_row
 acts as a buffer for a row of information

String file_name
 represents the file name (and path) the output stream writes to

String[] headers
 Contains the header for each column.

PrintStream out
 writer used to print

int row_number
 Is meant for sub-classes as an identifier to what information should be printed.


Detailed Description

Used to provide base functionality to print files largely made up of rows of tab- separated data.

Provides loose structure for getting data based on row and column numbers. The row and column information is used only when printing data rows, as done through printDataRow (). All free-form data can be written in between rows of formatted data. Row and column information can be reset at the convenience of the implementing classes

Author:
Anna I Rissman

Definition at line 20 of file AbstractTabbedDataWriter.java.


Constructor & Destructor Documentation

org::gel::mauve::summary::output::AbstractTabbedDataWriter::AbstractTabbedDataWriter String  file,
Hashtable  args
[inline]
 

Provides basic structure for outputting data from.

Parameters:
mod reference to mauve data
file_name The name of the file that should be output

Definition at line 59 of file AbstractTabbedDataWriter.java.

References file_name, initSubClassParticulars(), and printHeaderInfoForFile().


Member Function Documentation

void org::gel::mauve::summary::output::AbstractTabbedDataWriter::doneWritingFile  )  [inline]
 

Definition at line 141 of file AbstractTabbedDataWriter.java.

References file_name.

Referenced by org::gel::mauve::summary::output::AbstractIslandWriter::AbstractIslandWriter(), org::gel::mauve::summary::output::OverviewFileWriter::initSubClassParticulars(), and org::gel::mauve::summary::output::TroubleMatchWriter::TroubleMatchWriter().

String [] org::gel::mauve::summary::output::AbstractTabbedDataWriter::getColumnHeaders  )  [inline]
 

Definition at line 137 of file AbstractTabbedDataWriter.java.

References headers.

abstract String org::gel::mauve::summary::output::AbstractTabbedDataWriter::getData int  column,
int  row
[protected, pure virtual]
 

Returns the data that should be printed in the specified row and column.

It is up to sub-classes to track where to get the data from, as the format is not intended to be standardized.

Parameters:
column The header representing which column this data is for
row An int that may be useful for identifying what data is desired. It gets incremented every time printDataRow () is called.

Implemented in org::gel::mauve::summary::output::AbstractMatchDataWriter, org::gel::mauve::summary::output::IslandCoordinateWriter, org::gel::mauve::summary::output::IslandFeatureWriter, org::gel::mauve::summary::output::IslandGeneFeatureWriter, org::gel::mauve::summary::output::OverviewFileWriter, and org::gel::mauve::summary::output::TroubleMatchWriter.

Referenced by printDataRow().

void org::gel::mauve::summary::output::AbstractTabbedDataWriter::initSubClassParticulars Hashtable  args  )  [inline, protected]
 

Convenience method for inheriting classes to set variables necessary from the constructor.

Parameters:
args Contains objects necessary to successfully initialize a subclass. NOTE: can be null value

Reimplemented in org::gel::mauve::summary::output::AbstractMatchDataWriter, org::gel::mauve::summary::output::IslandFeatureWriter, org::gel::mauve::summary::output::IslandGeneFeatureWriter, org::gel::mauve::summary::output::OverviewFileWriter, and org::gel::mauve::summary::output::TroubleMatchWriter.

Definition at line 156 of file AbstractTabbedDataWriter.java.

References setColumnHeaders().

Referenced by AbstractTabbedDataWriter().

abstract boolean org::gel::mauve::summary::output::AbstractTabbedDataWriter::moreRowsToPrint  )  [protected, pure virtual]
 

called from printData.

Used to determine when to stop attempting to print rows.

Returns:
True if there is more tabbed data to print, false otherwise

Implemented in org::gel::mauve::summary::output::AbstractMatchDataWriter, org::gel::mauve::summary::output::IslandGeneFeatureWriter, and org::gel::mauve::summary::output::OverviewFileWriter.

Referenced by printData().

void org::gel::mauve::summary::output::AbstractTabbedDataWriter::printData  )  [inline]
 

Reimplemented in org::gel::mauve::summary::output::AbstractIslandWriter, and org::gel::mauve::summary::output::IslandGeneFeatureWriter.

Definition at line 120 of file AbstractTabbedDataWriter.java.

References moreRowsToPrint(), and printDataRow().

Referenced by org::gel::mauve::summary::output::TroubleMatchWriter::findOddLengthedMatches(), org::gel::mauve::summary::output::AbstractMatchDataWriter::printData(), and org::gel::mauve::summary::output::OverviewFileWriter::printGeneInformation().

void org::gel::mauve::summary::output::AbstractTabbedDataWriter::printDataRow  )  [inline]
 

Gathers and prints a row of data.

Definition at line 110 of file AbstractTabbedDataWriter.java.

References current_row, getData(), headers, printRow(), row_number, and shouldPrintRow().

Referenced by printData().

void org::gel::mauve::summary::output::AbstractTabbedDataWriter::printHeaderInfoForFile  )  [inline]
 

convenience method if there is data that should automatically be printed at the beginning of a file

Reimplemented in org::gel::mauve::summary::output::TroubleMatchWriter.

Definition at line 165 of file AbstractTabbedDataWriter.java.

Referenced by AbstractTabbedDataWriter().

void org::gel::mauve::summary::output::AbstractTabbedDataWriter::printHeaders  )  [inline]
 

Prints the headers.

Definition at line 101 of file AbstractTabbedDataWriter.java.

References headers, and printRow().

Referenced by org::gel::mauve::summary::output::TroubleMatchWriter::findOddLengthedMatches(), org::gel::mauve::summary::output::OverviewFileWriter::printGeneInformation(), org::gel::mauve::summary::output::IslandFeatureWriter::printIslands(), and org::gel::mauve::summary::output::IslandCoordinateWriter::printIslands().

void org::gel::mauve::summary::output::AbstractTabbedDataWriter::printRow String[]  data  )  [inline]
 

Prints a row of data to the output file, each field tab separated.

Parameters:
data Array of fields to print. Must be the same length as the header array.

Definition at line 85 of file AbstractTabbedDataWriter.java.

Referenced by printDataRow(), and printHeaders().

abstract Vector org::gel::mauve::summary::output::AbstractTabbedDataWriter::setColumnHeaders  )  [protected, pure virtual]
 

Gets the names of the columns.

Implemented in org::gel::mauve::summary::output::AbstractMatchDataWriter, org::gel::mauve::summary::output::IslandCoordinateWriter, org::gel::mauve::summary::output::IslandFeatureWriter, org::gel::mauve::summary::output::IslandGeneFeatureWriter, org::gel::mauve::summary::output::OverviewFileWriter, and org::gel::mauve::summary::output::TroubleMatchWriter.

Referenced by initSubClassParticulars().

void org::gel::mauve::summary::output::AbstractTabbedDataWriter::setColumnHeaders Vector  columns  )  [inline]
 

sets how many columns there are and what their headers should be

Parameters:
columns An array of strings representing column names

Definition at line 132 of file AbstractTabbedDataWriter.java.

References current_row, and headers.

abstract boolean org::gel::mauve::summary::output::AbstractTabbedDataWriter::shouldPrintRow int  row  )  [protected, pure virtual]
 

Implemented in org::gel::mauve::summary::output::AbstractMatchDataWriter, org::gel::mauve::summary::output::IslandCoordinateWriter, org::gel::mauve::summary::output::IslandFeatureWriter, org::gel::mauve::summary::output::IslandGeneFeatureWriter, org::gel::mauve::summary::output::OverviewFileWriter, and org::gel::mauve::summary::output::TroubleMatchWriter.

Referenced by printDataRow().


Member Data Documentation

String [] org::gel::mauve::summary::output::AbstractTabbedDataWriter::current_row [protected]
 

acts as a buffer for a row of information

Definition at line 42 of file AbstractTabbedDataWriter.java.

Referenced by printDataRow(), and setColumnHeaders().

String org::gel::mauve::summary::output::AbstractTabbedDataWriter::file_name [protected]
 

represents the file name (and path) the output stream writes to

Definition at line 30 of file AbstractTabbedDataWriter.java.

Referenced by AbstractTabbedDataWriter(), and doneWritingFile().

String [] org::gel::mauve::summary::output::AbstractTabbedDataWriter::headers [protected]
 

Contains the header for each column.

The headers can be printed on demand and are also used to determine what data from the match to display in each column. Array indeces match column indeces.

Definition at line 37 of file AbstractTabbedDataWriter.java.

Referenced by getColumnHeaders(), printDataRow(), printHeaders(), and setColumnHeaders().

PrintStream org::gel::mauve::summary::output::AbstractTabbedDataWriter::out [protected]
 

writer used to print

Definition at line 25 of file AbstractTabbedDataWriter.java.

int org::gel::mauve::summary::output::AbstractTabbedDataWriter::row_number [protected]
 

Is meant for sub-classes as an identifier to what information should be printed.

Is incremented in printDataRow, but can be reset without harm by sub-classes.

Definition at line 49 of file AbstractTabbedDataWriter.java.

Referenced by printDataRow().


The documentation for this class was generated from the following file:
Generated on Mon Aug 19 06:04:21 2013 for Mauve by doxygen 1.3.6