API Docs for:
Show:

Xmla.Dataset Class

Defined in: src/Xmla.js:5474
Module: xmla

This class implements an XML/A multidimensional Dataset object.

You do not need to instantiate objects of this class yourself. Rather, the Xmla class will instantiate this class to convey the result of the executeMultiDimensional method (see executeMultiDimensional()), and possibly the execute method. (Note that the execute() instantiates either the Xmla.Rowset or the Xmla.Dataset class depending on the value of the Format property in the options passed to the execute() method.)

An instance of the Xmla.Dataset class may be returned immediately as return value from these methods when doing a synchronous request. In addition, the Xmla.Dataset object is available in the eventdata passed to any registered listeners (see addListener()).

Constructor

Xmla.Dataset

(
  • doc
)

Defined in src/Xmla.js:5474

Parameters:

  • doc DOMDocument

    The responseXML result returned by server in response to a Execute request.

Methods

axisCount

() Int

Defined in src/Xmla.js:5637

Get the number of proper axes in this Dataset. This is the number of axes that appears in the SELECT list, and excludes the slicer axis.

Returns:

Int:

cellOrdinalForTupleIndexes

(
  • A
)
Int

Defined in src/Xmla.js:5796

Calculate the cellset ordinal for the argument tuple indexes.

This method accepts a variable number of tuple indexes. One integer argument must be passed for each proper axis (excluding the slicer axis). Each integer arguments represent the index of a tuple on the respective axis.

The arguments must be specified by descending axis order. So if the data set has two axes (a row and a column axis), this method expects the tuple index of a tuple on the row axis first, and after that, the tuple index on the column axis.

The method returns an integer that represents the ordinal of the cell identified by the tuples specified by the tuple index arguments. One could use this ordinal as argument to the getByOrdinal() method of this Dataset's Cellset.

Instead of calling this method and passing the result into the Cellsets getByOrdinal() method, you can call the getByTupleIndexes() method of this Dataset's Cellset.

Parameters:

  • A Int

    variable number of integer tuple indexes. Tuple indexes should be passed in descending order of axes.

Returns:

Int: The ordinal number that identifies the cell from this Dataset's Xmla.Dataset.Cellset that belongs to the tuples identified by the arguments.

close

()

Defined in src/Xmla.js:5860

Cleanup this Dataset object.

fetchAsObject

() Object

Defined in src/Xmla.js:5813

Gets all of the XML data into one JS object. The object consists of the following members:

  • axes: An array of objects that represent the query axes (but not the slicer axis). Each axis has a positions member which is an array of tuples, and a hierarchies member, which is an array of hierarchies.
  • slicerAxis: An object that represents the slicer axis, or null if there is no slicer axis.
  • cells: An array of cell objects, representing the cellset.

Returns:

Object:

getAxis

(
  • nameOrIndex
)
Xmla.Dataset.Axis

Defined in src/Xmla.js:5657

Get the axis specified by the argument index or name. If the axis does not exist, an INVALID_AXIS exception is thrown. To prevent an exception from being thrown, you should call the hasAxis() method to determine if the axis exists. Alternatively, you can call axisCount(), and use an integer argument between zero (inclusive) and axis count (exclusive).

Parameters:

  • nameOrIndex String | int

    For int arguments, a value of 0 up to the number of axes. You can also use one of the AXIS_xxx constants. For string arguments, this method will match the name of the axis as it is returned in the XML/A response. These names are of the form AxisN where N is an ordinal that identifies the axis.

Returns:

Xmla.Dataset.Axis: The Xmla.Dataset.Axis object that corresponds to the argument.

getCellset

() Xmla.Dataset.Cellset

Defined in src/Xmla.js:5788

Get the Cellset object.

getChapterAxis

() Xmla.Dataset.Axis

Defined in src/Xmla.js:5755

Get the Chapter axis. This is the fifth axis, and has ordinal 4. If the chapter axis doesn't exist, an INVALID_AXIS exception is thrown. To prevent an exception from being thrown, you should call the hasChapterAxis() method to determine if the axis exists.

Returns:

Xmla.Dataset.Axis: The chapter Xmla.Dataset.Axis object.

getColumnAxis

() Xmla.Dataset.Axis

Defined in src/Xmla.js:5687

Get the Column axis. This is the first axis, and has ordinal 0. If the column axis doesn't exist, an INVALID_AXIS exception is thrown. To prevent an exception from being thrown, you should call the hasColumnAxis() method to determine if the axis exists.

Returns:

Xmla.Dataset.Axis: The column Xmla.Dataset.Axis object.

getPageAxis

() Xmla.Dataset.Axis

Defined in src/Xmla.js:5721

Get the Page axis. This is the third axis, and has ordinal 2. If the page axis doesn't exist, an INVALID_AXIS exception is thrown. To prevent an exception from being thrown, you should call the hasPageAxis() method to determine if the axis exists.

Returns:

getRowAxis

() Xmla.Dataset.Axis

Defined in src/Xmla.js:5704

Get the Row axis. This is the second axis, and has ordinal 1. If the row axis doesn't exist, an INVALID_AXIS exception is thrown. To prevent an exception from being thrown, you should call the hasRowAxis() method to determine if the axis exists.

Returns:

getSectionAxis

() Xmla.Dataset.Axis

Defined in src/Xmla.js:5738

Get the Section axis. This is the fourth axis, and has ordinal 3. If the section axis doesn't exist, an INVALID_AXIS exception is thrown. To prevent an exception from being thrown, you should call the hasSectionAxis() method to determine if the axis exists.

Returns:

Xmla.Dataset.Axis: The section Xmla.Dataset.Axis object.

getSlicerAxis

() Xmla.Dataset.Axis

Defined in src/Xmla.js:5772

Get the Slicer axis. This is the axis that appears in the WHERE clause of the MDX statement.

Returns:

Xmla.Dataset.Axis: The slicer Xmla.Dataset.Axis object.

hasAxis

(
  • nameOrIndex
)
Boolean

Defined in src/Xmla.js:5677

Determine if the axis specified by the argument exists.

Parameters:

  • nameOrIndex String | int

    For int arguments, a value of 0 up to the number of axes. You can also use one of the AXIS_xxx constants. For string arguments, this method will match the name of the axis as it is returned in the XML/A response. These names are of the form AxisN where N is an ordinal that identifies the axis.

Returns:

Boolean: true if the specified axis exists, false if it doesn't exist.

hasChapterAxis

() Boolean

Defined in src/Xmla.js:5764

Determine if the chapter axis exists.

Returns:

Boolean: true if the chapter axis exists, false if it doesn't exist.

hasColumnAxis

() Boolean

Defined in src/Xmla.js:5696

Determine if the column axis exists.

Returns:

Boolean: true if the column axis exists, false if it doesn't exist.

hasPageAxis

() Boolean

Defined in src/Xmla.js:5730

Determine if the page axis exists.

Returns:

Boolean: true if the page axis exists, false if it doesn't exist.

hasRowAxis

() Boolean

Defined in src/Xmla.js:5713

Determine if the row axis exists.

Returns:

Boolean: true if the row axis exists, false if it doesn't exist.

hasSectionAxis

() Boolean

Defined in src/Xmla.js:5747

Determine if the section axis exists.

Returns:

Boolean: true if the section axis exists, false if it doesn't exist.

hasSlicerAxis

() Boolean

Defined in src/Xmla.js:5780

Determine if the slicer axis exists.

Returns:

Boolean: true if the slicer axis exists, false if it doesn't exist.

Properties

AXIS_CHAPTERS

Int final static

Defined in src/Xmla.js:5543

Can be used as argument for getAxis() to get the fifth axis (the chapters axis). Alternatively you can simply call getChapterAxis()

Default: <code>4</code>

AXIS_COLUMNS

Int final static

Defined in src/Xmla.js:5503

Can be used as argument for getAxis() to get the first axis (the column axis). Alternatively you can simply call getColumnAxis()

Default: <code>0</code>

AXIS_PAGES

Int final static

Defined in src/Xmla.js:5523

Can be used as argument for getAxis() to get the third axis (the page axis). Alternatively you can simply call getPageAxis()

Default: <code>2</code>

AXIS_ROWS

Int final static

Defined in src/Xmla.js:5513

Can be used as argument for getAxis() to get the second axis (the row axis). Alternatively you can simply call getRowAxis()

Default: <code>1</code>

AXIS_SECTIONS

Int final static

Defined in src/Xmla.js:5533

Can be used as argument for getAxis() to get the fourth axis (the section axis). Alternatively you can simply call getSectionAxis()

Default: <code>3</code>

AXIS_SLICER

String final static

Defined in src/Xmla.js:5553

Can be used as argument for getAxis() to get the slicer axis (the axis that appears in the WHERE clause of an MDX-SELECT statement). Alternatively you can simply call getSlicerAxis()

Default: <code>SlicerAxis</code>