org.palo.api
Interface CubeView

All Superinterfaces:
NamedEntity

public interface CubeView
extends NamedEntity

A CubeView reflects a certain state of its corresponding palo cube. Therefore each cube view consists of one or more so called Axis which allows the sorting of the cube dimensions. E.g. the palo client defines axes for a cube table, like column and row, and a third axis for remaining dimensions.

Version:
$Id: CubeView.html,v 1.19 2009/07/09 11:01:46 ArndHouben Exp $

Field Summary
static java.lang.String PROPERTY_ID_HIDE_EMPTY
          Property to indicate if empty cells are to be hidden or not.
static java.lang.String PROPERTY_ID_REVERSE_HORIZONTAL_LAYOUT
          Property to indicate if the horizontal order of elements is to be reversed or not (i.e. if set to true, consolidated elements are displayed to the _right_ of their children; consolidated elements are displayed on the _left_ hand side of their children if this property is not set or set to false).
static java.lang.String PROPERTY_ID_REVERSE_VERTICAL_LAYOUT
          Property to indicate if the vertical order of elements is to be reversed or not (i.e. if set to true, consolidated elements are displayed _below_ their children; consolidated elements are displayed _above_ their children if this property is not set or set to false).
static java.lang.String PROPERTY_ID_SHOW_RULES
          Property to indicate if cells, which contain a rule should be highlighted in the ui.
 
Method Summary
 Axis addAxis(java.lang.String id, java.lang.String name)
          Adds a new Axis to this cube view.
 void addProperty(Property property)
          Adds the given Property object to this CubeView.
 void addProperty(java.lang.String id, java.lang.String value)
          Adds a property with the given id and given value to this CubeView.
 Axis[] getAxes()
          Returns all axes registered to this cube view
 Axis getAxis(java.lang.String id)
          Returns the axis which is registered to this cube view under the given axis id or null if no such axis exists.
 Cube getCube()
          Returns the corresponding source Cube of this view
 java.lang.String getDescription()
          Returns an optional description or null if none has been set
 java.lang.String getId()
          Returns the unique id of this cube view
 java.lang.String[] getProperties()
          Returns all property ids.
 java.lang.String getPropertyValue(java.lang.String id)
          Returns the value of the property specified by the given id or null if the id has not been specified.
 java.lang.String getRawDefinition()
          Returns the internal used raw definition of this cube view.
 boolean isHideEmpty()
          Deprecated. Not used anymore. Please use the property mechanism to specify properties like this. For isHideEmpty, you should use getProperty(PROPERTY_ID_HIDE_EMPTY); and check if the return value is a String representing the boolean value true.
 void removeAxis(Axis axis)
          Removes the given axis from this cube view
 void removeProperty(Property property)
          Removes the property specified by the given Property object from this CubeView.
 void removeProperty(java.lang.String id)
          Removes the property specified by the given id from this CubeView.
 void save()
          Saves this cube view to its Database
 void setDescription(java.lang.String description)
          Sets an optional description
 void setHideEmpty(boolean hideEmpty)
          Deprecated. Not used anymore. Please use the property mechanism to specify properties like this. For setHideEmpty, you should use setProperty(PROPERTY_ID_HIDE_EMPTY, "true"); (or .., "false", respectively).
 void setName(java.lang.String name)
          Sets the name of this cube view.
 
Methods inherited from interface org.palo.api.NamedEntity
getName
 

Field Detail

PROPERTY_ID_HIDE_EMPTY

static final java.lang.String PROPERTY_ID_HIDE_EMPTY
Property to indicate if empty cells are to be hidden or not. It is the client's responsibility to implement the logic for this property.

See Also:
Constant Field Values

PROPERTY_ID_REVERSE_HORIZONTAL_LAYOUT

static final java.lang.String PROPERTY_ID_REVERSE_HORIZONTAL_LAYOUT
Property to indicate if the horizontal order of elements is to be reversed or not (i.e. if set to true, consolidated elements are displayed to the _right_ of their children; consolidated elements are displayed on the _left_ hand side of their children if this property is not set or set to false). It is the client's responsibility to implement the logic for this property.

See Also:
Constant Field Values

PROPERTY_ID_REVERSE_VERTICAL_LAYOUT

static final java.lang.String PROPERTY_ID_REVERSE_VERTICAL_LAYOUT
Property to indicate if the vertical order of elements is to be reversed or not (i.e. if set to true, consolidated elements are displayed _below_ their children; consolidated elements are displayed _above_ their children if this property is not set or set to false). It is the client's responsibility to implement the logic for this property.

See Also:
Constant Field Values

PROPERTY_ID_SHOW_RULES

static final java.lang.String PROPERTY_ID_SHOW_RULES
Property to indicate if cells, which contain a rule should be highlighted in the ui.

See Also:
Constant Field Values
Method Detail

getId

java.lang.String getId()
Returns the unique id of this cube view

Returns:
unique id

getCube

Cube getCube()
Returns the corresponding source Cube of this view

Returns:
the source Cube of this view

setName

void setName(java.lang.String name)
Sets the name of this cube view. Please note that the new name gets only stored with the next save of this view!

Parameters:
name - (new) name of the cube view

getDescription

java.lang.String getDescription()
Returns an optional description or null if none has been set

Returns:
a description of this view

setDescription

void setDescription(java.lang.String description)
Sets an optional description

Parameters:
description -

isHideEmpty

boolean isHideEmpty()
Deprecated. Not used anymore. Please use the property mechanism to specify properties like this. For isHideEmpty, you should use getProperty(PROPERTY_ID_HIDE_EMPTY); and check if the return value is a String representing the boolean value true.

Returns a flag that triggers if empty rows or columns are visible

Returns:
the flag state

setHideEmpty

void setHideEmpty(boolean hideEmpty)
Deprecated. Not used anymore. Please use the property mechanism to specify properties like this. For setHideEmpty, you should use setProperty(PROPERTY_ID_HIDE_EMPTY, "true"); (or .., "false", respectively).

Sets a flag, which shows or hides empty rows or columns.

Parameters:
hideEmpty -

getRawDefinition

java.lang.String getRawDefinition()
Returns the internal used raw definition of this cube view.

Returns:
internal representation of this view

addAxis

Axis addAxis(java.lang.String id,
             java.lang.String name)
Adds a new Axis to this cube view.

Parameters:
id - the unique id of the new axis
name - the name of the new axis
Returns:
the newly created axis

removeAxis

void removeAxis(Axis axis)
Removes the given axis from this cube view

Parameters:
axis - the axis to remove

getAxes

Axis[] getAxes()
Returns all axes registered to this cube view

Returns:
all registered axes

getAxis

Axis getAxis(java.lang.String id)
Returns the axis which is registered to this cube view under the given axis id or null if no such axis exists.

Parameters:
id -
Returns:
the registered axis or null

save

void save()
Saves this cube view to its Database


addProperty

void addProperty(java.lang.String id,
                 java.lang.String value)
Adds a property with the given id and given value to this CubeView. If a property with the same id already exists, the old value is overwritten with the new value.

Parameters:
id - a unique identifier
value - the property value

addProperty

void addProperty(Property property)
Adds the given Property object to this CubeView. If a property with the same id already exists, the old value is overwritten with the new value.

Parameters:
property - a Property object.

removeProperty

void removeProperty(java.lang.String id)
Removes the property specified by the given id from this CubeView.

Parameters:
id - the property identifier

removeProperty

void removeProperty(Property property)
Removes the property specified by the given Property object from this CubeView.

Parameters:
property - a Property object.

getProperties

java.lang.String[] getProperties()
Returns all property ids.

Returns:
all property identifiers.

getPropertyValue

java.lang.String getPropertyValue(java.lang.String id)
Returns the value of the property specified by the given id or null if the id has not been specified.

Parameters:
id - the property identifier
Returns:
the property value