org.palo.api
Interface Cube

All Superinterfaces:
NamedEntity, PaloObject, Writable

public interface Cube
extends PaloObject

Cube

A Cube instance corresponds to a PALO cube. Data can be read from and stored to a PALO cube.

A reference to this owner Database is obtained by invoking getDatabase().

A Cube is associated with a number of Dimensions. These Dimensions must belong to the same parent Database as the cube. (The cube's dimensions are thus a subset of the parent database's dimensions.)

Version:
$Id: Cube.html,v 1.30 2009/07/09 11:01:46 ArndHouben Exp $
See Also:
PaloAPIException

Field Summary
static int CUBEEXTENDEDTYPE_REGULAR
          Constants for cube-type
static int CUBEEXTENDEDTYPE_VIRTUAL
          Constants for cube-type
static int SPLASHMODE_BASE_ADD
          Splash-mode constant enumeration.
static int SPLASHMODE_BASE_SET
          Splash-mode constant enumeration.
static int SPLASHMODE_DEFAULT
          Splash-mode constant enumeration.
static int SPLASHMODE_DISABLED
          Splash-mode constant to disable splashing of a consolidated cell.
static int SPLASHMODE_UNKNOWN
          Splash-mode constant enumeration.
 
Fields inherited from interface org.palo.api.PaloObject
TYPE_ATTRIBUTE, TYPE_NORMAL, TYPE_SYSTEM, TYPE_USER_INFO
 
Method Summary
 CubeView addCubeView(java.lang.String name, Property[] properties)
          Adds a new cube view to this cube.
 CubeView addCubeView(java.lang.String id, java.lang.String name, Property[] properties)
          Deprecated. please use addCubeView(String, Property[]) instead
 void addDataArray(Element[][] coordinates, java.lang.Object[] values, int splashMode)
          Adds the given values to the existing values of the specified cells.
 void addProperty(Property2 property)
          Adds the given property to the list of properties for this cube.
 Rule addRule(java.lang.String definition)
          Adds the given rule definition to this cube instance
 Rule addRule(java.lang.String definition, java.lang.String externalIdentifier, boolean useIt, java.lang.String comment)
          Adds the given rule definition to this cube instance
 Rule addRule(java.lang.String definition, java.lang.String externalIdentifier, boolean useIt, java.lang.String comment, boolean activate)
          Adds the given rule definition to this cube instance
 void clear()
          Clears the complete cube, i.e. all its cells are cleared
 void clear(Element[][] area)
          Clears the cube data specified by the given area.
 void commitLog()
          Commits all setdata operations (logged in .cube.log) to the cube data file (.cube.data).
 java.lang.String[] getAllPropertyIds()
          Returns all ids of properties that can be set for this cube.
 Cell getCell(Element[] coordinate)
          Returns the Cell object for the given cube coordinate.
 Cell[] getCellArea(Element[][] coordinates)
          Returns the Cell objects for the cube area which is defined by the cartesian product of the given Element coordinates.
 java.math.BigInteger getCellCount()
          Returns the total number of Cells this cube contains.
 Cell[] getCells(Element[][] coordinates)
          Returns the Cell objects for the given cube coordinates.
 CubeView getCubeView(java.lang.String id)
          Returns the cube view which is registered with the given id or null if no such view exists.
 int getCubeViewCount()
          Returns the number of views which are registered with this Cube.
 java.lang.String[] getCubeViewIds()
          Returns the ids of all registered CubeViews
 java.lang.String getCubeViewName(java.lang.String id)
          Rturns the name of the CubeView which corresponds to the given id or null if no corresponding view exists
 CubeView[] getCubeViews()
          Deprecated. please use getCubeViews(PersistenceObserver) instead
 void getCubeViews(PersistenceObserver observer)
           
 java.lang.Object getData(Element[] coordinates)
          Returns the data stored at the given coordinates.
 java.lang.Object getData(java.lang.String[] coordinates)
          Returns the data stored at the given coordinates.
 java.lang.Object[] getDataArray(Element[][] elements)
          Returns the data stored at the given coordinates.
 java.lang.Object[] getDataArray(java.lang.String[][] elements)
          Returns the data stored at the cube area determined by the given element arrays.
 Database getDatabase()
          Returns the parent Database of this instance.
 java.lang.Object[] getDataBulk(Element[][] coordinates)
          Returns the data stored at the given coordinates.
 ExportDataset getDataExport(ExportContext context)
          Exports the dataset using given ExportContext.
 Dimension getDimensionAt(int index)
          Returns the Dimension stored at the given index.
 Dimension getDimensionById(java.lang.String id)
          Returns the Dimension associated with the given identifier or null if no such Dimension exists.
 Dimension getDimensionByName(java.lang.String name)
          Returns the Dimension stored under the given name or null if no such Dimension exists.
 int getDimensionCount()
          Returns the number of Dimensions of this instance.
 Dimension[] getDimensions()
          Returns an array of Dimension instances available for this instance.
 ExportContext getExportContext()
          Returns the default IExportContext which effects all cube elements.
 ExportContext getExportContext(Element[][] area)
          Returns an IExportContext which effects only the cube elements which are specified by the given area paramter
 int getExtendedType()
          Returns the extended-type of this Cube.
 java.math.BigInteger getFilledCellCount()
          Returns the number of filled Cells this cube contains.
 java.lang.String getName()
          Returns the name of this Cube
 Property2 getProperty(java.lang.String id)
          Returns the property identified by the given id.
 Rule getRule(Element[] coordinate)
          Returns the rule which determines the value of the cell specified by the given coordinate or null if no rule was defined for this cell
 Rule[] getRules()
          Returns all rules which are defined for the current cube
 int getType()
          Returns the type of this cube.
 boolean isAttributeCube()
          Checks if this Cube is an attribute cube, i.e.
 boolean isSubsetCube()
          Checks if this Cube is a subset cube, i.e.
 boolean isSystemCube()
          Signals if this Cube instance represents a so called system cube.
 boolean isUserInfoCube()
          Signals if this Cube instance represents a so called user info cube.
 boolean isViewCube()
          Checks if this Cube is a view cube, i.e.
 void registerViewObserver(PersistenceObserver cubeViewObserver)
          Deprecated. please use getCubeViews(PersistenceObserver) instead
 void removeCubeView(CubeView view)
          Removes the given cube view instance from the cube
 void removeProperty(java.lang.String id)
          Removes the given property from the list of properties for this cube.
 boolean removeRule(Rule rule)
          Removes the given rule from this cube instance
 boolean removeRule(java.lang.String ruleId)
          Removes the rule which corresponds to the given id from this cube instance.
 void rename(java.lang.String newName)
          Renames this Cube.
 void setData(Element[] coordinates, java.lang.Object value)
          Sets the data for the given coordinates.
 void setData(Element[] coordinate, java.lang.Object value, java.text.NumberFormat formatter)
          Deprecated. PLEASE DON'T USE! SUBJECT TO CHANGE!
 void setData(java.lang.String[] coordinates, java.lang.Object value)
          Sets the data for the given coordinates.
 void setDataArray(Element[][] coordinates, java.lang.Object[] values, boolean add, int splashMode, boolean notifyEventProcessors)
          Sets the data for multiple cells, specified by the given coordinates.
 void setDataArray(Element[][] coordinates, java.lang.Object[] values, int splashMode)
          Sets the data for multiple cells, specified by the given coordinates.
 void setDataSplashed(Element[] coordinate, java.lang.Object value)
          Sets the data for the given coordinate.
 void setDataSplashed(Element[] coordinates, java.lang.Object value, int splashMode)
          Sets the data for the given coordinates.
 void setDataSplashed(Element[] coordinate, java.lang.Object value, java.text.NumberFormat formatter)
          Deprecated. PLEASE DON'T USE! SUBJECT TO CHANGE!
 void setDataSplashed(java.lang.String[] coordinates, java.lang.Object value, int splashMode)
          Sets the data for the given coordinates.
 void unregisterViewObserver(PersistenceObserver cubeViewObserver)
          Deprecated. please use getCubeViews(PersistenceObserver) instead
 
Methods inherited from interface org.palo.api.PaloObject
getId
 
Methods inherited from interface org.palo.api.Writable
canBeModified, canCreateChildren
 

Field Detail

SPLASHMODE_DISABLED

static final int SPLASHMODE_DISABLED
Splash-mode constant to disable splashing of a consolidated cell.

See Also:
Constant Field Values

SPLASHMODE_DEFAULT

static final int SPLASHMODE_DEFAULT
Splash-mode constant enumeration.

See Also:
Constant Field Values

SPLASHMODE_BASE_ADD

static final int SPLASHMODE_BASE_ADD
Splash-mode constant enumeration.

See Also:
Constant Field Values

SPLASHMODE_BASE_SET

static final int SPLASHMODE_BASE_SET
Splash-mode constant enumeration.

See Also:
Constant Field Values

SPLASHMODE_UNKNOWN

static final int SPLASHMODE_UNKNOWN
Splash-mode constant enumeration.

See Also:
Constant Field Values

CUBEEXTENDEDTYPE_REGULAR

static final int CUBEEXTENDEDTYPE_REGULAR
Constants for cube-type

See Also:
Constant Field Values

CUBEEXTENDEDTYPE_VIRTUAL

static final int CUBEEXTENDEDTYPE_VIRTUAL
Constants for cube-type

See Also:
Constant Field Values
Method Detail

getExtendedType

int getExtendedType()
Returns the extended-type of this Cube.

Returns:
the extended-type of this Cube.

getName

java.lang.String getName()
Returns the name of this Cube

Specified by:
getName in interface NamedEntity
Returns:
the name of this Cube.

getDatabase

Database getDatabase()
Returns the parent Database of this instance.

Returns:
the parent Database of this instance.

getDimensionCount

int getDimensionCount()
Returns the number of Dimensions of this instance.

Returns:
the number of Dimensions of this instance.

getDimensionAt

Dimension getDimensionAt(int index)
Returns the Dimension stored at the given index. If the index does not correspond to a legal position in the internally managed array of dimensions of this instance, then null is returned.

Parameters:
index - the index
Returns:
the Dimension stored at the given index or null.

getDimensions

Dimension[] getDimensions()
Returns an array of Dimension instances available for this instance.

The returned array is a copy of the internal data structure. Changing the returned array does not change this instance.

Returns:
an array of Dimension instances available for this connection.

getDimensionByName

Dimension getDimensionByName(java.lang.String name)
Returns the Dimension stored under the given name or null if no such Dimension exists.

Parameters:
name - the dimension-name to look-up.
Returns:
the Dimension stored under the given name or null if no such Dimension exists.

getDimensionById

Dimension getDimensionById(java.lang.String id)
Returns the Dimension associated with the given identifier or null if no such Dimension exists.

Parameters:
id - the id of the dimension to look-up.
Returns:
the Dimension stored under the given id or null if no such Dimension exists.

commitLog

void commitLog()
Commits all setdata operations (logged in .cube.log) to the cube data file (.cube.data).


getData

java.lang.Object getData(java.lang.String[] coordinates)
Returns the data stored at the given coordinates. The given array of coordinates must be of the same length as the number of dimensions of the cube. This allows to identify a single data-cell of the cube. The coordinates-array consists of element names, one element name for each dimension

A valid coordinates specification must meet the following criteria:

Parameters:
coordinates - the coordinate array identifying the data cell.
Returns:
the value stored at the specified data-cell.

getDataArray

java.lang.Object[] getDataArray(java.lang.String[][] elements)
Returns the data stored at the cube area determined by the given element arrays.

The element arrays must meet the following criteria:

The number of returned elements is determined by the cartesian product of the given string-arrays.

Example: Suppose you have a cube with 3 dimensions which have the following names and elements.

As order matters, these dimensions would be returned in the above order when invoking getDimensions() on the cube. The following query
 cube.getDataArray(new String[][] {
   new String[] { "a1", "a2" },  // 2 elements
   new String[] { "b1", "b2" },  // 2 elements
   new String[] { "c1" },        // 1 element
 });
 
would return 2 * 2 * 1 = 4 results. Which correspond to the coordinates
   ("a1", "b1", "c1" ),
   ("a2", "b1", "c1" ),
   ("a1", "b2", "c1" ),
   ("a2", "b2", "c1" )
 
A second example shows the definition of a cell area:
 cube.getDataArray(new String[][] {
   new String[] { "a1", "a2", "a3" },  // 3 elements
   new String[] { "b1", "b2", "b3" },  // 3 elements
   new String[] { "c1" },              // 1 element
 });
 
would return 3 * 3 * 1 = 9 results. Which correspond to the coordinates
   ("a1", "b1", "c1" ), ("a2", "b1", "c1" ), ("a3", "b1", "c1" ),
   ("a1", "b2", "c1" ), ("a2", "b2", "c1" ), ("a3", "b2", "c1" ),
   ("a1", "b3", "c1" ), ("a3", "b3", "c1" ), ("a3", "b3", "c1" )
 
(The above sequence is from left to right and top to bottom)

Parameters:
elements - an array of string arrays that specifies the data to read.
Returns:
the values stored at the determined data-cells.

getData

java.lang.Object getData(Element[] coordinates)
Returns the data stored at the given coordinates. The coordinates are specified as Element instance. This method is similar to getData(String[]), the only difference is that the coordinates are now specified as element instances and not as names of elements. All preconditions of getData(String[]) apply to this method as well.

Parameters:
coordinates - the coordinate array identifying the data cell.
Returns:
the value stored at the specified data-cell.

getDataArray

java.lang.Object[] getDataArray(Element[][] elements)
Returns the data stored at the given coordinates. The coordinates are specified as Element instance. This method is similar to getDataArray(String[][]), the only difference is that the coordinates are now specified as element instances and not as names of elements. All preconditions of getDataArray(String[][]) apply to this method as well.
Note: using this method it is possible to define an area of cells which values are returned. If an area is not required it is probably easier to use getDataBulk(Element[][]).

Parameters:
elements - an array of Element-arrays that specifies the data to read. data cell.
Returns:
the values stored at the specified data-cells.
See Also:
getDataArray(String[][]), getDataBulk(Element[][])

getDataBulk

java.lang.Object[] getDataBulk(Element[][] coordinates)
Returns the data stored at the given coordinates. The coordinates are specified as Element instances. This method behaves differently from getDataArray(Element[][]) because it returns only the values from those cells which are specified, i.e. no area could be defined

Parameters:
coordinates - an array of Element-coordinates that specifies the data to read.
Returns:
the values stored at the specified cells.

setData

void setData(java.lang.String[] coordinates,
             java.lang.Object value)
Sets the data for the given coordinates. The coordinates are specified as strings which refer to element names. Consolidated coordinates will not allow writing of data.

Parameters:
coordinates - the string array identifying the data cell.
value - the value to set, the type of the value must match the element-type.

setData

void setData(Element[] coordinates,
             java.lang.Object value)
Sets the data for the given coordinates. The coordinates are specified as Element instance. Consolidated coordinates will not allow writing of data.

Parameters:
coordinates - the Element array identifying the data cell.
value - the value to set, the type of the value must match the element-type.

setDataSplashed

void setDataSplashed(Element[] coordinate,
                     java.lang.Object value)
Sets the data for the given coordinate. This method determines the splashmode from the specified value which could be optional prefixed by splash parameters.

Following splash parameters are supported:

As an example a specified value of #100 would set the consolidated cell value to 100 and distribute this to all its base cells according to their weights. An additional #19% would set the consolidated cell value to 119 and adjust the base cells accordingly.

If given value was not prefixed with a splash parameter SPLASHMODE_DEFAULT is used as splash mode. In this case calling this method is equal to setDataSplashed(Element[], Object, int)

Parameters:
coordinate - the cell coordinate
value - the value to set optional prefixed by a splash parameter.

setDataSplashed

void setDataSplashed(Element[] coordinate,
                     java.lang.Object value,
                     java.text.NumberFormat formatter)
Deprecated. PLEASE DON'T USE! SUBJECT TO CHANGE!

Sets the data for the given coordinate. This method determines the splashmode from the specified value which could be optional prefixed by splash parameters.

Following splash parameters are supported:

As an example a specified value of #100 would set the consolidated cell value to 100 and distribute this to all its base cells according to their weights. An additional #19% would set the consolidated cell value to 119 and adjust the base cells accordingly.

If given value was not prefixed with a splash parameter SPLASHMODE_DEFAULT is used as splash mode. In this case calling this method is equal to setDataSplashed(Element[], Object, int)

Parameters:
coordinate - the cell coordinate
value - the value to set optional prefixed by a splash parameter.
formatter - the NumberFormat to use to format the value. If null is specified no formatting is applied.

setData

void setData(Element[] coordinate,
             java.lang.Object value,
             java.text.NumberFormat formatter)
Deprecated. PLEASE DON'T USE! SUBJECT TO CHANGE!


setDataSplashed

void setDataSplashed(java.lang.String[] coordinates,
                     java.lang.Object value,
                     int splashMode)
Sets the data for the given coordinates. This method is identical to setData(String[], Object) except that the splashing behavior is explicitly specified.

The splashMode parameter must be set to one of the constants defined in the Cube class.

Parameters:
coordinates - the string array identifying the data cell.
value - the value to set, the type of the value must match the element-type.
splashMode - the splashMode to use.

setDataSplashed

void setDataSplashed(Element[] coordinates,
                     java.lang.Object value,
                     int splashMode)
Sets the data for the given coordinates. This method is identical to setData(String[], Object) except that the splashing behavior is explicitly specified.

The splashMode parameter must be set to one of the constants defined in the Cube class.

Parameters:
coordinates - the Element array identifying the data cell.
value - the value to set, the type of the value must match the element-type.
splashMode - the splashMode to use.

setDataArray

void setDataArray(Element[][] coordinates,
                  java.lang.Object[] values,
                  int splashMode)
Sets the data for multiple cells, specified by the given coordinates.

Note that this method is not the opposite of getDataArray() since it does not expect a defined area of cells. Instead each cell must be defined by a coordinate as an array of elements.

Parameters:
coordinates - an array of Element coordinates which identify each cell
values - the cell values to set
splashMode - the splashing mode to use

isAttributeCube

boolean isAttributeCube()
Checks if this Cube is an attribute cube, i.e. its cells represent Attribute values.

Returns:
true if this cube is an attribute cube, false otherwise

isSubsetCube

boolean isSubsetCube()
Checks if this Cube is a subset cube, i.e. its cells represent Subset definitions.

Returns:
true if this cube is a subset cube, false otherwise

isViewCube

boolean isViewCube()
Checks if this Cube is a view cube, i.e. its cells represent CubeView definitions.

Returns:
true if this cube is a view cube, false otherwise

addCubeView

CubeView addCubeView(java.lang.String id,
                     java.lang.String name,
                     Property[] properties)
Deprecated. please use addCubeView(String, Property[]) instead

Adds the specified cube view to this cube.

Note: if a view with the given id was already added before this method throws an PaloAPIException

Parameters:
id - an unique identifier for the new view
name - the view name
properties - array of Property objects for the cube view.
Returns:
the new cube view instance

addCubeView

CubeView addCubeView(java.lang.String name,
                     Property[] properties)
Adds a new cube view to this cube. It is encouraged to use this method instead of #addCubeView(String, String, boolean).

Parameters:
name - the view name
properties - array of Property objects for the cube view.
Returns:
the new cube view instance

removeCubeView

void removeCubeView(CubeView view)
Removes the given cube view instance from the cube

Parameters:
view - the cube view to remove
Throws:
PaloObjectNotFoundException - if corresponding palo object could not be found

getCubeView

CubeView getCubeView(java.lang.String id)
                     throws PaloIOException
Returns the cube view which is registered with the given id or null if no such view exists.

Parameters:
id - identifier of the view to load
Returns:
the cube view or null
Throws:
PaloIOException - to signal the occurrence of errors during loading of CubeView

getCubeViewIds

java.lang.String[] getCubeViewIds()
Returns the ids of all registered CubeViews

Returns:

getCubeViewName

java.lang.String getCubeViewName(java.lang.String id)
Rturns the name of the CubeView which corresponds to the given id or null if no corresponding view exists

Parameters:
id - a valid view identifier
Returns:
the CubeView name or null

getCubeViewCount

int getCubeViewCount()
Returns the number of views which are registered with this Cube.

Returns:
the number of views of this Cube

getCubeViews

CubeView[] getCubeViews()
Deprecated. please use getCubeViews(PersistenceObserver) instead

Returns all registered cube views. This may include views which could not be loaded completely.
Note: use registerViewObserver(PersistenceObserver) to monitor loading of cube views and to get notified about any errors during the load process

Returns:
the registered CubeViews

getCubeViews

void getCubeViews(PersistenceObserver observer)

getExportContext

ExportContext getExportContext()
Returns the default IExportContext which effects all cube elements.


getExportContext

ExportContext getExportContext(Element[][] area)
Returns an IExportContext which effects only the cube elements which are specified by the given area paramter

Parameters:
area -
Returns:
ExportContext

getDataExport

ExportDataset getDataExport(ExportContext context)
Exports the dataset using given ExportContext. If the specified context is null, he default context is used which effects all cube elements. To get the internally used context use getExportContext(), for the default context, or getExportContext(Element[][]) respectively.

Returns:
a dataset with exported cube Cells

addDataArray

void addDataArray(Element[][] coordinates,
                  java.lang.Object[] values,
                  int splashMode)
Adds the given values to the existing values of the specified cells. If a cell has no value then it is set.

Note: the splash mode must be either DISABLED, DEFAULT or ADD.

Parameters:
coordinates - specify the cells to add the values to
values - the cell value to add or set
splashMode - either DISABLED, DEFAULT or ADD

setDataArray

void setDataArray(Element[][] coordinates,
                  java.lang.Object[] values,
                  boolean add,
                  int splashMode,
                  boolean notifyEventProcessors)
Sets the data for multiple cells, specified by the given coordinates. Additionally one can define if the given values should be added to existing ones and if the external supervision server should be notified, which is the default. Note: to disable the notification of the supervision server admin rights are required.

The supervision server is an external process which listens to changes within a certain area of a palo cube. For more detailed information please refer to www.jedox.com

Parameters:
coordinates - specify the cells to change
values - the values to set or add
add - set to true to add the given values, to false otherwise
splashMode - if values should be added then the splash mode has to be either DISABLED, DEFAULT or ADD
notifyEventProcessors - set to false to disable the notification of the external event processors, true otherwise. Changing the default requires admin user rights.

getRules

Rule[] getRules()
Returns all rules which are defined for the current cube

Returns:
all defined rules

addRule

Rule addRule(java.lang.String definition)
Adds the given rule definition to this cube instance

Parameters:
definition - a valid rule definition
Returns:
a new rule instance represented by this definition

addRule

Rule addRule(java.lang.String definition,
             java.lang.String externalIdentifier,
             boolean useIt,
             java.lang.String comment)
Adds the given rule definition to this cube instance

Parameters:
definition - a valid rule definition
externalIdentifier - an optional external identifier
useIt - set to true to use external identifier, otherwise to false
comment - an optional comment for this rule
Returns:
a new rule instance represented by this definition

addRule

Rule addRule(java.lang.String definition,
             java.lang.String externalIdentifier,
             boolean useIt,
             java.lang.String comment,
             boolean activate)
Adds the given rule definition to this cube instance

Parameters:
definition - a valid rule definition
externalIdentifier - an optional external identifier
useIt - set to true to use external identifier, otherwise to false
comment - an optional comment for this rule
activate - specify if the added rule should be active or not
Returns:
a new rule instance represented by this definition

removeRule

boolean removeRule(Rule rule)
Removes the given rule from this cube instance

Parameters:
rule - the rule to remove
Returns:
true if deleting the rule was successful, false otherwise

removeRule

boolean removeRule(java.lang.String ruleId)
Removes the rule which corresponds to the given id from this cube instance. This method is useful to delete rules on the server which could not be loaded. However, the preferred way to delete a rule is to use removeRule(Rule rule).

Parameters:
ruleId - the identifier of the rule to delete
Returns:

getRule

Rule getRule(Element[] coordinate)
Returns the rule which determines the value of the cell specified by the given coordinate or null if no rule was defined for this cell

Parameters:
coordinate - the cell coordinate
Returns:
rule instance which determines cell value or null if none was specified
Throws:
PaloAPIException - if rule loading fails

isSystemCube

boolean isSystemCube()
Signals if this Cube instance represents a so called system cube. NOTE: native support for system cubes is only available since palo server 1.5

Returns:
true if this cube is a system cube, false otherwise

isUserInfoCube

boolean isUserInfoCube()
Signals if this Cube instance represents a so called user info cube. NOTE: native support for system cubes is only available since palo server 2.0

Returns:
true if this cube is a user info cube, false otherwise

getType

int getType()
Returns the type of this cube. This is one of the constants defined in this class.

Specified by:
getType in interface PaloObject
Returns:
type of this cube.

registerViewObserver

void registerViewObserver(PersistenceObserver cubeViewObserver)
Deprecated. please use getCubeViews(PersistenceObserver) instead

Registers the given PersistenceObserver to the list of observers which monitor the loading and saving process of cube views. The observer will be notified about any load success or fail.

Parameters:
cubeViewObserver - the PersistenceObserver to register

unregisterViewObserver

void unregisterViewObserver(PersistenceObserver cubeViewObserver)
Deprecated. please use getCubeViews(PersistenceObserver) instead

Removes given PersistenceObserver from the list of observers

Parameters:
cubeViewObserver - the PersistenceObserver to remove

rename

void rename(java.lang.String newName)
Renames this Cube.

Parameters:
name - the new name for this Cube.

clear

void clear()
Clears the complete cube, i.e. all its cells are cleared


clear

void clear(Element[][] area)
Clears the cube data specified by the given area. The area is described by the cartesian product of the given Element coordinates. Please refer to getDataArray(String[][]) for a description of a correct area definition.

Parameters:
area - an array of coordinates which define the area of cube data to be cleared

getAllPropertyIds

java.lang.String[] getAllPropertyIds()
Returns all ids of properties that can be set for this cube. If no properties are known to this cube, an empty array is returned.

Returns:
all property ids that are understood by this cube.

getProperty

Property2 getProperty(java.lang.String id)
Returns the property identified by the given id. All valid ids can be requested by a call to getAllPropertyIds.

Parameters:
id - the id of the property to read.
Returns:
the property for the given id.

addProperty

void addProperty(Property2 property)
Adds the given property to the list of properties for this cube.

Parameters:
property - the property to add.

removeProperty

void removeProperty(java.lang.String id)
Removes the given property from the list of properties for this cube. If the specified id was not set, the call is ignored.

Parameters:
id - the id of the property which is to be cleared.

getCell

Cell getCell(Element[] coordinate)
Returns the Cell object for the given cube coordinate. Please note that cells are not cached by the API! Each invocation of this method will create new cell instance!

Returns:
the cell specified by the coordinate

getCells

Cell[] getCells(Element[][] coordinates)
Returns the Cell objects for the given cube coordinates. Please note that cells are not cached by the API! Each invocation of this method will create new cell instances!

Parameters:
coordinates - an array of Element coordinates which specify the cells to return
Returns:
the cells at the given coordinates

getCellArea

Cell[] getCellArea(Element[][] coordinates)
Returns the Cell objects for the cube area which is defined by the cartesian product of the given Element coordinates. Please note that cells are not cached by the API! Each invocation of this method will create new cell instances!

Parameters:
coordinates - an array of Element coordinates defining the cube area.
Returns:
the cells of the defined area.

getCellCount

java.math.BigInteger getCellCount()
Returns the total number of Cells this cube contains.

Returns:
total number of cells

getFilledCellCount

java.math.BigInteger getFilledCellCount()
Returns the number of filled Cells this cube contains.

Returns:
number of filled cells