Class DeTable

java.lang.Object
  |
  +--DeTable

public class DeTable
extends java.lang.Object


Constructor Summary
DeTable()
           
 
Method Summary
static void analyzeTable()
          this analyzes the table and finds out if there is a header, and what are duplicated header fields and then mark the cells for supression
static TableCell getCell(int posX, int posY)
          gets a TableCell from the listRows and the containing listCells object
if the row/cell is not existing (posY or posX greater than the size of the list) the row/cell is created
this is to create a dynamic array with different amount of cells per row
static int getNextFreeCell(int posX, int posY)
          gets a TableCell from the listRows and the containing listCells object
if the row/cell is not existing (posY or posX greater than the size of the list) the row/cell is created
this is to create a dynamic array with different amount of cells per row
static TableRow getRow(int posY)
          gets a TableRow from the listRows object
if the row is not existing (posY greater than size of listRows), the row is created
this is to create a dynamic array with different amount of cells per row
static java.util.Vector HTMLTokenizer(java.io.BufferedReader inputFile)
          breaks the file supplied by a parameter into tokens
a token is a text (between tags) or a tag
the delimetres are the < and the >
static void main(java.lang.String[] args)
          the main routine
reads the configuration, reads and parses the input file and writes (if configured) html and xml ouput
static void parseTable()
          this is the main parser, parses the tags in the listTokens to create a talbe-object with rows and cells
static void PeelTableTokens()
          moves the tokens before and after the table into seperate lists
this tokens are removed from listTokens and put into listPreTableTokens and listPostTableTokens
static void writeTable(java.io.PrintWriter outFile)
          writes the html output
writes preTable tokens, the table created and the post table tokens
tries to make the output html file very similiar to the input file
static void writeXml(java.io.PrintWriter outFile)
          writes the xml output
writes the the table size and the table created, but no html tags or pre/post text and tags
tries to make the output xml as "textual" as possible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeTable

public DeTable()
Method Detail

analyzeTable

public static void analyzeTable()
this analyzes the table and finds out if there is a header, and what are duplicated header fields and then mark the cells for supression

getCell

public static TableCell getCell(int posX,
                                int posY)
gets a TableCell from the listRows and the containing listCells object
if the row/cell is not existing (posY or posX greater than the size of the list) the row/cell is created
this is to create a dynamic array with different amount of cells per row
Parameters:
posX - number of row
posY - cell of specified row
Returns:
returns a TableCell object containing the selected or a new cell

getNextFreeCell

public static int getNextFreeCell(int posX,
                                  int posY)
gets a TableCell from the listRows and the containing listCells object
if the row/cell is not existing (posY or posX greater than the size of the list) the row/cell is created
this is to create a dynamic array with different amount of cells per row
Parameters:
posX - number of row
posY - cell of specified row
Returns:
returns the position of the next free cell

getRow

public static TableRow getRow(int posY)
gets a TableRow from the listRows object
if the row is not existing (posY greater than size of listRows), the row is created
this is to create a dynamic array with different amount of cells per row
Parameters:
posX - number of row
Returns:
returns a TableRow object containing the selected or a new row

HTMLTokenizer

public static java.util.Vector HTMLTokenizer(java.io.BufferedReader inputFile)
                                      throws java.io.IOException
breaks the file supplied by a parameter into tokens
a token is a text (between tags) or a tag
the delimetres are the < and the >
Parameters:
inputFile - a buffererd reader for the input file
Returns:
returns a vetor list containig the tokens as strings
Throws:
java.io.IOException -  

main

public static void main(java.lang.String[] args)
the main routine
reads the configuration, reads and parses the input file and writes (if configured) html and xml ouput
Parameters:
args - Arguments from command line

parseTable

public static void parseTable()
this is the main parser, parses the tags in the listTokens to create a talbe-object with rows and cells

PeelTableTokens

public static void PeelTableTokens()
moves the tokens before and after the table into seperate lists
this tokens are removed from listTokens and put into listPreTableTokens and listPostTableTokens

writeTable

public static void writeTable(java.io.PrintWriter outFile)
writes the html output
writes preTable tokens, the table created and the post table tokens
tries to make the output html file very similiar to the input file
Parameters:
outFile - PrintWriter as html output file

writeXml

public static void writeXml(java.io.PrintWriter outFile)
writes the xml output
writes the the table size and the table created, but no html tags or pre/post text and tags
tries to make the output xml as "textual" as possible
Parameters:
outFile - PrintWriter as xml output file