com.waveset.object
Class ResultTable

java.lang.Object
  extended bycom.waveset.util.AbstractXmlObject
      extended bycom.waveset.object.ResultTable
All Implemented Interfaces:
javax.naming.Referenceable, XmlObject
Direct Known Subclasses:
ResultRecord

public class ResultTable
extends AbstractXmlObject

A class used to represent a grid of information within a WavesetResult. These can be used in cases where an operation may produce a set of similar results, which are easier to read in tabular format.


Field Summary
static java.lang.String ATT_NAME
           
static java.lang.String code_id
           
static java.lang.String EL_COLUMNS
           
static java.lang.String EL_ROWS
           
static java.lang.String EL_TITLE
           
static java.lang.String ELEMENT
          Our XML element name.
static java.lang.String ITEM_TYPE
          The ResultItem type name for these.
 
Fields inherited from class com.waveset.util.AbstractXmlObject
_trace
 
Constructor Summary
ResultTable()
          Build an empty result object, which can be populated manually.
ResultTable(org.w3c.dom.Element e)
          Build a result object from xml.
 
Method Summary
 void addColumn(java.lang.String name)
          Add a column name.
 void addRow(java.util.List row)
          Add a row.
 java.lang.String getColumn(int i)
          Get a column name.
 java.lang.Object getColumn(java.lang.String rowName, int column)
          Search the result table and return the value of one column in one row.
 java.util.List getColumns()
          Get the column names.
 java.lang.String getElementName()
          Return the XML element name, required by AbstractXmlObject.
 java.lang.String getName()
          Get the table name.
 Message getNameMsg()
          Get the table name.
 java.util.List getRow(java.lang.String rowName)
          Search the result table for a row whose first column value matches the given value.
 java.util.List getRows()
          Get the rows.
protected  void parseXml(org.w3c.dom.Element e)
           
 void removeColumn(java.lang.String name)
          Remove a column name.
 void setColumns(java.util.List l)
          Set the column names.
 void setName(java.lang.String s)
          Set the table name.
 void setNameMsg(Message s)
          Set the table name.
 void setRows(java.util.List l)
          Set the rows.
 void toXml(java.lang.StringBuffer b, int indent)
          Serialize into a buffer with optional indentation.
 
Methods inherited from class com.waveset.util.AbstractXmlObject
addXmlHeader, cloneObject, dump, dumpFile, getReference, println, setTrace, toIdentityString, toVerboseString, toVerboseString, toXml, toXml, toXml
 
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

ELEMENT

public static final java.lang.String ELEMENT
Our XML element name.

See Also:
Constant Field Values

ITEM_TYPE

public static final java.lang.String ITEM_TYPE
The ResultItem type name for these. Should this go here or in ResultItem?

See Also:
Constant Field Values

ATT_NAME

public static final java.lang.String ATT_NAME
See Also:
Constant Field Values

EL_TITLE

public static final java.lang.String EL_TITLE
See Also:
Constant Field Values

EL_COLUMNS

public static final java.lang.String EL_COLUMNS
See Also:
Constant Field Values

EL_ROWS

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

ResultTable

public ResultTable()
Build an empty result object, which can be populated manually.


ResultTable

public ResultTable(org.w3c.dom.Element e)
            throws WavesetException
Build a result object from xml.

Method Detail

getElementName

public java.lang.String getElementName()
Return the XML element name, required by AbstractXmlObject.

Specified by:
getElementName in interface XmlObject
Specified by:
getElementName in class AbstractXmlObject

getName

public java.lang.String getName()
Get the table name.


setName

public void setName(java.lang.String s)
Set the table name.


getNameMsg

public Message getNameMsg()
Get the table name.


setNameMsg

public void setNameMsg(Message s)
Set the table name.


getColumns

public java.util.List getColumns()
Get the column names.


getColumn

public java.lang.String getColumn(int i)
Get a column name.


setColumns

public void setColumns(java.util.List l)
Set the column names.


addColumn

public void addColumn(java.lang.String name)
Add a column name.


removeColumn

public void removeColumn(java.lang.String name)
Remove a column name.


getRows

public java.util.List getRows()
Get the rows.


setRows

public void setRows(java.util.List l)
Set the rows.


addRow

public void addRow(java.util.List row)
Add a row.


getRow

public java.util.List getRow(java.lang.String rowName)
Search the result table for a row whose first column value matches the given value.


getColumn

public java.lang.Object getColumn(java.lang.String rowName,
                                  int column)
Search the result table and return the value of one column in one row. The row is identified by name, which is assumed to match the first column in the row. The value of the numbered column is returned.


toXml

public void toXml(java.lang.StringBuffer b,
                  int indent)
Description copied from class: AbstractXmlObject
Serialize into a buffer with optional indentation. This must be implemented by the subclass.

Specified by:
toXml in interface XmlObject
Specified by:
toXml in class AbstractXmlObject

parseXml

protected void parseXml(org.w3c.dom.Element e)
                 throws WavesetException
Throws:
WavesetException