com.sas.dataselectors.export
Class BaseExportSelectorAdapter

com.sas.dataselectors.export.BaseExportSelectorAdapter
All Implemented Interfaces:
ExportHeadersFootersInterface, ExportSelectorInterface, HTMLExportSelectorInterface
Direct Known Subclasses:
OLAPExportSelectorAdapter, RelationalExportSelectorAdapter

public abstract class BaseExportSelectorAdapter
implements ExportSelectorInterface, HTMLExportSelectorInterface, ExportHeadersFootersInterface

Base class that contains attributes and methods common to the different actual ExportSelector adapters.

It's an implementation of an ExportSelector adapter for non multidimensional (relational) data.

Since:
3.1

Field Summary
protected  HTMLExportCSSInfoInterface[] cssDefinitions
          The HTMLExportCSSInfoInterface objects that contain the info on the CSSs to be exported.
protected  java.lang.String[] cssMediaList
          The media attributes of the CSSs to be exported together with the data.
protected  java.lang.String[] cssMIMEType
          The MIME types of the CSSs to be exported together with the data.
protected  java.lang.String[] cssTitle
          The title attributes of the CSSs to be exported together with the data.
protected  java.lang.String[] cssURL
          The URLs of the CSSs to be exported together with the data.
protected  java.lang.Object dataModel
          The model that contains the data to export.
protected  java.lang.String[] footers
          The footers to export below the data.
protected  int fromRow
          The ordinal in the model of the first row to be exported.
protected  java.lang.String[] headers
          The headers to export above the data.
protected  java.lang.String includeRows
          If all or a subset of the rows in the model have to be exported.
protected  boolean isFormattedData
          If the data have to be exported formatted or non formatted.
protected  java.lang.String outputType
          The requested exporting format.
protected  int toRow
          The ordinal in the model of the last row to be exported.
 
Fields inherited from interface com.sas.dataselectors.export.ExportSelectorInterface
ALL_ROWS, EXCEL_CSV_OUTPUT_TYPE, EXCEL_HTML_OUTPUT_TYPE, EXCEL_TSV_OUTPUT_TYPE, EXCEL_XML_OUTPUT_TYPE, EXPORT_TO, FORMATTED_DATA, MAX_NROWS, MIN_NROWS, NOT_REPEAT_ROW_LABELS, PARTIAL_ROWS, RAW_DATA, REPEAT_ROW_LABELS, SAVE_AS, WORD_HTML_OUTPUT_TYPE
 
Constructor Summary
BaseExportSelectorAdapter()
          Default constructor.
 
Method Summary
 HTMLExportCSSInfoInterface[] getCSSInfo()
          Given the URLS, the MIME types, the media lists and the titles of the CSS style sheets, stores them into an array of HTMLExportCSSInfoInterface objects and returns the array.
 java.lang.String[] getCssMediaList()
          returns the media lists of the CSS style sheets.
 java.lang.String[] getCssMIMEType()
          returns the MIME types of the CSS style sheets.
 java.lang.String[] getCssTitle()
          returns the titles of the CSS style sheets.
 java.lang.String[] getCssURL()
          Returns the URLs of the CSS style sheets.
 java.lang.Object getDataModel()
          Returns the model that contains the data to export.
 java.lang.String[] getFooters()
          Returns the footers to export below the data.
 int getFromRowCount()
          If partial rows must be exported it returns the row number of the first row to export.
 java.lang.String[] getHeaders()
          Returns the headers to export above the data.
 java.lang.String getIncludeRows()
          Returns the value indicating if all the rows or only partial rows must be exported.
 int getNRows()
          Returns the number of rows to export
 java.lang.String getOutputType()
          Returns the output type that has been selected in the selector.
 int getStartRow()
          Returns the ordinal in the model of the first row to be exported
 int getToRowCount()
          If partial rows must be exported it returns the row number of the last row to export.
 boolean isFormattedData()
          Returns true if formatted data must be exported, false otherwise.
 boolean isRawDataAvailable()
          Deprecated.  
 void setCssMediaList(java.lang.String[] value)
          Sets the media lists of the CSS style sheets.
 void setCssMIMEType(java.lang.String[] value)
          Sets the MIME types of the CSS style sheets.
 void setCssTitle(java.lang.String[] value)
          Sets the titles of the CSS style sheets.
 void setCssURL(java.lang.String[] value)
          Sets the URLs of the CSS style sheets.
 void setDataModel(java.lang.Object model)
          Sets the model that contains the data to export.
 void setFooters(java.lang.String[] footers)
          Sets the footers to export below the data.
 void setFromRowCount(int fromRow)
          If partial rows must be exported it sets the row number of the first row to export.
 void setHeaders(java.lang.String[] headers)
          Sets the headers to export above the data.
 void setIncludeRows(java.lang.String includeRows)
          Sets the value that indicates if all the rows or only partial rows must be exported.
 void setIsFormattedData(boolean isFormattedData)
          Sets the flag indicating if formatted data must be exported.
 void setOutputType(java.lang.String outputType)
          Sets the output type that has been selected in the selector.
 void setToRowCount(int toRow)
          If partial rows must be exported it sets the row number of the last row to export.
 

Field Detail

dataModel

protected java.lang.Object dataModel
The model that contains the data to export.


outputType

protected java.lang.String outputType
The requested exporting format.

See Also:
ExportSelectorInterface.EXCEL_TSV_OUTPUT_TYPE, ExportSelectorInterface.EXCEL_CSV_OUTPUT_TYPE, ExportSelectorInterface.EXCEL_XML_OUTPUT_TYPE, ExportSelectorInterface.EXCEL_HTML_OUTPUT_TYPE

includeRows

protected java.lang.String includeRows
If all or a subset of the rows in the model have to be exported.

See Also:
ExportSelectorInterface.ALL_ROWS, ExportSelectorInterface.PARTIAL_ROWS

fromRow

protected int fromRow
The ordinal in the model of the first row to be exported.


toRow

protected int toRow
The ordinal in the model of the last row to be exported.


isFormattedData

protected boolean isFormattedData
If the data have to be exported formatted or non formatted.


cssURL

protected java.lang.String[] cssURL
The URLs of the CSSs to be exported together with the data.

Used only when exporting to HTML.


cssMIMEType

protected java.lang.String[] cssMIMEType
The MIME types of the CSSs to be exported together with the data.

Used only when exporting to HTML.


cssMediaList

protected java.lang.String[] cssMediaList
The media attributes of the CSSs to be exported together with the data.

Used only when exporting to HTML.


cssTitle

protected java.lang.String[] cssTitle
The title attributes of the CSSs to be exported together with the data.

Used only when exporting to HTML.


cssDefinitions

protected HTMLExportCSSInfoInterface[] cssDefinitions
The HTMLExportCSSInfoInterface objects that contain the info on the CSSs to be exported.

Used only when exporting to HTML.


headers

protected java.lang.String[] headers
The headers to export above the data.


footers

protected java.lang.String[] footers
The footers to export below the data.

Constructor Detail

BaseExportSelectorAdapter

public BaseExportSelectorAdapter()
Default constructor.

Method Detail

setDataModel

public void setDataModel(java.lang.Object model)
Sets the model that contains the data to export.

Parameters:
model - the model that contains the data to export.

getDataModel

public java.lang.Object getDataModel()
Returns the model that contains the data to export.

Returns:
BusinessQuery the model that contains the data to export.

getOutputType

public java.lang.String getOutputType()
Description copied from interface: ExportSelectorInterface
Returns the output type that has been selected in the selector.

Specified by:
getOutputType in interface ExportSelectorInterface
Returns:
String the output type that has been selected in the selector. Possible values are: ExportSelectorInterface.EXCEL_TSV_OUTPUT_TYPE, ExportSelectorInterface.EXCEL_CSV_OUTPUT_TYPE, ExportSelectorInterface.EXCEL_XML_OUTPUT_TYPE, ExportSelectorInterface.EXCEL_HTML_OUTPUT_TYPE

setOutputType

public void setOutputType(java.lang.String outputType)
Description copied from interface: ExportSelectorInterface
Sets the output type that has been selected in the selector.

Specified by:
setOutputType in interface ExportSelectorInterface
Parameters:
outputType - the output type that has been selected in the selector. Valid values are: ExportSelectorInterface.EXCEL_TSV_OUTPUT_TYPE, ExportSelectorInterface.EXCEL_CSV_OUTPUT_TYPE, ExportSelectorInterface.EXCEL_XML_OUTPUT_TYPE, ExportSelectorInterface.EXCEL_HTML_OUTPUT_TYPE

getIncludeRows

public java.lang.String getIncludeRows()
Description copied from interface: ExportSelectorInterface
Returns the value indicating if all the rows or only partial rows must be exported.

Specified by:
getIncludeRows in interface ExportSelectorInterface
Returns:
String the value indicating if all the rows or only partial rows must be exported. Possible values are: ExportSelectorInterface.ALL_ROWS or ExportSelectorInterface.PARTIAL_ROWS.

setIncludeRows

public void setIncludeRows(java.lang.String includeRows)
Description copied from interface: ExportSelectorInterface
Sets the value that indicates if all the rows or only partial rows must be exported.

Specified by:
setIncludeRows in interface ExportSelectorInterface
Parameters:
includeRows - the value indicating if all the rows or only partial rows must be exported. Possible values are: ExportSelectorInterface.ALL_ROWS or ExportSelectorInterface.PARTIAL_ROWS.

getFromRowCount

public int getFromRowCount()
Description copied from interface: ExportSelectorInterface
If partial rows must be exported it returns the row number of the first row to export.

Specified by:
getFromRowCount in interface ExportSelectorInterface
Returns:
int the row number of the first row to export.

setFromRowCount

public void setFromRowCount(int fromRow)
Description copied from interface: ExportSelectorInterface
If partial rows must be exported it sets the row number of the first row to export.

Specified by:
setFromRowCount in interface ExportSelectorInterface
Parameters:
fromRow - the row number of the first row to export.

getToRowCount

public int getToRowCount()
Description copied from interface: ExportSelectorInterface
If partial rows must be exported it returns the row number of the last row to export.

Specified by:
getToRowCount in interface ExportSelectorInterface
Returns:
int the row number of the last row to export.

setToRowCount

public void setToRowCount(int toRow)
Description copied from interface: ExportSelectorInterface
If partial rows must be exported it sets the row number of the last row to export.

Specified by:
setToRowCount in interface ExportSelectorInterface
Parameters:
toRow - the row number of the last row to export.

isFormattedData

public boolean isFormattedData()
Description copied from interface: ExportSelectorInterface
Returns true if formatted data must be exported, false otherwise.

Specified by:
isFormattedData in interface ExportSelectorInterface
Returns:
boolean true if formatted data must be exported, false otherwise.

setIsFormattedData

public void setIsFormattedData(boolean isFormattedData)
Description copied from interface: ExportSelectorInterface
Sets the flag indicating if formatted data must be exported.

Specified by:
setIsFormattedData in interface ExportSelectorInterface
Parameters:
isFormattedData - true if formatted data must be exported, false otherwise.

getStartRow

public int getStartRow()
Description copied from interface: ExportSelectorInterface
Returns the ordinal in the model of the first row to be exported

Specified by:
getStartRow in interface ExportSelectorInterface
Returns:
int the ordinal in the model of the first row to be exported

getNRows

public int getNRows()
Description copied from interface: ExportSelectorInterface
Returns the number of rows to export

Specified by:
getNRows in interface ExportSelectorInterface
Returns:
int the number of rows to export

isRawDataAvailable

public boolean isRawDataAvailable()
Deprecated. 

Description copied from interface: ExportSelectorInterface
Returns true if the model can return raw data, false if the model can return only formatted data

Specified by:
isRawDataAvailable in interface ExportSelectorInterface
Returns:
boolean true if the model can return raw data, false if the model can return only formatted data

getCssURL

public java.lang.String[] getCssURL()
Description copied from interface: HTMLExportSelectorInterface
Returns the URLs of the CSS style sheets.

Specified by:
getCssURL in interface HTMLExportSelectorInterface
Returns:
String[] the URLs of the CSS style sheets.

setCssURL

public void setCssURL(java.lang.String[] value)
Description copied from interface: HTMLExportSelectorInterface
Sets the URLs of the CSS style sheets.

Specified by:
setCssURL in interface HTMLExportSelectorInterface
Parameters:
value - The URLs of the CSS style sheets.

getCssMIMEType

public java.lang.String[] getCssMIMEType()
Description copied from interface: HTMLExportSelectorInterface
returns the MIME types of the CSS style sheets.

Specified by:
getCssMIMEType in interface HTMLExportSelectorInterface
Returns:
String[] The MIME types of the CSS style sheets.

setCssMIMEType

public void setCssMIMEType(java.lang.String[] value)
Description copied from interface: HTMLExportSelectorInterface
Sets the MIME types of the CSS style sheets.

Specified by:
setCssMIMEType in interface HTMLExportSelectorInterface
Parameters:
value - The MIME types of the CSS style sheets.

getCssMediaList

public java.lang.String[] getCssMediaList()
Description copied from interface: HTMLExportSelectorInterface
returns the media lists of the CSS style sheets.

Specified by:
getCssMediaList in interface HTMLExportSelectorInterface
Returns:
String[] The media lists of the CSS style sheets.

setCssMediaList

public void setCssMediaList(java.lang.String[] value)
Description copied from interface: HTMLExportSelectorInterface
Sets the media lists of the CSS style sheets.

Specified by:
setCssMediaList in interface HTMLExportSelectorInterface
Parameters:
value - The media lists of the CSS style sheets.

getCssTitle

public java.lang.String[] getCssTitle()
Description copied from interface: HTMLExportSelectorInterface
returns the titles of the CSS style sheets.

Specified by:
getCssTitle in interface HTMLExportSelectorInterface
Returns:
String[] The titles of the CSS style sheets.

setCssTitle

public void setCssTitle(java.lang.String[] value)
Description copied from interface: HTMLExportSelectorInterface
Sets the titles of the CSS style sheets.

Specified by:
setCssTitle in interface HTMLExportSelectorInterface
Parameters:
value - The titles of the CSS style sheets.

getCSSInfo

public HTMLExportCSSInfoInterface[] getCSSInfo()
Description copied from interface: HTMLExportSelectorInterface
Given the URLS, the MIME types, the media lists and the titles of the CSS style sheets, stores them into an array of HTMLExportCSSInfoInterface objects and returns the array.

Into the returned array there's one HTMLExportCSSInfoInterface object for each CSS style sheet.

Specified by:
getCSSInfo in interface HTMLExportSelectorInterface
Returns:
com.sas.dataselectors.export.HTMLExportCSSInfoInterface[] The HTMLExportCSSInfoInterface objects containing the info about the CSS style sheets.

setHeaders

public void setHeaders(java.lang.String[] headers)
Description copied from interface: ExportHeadersFootersInterface
Sets the headers to export above the data.

Specified by:
setHeaders in interface ExportHeadersFootersInterface
Parameters:
headers - the headers to export above the data.

getHeaders

public java.lang.String[] getHeaders()
Description copied from interface: ExportHeadersFootersInterface
Returns the headers to export above the data.

Specified by:
getHeaders in interface ExportHeadersFootersInterface
Returns:
the headers to export above the data.

getFooters

public java.lang.String[] getFooters()
Description copied from interface: ExportHeadersFootersInterface
Returns the footers to export below the data.

Specified by:
getFooters in interface ExportHeadersFootersInterface
Returns:
the footers to export below the data.

setFooters

public void setFooters(java.lang.String[] footers)
Description copied from interface: ExportHeadersFootersInterface
Sets the footers to export below the data.

Specified by:
setFooters in interface ExportHeadersFootersInterface
Parameters:
footers - the headers to export below the data.



Copyright © 2009 SAS Institute Inc. All Rights Reserved.