001    /*
002    // $Id: StandardTransformLibrary.java 229 2009-05-08 19:11:29Z jhyde $
003    // This software is subject to the terms of the Eclipse Public License v1.0
004    // Agreement, available at the following URL:
005    // http://www.eclipse.org/legal/epl-v10.html.
006    // Copyright (C) 2008-2008 Julian Hyde
007    // All Rights Reserved.
008    // You must accept the terms of that agreement to use this software.
009    */
010    package org.olap4j.transform;
011    
012    import org.olap4j.Axis;
013    import org.olap4j.CellSet;
014    
015    /**
016     * Standard transformations library
017     *
018     * NOTE: is this really needed since transforms' ctors have the same
019     * parameters as these functions? This serves only as a place to conveniently
020     * regroup transforms in a "library".
021     *
022     * @author etdub
023     * @author jhyde
024     * @version $Id: StandardTransformLibrary.java 229 2009-05-08 19:11:29Z jhyde $
025     * @since Jul 28, 2008
026     */
027    public class StandardTransformLibrary {
028    
029        public static MdxQueryTransform createDrillReplaceTransform(
030            Axis axis,
031            int positionOrdinalInAxis,
032            int memberOrdinalInPosition,
033            CellSet cellSet)
034        {
035            return new DrillReplaceTransform(
036                axis,
037                positionOrdinalInAxis,
038                memberOrdinalInPosition,
039                cellSet);
040        }
041    
042        public static MdxQueryTransform createDrillDownOnPositionTransform(
043            Axis axis,
044            int positionOrdinalInAxis,
045            int memberOrdinalInPosition,
046            CellSet cellSet)
047        {
048            return new DrillDownOnPositionTransform(
049                axis,
050                positionOrdinalInAxis,
051                memberOrdinalInPosition,
052                cellSet);
053        }
054    
055        public static MdxQueryTransform createRollUpLevelTransform(
056            Axis axis,
057            int positionOrdinalInAxis,
058            int memberOrdinalInPosition,
059            CellSet cellSet)
060        {
061            return new RollUpLevelTransform(
062                axis,
063                positionOrdinalInAxis,
064                memberOrdinalInPosition,
065                cellSet);
066        }
067    
068        // many other transforms ...
069    }
070    
071    // End StandardTransformLibrary.java