EspressReport 6.6

quadbase.util
Interface IInputData


public interface IInputData

This interface defines methods to modify the chart's input data properties, including file or database information, and accessing individual records. A handle to an object that implements this interface can be obtained by calling the getInputData method defined in QbChart.


Method Summary
 void addRow(IRow r)
          Adds a new row to the chart input data.
 void deleteRow(int rowId)
          Delete a record(row) from the chart input data.
 java.lang.String getClassFile()
          Gets the name of the input class file used to create the chart.
 IColumnMap getColumnMap()
          Returns the data column mapping information.
 IResultSet getData()
          Returns the IResultSet object containing the input chart data.
 IDatabaseInfo getDatabaseInfo()
          Gets the database info used for plotting the chart.
 java.lang.String getDataFile()
          Gets the name of the input data file used to create the chart.
 java.lang.String getDTDFile()
          Gets the name of the input dtd file used to create the chart.
 quadbase.common.util.internal.ExcelFileInfo getExcelFileInfo()
          Gets the Excel info used for the chart.
 java.lang.String getQueryFilename()
          Gets a query file (*.qry) for plotting the chart.
 IRow getRow(int rowId)
          Gets the specified row data from the chart.
 int getRowCount()
          Returns the total number of rows in the input data.
 quadbase.common.paramquery.SalesForceQueryFileInfo getSalesForceQueryInfo()
          Gets the SalesForce info used for the chart.
 ISpreadSheetModel getSpreadSheetModel()
          Returns the spread sheet model for the chart, if one is set.
 int[] getTransposedColumn()
          This method returns the transposed columns for spreadsheet format
 java.lang.String getXMLFile()
          Gets the name of the input xml file used to create the chart.
 XMLFileQueryInfo getXMLFileQueryInfo()
          Gets the xml file query info used to create the chart.
 boolean isSpreadSheetFormat()
          This flag notifies that the input result set should be treated as a spreadsheet.
 int matchRecord(IRow r)
          Get the row number containing the record that matches the input row.
 IQueryFileInfo readQueryFile(java.lang.String filename)
          Reads a query file (*.qry) and returns a IQueryFileInfo object.
 void setClassFile(java.lang.String className)
          Sets the input class file, which is used to create a chart.
 void setColumnMap(IColumnMap info)
          Set the chart column mapping.
 void setData(IResultSet rs)
          Sets the input data for the chart using an IResultSet object.
 void setDatabaseInfo(IDatabaseInfo db)
          Sets the input database information, which is used to create a chart.
 void setDatabaseInfo(IDatabaseInfo db, boolean getNewData)
          Sets the input database information, which is used to create a chart.
 void setDataFile(java.lang.String fileName)
          Sets the input data file, which is used to create a chart.
 void setDataFile(java.lang.String fileName, java.lang.String encoding)
          Sets the input data file, which is used to create a chart.
 void setExcelFileInfo(quadbase.common.util.internal.ExcelFileInfo excelInfo)
          Sets the Excel info for the chart.
 void setQueryFilename(java.lang.String filename)
          Sets a query file (*.qry) for plotting the chart.
 void setSalesForceQueryInfo(quadbase.common.paramquery.SalesForceQueryFileInfo sfQueryInfo)
          Sets the SalesForce info for the chart.
 void setSpreadSheetFormat(boolean b)
          This flag notifies the chart that the input result set should be treated as a spreadsheet.
 void setSpreadSheetFormat(boolean b, int[] transposedColumn)
          This flag notifies the chart that the input result set should be treated as a spreadsheet.
 void setSpreadSheetModel(ISpreadSheetModel sheet)
          Sets the chart's spread sheet model to the given object.
 void setXMLFile(java.lang.String xmlName)
          Sets the input xml file, which is used to create a chart.
 void setXMLFileQueryInfo(XMLFileQueryInfo xmlInfo)
          Sets the xml file query info, which is used to create a chart.
 void updateRow(int rowId, IRow r)
          Update the specified row in the chart.
 

Method Detail

getColumnMap

IColumnMap getColumnMap()
Returns the data column mapping information. i.e. which columns are used for plotting the category, series, sum-by, value, and sub-value.

Associated QbChart property: DATACOLUMN

Returns:
the chart column mapping information
See Also:
IColumnMap

setColumnMap

void setColumnMap(IColumnMap info)
Set the chart column mapping.

Parameters:
info - An instance of IColumnMap containing the column mappings.
See Also:
IColumnMap, getColumnMap()

getDatabaseInfo

IDatabaseInfo getDatabaseInfo()
Gets the database info used for plotting the chart. Only valid if the chart was created by performing a database query.

Associated QbChart property: PLOTDATA

Returns:
An object containing the database information.
See Also:
IDatabaseInfo, IQueryFileInfo

setDatabaseInfo

void setDatabaseInfo(IDatabaseInfo db)
                     throws java.lang.Exception
Sets the input database information, which is used to create a chart.

Associated QbChart property: PLOTDATA

Parameters:
db - An IDatabaseInfo implementation object containing the database connect info and search query.
Throws:
java.lang.Exception
See Also:
IDatabaseInfo, IQueryFileInfo

setDatabaseInfo

void setDatabaseInfo(IDatabaseInfo db,
                     boolean getNewData)
                     throws java.lang.Exception
Sets the input database information, which is used to create a chart.

Associated QbChart property: PLOTDATA

Parameters:
db - An IDatabaseInfo implementation object containing the database connect info and search query.
getNewData - : indicate if it is required to retrieve new data from the data source.
Throws:
java.lang.Exception

getQueryFilename

java.lang.String getQueryFilename()
Gets a query file (*.qry) for plotting the chart. A query file is a hard copy of a IQueryFileInfo object, which contains database driver, url, username, password, input parameters(if applicable) and output parameters(if applicable) IQueryFileInfo is a subclass of IDatabaseInfo

Returns:
A query file name with extension *.qry return null if no query file is used
See Also:
IDatabaseInfo, IQueryFileInfo

setQueryFilename

void setQueryFilename(java.lang.String filename)
                      throws java.lang.Exception
Sets a query file (*.qry) for plotting the chart. A query file is a hard copy of a IQueryFileInfo object, which contains database driver, url, username, password, input parameters(if applicable) and output parameters(if applicable) IQueryFileInfo is a subclass of IDatabaseInfo

Parameters:
filename - A query file name with extension *.qry
Throws:
java.lang.Exception
See Also:
IDatabaseInfo, IQueryFileInfo

readQueryFile

IQueryFileInfo readQueryFile(java.lang.String filename)
                             throws java.lang.Exception
Reads a query file (*.qry) and returns a IQueryFileInfo object.

Parameters:
filename - A query file name with extension *.qry
Returns:
A IQueryFileInfo object
Throws:
java.lang.Exception

setDataFile

void setDataFile(java.lang.String fileName)
                 throws java.io.IOException
Sets the input data file, which is used to create a chart.

Associated QbChart property: PLOTDATA

Parameters:
fileName - The name of the input data file.
Throws:
java.io.IOException

setDataFile

void setDataFile(java.lang.String fileName,
                 java.lang.String encoding)
                 throws java.io.IOException
Sets the input data file, which is used to create a chart.

Parameters:
fileName - The name of the input data file.
encoding - The encoding of the file
Throws:
java.io.IOException

getDataFile

java.lang.String getDataFile()
Gets the name of the input data file used to create the chart.

Returns:
The name of the input data file.

setClassFile

void setClassFile(java.lang.String className)
                  throws java.io.IOException
Sets the input class file, which is used to create a chart.

Parameters:
className - The name of the input class.
Throws:
java.io.IOException

getClassFile

java.lang.String getClassFile()
Gets the name of the input class file used to create the chart.

Returns:
The name of the input class file.

setXMLFileQueryInfo

void setXMLFileQueryInfo(XMLFileQueryInfo xmlInfo)
Sets the xml file query info, which is used to create a chart.

Parameters:
xmlInfo - The XMLFileQueryInfo.

getXMLFileQueryInfo

XMLFileQueryInfo getXMLFileQueryInfo()
Gets the xml file query info used to create the chart.

Returns:
The XMLFileQueryInfo.

setXMLFile

void setXMLFile(java.lang.String xmlName)
                throws java.io.IOException
Sets the input xml file, which is used to create a chart.

Parameters:
xmlName - The name of the input xml file.
Throws:
java.io.IOException

getXMLFile

java.lang.String getXMLFile()
Gets the name of the input xml file used to create the chart.

Returns:
The name of the input xml file.

getDTDFile

java.lang.String getDTDFile()
Gets the name of the input dtd file used to create the chart.

Returns:
The name of the input dtd file.

isSpreadSheetFormat

boolean isSpreadSheetFormat()
This flag notifies that the input result set should be treated as a spreadsheet. The first column in the input is assumed to be the "row label column". The other column headings (except the first) are called "column labels". The values in the remaining rows and columns are treated as cells in the spreadsheet. Before plotting the chart, data is transposed from the spreadsheet form into a tabular form. The new result set has three columns : RowLabel, ColumnLabel and Value. The RowLabel column only contains the values from the first input column. The ColumLabel column only contains values from the input column headings. Finally, each cell in the original spreadsheet is transformed into a distinct row, comprising the row label, the column label, and the value of that cell.

Such a transformation is useful when the various columns in a result set from a spreadsheet (e.g. Excel) need to be treated as different series for the same data category (denoted by the first column in the set). Note that the data types of all the columns (except the first) must be numeric and of the same type.


getTransposedColumn

int[] getTransposedColumn()
This method returns the transposed columns for spreadsheet format


setSpreadSheetFormat

void setSpreadSheetFormat(boolean b)
This flag notifies the chart that the input result set should be treated as a spreadsheet. See ISpreadSheetFormat() for details.

Parameters:
b - the status of the spreadsheet format
See Also:
isSpreadSheetFormat(), ISpreadSheetFormat

setSpreadSheetFormat

void setSpreadSheetFormat(boolean b,
                          int[] transposedColumn)
This flag notifies the chart that the input result set should be treated as a spreadsheet. See ISpreadSheetFormat() for details.

Parameters:
b - the status of the spreadsheet format
transposedColumn - - transposed column index
See Also:
isSpreadSheetFormat(), ISpreadSheetFormat

addRow

void addRow(IRow r)
Adds a new row to the chart input data.

Associated QbChart property: ADD_RECORD

Parameters:
r - An object of type quadbase.util.IRow
See Also:
IRow

deleteRow

void deleteRow(int rowId)
Delete a record(row) from the chart input data.

Associated QbChart property: DEL_RECORD

Parameters:
rowId - The row number to delete.

updateRow

void updateRow(int rowId,
               IRow r)
Update the specified row in the chart.

Associated QbChart property: UPDATE_RECORD

Parameters:
rowId - The row number to update
r - The new row values.
See Also:
IRow

getRow

IRow getRow(int rowId)
Gets the specified row data from the chart.

Associated QbChart property: GET_RECORD

Parameters:
rowId - The row number.
Returns:
The IRow object containing the row data.
See Also:
IRow

getRowCount

int getRowCount()
Returns the total number of rows in the input data.

Associated QbChart property: GET_NOOF_RECORD

Returns:
The total number of rows in the input data set.

matchRecord

int matchRecord(IRow r)
Get the row number containing the record that matches the input row.

Associated QbChart property: GET_RECORDNO

Parameters:
r - The IRow object for which the row number is desired.
Returns:
The row number in the data set.
See Also:
IRow

getData

IResultSet getData()
Returns the IResultSet object containing the input chart data.

Returns:
The IResultSet object.
See Also:
IResultSet

setData

void setData(IResultSet rs)
             throws java.lang.Exception
Sets the input data for the chart using an IResultSet object.

Parameters:
rs - The IResultSet object
Throws:
java.lang.Exception
See Also:
IResultSet

getSpreadSheetModel

ISpreadSheetModel getSpreadSheetModel()
Returns the spread sheet model for the chart, if one is set.

See Also:
ISpreadSheetModel

setSpreadSheetModel

void setSpreadSheetModel(ISpreadSheetModel sheet)
Sets the chart's spread sheet model to the given object.

Parameters:
sheet - the spreadsheet model object
See Also:
ISpreadSheetModel

getSalesForceQueryInfo

quadbase.common.paramquery.SalesForceQueryFileInfo getSalesForceQueryInfo()
Gets the SalesForce info used for the chart. Only valid if the chart was created from SalesForce data source.

Returns:
SalesForce data source information
See Also:
SalesForceQueryFileInfo

setSalesForceQueryInfo

void setSalesForceQueryInfo(quadbase.common.paramquery.SalesForceQueryFileInfo sfQueryInfo)
                            throws java.lang.Exception
Sets the SalesForce info for the chart.

Parameters:
sfQueryInfo - SalesForce data source information
Throws:
java.lang.Exception - if an error occurred
See Also:
SalesForceQueryFileInfo

getExcelFileInfo

quadbase.common.util.internal.ExcelFileInfo getExcelFileInfo()
Gets the Excel info used for the chart. Only valid if the chart was created from Excel data source.

Returns:
Excel data source information
See Also:
ExcelFileInfo

setExcelFileInfo

void setExcelFileInfo(quadbase.common.util.internal.ExcelFileInfo excelInfo)
                      throws java.lang.Exception
Sets the Excel info for the chart.

Parameters:
excelInfo - Excel data source information
Throws:
java.lang.Exception - if an error occurred
See Also:
ExcelFileInfo

EspressReport 6.6