001/*
002// Licensed to Julian Hyde under one or more contributor license
003// agreements. See the NOTICE file distributed with this work for
004// additional information regarding copyright ownership.
005//
006// Julian Hyde licenses this file to you under the Apache License,
007// Version 2.0 (the "License"); you may not use this file except in
008// compliance with the License. You may obtain a copy of the License at:
009//
010// http://www.apache.org/licenses/LICENSE-2.0
011//
012// Unless required by applicable law or agreed to in writing, software
013// distributed under the License is distributed on an "AS IS" BASIS,
014// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015// See the License for the specific language governing permissions and
016// limitations under the License.
017*/
018package org.olap4j.transform;
019
020import org.olap4j.CellSetAxis;
021import org.olap4j.Position;
022import org.olap4j.metadata.Member;
023
024/**
025 * Representation of member expressions on a query axis, derived from
026 * CellSetAxis objects.
027 *
028 * <p>Quaxes are used by MDX axis query transforms, to construct and use
029 * an internal tree-like representation of positions and members from the
030 * result CellSetAxis objects of a previous MDX query. This is needed
031 * for OLAP navigation operators like drill-down on a position.
032 *
033 * <p>Inspired from the JPivot Quax class.
034 *
035 * <p>NOTE: not exactly sure how to implement this, to be completed...
036 *
037 * @author etdub
038 * @since Aug 7, 2008
039 */
040public class Quax {
041    private final CellSetAxis cellSetAxis;
042
043    private TreeNode<Member> memberTree;
044
045    public Quax(CellSetAxis cellSetAxis) {
046        this.cellSetAxis = cellSetAxis;
047
048        for (Position p : cellSetAxis.getPositions()) {
049            p.getMembers();
050        }
051    }
052}
053
054// End Quax.java