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

B14351-01

oracle.AWXML
Class Attribute

java.lang.Object
  |
  +--oracle.AWXML.BaseObject
        |
        +--oracle.AWXML.Attribute
Direct Known Subclasses:
AttributeProjection

public class Attribute
extends BaseObject
implements DerivedMeasureInput

A BaseObject that represents an attribute of a dimension member. An attribute is some quality of a dimension member. For example, a Product dimension might have a color attribute for certain types of products. Attributes are often used to restrict the current set of active dimension members. For a diagram of the associations of the Attribute class, see Analytic Workspace Java API Object Model.

An Attribute can have a native OLAP data type or it can have a domain of a dimension. When a dimension is the domain of an attribute, all attribute values are members of the associated dimension. Refer to the OLAP DML Reference for information on the valid data types that are native to OLAP processing within analytic workspaces.

An attribute can have a classification, which supplies it with a predetermined meaning. Classified attributes have specific OLAP data types depending on the classification. The following table lists the Attribute classifications, the data type of the classification, and a brief description.

Classification

Data Type

Description

DEFAULT_ORDER

Numeric

Position in the default order.

END_DATE

Date

Last date in a time period.

TIME_SPAN

Numeric

Number of days in a time period.

MEMBER_LONG_DESCRIPTION

Text

Long description.

MEMBER_SHORT_DESCRIPTION

Text

Short description.

MEMBER_VISIBLE

Boolean

Hidden or visible?

USER

---

User-defined.

The Attribute class implements the DerivedMeasureInput interface. You can therefore use an Attribute as am input to calculations that generate derived measures.

In the current release, only Dimension objects can support attributes. To apply an attribute to an object owned by a dimension, use an AttributeProjection.


Fields inherited from class oracle.AWXML.BaseObject
DATABASENULL

Constructor Summary
Attribute(BaseObject input)
Creates an Attribute for the specified Dimension.

Method Summary
java.lang.String Alter(AWConnection connection)
Alters this Attribute in the current analytic workspace.
java.lang.String Create(AWConnection connection)
Creates the Attribute in the current analytic workspace of the specified database connection.
java.lang.String Delete(AWConnection connection)
Deletes the Attribute in the current analytic workspace of the specified database connection.
java.lang.String getClassification()
Gets the classification of the Attribute.
java.lang.String getDataType()
Gets the name of the data type of the Attribute.
Dimension getDimensionDomain()
Gets the Dimension referenced as the domain for the Attribute.
boolean isDefaultOrder()
Indicates whether the Attribute is used to define the default sort order for the dimension.
boolean isMultiLingual()
Indicates whether the Attribute has values for more than one language.
void setClassification(java.lang.String input)
Specifies the classification of the Attribute.
void setDataType(java.lang.String input)
Specifies the data type of the Attribute.
void setDimensionDomain(Dimension input)
Assigns the specified Dimension as the domain of the Attribute.
void setIsDefaultOrder(boolean input)
Specifies whether to use the Attribute to define the default sort order for the dimension.
void setIsDefaultOrder(java.lang.Boolean input)
Specifies whether to use the Attribute to define the default sort order for the dimension.
void setIsMultiLingual(boolean input)
Specifies whether the Attribute has values for more than one language.
void setIsMultiLingual(java.lang.Boolean input)
Specifies whether the Attribute has values for more than one language.
java.lang.String WriteToXML()
Gets an XML representation of the Attribute.

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

Attribute

public Attribute(BaseObject input)
Creates an Attribute for the specified Dimension.
Parameters:
input - The Dimension that owns the Attribute.

Method Detail

setDimensionDomain

public void setDimensionDomain(Dimension input)
Assigns the specified Dimension as the domain of the Attribute. All values of the Attribute are members of the associated dimension. Attributes defined with a dimension domain perform better than attributes with standard data types when the number of unique attribute values is small compared to the size of the owning dimension.
Parameters:
input - The Dimension to use as the domain of this Attribute.

getDimensionDomain

public Dimension getDimensionDomain()
Gets the Dimension referenced as the domain for the Attribute.
Returns:
The Dimension representing the domain of the Attribute.

setClassification

public void setClassification(java.lang.String input)
Specifies the classification of the Attribute. The classification system provides predetermined meanings for specific attributes. The attribute classifications are the following:
   DEFAULT_ORDER
   END_DATE
   TIME_SPAN
   MEMBER_LONG_DESCRIPTION
   MEMBER_SHORT_DESCRIPTION
   MEMBER_VISIBLE
   USER

To identify an Attribute that is used by a foreign tool or application for its own purpose, specify a classification of USER.

Parameters:
input - The classification that you want the Attribute to have.

getClassification

public java.lang.String getClassification()
Gets the classification of the Attribute.
Returns:
The Attribute classification.

setDataType

public void setDataType(java.lang.String input)
Specifies the data type of the Attribute.

The data type can be any valid type supported by the OLAP DML.

Parameters:
input - The data type of the Attribute.

getDataType

public java.lang.String getDataType()
Gets the name of the data type of the Attribute.
Returns:
The name of the OLAP data type of the Attribute.

WriteToXML

public java.lang.String WriteToXML()
Gets an XML representation of the Attribute.
Overrides:
WriteToXML in class BaseObject
Returns:
An XML String that represents the Attribute.

isDefaultOrder

public boolean isDefaultOrder()
Indicates whether the Attribute is used to define the default sort order for the dimension.
Returns:
True if the attribute defines the default sort order for the dimension, otherwise False.

setIsDefaultOrder

public void setIsDefaultOrder(boolean input)
Specifies whether to use the Attribute to define the default sort order for the dimension. By default, an Attribute does not define the default sort order.
Parameters:
input - The boolean true if you want the Attribute to define the default sort order for the dimension, or false otherwise.

setIsDefaultOrder

public void setIsDefaultOrder(java.lang.Boolean input)
Specifies whether to use the Attribute to define the default sort order for the dimension. By default, an Attribute does not define the default sort order.
Parameters:
input - A Boolean that contains true if you want the Attribute to define the default sort order for the dimension, or false otherwise.

Create

public java.lang.String Create(AWConnection connection)
Creates the Attribute in the current analytic workspace of the specified database connection.
Overrides:
Create in class BaseObject
Parameters:
connection - The AWConnection that represents the database connection.
Returns:
If successful, a String that contains success.

Alter

public java.lang.String Alter(AWConnection connection)
Alters this Attribute in the current analytic workspace.
Overrides:
Alter in class BaseObject
Parameters:
connection - The AWConnection that specifies the database connection.
Returns:
If successful, a String that contains success.

Delete

public java.lang.String Delete(AWConnection connection)
Deletes the Attribute in the current analytic workspace of the specified database connection.
Overrides:
Delete in class BaseObject
Parameters:
connection - The AWConnection that represents the database connection.
Returns:
If successful, a String that contains success.

setIsMultiLingual

public void setIsMultiLingual(java.lang.Boolean input)
Specifies whether the Attribute has values for more than one language.
Parameters:
input - A Boolean that indicates whether the Attribute has values for more than one language.

setIsMultiLingual

public void setIsMultiLingual(boolean input)
Specifies whether the Attribute has values for more than one language.
Parameters:
input - A boolean that indicates whether the Attribute has values for more than one language.

isMultiLingual

public boolean isMultiLingual()
Indicates whether the Attribute has values for more than one language.
Returns:
A boolean that is true if the Attribute has values for more than one language or false otherwise.

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

B14351-01

Copyright © 2003, 2005 Oracle. All rights reserved.