org.pentaho.reporting.engine.classic.core.filter
Interface RawDataSource

All Superinterfaces:
Cloneable, DataSource, Serializable
All Known Implementing Classes:
DateFieldTemplate, DateFieldType, DateFormatFilter, DecimalFormatFilter, FormatFilter, LegacyType, NumberFieldTemplate, NumberFieldType, NumberFormatFilter, SimpleDateFormatFilter, StringFieldTemplate, StringFilter

public interface RawDataSource
extends DataSource

The raw data source allows direct access to the filtered raw data. It is mainly used in the table exports, where access to Number and Date objects is a requirement.

There is no enforced requirement to implement this interface, all exports will be able to work without it. But raw datasources definitly improve the quality and value of the generated output, so it is generally a good idea to implement it.

Author:
Thomas Morgner

Method Summary
 FormatSpecification getFormatString(ExpressionRuntime runtime, Element element, FormatSpecification formatSpecification)
          Returns information about the formatstring that was used to transform a raw-value into a formatted text.
 Object getRawValue(ExpressionRuntime runtime, Element element)
          Returns the unformated raw value.
 
Methods inherited from interface org.pentaho.reporting.engine.classic.core.filter.DataSource
clone, getValue
 

Method Detail

getRawValue

Object getRawValue(ExpressionRuntime runtime,
                   Element element)
Returns the unformated raw value. Whether that raw value is useable for the export is beyond the scope of this API definition, but providing access to Number or Date objects is a good idea.

Parameters:
runtime - the expression runtime that is used to evaluate formulas and expressions when computing the value of this filter.
element -
Returns:
the raw data.

getFormatString

FormatSpecification getFormatString(ExpressionRuntime runtime,
                                    Element element,
                                    FormatSpecification formatSpecification)
Returns information about the formatstring that was used to transform a raw-value into a formatted text. Not all elements will make use of a format-string. These elements will return FormatSpecification.TYPE_UNDEFINED in that case.

Parameters:
runtime - the Expression runtime used to possibly compute the raw-value.
element - the element to which this datasource is added.
formatSpecification - the format specification (can be null). @return a filled format specififcation. If the formatSpecification parameter was not null, this given instance is reused.