Copyright © 2011 Citra Technologies. All Rights Reserved.

com.citra.pivot.table
Class TableCube

java.lang.Object
  extended by com.citra.pivot.table.AbstractTableObject
      extended by com.citra.pivot.table.TableCube
All Implemented Interfaces:
OlapCube, OlapObject

public class TableCube
extends AbstractTableObject
implements OlapCube

TableCube is the the concrete OlapCube implementation for the table datasource.


Field Summary
protected  DimensionList dimensions
          the cube's dimensions
protected  MeasureList measures
          the cube's measures
protected  OlapSchema schema
          the cube's schema
 
Fields inherited from class com.citra.pivot.table.AbstractTableObject
caption, description, id, name
 
Method Summary
 void addDimension(TableDimension dimension)
          Adds a dimension to the cube.
 void addSupportedLocale(Locale locale)
          Adds a locale to the cube.
 DerivedTableMeasure createDerivedMeasure(String name, Class dataType, OlapType olapType, TableMeasure inputMeasure, DerivedMeasureAggregator aggregator)
          Creates, adds and returns a derived measure, given a name, datatype, olaptype and derived aggregator.
 DerivedTableMeasure createDerivedMeasure(String name, Class dataType, TableMeasure inputMeasure, DerivedMeasureAggregator aggregator)
          Creates, adds and returns a derived measure, given a name, datatype and derived aggregator.
 StandardTableMeasure createMeasure(String name, Class dataType, int column)
          Creates, adds and returns a measure given a name and datatype.
 StandardTableMeasure createMeasure(String name, Class dataType, int column, StandardMeasureAggregator aggregator)
          Creates, adds and returns a measure, given a name, datatype, and aggregator.
 StandardTableMeasure createMeasure(String name, Class dataType, OlapType olapType, TableLeafAggregator leafAggregator, StandardMeasureAggregator aggregator)
          Creates, adds and returns a measure, given a name, datatype, olaptype, aggregator and leaf aggregator.
 StandardTableMeasure createMeasure(String name, Class dataType, TableLeafAggregator leafAggregator)
          Creates, adds and returns a measure, given a name, datatype and leaf aggregator.
 StandardTableMeasure createMeasure(String name, Class dataType, TableLeafAggregator leafAggregator, StandardMeasureAggregator aggregator)
          Creates, adds and returns a measure, given a name, datatype, aggregator and leaf aggregator.
 DimensionList getDimensions()
          Retrieves the dimensions of the cube.
 OlapDimension getMeasureDimension()
          Retrieves the measure dimension.
 MeasureList getMeasures()
          Retrieves the measures of the cube.
 OlapSchema getSchema()
          Retrieves the schema this cube belongs to.
 LocaleList getSupportedLocales()
          Retrieves the locales that are supported by this cube.
 void removeDimension(TableDimension dimension)
          Removes a dimension from the cube.
 boolean removeSupportedLocale(Locale locale)
          Removes a locale from the cube.
 
Methods inherited from class com.citra.pivot.table.AbstractTableObject
getCaption, getCaption, getDescription, getDescription, getID, getName, setCaption, setCaption, setDescription, setDescription, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.citra.pivot.olap.metadata.OlapObject
getCaption, getDescription, getID, getName
 

Field Detail

dimensions

protected DimensionList dimensions
the cube's dimensions


measures

protected MeasureList measures
the cube's measures


schema

protected OlapSchema schema
the cube's schema

Method Detail

addDimension

public void addDimension(TableDimension dimension)
Adds a dimension to the cube.

Parameters:
dimension - the dimension to add

addSupportedLocale

public void addSupportedLocale(Locale locale)
Adds a locale to the cube.

Parameters:
locale - the supported locale to add

createDerivedMeasure

public DerivedTableMeasure createDerivedMeasure(String name,
                                                Class dataType,
                                                OlapType olapType,
                                                TableMeasure inputMeasure,
                                                DerivedMeasureAggregator aggregator)
Creates, adds and returns a derived measure, given a name, datatype, olaptype and derived aggregator.

Parameters:
name - the measure's name
dataType - the measure's data type
olapType - the measure's olap type
aggregator - the measure's derived aggregator
Returns:
the derived measure that was created

createDerivedMeasure

public DerivedTableMeasure createDerivedMeasure(String name,
                                                Class dataType,
                                                TableMeasure inputMeasure,
                                                DerivedMeasureAggregator aggregator)
Creates, adds and returns a derived measure, given a name, datatype and derived aggregator.

Parameters:
name - the measure's name
dataType - the measure's data type
aggregator - the measure's derived aggregator
Returns:
the derived measure that was created

createMeasure

public StandardTableMeasure createMeasure(String name,
                                          Class dataType,
                                          int column)
Creates, adds and returns a measure given a name and datatype. The measure will use a summation leaf aggregator based on a single column of the underlying table model. Also, the measure's aggregator defaults to sum.

Parameters:
name - the measure's name
dataType - the measure's data type
column - the single column that is used in the aggregation of the leafs
Returns:
the measure that was created

createMeasure

public StandardTableMeasure createMeasure(String name,
                                          Class dataType,
                                          int column,
                                          StandardMeasureAggregator aggregator)
Creates, adds and returns a measure, given a name, datatype, and aggregator. The measure will use a summation leaf aggregator based on a single column of the underlying table model.

Parameters:
name - the measure's name
dataType - the measure's data type
column - the single column that is used in the aggregation of the leafs
aggregator - the measure's aggregator
Returns:
the measure that was created

createMeasure

public StandardTableMeasure createMeasure(String name,
                                          Class dataType,
                                          OlapType olapType,
                                          TableLeafAggregator leafAggregator,
                                          StandardMeasureAggregator aggregator)
Creates, adds and returns a measure, given a name, datatype, olaptype, aggregator and leaf aggregator.

Parameters:
name - the measure's name
dataType - the measure's data type
olapType - the measure's olap type
leafAggregator - the measure's leaf aggregator
aggregator - the measure's aggregator
Returns:
the measure that was created

createMeasure

public StandardTableMeasure createMeasure(String name,
                                          Class dataType,
                                          TableLeafAggregator leafAggregator)
Creates, adds and returns a measure, given a name, datatype and leaf aggregator. The measure's aggregator defaults to sum.

Parameters:
name - the measure's name
dataType - the measure's data type
leafAggregator - the measure's leaf aggregator
Returns:
the measure that was created

createMeasure

public StandardTableMeasure createMeasure(String name,
                                          Class dataType,
                                          TableLeafAggregator leafAggregator,
                                          StandardMeasureAggregator aggregator)
Creates, adds and returns a measure, given a name, datatype, aggregator and leaf aggregator.

Parameters:
name - the measure's name
dataType - the measure's data type
leafAggregator - the measure's leaf aggregator
aggregator - the measure's aggregator
Returns:
the measure that was created

getDimensions

public DimensionList getDimensions()
Retrieves the dimensions of the cube.

Specified by:
getDimensions in interface OlapCube
Returns:
the cube's dimensions

getMeasureDimension

public OlapDimension getMeasureDimension()
Retrieves the measure dimension.

Specified by:
getMeasureDimension in interface OlapCube
Returns:
the cube's measure dimension

getMeasures

public MeasureList getMeasures()
Retrieves the measures of the cube.

Specified by:
getMeasures in interface OlapCube
Returns:
the cube's measures

getSchema

public OlapSchema getSchema()
Retrieves the schema this cube belongs to.

Specified by:
getSchema in interface OlapCube
Returns:
the cube's schema

getSupportedLocales

public LocaleList getSupportedLocales()
Retrieves the locales that are supported by this cube.

Specified by:
getSupportedLocales in interface OlapCube
Returns:
the cube's supported locales

removeDimension

public void removeDimension(TableDimension dimension)
Removes a dimension from the cube.

Parameters:
dimension - the dimension to remove

removeSupportedLocale

public boolean removeSupportedLocale(Locale locale)
Removes a locale from the cube.

Parameters:
locale - the locale to remove

Copyright © 2011 Citra Technologies. All Rights Reserved.