|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Dimension
Dimension
.
Dimensions are defined inside a database. Out of the set of defined
dimensions of a database, cubes can be created by associating these
dimensions to form a cube. A Cube
is
capable of storing data.
A single dimension can be shared in multiple cubes.
Within the scope of a single parent database, a dimension
is uniquely identified by its name as returned by
getName()
.
A dimension is made up of distinct Element
s.
Dimension-information and domain-objects can be retrieved from a
dimensino instance by
invoking the following methods.
PaloAPIException
Field Summary | |
---|---|
static int |
DIMENSIONEXTENDEDTYPE_REGULAR
Constants for dimension-type |
static int |
DIMENSIONEXTENDEDTYPE_VIRTUAL
Constants for dimension-type |
Fields inherited from interface org.palo.api.PaloObject |
---|
TYPE_ATTRIBUTE, TYPE_NORMAL, TYPE_SYSTEM, TYPE_USER_INFO |
Method Summary | |
---|---|
Attribute |
addAttribute(java.lang.String name)
Deprecated. use Hierarchy.addAttribute(String) instead. |
Element |
addElement(java.lang.String name,
int type)
Deprecated. use Hierarchy.addElement(String, int) instead. |
void |
addElements(java.lang.String[] names,
int[] types)
Deprecated. use {@link Hierarchy#addElements(String [], int []) instead. |
void |
addElements(java.lang.String[] names,
int[] types,
Element[][] children,
double[][] weights)
|
void |
addElements(java.lang.String[] names,
int type,
Element[][] children,
double[][] weights)
|
Subset |
addSubset(java.lang.String name)
Deprecated. old subsets are not supported anymore, please instead add subsets via getSubsetHandler() and its appropriate
methods |
void |
dumpElementsTree()
Deprecated. for internal use only. Please do not use. |
ElementNode[] |
getAllElementNodes()
Deprecated. use Hierarchy.getAllElementNodes() instead. |
Attribute |
getAttribute(java.lang.String id)
Deprecated. use Hierarchy.getAttribute(String) instead. |
Attribute |
getAttributeByName(java.lang.String name)
Deprecated. use Hierarchy.getAttributeByName(String) instead. |
Cube |
getAttributeCube()
Deprecated. use Hierarchy.getAttributeCube() instead. |
Dimension |
getAttributeDimension()
Deprecated. use Hierarchy.getAttributeHierarchy() instead. |
Attribute[] |
getAttributes()
Deprecated. use Hierarchy.getAttributes() instead. |
java.lang.Object[] |
getAttributeValues(Attribute[] attributes,
Element[] elements)
Deprecated. use Hierarchy.getAttributeValues(Attribute [], Element [])
instead. |
Cube[] |
getCubes()
Returns all cubes which use this dimension. |
Database |
getDatabase()
Returns the parent Database of this instance. |
Hierarchy |
getDefaultHierarchy()
Returns the default hierarchy of this dimension. |
Element |
getElementAt(int index)
Deprecated. use Hierarchy.getElementAt(int) instead. |
Element |
getElementById(java.lang.String id)
Deprecated. use Hierarchy#getElementById() instead. |
Element |
getElementByName(java.lang.String name)
Deprecated. use Hierarchy#getElementByName() instead. |
int |
getElementCount()
Deprecated. use Hierarchy.getElementCount() instead. |
java.lang.String[] |
getElementNames()
Deprecated. use Hierarchy.getElementNames() instead. |
Element[] |
getElements()
Deprecated. use Hierarchy.getElements() instead. |
Element[] |
getElementsInOrder()
Deprecated. use Hierarchy.getElementsInOrder() instead. |
ElementNode[] |
getElementsTree()
Deprecated. use Hierarchy.getElementsTree() instead. |
int |
getExtendedType()
Returns the extended-type of this Dimension . |
Hierarchy[] |
getHierarchies()
Returns all hierarchies of this dimension. |
java.lang.String[] |
getHierarchiesIds()
Returns the ids of all hierarchies of this dimension. |
Hierarchy |
getHierarchyAt(int index)
Returns the hierarchy at the given index. |
Hierarchy |
getHierarchyById(java.lang.String id)
Returns the hierarchy specified by the given id. |
Hierarchy |
getHierarchyByName(java.lang.String name)
Returns the hierarchy with the specified name or null if
no such hierarchy exists. |
int |
getHierarchyCount()
Returns the number of hierarchies in this dimension. |
int |
getMaxDepth()
Deprecated. use Hierarchy.getMaxDepth() instead. |
int |
getMaxLevel()
Deprecated. use Hierarchy.getMaxLevel() instead. |
java.lang.String |
getName()
Returns the name of this Dimension |
Element[] |
getRootElements()
Deprecated. use Hierarchy.getRootElements() instead. |
Subset |
getSubset(java.lang.String id)
Returns the subset which is registered with the given id or null if no subset with this id could be found |
SubsetHandler |
getSubsetHandler()
Returns the SubsetHandler for managing the new subsets. |
Subset[] |
getSubsets()
Returns all subsets currently registered with this dimension |
int |
getType()
TODO please comment :) |
boolean |
isAttributeDimension()
Checks if this Dimension is an attribute dimension, i.e. |
boolean |
isSubsetDimension()
Deprecated. use Hierarchy.isSubsetHierarchy() instead. |
boolean |
isSystemDimension()
Returns whether this dimension is a system dimension. |
boolean |
isUserInfoDimension()
Returns whether this dimension is a user info dimension. |
Consolidation |
newConsolidation(Element element,
Element parent,
double weight)
Deprecated. use Hierarchy.newConsolidation(Element, Element, double)
instead. |
void |
reload(boolean fireEvents)
Reloads the internal dimension structure from database. |
void |
removeAllAttributes()
Deprecated. use Hierarchy.removeAllAttributes() instead. |
void |
removeAttribute(Attribute attribute)
Deprecated. use Hierarchy.removeAttribute(Attribute) instead. |
void |
removeElement(Element element)
Deprecated. use Hierarchy.removeElement(Element) instead. |
void |
removeElements(Element[] elements)
Deprecated. use Hierarchy.removeElements(Element []) instead. |
void |
removeSubset(Subset subset)
Removes the given subset from the dimension |
void |
rename(java.lang.String name)
Renames this Dimension . |
void |
renameElement(Element element,
java.lang.String newName)
Deprecated. use Hierarchy.renameElement(Element, String) instead. |
void |
setAttributeValues(Attribute[] attributes,
Element[] elements,
java.lang.Object[] values)
Deprecated. use Hierarchy.setAttributeValues(Attribute [], Element [], Object [])
instead. |
void |
visitElementTree(ElementNodeVisitor visitor)
Deprecated. use Hierarchy#visitElementTree() instead. |
Methods inherited from interface org.palo.api.PaloObject |
---|
getId |
Methods inherited from interface org.palo.api.Writable |
---|
canBeModified, canCreateChildren |
Field Detail |
---|
static final int DIMENSIONEXTENDEDTYPE_REGULAR
static final int DIMENSIONEXTENDEDTYPE_VIRTUAL
Method Detail |
---|
int getExtendedType()
Dimension
.
Dimension
.int getType()
PaloObject
getType
in interface PaloObject
java.lang.String getName()
Dimension
getName
in interface NamedEntity
Dimension
.Database getDatabase()
Database
of this instance.
Database
of this instance.int getElementCount()
Hierarchy.getElementCount()
instead.
Element
s of this instance.
Note that a single dimension with consolidated elements might
consolidate a particular element more than once.
Element
s of this instance.Element getElementAt(int index)
Hierarchy.getElementAt(int)
instead.
Element
stored at the given index.
If the index does not correspond to a legal position
in the internally managed array of elements of this
instance, then null
is returned.
index
- the index
Element
stored at the given index
or null
.Element[] getElements()
Hierarchy.getElements()
instead.
Element
instances available
for this instance.
The returned array is a copy of the internal datastructure. Changing the returned array does not change this instance.
Element
instances available
for this Dimension
.java.lang.String[] getElementNames()
Hierarchy.getElementNames()
instead.
Dimension
.
The returned array is a copy of the internal datastructure. Changing the returned array does not change this instance.
Element
s instances available
for this Dimension>
.Element getElementByName(java.lang.String name)
Hierarchy#getElementByName()
instead.
Element
stored under the given name or
null
if no such Element
exists.
name
- the element-name to look-up.
Element
stored under the given name or
null
if no such Element
exists.Element getElementById(java.lang.String id)
Hierarchy#getElementById()
instead.
Element
stored under the given id or
null
if no such Element
exists.
id
- the element-id to look-up.
Element
stored under the given id or
null
if no such Element
exists.void rename(java.lang.String name)
Dimension
.
name
- the new name for this Dimension
.void addElements(java.lang.String[] names, int[] types)
names
- the names of the elements to add.types
- the types of the elements to add.void addElements(java.lang.String[] names, int type, Element[][] children, double[][] weights)
void addElements(java.lang.String[] names, int[] types, Element[][] children, double[][] weights)
Element[] getRootElements()
Hierarchy.getRootElements()
instead.
Element[] getElementsInOrder()
Hierarchy.getElementsInOrder()
instead.
ElementNode[] getElementsTree()
Hierarchy.getElementsTree()
instead.
void visitElementTree(ElementNodeVisitor visitor)
Hierarchy#visitElementTree()
instead.
visitor
- the visitor-callback to invoke
during traversal.ElementNode[] getAllElementNodes()
Hierarchy.getAllElementNodes()
instead.
void dumpElementsTree()
Element addElement(java.lang.String name, int type)
Hierarchy.addElement(String, int)
instead.
Element
to this Dimension
.
name
- the name of the element to add.type
- the type of the element to add as defined by the constants
in the Element
class.void removeElement(Element element)
Hierarchy.removeElement(Element)
instead.
Element
from this Dimension
element
- the Element
to remove.void removeElements(Element[] elements)
Hierarchy.removeElements(Element [])
instead.
Element
s from this Dimension
elements
- Element
s to remove.void renameElement(Element element, java.lang.String newName)
Hierarchy.renameElement(Element, String)
instead.
Element
.
element
- the Element
to rename.newName
- the new name for this Element
.Consolidation newConsolidation(Element element, Element parent, double weight)
Hierarchy.newConsolidation(Element, Element, double)
instead.
Consolidation
for later use in this dimension.
element
- the Element
to consolidate.parent
- the parent-Element
of the consolidation.weight
- the consolidation weight.
Consolidation
object.boolean isAttributeDimension()
Dimension
is an attribute dimension, i.e.
its elements represent Attribute
s.
Attribute addAttribute(java.lang.String name)
Hierarchy.addAttribute(String)
instead.
Attribute
and adds it to the dimension.
Note: adding an attribute to a dimension which is itself of type
attribute dimension is prohibited and will result in a
PaloAPIException
.
name
- the name of the new attribute
Attribute
void removeAttribute(Attribute attribute)
Hierarchy.removeAttribute(Attribute)
instead.
Attribute
from the dimension
attribute
- the attribute instance to removevoid removeAllAttributes()
Hierarchy.removeAllAttributes()
instead.
Attribute[] getAttributes()
Hierarchy.getAttributes()
instead.
Attribute
s this dimension has.
Attribute
s of this dimensionAttribute getAttribute(java.lang.String id)
Hierarchy.getAttribute(String)
instead.
Attribute
which corresponds to the given id or
null
if no Attribute
with this id exists
id
- identifier of the Attribute
to get
Attribute
or null
Attribute getAttributeByName(java.lang.String name)
Hierarchy.getAttributeByName(String)
instead.
Attribute
which corresponds to the given name or
null
if no Attribute
with this name exists
name
- the name of the Attribute
to get
Attribute
or null
void setAttributeValues(Attribute[] attributes, Element[] elements, java.lang.Object[] values)
Hierarchy.setAttributeValues(Attribute [], Element [], Object [])
instead.
Attribute
s
at once, i.e. the i.th value is assigned to the i.th attribute for the
i.th element.PaloAPIException
is thrown.
attributes
- the attributes to set the values forelements
- the effected elementsvalues
- the new valuesjava.lang.Object[] getAttributeValues(Attribute[] attributes, Element[] elements)
Hierarchy.getAttributeValues(Attribute [], Element [])
instead.
Attribute
s in one go, i.e. the i.th object in the returned
array is the i.th value of the i.th attribute for the i.th element.PaloAPIException
is thrown.
attributes
- the attributes to get the values fromelements
- the effected elements
Cube getAttributeCube()
Hierarchy.getAttributeCube()
instead.
Cube
corresponding to this dimension or
null
if the attribute cube couldn't be loaded or does
not exist.
Note: this is a convenient method to provide raw access to the internal attribute handling. Its usage is not recommended!!
Dimension getAttributeDimension()
Hierarchy.getAttributeHierarchy()
instead.
Dimension
or
null
if the attribute dimension couldn't be loaded or does
not exist.
Note: this is a convenient method to provide raw access to the internal attribute handling. Its usage is not recommended!!
boolean isSubsetDimension()
Hierarchy.isSubsetHierarchy()
instead.
Dimension
is a subset dimension, i.e.
its elements represent Subset
s.
Subset addSubset(java.lang.String name)
getSubsetHandler()
and its appropriate
methods
Subset
with the given name to the dimension.
name
- the name of the subset
void removeSubset(Subset subset)
subset
- the subset to removeSubset[] getSubsets()
Subset getSubset(java.lang.String id)
id
- the subset id
boolean isSystemDimension()
boolean isUserInfoDimension()
int getMaxLevel()
Hierarchy.getMaxLevel()
instead.
Element.getLevel()
for an explanation of how the level is
determined
int getMaxDepth()
Hierarchy.getMaxDepth()
instead.
Element.getDepth()
for an explanation of how the depth is
determined
Cube[] getCubes()
SubsetHandler getSubsetHandler()
SubsetHandler
for managing the new subsets.
Please use Database.supportsNewSubsets()
to check if new
subsets are supported.
SubsetHandler
for managing new subsetsHierarchy[] getHierarchies()
int getHierarchyCount()
java.lang.String[] getHierarchiesIds()
Hierarchy getHierarchyAt(int index)
index
- the index of the hierarchy.
Hierarchy getHierarchyById(java.lang.String id)
id
- the id of the hierarchy.
Hierarchy getHierarchyByName(java.lang.String name)
null
if
no such hierarchy exists.
name
- the name of the hierarchy.
null
if
no such hierarchy exists.Hierarchy getDefaultHierarchy()
void reload(boolean fireEvents)
fireEvents
- specify true
to get event notification on
dimension changes or false
otherwise
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |