|
Spreadsheet Toolkit | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--corpus.excel.Component | +--corpus.excel.WorkBook
Used to store the internal representation of an excel file. This will be the data that is used to display the worksheet.
Field Summary |
Fields inherited from class corpus.excel.Component |
haltOnErrors |
Constructor Summary | |
WorkBook(java.lang.String name)
Construct a new WorkBook |
Method Summary | |
void |
add(WorkSheet newSheet)
Adds a new WorkSheet to the WorkBook |
void |
display()
Displays the contents of this WorkBook using a tabbed table browser. |
Cell |
getCell(int depth,
int col,
int row)
Returns the cell in a specific (col,row) pair and sheet depth |
java.lang.String[] |
getSheetNames()
The names of the WorkSheets. |
java.lang.String |
getWorkBookName()
|
WorkSheet |
getWorkSheet(int i)
Get the WorkSheet at depth i |
java.util.Iterator |
iterator()
An iterator to the WorkSheets contained in the WorkBook. |
static WorkBook |
load(java.lang.String path)
Load the saved version of the workbook. |
static WorkBook |
loadDiskRaw(java.lang.String path,
boolean api)
Try to load from serialised disk version. |
static WorkBook |
loadRaw(java.lang.String path,
boolean api)
Uses Extractor to read the excel file and save a workbook to disk. |
static void |
main(java.lang.String[] args)
Run tests, metrics and visualisations. |
int |
maxTreeDepth()
Find maximum depth of dependency tree |
java.lang.String |
metricsFunctionCatagory(boolean header)
Breaks down the functions used into catagories. |
static Grid |
occupancyGrid(WorkBook wb)
Counts the number of times each cell is occupied in the worksheet grids and returns the result in a Grid of Integers. |
int |
occupiedCells()
Report number of occupied cells in each worksheet |
int |
orphanCount()
Report number of orphans at each worksheet |
void |
print()
Print all info. |
void |
process()
Called after basic loading is complete, perfrom data structure init |
void |
save(java.lang.String path)
Write out to disk |
void |
setExcelVersion(java.lang.String version)
The excel version used in the spreadsheet |
void |
setReadUsing(java.lang.String readUsing)
The API used to read the spreadsheet. |
void |
setWorkBookName(java.lang.String name)
|
static Grid |
sheetOccupancyGrid(WorkBook wb)
Increases the count for each cell if it is within the total occupied area for the Worksheet. |
int |
size()
How many worksheets the workbook has. |
java.lang.String |
toHTMLString()
Converts information about this component into an HTML formatted String. |
java.lang.String |
toString()
Dump String version |
java.lang.String |
treeToGraph()
Convert the dependency tree into a file, node-edge-node. |
java.lang.String |
treeToString()
Convert the dependency tree into a file, used for fisheye views. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public WorkBook(java.lang.String name)
name
- The name of the WorkBook (may include path details)Method Detail |
public void add(WorkSheet newSheet)
public int size()
public WorkSheet getWorkSheet(int i)
public java.util.Iterator iterator()
public java.lang.String[] getSheetNames()
public java.lang.String getWorkBookName()
public void setWorkBookName(java.lang.String name)
public void setExcelVersion(java.lang.String version)
public void setReadUsing(java.lang.String readUsing)
public Cell getCell(int depth, int col, int row)
public void save(java.lang.String path)
path
- The disk location to write to.load(String)
public static WorkBook load(java.lang.String path)
path
- The location to load from.
save(String)
public static WorkBook loadRaw(java.lang.String path, boolean api)
api
- true will use JExcelRead while false will use IBMExcelAccessor.public static WorkBook loadDiskRaw(java.lang.String path, boolean api)
load(String)
,
loadRaw(String,boolean)
public void process()
public java.lang.String toString()
toString
in class Component
public java.lang.String toHTMLString()
toHTMLString
in class Component
public void print()
public void display()
SpreadsheetTableTabbed
public java.lang.String treeToString()
public java.lang.String treeToGraph()
public int occupiedCells()
public int orphanCount()
public int maxTreeDepth()
public java.lang.String metricsFunctionCatagory(boolean header)
public static void main(java.lang.String[] args)
public static Grid occupancyGrid(WorkBook wb)
wb
- The workbook to examine.sheetOccupancyGrid(WorkBook)
public static Grid sheetOccupancyGrid(WorkBook wb)
wb
- The workbook to examine.occupancyGrid(WorkBook)
|
Spreadsheet Toolkit | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |