SAP BI Java SDK

Package com.sap.ip.bi.sdk.dac.olap.query.msx

Provides classes for creating MemberSetExpressions, which specify a collection of tuples of members of one dimension (with one member per dimension).

See:
          Description

Interface Summary
IBIChildren An expression in the Select category, represents all children of the Member that is associated with this expression.
IBICompositeMemberSetExpression An expression in the Select category, provides the ability to logically group MemberSetExpressions.
IBIConditionBasedFilter An expression in the Filter category, retains only those objects of the input set that match the search condition specified by this FilterObject.
IBIDescendantsLevel An expression in the Select category, selects descendants based on a Level criterion.
IBIDimensionMembers An expression in the Select category, represents the set of all members of the dimension.
IBIDrill An expression in the Drill category, this is the supertype for all drill expressions.
IBIFilter An expression in the Filter category, represents the concept of filter expressions that eliminate objects (members/tuples) from a set based on either a ranking mechanism or a search condition.
IBIHierarchyMembers An expression in the Select category, represents the set of all members of the hierarchy associated with this expression.
IBILastPeriods An expression in the Select category, yields a set of index periods.
IBILevelDrill An expression in the Drill category, supports drilling by level.
IBILevelMembers An expression in the Select category, represents the set of all members of the level that is associated with this expression.
IBIMemberDrill An expression in the Drill category, supports drilling by member.
IBIMemberList An expression in the Select category, provides the ability to build a set by simply enumerating individual member objects.
IBIMemberSelection An expression in the Select category, represents a category of MemberSetExpressions that have a join type and select sets of members based on various "family relationships."
IBIMemberSetExpression Represents the concept of an expression that generates a collection of members of the same dimension or a single member.
IBIPeriodsToDate An expression in the Select category, yields a set of members at the level of the associated member.
IBIRange An expression in the Select category, represents a range of members.
IBIRankingFilter An expression in the Filter category, retains objects out of an input set based on a ranking condition such as those listed below.
IBISort An expression in the Sort category, controls the sort order of members or tuples in a set.
IBITimeSeries An expression in the Select category, represents a group of MemberSetExpressions, and more specifically memberSelections that are typically applied to dimensions which are related to time, hence the name TimeSeries.
 

Package com.sap.ip.bi.sdk.dac.olap.query.msx Description

Provides classes for creating MemberSetExpressions, which specify a collection of tuples of members of one dimension (with one member per dimension). MemberSetExpression is therefore a specification of an ordered collection of members of one dimension. This package documentation contains the following sections:

Overview

MemberSetExpressions are similar to TupleSetExpressions, which specify a collection of tuples of members of one to many dimensions (with one member per dimension). IBIMemberSetExpression, like IBITupleSetExpression, is derived from the abstract supertype SetExpression.

Let's consider the classes shared by both together in one diagram:

TupleSetExpression and MemberSetExpression diagram IBITupleSetExpression (from tsx) IBIMemberSetExpression IBICompositeTupleSetExpression (from tsx) IBICompositeMemberSetExpression IBISort IBIFilter IBIRankingFilter IBIConditionBasedFilter

The IBITupleSetExpression and IBIMemberSetExpression classes are abstract and can therefore not be instantiated. A list of subtypes are provided that can be instantiated in order to specify tuple collections in various ways (see All Known Subinterfaces in IBIMemberSetExpression and IBITupleSetExpression).

Regarding the existing subtypes of TupleSetExpression and MemberSetExpression, there are types which inherit only from TupleSetExpression, types which inherit only from MemberSetExpression, and types which inherit from both supertypes. The subtypes which are derived from both supertypes can be used to specify either tuple collections or member collections, depending on their parameterization.

The subtypes are IBIFilter (with the non-abstract subtypes IBIRankingFilter and IBIConditionBasedFilter) and IBISort, which can work on both tuple and member collections.

Categories of SetExpressions

Relevant for both TupleSetExpressions and MemberSetExpressions, there are four categories of SetExpressions:

  1. Select:
    These expressions select tuples or members and specify how they should interact with tuples and members in preceding expressions:
  2. Filter:
    These expressions eliminate tuples or members from a given set:
  3. Sort:
    This expression changes the order of selected tuples or members:
  4. Drill:
    These expressions either expand or collapse nodes in a hierarchy:

Join Types

In order to specify how two tuple/member collections should interact with each other, the model declares six different join types:

Type Description Usage
APPEND The resulting collection of tuples/members is computed by appending the current collection to the previously defined collection. Regarded as the default join type, and used to gradually define the resulting collection. Potential duplicate members are retained.
INITIAL The resulting collection of tuples/members equals the current collection. All previously-defined selections are ignored. This is mainly used as join type for the first TupleSetExpression or MemberSetExpression in a sequence.
EXCEPT The resulting collection of tuples/members equals the previously-defined collection, with all tuples/members of the current collection which also exist in the previously-defined collection removed. This is used to build business questions like "all products that are blue, but not sold in Texas."
GENERATE For each tuple/member of the previously-defined collection, the current collection will be applied and a new collection created. The resulting collection of tuples/members is computed by joining the newly-created collections. Only used if the current collection contains a variable like CURRENTMEMBER. With it, you can create the types of asymmetric result sets found in business questions like "the best 5 products of my best 5 stores."
INTERSECT The resulting collection of tuples/members equals the intersection of the previously-defined collection and the current collection. Used to build business questions like "all products that are green and liquid."
UNION The resulting collection of tuples/members is computed by joining the previously-defined collection with the current collection. Used to gradually define the resulting collection, like APPEND, but duplicate members are eliminated. Builds business questions such as "all products that are blue or liquid."

Composite Design Pattern

You can define IBIMemberSetExpressions and IBITupleSetExpressions either in a sequence, or nested in a tree-like structure. Use parenthesis to specify more complex tuple/member collections, for example:

( blue ∩ solid ) ∪ ( green ∩ liquid )

The IBIMemberSetExpression and IBITupleSetExpression models employ the concept of a design pattern, in this case, the composite design pattern, that specifies a treelike structure:

IBIMemberSetExpression and IBITupleSetExpression are abstract components. IBICompositeMemberSetExpression and IBICompositeTupleSetExpression are concrete composites, and all the non-abstract subtypes are concrete components (see All Known Subinterfaces in IBIMemberSetExpression and IBITupleSetExpression).
The composite design pattern is applied twice: once on the level of IBIMemberSetExpressions, and once on IBITupleSetExpressions. The exception is that there are classes which are concrete components of both design patterns: IBIFilter and IBISort.

The following example for an IBICompositeMemberSetExpression shows how the composite design pattern provides this kind of functionality.

ExampleExample query:
"All products that are green and liquid:"

The example "all products that are green and liquid" shows three main steps:

  1. Selecting all products of a specific level
  2. Restricting this collection to only the ones that are green in color
  3. Intersecting this restricted collection with another collection

But before you can intersect both collections, the collection represented by the IBICompositeMemberSetExpression must be computed first. For this purpose, you can associate the IBICompositeMemberSetExpression (IBICompositeTupleSetExpression) with a pair of parenthesis.

MemberSetExpressions

IBIMemberSetExpression and related classes are diagrammed below:

MemberSetExpression diagram IBIMemberSetExpression IBIDrill IBICompositeMemberSetExpression IBILevelDrill IBIMemberSelection IBIMemberDrill

Note from the diagram that the four SetExpressions categories are available:

  1. Select:
    IBICompositeMemberSetExpression, and All Known Subinterfaces of IBIMemberSelection.
  2. Filter:
    IBIRankingFilter and IBIConditionBasedFilter
  3. Sort:
    IBISort
  4. Drill:
    IBILevelDrill and IBIMemberDrill

MemberSelection

MemberSelection is a MemberSetExpression. Below are the sub-classes of IBIMemberSelection, which themselves are MemberSetExpressions:

MemberSelection diagramIBIRange IBIMemberSelection IBITimeSeries IBILastPeriods IBIDescendantsLevel IBIRange IBIChildren IBILevelMembers IBIHierarchyMembers IBIDimensionMembers IBIMemberList IBIPeriodsToDate

Since:
3.50

SAP BI Java SDK

Copyright © 2004-2006 by SAP AG. All Rights Reserved.
SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.
These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies (SAP Group) for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.