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.Axis;
021import org.olap4j.CellSet;
022
023/**
024 * Standard transformations library
025 *
026 * NOTE: is this really needed since transforms' ctors have the same
027 * parameters as these functions? This serves only as a place to conveniently
028 * regroup transforms in a "library".
029 *
030 * @author etdub
031 * @author jhyde
032 * @since Jul 28, 2008
033 */
034public class StandardTransformLibrary {
035
036    public static MdxQueryTransform createDrillReplaceTransform(
037        Axis axis,
038        int positionOrdinalInAxis,
039        int memberOrdinalInPosition,
040        CellSet cellSet)
041    {
042        return new DrillReplaceTransform(
043            axis,
044            positionOrdinalInAxis,
045            memberOrdinalInPosition,
046            cellSet);
047    }
048
049    public static MdxQueryTransform createDrillDownOnPositionTransform(
050        Axis axis,
051        int positionOrdinalInAxis,
052        int memberOrdinalInPosition,
053        CellSet cellSet)
054    {
055        return new DrillDownOnPositionTransform(
056            axis,
057            positionOrdinalInAxis,
058            memberOrdinalInPosition,
059            cellSet);
060    }
061
062    public static MdxQueryTransform createRollUpLevelTransform(
063        Axis axis,
064        int positionOrdinalInAxis,
065        int memberOrdinalInPosition,
066        CellSet cellSet)
067    {
068        return new RollUpLevelTransform(
069            axis,
070            positionOrdinalInAxis,
071            memberOrdinalInPosition,
072            cellSet);
073    }
074
075    // many other transforms ...
076}
077
078// End StandardTransformLibrary.java