Oracle® OLAP Analytic Workspace Java API Reference
10g Release 2 (10.2)

B14351-01

oracle.AWXML
Class Hierarchy

java.lang.Object
  |
  +--oracle.AWXML.BaseObject
        |
        +--oracle.AWXML.AWObject
              |
              +--oracle.AWXML.Hierarchy

public class Hierarchy
extends AWObject
implements DerivedMeasureInput

An AWObject that specifies a hierarchy. A hierarchy defines an ordered set of relationships between dimension members.

There are two types of hierarchies: level-based hierarchies, which define an ordered set of levels, and value-based hierarchies, which define parent-child relationships between the members of the dimension.

Level-based hierarchies have an ordered list of HierarchyLevelAssociation objects. A HierarchyLevelAssociation associates a level with a hierarchy. The ordered list of HierarchyLevelAssociation objects specifies the order of the levels in the hierarchy. The first level is the most aggregate. The last level is the least aggregate.

Hierarchies implement the DerivedMeasureInput interface, and therefore can be used as input to the calculations that define a derived measure.


Fields inherited from class oracle.AWXML.BaseObject
DATABASENULL

Constructor Summary
Hierarchy(BaseObject input)
Creates a Hierarchy for the specified Dimension.

Method Summary
void addHierarchyLevelAssociation(HierarchyLevelAssociation input)
Adds the specified HierarchyLevelAssociation to the end of the list of levels in the Hierarchy.
void addHierarchyLevelAssociationAfter(HierarchyLevelAssociation input, BaseObject reference)
Adds the specified HierarchyLevelAssociation after the referenced HierarchyLevelAssociation in the list of levels for the Hierarchy.
void addHierarchyLevelAssociationBefore(HierarchyLevelAssociation input, BaseObject reference)
Adds the specified HierarchyLevelAssociation before the referenced HierarchyLevelAssociation in the list of levels for the Hierarchy.
void addHierarchyLevelAssociationFirst(HierarchyLevelAssociation input)
Adds the specified HierarchyLevelAssociation to the beginning of the list of levels for the Hierarchy.
java.lang.String Alter(AWConnection connection)
Alter the Hierarchy within the current analytic workspace of the specified connection.
java.lang.String Create(AWConnection connection)
Creates the Hierarchy in the current analytic workspace of the specified database connection.
HierarchyLevelAssociation createHierarchyLevelAssociation()
Creates a HierarchyLevelAssociation at the end of the list of levels for the Hierarchy.
HierarchyLevelAssociation createHierarchyLevelAssociationAfter(HierarchyLevelAssociation input)
Creates a HierarchyLevelAssociation after the referenced HierarchyLevelAssociation in the list of levels for the Hierarchy.
HierarchyLevelAssociation createHierarchyLevelAssociationBefore(HierarchyLevelAssociation input)
Creates a HierarchyLevelAssociation before the referenced HierarchyLevelAssociation in the list of levels for the Hierarchy.
HierarchyLevelAssociation createHierarchyLevelAssociationFirst()
Creates a HierarchyLevelAssociation at the beginning of the list of levels for the Hierarchy.
java.lang.String Delete(AWConnection connection)
Deletes the Hierarchy in the current analytic workspace of the specified database connection.
AttributeProjection findAttributeProjection(Attribute input)
Returns the AttributeProjection that is owned by the specified Attribute.
Attribute getDefaultOrder()
Returns the Attribute that specifies how the dimension members are ordered.
java.util.Vector getHierarchyLevels()
Returns the levels in the Hierarchy
boolean getIsDefault()
Returns a boolean indicating whether or not the Hierarchy is the default hierarchy for the dimension.
java.lang.String getType()
Returns the hierarchy type.
void readAWDefinitions(AWConnection connection, boolean readType)
Reads the objects owned by the Hierarchy into memory, making them available for processing within the current analytic workspace of the specified database connection.
void removeHierarchyLevelAssociation(HierarchyLevelAssociation input)
Removes a HierarchyLevelAssociation from the Hierarchy.
void setDefaultOrder(Attribute input)
Sets the Attribute that specifies how the dimension members are ordered.
void setIsDefault(boolean input)
Sets a boolean indicating whether or not the Hierarchy is the default hierarchy for the dimension.
void setIsDefault(java.lang.Boolean input)
Sets a Boolean indicating whether or not the Hierarchy is the default hierarchy for the dimension.
void setType(java.lang.String input)
Sets the hierarchy type.
java.lang.String WriteToXML()
Returns the Hierarchy object as an XML string.

Methods inherited from class oracle.AWXML.AWObject
addAttribute, addAttributeProjection, addSourceCubeMapGroup, addSourceDimensionMapGroup, addSourceMappingGroup, createAttribute, createAttributeProjection, createSourceCubeMapGroup, createSourceDimensionMapGroup, getAttributes, getSourceMapGroup, removeAttribute, removeAttributeProjection, removeAttributeProjection, removeSourceMappingGroup

Methods inherited from class oracle.AWXML.BaseObject
CreateAfter, CreateBefore, CreateFirst, DataRead, getColumnName, getId, getLongName, getLongName, getName, getOwner, getPluralName, getPluralName, getSchema, getShortName, getShortName, setColumnName, setLongName, setLongName, setName, setPluralName, setPluralName, setSchema, setShortName, setShortName

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Hierarchy

public Hierarchy(BaseObject input)
Creates a Hierarchy for the specified Dimension.

Note: The object factories are a recommended way of creating objects. For example, use the createHierarchy method on a Dimension object.

Parameters:
input - The Dimension that owns the new Hierarchy.

Method Detail

WriteToXML

public java.lang.String WriteToXML()
Returns the Hierarchy object as an XML string.
Overrides:
WriteToXML in class AWObject
Returns:
A String containing the XML that represents the Hierarchy.

setDefaultOrder

public void setDefaultOrder(Attribute input)
Sets the Attribute that specifies how the dimension members are ordered. For example, in a value-based hierarchy, the attribute would specify the parent of each of the dimension members in the hierarchy.
Parameters:
input - The Attribute.

getDefaultOrder

public Attribute getDefaultOrder()
Returns the Attribute that specifies how the dimension members are ordered.
Returns:
The Attribute.

setIsDefault

public void setIsDefault(java.lang.Boolean input)
Sets a Boolean indicating whether or not the Hierarchy is the default hierarchy for the dimension.
Parameters:
input - True if the Hierarchy is the default, otherwise False.

setIsDefault

public void setIsDefault(boolean input)
Sets a boolean indicating whether or not the Hierarchy is the default hierarchy for the dimension.
Parameters:
input - True if the Hierarchy is the default, otherwise False.

getIsDefault

public boolean getIsDefault()
Returns a boolean indicating whether or not the Hierarchy is the default hierarchy for the dimension.
Returns:
True if the Hierarchy is the default, otherwise False.

addHierarchyLevelAssociation

public void addHierarchyLevelAssociation(HierarchyLevelAssociation input)
Adds the specified HierarchyLevelAssociation to the end of the list of levels in the Hierarchy.
Parameters:
input - The HierarchyLevelAssociation to add.

addHierarchyLevelAssociationAfter

public void addHierarchyLevelAssociationAfter(HierarchyLevelAssociation input,
                                              BaseObject reference)
Adds the specified HierarchyLevelAssociation after the referenced HierarchyLevelAssociation in the list of levels for the Hierarchy.
Parameters:
input - The HierarchyLevelAssociation to add.
reference - The referenced HierarchyLevelAssociation.

addHierarchyLevelAssociationBefore

public void addHierarchyLevelAssociationBefore(HierarchyLevelAssociation input,
                                               BaseObject reference)
Adds the specified HierarchyLevelAssociation before the referenced HierarchyLevelAssociation in the list of levels for the Hierarchy.
Parameters:
input - The HierarchyLevelAssociation to add.
reference - The referenced HierarchyLevelAssociation.

addHierarchyLevelAssociationFirst

public void addHierarchyLevelAssociationFirst(HierarchyLevelAssociation input)
Adds the specified HierarchyLevelAssociation to the beginning of the list of levels for the Hierarchy.
Parameters:
input - The HierarchyLevelAssociation to add.

removeHierarchyLevelAssociation

public void removeHierarchyLevelAssociation(HierarchyLevelAssociation input)
Removes a HierarchyLevelAssociation from the Hierarchy.
Parameters:
input - The HierarchyLevelAssociation to remove.

getHierarchyLevels

public java.util.Vector getHierarchyLevels()
Returns the levels in the Hierarchy
Returns:
A Vector of Level objects.

createHierarchyLevelAssociation

public HierarchyLevelAssociation createHierarchyLevelAssociation()
Creates a HierarchyLevelAssociation at the end of the list of levels for the Hierarchy.
Returns:
The new HierarchyLevelAssociation.

getType

public java.lang.String getType()
Returns the hierarchy type. Hierarchies can be either level-based or value-based. By default, hierarchies are level-based.
Returns:
Either "LEVEL" or "VALUE".

setType

public void setType(java.lang.String input)
Sets the hierarchy type. Hierarchies can be either level-based or value-based. By default, hierarchies are level-based.
Parameters:
input - Specify "LEVEL" for a level-based hierarchy. Specify "VALUE" for a value-based hierarchy.

createHierarchyLevelAssociationAfter

public HierarchyLevelAssociation createHierarchyLevelAssociationAfter(HierarchyLevelAssociation input)
Creates a HierarchyLevelAssociation after the referenced HierarchyLevelAssociation in the list of levels for the Hierarchy.
Parameters:
input - The referenced HierarchyLevelAssociation.
Returns:
The new HierarchyLevelAssociation.

createHierarchyLevelAssociationBefore

public HierarchyLevelAssociation createHierarchyLevelAssociationBefore(HierarchyLevelAssociation input)
Creates a HierarchyLevelAssociation before the referenced HierarchyLevelAssociation in the list of levels for the Hierarchy.
Parameters:
input - The referenced HierarchyLevelAssociation.
Returns:
The new HierarchyLevelAssociation.

createHierarchyLevelAssociationFirst

public HierarchyLevelAssociation createHierarchyLevelAssociationFirst()
Creates a HierarchyLevelAssociation at the beginning of the list of levels for the Hierarchy.
Returns:
The new HierarchyLevelAssociation.

Create

public java.lang.String Create(AWConnection connection)
Creates the Hierarchy in the current analytic workspace of the specified database connection.
Overrides:
Create in class BaseObject
Parameters:
connection - The AWConnection that specifies the connection.
Returns:
"success" if successful.

Alter

public java.lang.String Alter(AWConnection connection)
Alter the Hierarchy within the current analytic workspace of the specified connection.
Overrides:
Alter in class BaseObject
Parameters:
connection - An AWConnection that defines the connection.
Returns:
String

Delete

public java.lang.String Delete(AWConnection connection)
Deletes the Hierarchy in the current analytic workspace of the specified database connection.
Overrides:
Delete in class BaseObject
Parameters:
connection - The AWConnection that specifies the connection.
Returns:
"success" if successful.

findAttributeProjection

public AttributeProjection findAttributeProjection(Attribute input)
Returns the AttributeProjection that is owned by the specified Attribute.
Parameters:
input - An Attribute that applies to the owning dimension.
Returns:
The AttributeProjection that projects the Attribute to the Hierarchy.

readAWDefinitions

public void readAWDefinitions(AWConnection connection,
                              boolean readType)
Reads the objects owned by the Hierarchy into memory, making them available for processing within the current analytic workspace of the specified database connection.
Parameters:
connection - The AWConnection that specifies the database connection.
readType - Specify True to read the Hierarchy and all its child objects. False normally causes some of the child objects to be ignored, but for a hierarchy, False has the same effect as True.

Oracle® OLAP Analytic Workspace Java API Reference
10g Release 2 (10.2)

B14351-01

Copyright © 2003, 2005 Oracle. All rights reserved.