com.sas.storage.jdbc.export
Class RelationalExcelXMLExporter

com.sas.storage.jdbc.export.RelationalExcelXMLExporter
All Implemented Interfaces:
ExportExcelXMLInterface, RelationalExportInterface

public class RelationalExcelXMLExporter
implements ExportExcelXMLInterface

Exporter class that tranforms non multidimensional data into an MS Excel XML data stream .

Since:
3.1

Constructor Summary
RelationalExcelXMLExporter()
           
 
Method Summary
 java.lang.String getColumnHeaderLine(java.lang.Object[] columnHeaders)
          Generates a string containing the values of the column headers to export.
 java.lang.String getFileHeader()
          Returns what is used as the header of the exported file.
 java.lang.String getFileTrailer()
          Returns what is used as the trailer of the exported file.
 java.lang.String getLine(java.lang.Object rowHeader, java.lang.Object[] data)
          Generates a string containing the values of the rowHeader (if not null) followed by the values of the data to export.
protected  java.lang.String getStyleDefinitions()
          Returns the style definitions for an Excel XML document.
protected  java.lang.String getWorkbookHeader()
          Returns the definition of a workbook header for an Excel XML document.
protected  java.lang.String getWorkbookTrailer()
          Returns the workbook trailer for an Excel XML document.
protected  java.lang.String getWorksheetHeader()
          Returns the definition of a worksheet header for an Excel XML document.
protected  java.lang.String getWorksheetTrailer()
          Returns the worksheet trailer for an Excel XML document.
protected  java.lang.String objectToString(java.lang.Object value)
          Transforms an Object into a String.
 void setColumnCount(int columnCount)
          Set the number of columns of data to export in the XML file.
 void setRowCount(int rowCount)
          Set the number of rows of data to export in the XML file.
protected  void writeString(java.lang.String str, java.lang.StringBuffer line)
          Writes a string into a StringBuffer.
 

Constructor Detail

RelationalExcelXMLExporter

public RelationalExcelXMLExporter()
Method Detail

getFileHeader

public java.lang.String getFileHeader()
Description copied from interface: RelationalExportInterface
Returns what is used as the header of the exported file.

Specified by:
getFileHeader in interface RelationalExportInterface
Returns:
String The header of the exported file.

getColumnHeaderLine

public java.lang.String getColumnHeaderLine(java.lang.Object[] columnHeaders)
Description copied from interface: RelationalExportInterface
Generates a string containing the values of the column headers to export.

Specified by:
getColumnHeaderLine in interface RelationalExportInterface
Parameters:
columnHeaders - The column header objects.
Returns:
String The values of the column headers to export.

getLine

public java.lang.String getLine(java.lang.Object rowHeader,
                                java.lang.Object[] data)
Description copied from interface: RelationalExportInterface
Generates a string containing the values of the rowHeader (if not null) followed by the values of the data to export.

Specified by:
getLine in interface RelationalExportInterface
Parameters:
rowHeader - The object holding the row header value.
data - The object holding the data values.
Returns:
String The string containing the values of the rowHeader followed by the values of the data to export.

getFileTrailer

public java.lang.String getFileTrailer()
Description copied from interface: RelationalExportInterface
Returns what is used as the trailer of the exported file.

Specified by:
getFileTrailer in interface RelationalExportInterface
Returns:
String The trailer of the exported file.

setRowCount

public void setRowCount(int rowCount)
Description copied from interface: ExportExcelXMLInterface
Set the number of rows of data to export in the XML file.

Specified by:
setRowCount in interface ExportExcelXMLInterface
Parameters:
rowCount - the number of rows of data to export in the XML file.

setColumnCount

public void setColumnCount(int columnCount)
Description copied from interface: ExportExcelXMLInterface
Set the number of columns of data to export in the XML file.

Specified by:
setColumnCount in interface ExportExcelXMLInterface
Parameters:
columnCount - the number of columns of data to export in the XML file.

writeString

protected void writeString(java.lang.String str,
                           java.lang.StringBuffer line)
Writes a string into a StringBuffer.

Parameters:
str - The string to write.
line - The StringBuffer to fill.

getWorkbookHeader

protected java.lang.String getWorkbookHeader()
Returns the definition of a workbook header for an Excel XML document.

Returns:
String The definition of a workbook header for an Excel XML document.

getStyleDefinitions

protected java.lang.String getStyleDefinitions()
Returns the style definitions for an Excel XML document.

Returns:
String The style definitions for an Excel XML document.

getWorksheetHeader

protected java.lang.String getWorksheetHeader()
Returns the definition of a worksheet header for an Excel XML document.

Returns:
String The definition of a worksheet header for an Excel XML document.

getWorksheetTrailer

protected java.lang.String getWorksheetTrailer()
Returns the worksheet trailer for an Excel XML document.

Returns:
String The worksheet trailer for an Excel XML document.

getWorkbookTrailer

protected java.lang.String getWorkbookTrailer()
Returns the workbook trailer for an Excel XML document.

Returns:
String The workbook trailer for an Excel XML document.

objectToString

protected java.lang.String objectToString(java.lang.Object value)
Transforms an Object into a String.

Parameters:
value - The object to transform.
Returns:
String The transformed object.



Copyright © 2009 SAS Institute Inc. All Rights Reserved.