jsystem.extensions.analyzers.tabletext
Class Table

java.lang.Object
  extended byjsystem.extensions.analyzers.tabletext.Table

public class Table
extends Object

Table is used to analyze tables that are recieved from cli. The table string should be in the following format: Header1 Header2 ------- ------- key1 value1 key2 value2


Constructor Summary
Table(String stringTable)
          Create a table instance from a cli string input.
 
Method Summary
 int findFieldInRow(String fieldName, int lineIndex)
           
 String[][] getAllLinesWithFields(String[] fields)
           
 String getCell(int row, int col)
           
 String[] getColumn(int col)
           
 int getFirstRowIndex(String headerField, String cellValue)
           
 int getHeaderFieldIndex(String fieldName)
           
 String[] getHeaders()
           
 int getNumberOfColumns()
           
 int getNumberOfRows()
           
 String[] getRow(int row)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Table

public Table(String stringTable)
      throws Exception
Create a table instance from a cli string input.

Parameters:
stringTable - the string to be analyze into table structure
Throws:
Exception
Method Detail

getNumberOfRows

public int getNumberOfRows()

getNumberOfColumns

public int getNumberOfColumns()

getCell

public String getCell(int row,
                      int col)

getRow

public String[] getRow(int row)

getFirstRowIndex

public int getFirstRowIndex(String headerField,
                            String cellValue)
                     throws Exception
Throws:
Exception

getColumn

public String[] getColumn(int col)

getAllLinesWithFields

public String[][] getAllLinesWithFields(String[] fields)

findFieldInRow

public int findFieldInRow(String fieldName,
                          int lineIndex)

getHeaders

public String[] getHeaders()
                    throws Exception
Throws:
Exception

getHeaderFieldIndex

public int getHeaderFieldIndex(String fieldName)
                        throws Exception
Throws:
Exception

toString

public String toString()