com.waveset.util
Class ReportSection

java.lang.Object
  extended bycom.waveset.util.ReportSection

public class ReportSection
extends java.lang.Object


Field Summary
static java.lang.String code_id
           
 
Constructor Summary
ReportSection()
           
ReportSection(java.lang.Object title)
          Create a report section with the given title.
 
Method Summary
 void addItem(java.lang.Object item)
          Add an item to the Section..
 void addParagraph(java.lang.String paragraph)
          Add a paragraph to this section.
 java.lang.String getParagraph(int num)
          Get one of the paragraphs from this section.
 java.util.ArrayList getParagraphs()
          Get a list of all the paragraphs contained in this section.
 ReportTable getTable()
          Returns the table in the report.
 ReportTable getTable(int num)
          Returns the specified table from the report.
 java.util.ArrayList getTables()
          Returns an ArrayList of ReportTable objects.
 java.lang.Object getTitle()
          Get the title for this section.
 boolean isEmpty()
          Returns true if there are no items in the section.
 int numItems()
          Get the number of items in this section.
 int numParagraphs()
          Gets the number of paragraphs in this section
 int numTables()
          Gets the number of tables in this section .
 void removeItem(java.lang.Object item)
          Removes an item from this section.
 void setParagraphs(java.util.ArrayList paragraphs)
          Set the list of paragraphs for this section
 void setTitle(java.lang.Object title)
          Set the title for this section.
 java.lang.String toXml()
           
 java.lang.String toXml(java.lang.StringBuffer buf, int indent)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

code_id

public static final java.lang.String code_id
See Also:
Constant Field Values
Constructor Detail

ReportSection

public ReportSection()

ReportSection

public ReportSection(java.lang.Object title)
Create a report section with the given title. The title of the section acts as the name, and can be retrieved from a Report using it.

Method Detail

setTitle

public void setTitle(java.lang.Object title)
Set the title for this section.


getTitle

public java.lang.Object getTitle()
Get the title for this section.


isEmpty

public boolean isEmpty()
Returns true if there are no items in the section.


addItem

public void addItem(java.lang.Object item)
Add an item to the Section.. There are currently only two things that will be accepted, ReportTables and Strings. ReportTables to represent the tables and Strings to represent the paragraphs.


removeItem

public void removeItem(java.lang.Object item)
Removes an item from this section.


numItems

public int numItems()
Get the number of items in this section.


toXml

public java.lang.String toXml()

toXml

public java.lang.String toXml(java.lang.StringBuffer buf,
                              int indent)

getTable

public ReportTable getTable(int num)
Returns the specified table from the report.


getTable

public ReportTable getTable()
Returns the table in the report.


getTables

public java.util.ArrayList getTables()
Returns an ArrayList of ReportTable objects.


numTables

public int numTables()
Gets the number of tables in this section .


getParagraph

public java.lang.String getParagraph(int num)
Get one of the paragraphs from this section. TODO : introduce a name or id into DTD per paragraph


numParagraphs

public int numParagraphs()
Gets the number of paragraphs in this section


getParagraphs

public java.util.ArrayList getParagraphs()
Get a list of all the paragraphs contained in this section. This method returns an arraylist of strings which represent paragraphs.


addParagraph

public void addParagraph(java.lang.String paragraph)
Add a paragraph to this section. A paragraph is just a string of text.


setParagraphs

public void setParagraphs(java.util.ArrayList paragraphs)
Set the list of paragraphs for this section