SMWAggregatablePrinter Class Reference

Inherits SMWResultPrinter.

Inherited by SRFjqPlotBar, and SRFjqPlotPie.

List of all members.

Public Member Functions

 getParameters ()

Protected Member Functions

 getFormatOutput (array $data)
 Create the formats output given the result data and return it.
 addResources ()
 Method gets called right before the result is returned in case there are values to display.
 getResultText (SMWQueryResult $result, $outputmode)
 (non-PHPdoc)
 applyDistributionParams (array &$data)
 Apply the distribution specific parameters.
 getResults (SMWQueryResult $result, $outputmode)
 Gets and processes the results so they can be fed directly to the getFormatOutput method.
 getDistributionResults (SMWQueryResult $result, $outputmode)
 Counts all the occurances of all values in the query result, and returns an array with as key the value and as value the count.
 getNumericResults (SMWQueryResult $res, $outputmode)
 Returns an array with the numerical data in the query result.
 addNumbersForDataItem (SMWDataItem $dataItem, array &$values, $name)
 Adds all numbers contained in a dataitem to the list.


Detailed Description

Definition at line 23 of file SMW_QP_Aggregatable.php.


Member Function Documentation

SMWAggregatablePrinter::getFormatOutput ( array $  data  )  [abstract, protected]

Create the formats output given the result data and return it.

Since:
1.7
Parameters:
array $data label => value

Reimplemented in SRFjqPlotBar, and SRFjqPlotPie.

Referenced by getResultText().

SMWAggregatablePrinter::addResources (  )  [protected]

Method gets called right before the result is returned in case there are values to display.

It is meant for adding resources such as JS and CSS only needed for this format when it has actual values.

Since:
1.7

Reimplemented in SRFjqPlotBar, and SRFjqPlotPie.

Definition at line 42 of file SMW_QP_Aggregatable.php.

Referenced by getResultText().

SMWAggregatablePrinter::getResultText ( SMWQueryResult result,
outputmode 
) [protected]

(non-PHPdoc)

See also:
SMWResultPrinter::getResultText()

Reimplemented from SMWResultPrinter.

Definition at line 48 of file SMW_QP_Aggregatable.php.

References addResources(), applyDistributionParams(), getFormatOutput(), and getResults().

SMWAggregatablePrinter::applyDistributionParams ( array &$  data  )  [protected]

Apply the distribution specific parameters.

Since:
1.7
Parameters:
array $data

Definition at line 77 of file SMW_QP_Aggregatable.php.

Referenced by getResultText().

SMWAggregatablePrinter::getResults ( SMWQueryResult result,
outputmode 
) [protected]

Gets and processes the results so they can be fed directly to the getFormatOutput method.

They are returned as an array with the keys being the labels and the values being their corresponding (numeric) values.

Since:
1.7
Parameters:
SMWQueryResult $result
$outputmode 
Returns:
array label => value

Definition at line 102 of file SMW_QP_Aggregatable.php.

References getDistributionResults(), and getNumericResults().

Referenced by getResultText().

SMWAggregatablePrinter::getDistributionResults ( SMWQueryResult result,
outputmode 
) [protected]

Counts all the occurances of all values in the query result, and returns an array with as key the value and as value the count.

Since:
1.7
Parameters:
SMWQueryResult $res
$outputmode 
Returns:
array label => value

Definition at line 122 of file SMW_QP_Aggregatable.php.

References SMWResultPrinter::getLinker().

Referenced by getResults().

SMWAggregatablePrinter::getNumericResults ( SMWQueryResult res,
outputmode 
) [protected]

Returns an array with the numerical data in the query result.

Since:
1.7
Parameters:
SMWQueryResult $res
$outputmode 
Returns:
array label => value

Definition at line 159 of file SMW_QP_Aggregatable.php.

References addNumbersForDataItem().

Referenced by getResults().

SMWAggregatablePrinter::addNumbersForDataItem ( SMWDataItem dataItem,
array &$  values,
name 
) [protected]

Adds all numbers contained in a dataitem to the list.

Since:
1.7
Parameters:
SMWDataItem $dataItem
array $values
string $name

Definition at line 189 of file SMW_QP_Aggregatable.php.

References SMWDataItem::TYPE_CONTAINER, and SMWDataItem::TYPE_NUMBER.

Referenced by getNumericResults().

SMWAggregatablePrinter::getParameters (  ) 

See also:
SMWResultPrinter::getParameters
Since:
1.7

Reimplemented from SMWResultPrinter.

Reimplemented in SRFjqPlotBar, and SRFjqPlotPie.

Definition at line 207 of file SMW_QP_Aggregatable.php.

References SMWResultPrinter::$params.


The documentation for this class was generated from the following file:

Generated on Sun Mar 18 07:15:42 2012 for Semantic MediaWiki by  doxygen 1.5.6