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

B14351-01

oracle.AWXML
Class Dimension

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

public class Dimension
extends AWObject

An AWObject that specifies a dimension. A dimension is a set of values that identify and categorize data. A dimension forms an edge of a logical cube, and thus of the measures within the cube.

A Dimension is a top-level object in the Analytic Workspace Java API object model. Top-level objects are logically owned by an AW object, and they exist within the name space of the schema. For a description and a diagram of the object model hierarchy, see Object Hierarchy.

The Dimension class supports methods for defining calculations that result in new dimension members. Calculated members can be created permanently or on a session basis.

The Dimension class supports methods for building the logical dimension in memory and action methods for physically manipulating the dimension within the Oracle Database. The action methods take an AWConnection argument that specifies a JDBC connection to an the Oracle Database instance.


Fields inherited from class oracle.AWXML.BaseObject
DATABASENULL

Constructor Summary
Dimension()
Creates a Dimension in the analytic workspace.

Method Summary
void addHierarchy(Hierarchy input)
Adds the specified Hierarchy to the Dimension.
void addIndex(Index input)
Adds an Index to the Dimension.
void addLevel(Level input)
Adds the specified Level to the Dimension.
void addMemberSelection(MemberSelection input)
Adds the specified MemberSelection to the Dimension.
void addModel(Model input)
Adds the specified Model to Dimension.
void addPermanentCalculatedMember(PermanentCalculatedMember input)
Adds the specified PermanentCalculatedMember to the Dimension.
void addSessionCalculatedMember(SessionCalculatedMember input)
Adds the specified SessionCalculatedMember to the Dimension.
java.lang.String Alter(AWConnection connection)
Changes the textual attributes of the Dimension, such as its short and long names, in the analytic workspace to those currently specified by the Dimension.
java.lang.String Create(AWConnection connection)
Creates a Dimension in the current analytic workspace of the specified database connection.
Hierarchy createHierarchy()
Creates a Hierarchy for the Dimension.
Index createIndex()
Creates an Index for the Dimension.
Level createLevel()
Creates a Level for the Dimension.
MemberSelection createMemberSelection()
Creates a MemberSelection for the Dimension.
Model createModel()
Creates a Model based on the Dimension.
PermanentCalculatedMember createPermanentCalculatedMember()
Creates a PermanentCalculatedMember for the Dimension.
SessionCalculatedMember createSessionCalculatedMember()
Creates a SessionCalculatedMember for the Dimension.
java.lang.String Delete(AWConnection connection)
Deletes the Dimension in the current analytic workspace of the specified database connection.
Attribute FindAttribute(java.lang.String input)
Gets the Attribute with the specified name.
Hierarchy FindHierarchy(java.lang.String input)
Gets the Hierarchy with the specified name.
Level FindLevel(java.lang.String input)
Gets the Level with the specified name.
Attribute getAttributeBasedOnRole(java.lang.String role)
Gets the Attribute that has the specified role (classification).
java.util.Vector getCalculatedMembers()
Gets the permanent and session-based calculated member specifications for the Dimension.
java.util.Vector getHierarchies()
Gets the hierarchies owned by the Dimension.
java.lang.String getId()
Gets the full name of the Dimension.
java.util.Vector getIndexes()
Gets the Index objects owned by the Dimension.
java.util.Vector getLevels()
Gets the levels owned by the Dimension.
java.util.Vector getMemberSelections()
Gets the dimension member selections owned by the Dimension.
java.util.Vector getModels()
Gets the Model objects owned by the Dimension.
boolean getUseNativeKey()
Indicates whether the primary key of the dimension table contains the lowest-level dimension members.
boolean isMeasure()
Indicates whether the Dimension is a measure dimension, which is a dimension that has measures as its members.
boolean isNativeKeyUnique()
Indicates whether the Dimension contains duplicate members.
boolean isTime()
Indicates whether the Dimension is a dimension of time values.
void readAWDefinitions(AWConnection connection, boolean readType)
Reads the objects owned by the Dimension into memory, making them available for processing within the current analytic workspace of the specified database connection.
void removeHierarchy(Hierarchy input)
Removes the specified Hierarchy from the Dimension.
void removeIndex(Index input)
Removes an Index from the Dimension.
void removeLevel(Level input)
Removes the specified Level from the Dimension.
void removeMemberSelection(MemberSelection input)
Removes the specified MemberSelection from the Dimension.
void removeModel(Model input)
Removes the specified Model from the Dimension.
void removePermanentCalculatedMember(PermanentCalculatedMember input)
Removes the specified PermanentCalculatedMember from the Dimension.
void removeSessionCalculatedMember(SessionCalculatedMember input)
Removes the specified SessionCalculatedMember from the Dimension.
void setIsMeasure(boolean input)
Specifies whether the Dimension is a measure dimension, which is a dimension that has measures as its members.
void setIsMeasure(java.lang.Boolean input)
Specifies whether the Dimension is a measure dimension, which is a dimension that has measures as its members.
void setIsNativeKeyUnique(boolean input)
Specifies whether the Dimension contains duplicate members.
void setIsTime(boolean input)
Specifies whether the Dimension is a dimension of time values.
void setIsTime(java.lang.Boolean input)
Specifies whether the Dimension is a dimension of time values.
void setUseNativeKey(boolean input)
Specifies whether the primary key of the dimension table contains the lowest-level dimension members.
void setUseNativeKey(java.lang.Boolean input)
Specifies whether the primary key of the dimension table contains the lowest-level dimension members.
java.lang.String ValidateCalculatedMembers(AWConnection connection)
Determines the validity of the CalculatedMember objects of the Dimension.
java.lang.String WriteToXML()
Gets an XML representation of the Index.

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, 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

Dimension

public Dimension()
Creates a Dimension in the analytic workspace.

Method Detail

WriteToXML

public java.lang.String WriteToXML()
Gets an XML representation of the Index.
Overrides:
WriteToXML in class AWObject
Returns:
A String that is an XML representation of the Index.

getId

public java.lang.String getId()
Gets the full name of the Dimension. The full name includes the name space to which the object belongs (its lineage in the object model hierarchy, the logical name of the object, and the object type in the following format.

lineage.name.type

Because Dimension is at the top of the object hierarchy, its full name does not include the lineage, which would be the AW. Its fullname is therefore in the following format.

dimension_name.Dimension

Overrides:
getId in class BaseObject
Returns:
A String containing the full name of the Dimension.

getUseNativeKey

public boolean getUseNativeKey()
Indicates whether the primary key of the dimension table contains the lowest-level dimension members.
Returns:
A boolean that is true if the primary key contains the lowest-level members or false otherwise.

setUseNativeKey

public void setUseNativeKey(boolean input)
Specifies whether the primary key of the dimension table contains the lowest-level dimension members.
Parameters:
input - A boolean that is true if the primary key contains the lowest-level members or false otherwise.

isNativeKeyUnique

public boolean isNativeKeyUnique()
Indicates whether the Dimension contains duplicate members.
Returns:
A boolean that is true if the members of the dimension are unique or false otherwise.

setIsNativeKeyUnique

public void setIsNativeKeyUnique(boolean input)
Specifies whether the Dimension contains duplicate members.
Parameters:
input - A boolean that is true if the members of the dimension are unique or false otherwise.

setUseNativeKey

public void setUseNativeKey(java.lang.Boolean input)
Specifies whether the primary key of the dimension table contains the lowest-level dimension members.
Parameters:
input - A Boolean that contains true if the primary key contains the lowest-level members or false otherwise.

isTime

public boolean isTime()
Indicates whether the Dimension is a dimension of time values.
Returns:
A boolean that is true if the dimension is a time dimension or false otherwise.

setIsTime

public void setIsTime(boolean input)
Specifies whether the Dimension is a dimension of time values.
Parameters:
input - A boolean that is true if the dimension is a time dimension or false otherwise.

setIsTime

public void setIsTime(java.lang.Boolean input)
Specifies whether the Dimension is a dimension of time values.
Parameters:
input - A Boolean that contains true if the dimension is a time dimension or false otherwise.

isMeasure

public boolean isMeasure()
Indicates whether the Dimension is a measure dimension, which is a dimension that has measures as its members.
Returns:
A boolean that is true if the dimension is a measure dimension or false otherwise.

setIsMeasure

public void setIsMeasure(boolean input)
Specifies whether the Dimension is a measure dimension, which is a dimension that has measures as its members.
Parameters:
input - A boolean that is true if the dimension is a measure dimension or false otherwise.

setIsMeasure

public void setIsMeasure(java.lang.Boolean input)
Specifies whether the Dimension is a measure dimension, which is a dimension that has measures as its members.
Parameters:
input - A Boolean that contains true if the dimension is a measure dimension or false otherwise.

addMemberSelection

public void addMemberSelection(MemberSelection input)
Adds the specified MemberSelection to the Dimension.
Parameters:
input - The MemberSelection to add.

removeMemberSelection

public void removeMemberSelection(MemberSelection input)
Removes the specified MemberSelection from the Dimension.
Parameters:
input - The MemberSelection to remove.

getMemberSelections

public java.util.Vector getMemberSelections()
Gets the dimension member selections owned by the Dimension.
Returns:
A Vector of MemberSelection objects.

addLevel

public void addLevel(Level input)
Adds the specified Level to the Dimension.
Parameters:
input - The Level to add.

removeLevel

public void removeLevel(Level input)
Removes the specified Level from the Dimension.
Parameters:
input - The Level to remove.

getLevels

public java.util.Vector getLevels()
Gets the levels owned by the Dimension.
Returns:
A Vector of Level objects.

addHierarchy

public void addHierarchy(Hierarchy input)
Adds the specified Hierarchy to the Dimension.
Parameters:
input - The Hierarchy to add.

removeHierarchy

public void removeHierarchy(Hierarchy input)
Removes the specified Hierarchy from the Dimension.
Parameters:
input - The Hierarchy to remove.

getHierarchies

public java.util.Vector getHierarchies()
Gets the hierarchies owned by the Dimension.
Returns:
A Vector of Hierarchy objects.

createMemberSelection

public MemberSelection createMemberSelection()
Creates a MemberSelection for the Dimension.
Returns:
The new MemberSelection.

createLevel

public Level createLevel()
Creates a Level for the Dimension.
Returns:
The new Level.

createHierarchy

public Hierarchy createHierarchy()
Creates a Hierarchy for the Dimension.
Returns:
The new Hierarchy.

Create

public java.lang.String Create(AWConnection connection)
Creates a Dimension in the current analytic workspace of the specified database connection. If it cannot create the Dimension, then this method throws an AWException exception.
Overrides:
Create in class BaseObject
Parameters:
connection - The AWConnection that represents the database connection.
Returns:
A String that contains success if the method creates the Dimension.

Delete

public java.lang.String Delete(AWConnection connection)
Deletes the Dimension in the current analytic workspace of the specified database connection. If it cannot delete the Dimension, then this method throws an AWException exception.
Overrides:
Delete in class BaseObject
Parameters:
connection - The AWConnection that represents the database connection.
Returns:
A String that contains success if the method deletes the Dimension.

Alter

public java.lang.String Alter(AWConnection connection)
Changes the textual attributes of the Dimension, such as its short and long names, in the analytic workspace to those currently specified by the Dimension. If it cannot make the changes, then this method throws an AWException exception.
Overrides:
Alter in class BaseObject
Parameters:
connection - The AWConnection that represents the database connection.
Returns:
A String that contains success if the method makes the changes.

FindLevel

public Level FindLevel(java.lang.String input)
Gets the Level with the specified name.
Parameters:
input - The name of the level.
Returns:
The Level with the specified name.

FindAttribute

public Attribute FindAttribute(java.lang.String input)
Gets the Attribute with the specified name.
Parameters:
input - The name of the attribute.
Returns:
The Attribute with the specified name.

FindHierarchy

public Hierarchy FindHierarchy(java.lang.String input)
Gets the Hierarchy with the specified name.
Parameters:
input - The name of the hierarchy.
Returns:
The Hierarchy with the specified name.

addPermanentCalculatedMember

public void addPermanentCalculatedMember(PermanentCalculatedMember input)
Adds the specified PermanentCalculatedMember to the Dimension.
Parameters:
input - The PermanentCalculatedMember to add.

removePermanentCalculatedMember

public void removePermanentCalculatedMember(PermanentCalculatedMember input)
Removes the specified PermanentCalculatedMember from the Dimension.
Parameters:
input - The PermanentCalculatedMember to remove.

addSessionCalculatedMember

public void addSessionCalculatedMember(SessionCalculatedMember input)
Adds the specified SessionCalculatedMember to the Dimension.
Parameters:
input - The SessionCalculatedMember to add.

removeSessionCalculatedMember

public void removeSessionCalculatedMember(SessionCalculatedMember input)
Removes the specified SessionCalculatedMember from the Dimension.
Parameters:
input - The SessionCalculatedMember to remove.

getCalculatedMembers

public java.util.Vector getCalculatedMembers()
Gets the permanent and session-based calculated member specifications for the Dimension.
Returns:
A Vector of CalculatedMember objects.

createPermanentCalculatedMember

public PermanentCalculatedMember createPermanentCalculatedMember()
Creates a PermanentCalculatedMember for the Dimension.
Returns:
The new PermanentCalculatedMember.

createSessionCalculatedMember

public SessionCalculatedMember createSessionCalculatedMember()
Creates a SessionCalculatedMember for the Dimension.
Returns:
The new SessionCalculatedMember.

getAttributeBasedOnRole

public Attribute getAttributeBasedOnRole(java.lang.String role)
Gets the Attribute that has the specified role (classification). For a time dimension, the role can be END_DATE or TIME_SPAN.
Parameters:
role - A String that contains the role of the Attribute.
Returns:
The Attribute with the specified role.

readAWDefinitions

public void readAWDefinitions(AWConnection connection,
                              boolean readType)
Reads the objects owned by the Dimension into memory, making them available for processing within the current analytic workspace of the specified database connection.
Parameters:
connection - The AWConnection that represents the database connection.
readType - A boolean that specifies whether to read all or only some of the objects owned by the Dimension. Specify true to read the Dimension and all of its child objects. Specify false to read only the Dimension and its levels and attributes and the names of its hierarchies, and omit other child objects.

addModel

public void addModel(Model input)
Adds the specified Model to Dimension.
Parameters:
input - The Model to add.

removeModel

public void removeModel(Model input)
Removes the specified Model from the Dimension.
Parameters:
input - The Model to remove.

getModels

public java.util.Vector getModels()
Gets the Model objects owned by the Dimension.
Returns:
A Vector that contains the Model objects owned by the Dimension.

createModel

public Model createModel()
Creates a Model based on the Dimension.
Returns:
The new Model.

createIndex

public Index createIndex()
Creates an Index for the Dimension.
Returns:
An Index for the Dimension.

addIndex

public void addIndex(Index input)
Adds an Index to the Dimension.
Parameters:
input - The Index to add to the Dimension.

removeIndex

public void removeIndex(Index input)
Removes an Index from the Dimension.
Parameters:
The - Index to remove from the Dimension.

getIndexes

public java.util.Vector getIndexes()
Gets the Index objects owned by the Dimension.
Returns:
A Vector that contains the Index objects owned by the Dimension.

ValidateCalculatedMembers

public java.lang.String ValidateCalculatedMembers(AWConnection connection)
Determines the validity of the CalculatedMember objects of the Dimension. If a calculated dimension member is not valid, then this method throws an AWException exception.
Parameters:
connection - The AWConnection that represents the database connection.
Returns:
A String that contains success if the calculated dimension members are valid.

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

B14351-01

Copyright © 2003, 2005 Oracle. All rights reserved.