JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.table.data
Class JCXMLFormatParser

java.lang.Object
  |
  +--com.klg.jclass.table.data.JCXMLFormatParser
All Implemented Interfaces:
JCFileFormatParser, JCTablePopulator

public class JCXMLFormatParser
extends Object
implements JCFileFormatParser, JCTablePopulator

This class takes in a stream of data and parses it under the assumption it is in the defined XML format JClass LiveTable uses. This format is defined in com.klg.jclass.util.xml.JCTableXMLParser.


Field Summary
protected  com.klg.jclass.table.data.JCVectorDataSource dataSource
          The data source to populate with the data.
 
Constructor Summary
JCXMLFormatParser()
           
 
Method Summary
 void readAndParse(Reader r, com.klg.jclass.table.data.JCVectorDataSource ds)
          Reads and parses data in the defined XML format and places it inside a LiveTable data source.
 void setTableData(Vector rowV, Vector rowLabelV, Vector colLabelV, int nrows, int ncols)
          Populates the table with the given data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dataSource

protected com.klg.jclass.table.data.JCVectorDataSource dataSource
The data source to populate with the data.

Constructor Detail

JCXMLFormatParser

public JCXMLFormatParser()
Method Detail

readAndParse

public void readAndParse(Reader r,
                         com.klg.jclass.table.data.JCVectorDataSource ds)
                  throws IOException
Reads and parses data in the defined XML format and places it inside a LiveTable data source.

Specified by:
readAndParse in interface JCFileFormatParser
Parameters:
r - reader open on an active stream
ds - JCVectorDataSource instance to act as a container for the data read in from r
Throws:
IOException

setTableData

public void setTableData(Vector rowV,
                         Vector rowLabelV,
                         Vector colLabelV,
                         int nrows,
                         int ncols)
Populates the table with the given data. Implemented from the JCTablePopulator interface.

Specified by:
setTableData in interface JCTablePopulator
Parameters:
rowV - a vector of vectors, where each inside vector represents one row in the table
rowLabelV - a vector containing the row labels for this table
colLabelV - a vector containing the column labels for this table
nrows - the number of rows in this table
ncols - the number of columns in this table

Copyright © 2004 Quest Software Inc..
All rights reserved.