Spreadsheet Toolkit

corpus.analyser
Class MetricsAnalyser

java.lang.Object
  |
  +--corpus.analyser.Analyser
        |
        +--corpus.analyser.MetricsAnalyser

public class MetricsAnalyser
extends Analyser

This class is responsible for reading in a bunch of spreadsheets, using the extractor to get the data out, doing some processing on them, and then passing the information onto Doodler.


Field Summary
protected  java.lang.String metrics
          This stores the metrics for each worksheet.
 
Fields inherited from class corpus.analyser.Analyser
averageMathVector, CLUSTER, COMPRESSION, diagram, FORMULA_COM, FORMULACOMPONENT, HEATMAP, METRICS, OCCUPANCY, path, POWERLAW, TREEDEPTH, values, VECTOR, VECTOR_MAG, vectorGrid, workbooks, worksheets, WS_OCCUPANCY
 
Constructor Summary
MetricsAnalyser(java.lang.String path, int diagram)
           
 
Method Summary
 void display()
          Takes all the results from computation and passes them off to Doodler.
static java.lang.String getMetrics(WorkSheet ws, int sheetnum, boolean header)
          Process metrics
static void main(java.lang.String[] args)
          Get the party started :)
protected  java.lang.String metrics(WorkSheet ws, int sheetnum, boolean header)
           
protected  void process(WorkSheet ws, java.lang.String[] sheetnames, int sheetnum)
          Takes a worksheet from a workbook and computes something on it.
 void saveResults(java.lang.String path)
          Store the results or all our hard work in a file at path.
 
Methods inherited from class corpus.analyser.Analyser
distinctFamilyTrees, load, loadSheets, mode, mode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

metrics

protected java.lang.String metrics
This stores the metrics for each worksheet.

Constructor Detail

MetricsAnalyser

public MetricsAnalyser(java.lang.String path,
                       int diagram)
Method Detail

process

protected void process(WorkSheet ws,
                       java.lang.String[] sheetnames,
                       int sheetnum)
Takes a worksheet from a workbook and computes something on it. The something depends on the analysis/diagram mode.

Specified by:
process in class Analyser

getMetrics

public static java.lang.String getMetrics(WorkSheet ws,
                                          int sheetnum,
                                          boolean header)
Process metrics

Parameters:
header - boolean - when true will return column labels rather than actual data.

metrics

protected java.lang.String metrics(WorkSheet ws,
                                   int sheetnum,
                                   boolean header)

saveResults

public void saveResults(java.lang.String path)
Store the results or all our hard work in a file at path.

Specified by:
saveResults in class Analyser

display

public void display()
Takes all the results from computation and passes them off to Doodler.

Specified by:
display in class Analyser

main

public static void main(java.lang.String[] args)
Get the party started :)


Spreadsheet Toolkit

Project Home Page