001 /*
002 // $Id: StandardTransformLibrary.java 482 2012-01-05 23:27:27Z jhyde $
003 //
004 // Licensed to Julian Hyde under one or more contributor license
005 // agreements. See the NOTICE file distributed with this work for
006 // additional information regarding copyright ownership.
007 //
008 // Julian Hyde licenses this file to you under the Apache License,
009 // Version 2.0 (the "License"); you may not use this file except in
010 // compliance with the License. You may obtain a copy of the License at:
011 //
012 // http://www.apache.org/licenses/LICENSE-2.0
013 //
014 // Unless required by applicable law or agreed to in writing, software
015 // distributed under the License is distributed on an "AS IS" BASIS,
016 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
017 // See the License for the specific language governing permissions and
018 // limitations under the License.
019 */
020 package org.olap4j.transform;
021
022 import org.olap4j.Axis;
023 import org.olap4j.CellSet;
024
025 /**
026 * Standard transformations library
027 *
028 * NOTE: is this really needed since transforms' ctors have the same
029 * parameters as these functions? This serves only as a place to conveniently
030 * regroup transforms in a "library".
031 *
032 * @author etdub
033 * @author jhyde
034 * @version $Id: StandardTransformLibrary.java 482 2012-01-05 23:27:27Z jhyde $
035 * @since Jul 28, 2008
036 */
037 public class StandardTransformLibrary {
038
039 public static MdxQueryTransform createDrillReplaceTransform(
040 Axis axis,
041 int positionOrdinalInAxis,
042 int memberOrdinalInPosition,
043 CellSet cellSet)
044 {
045 return new DrillReplaceTransform(
046 axis,
047 positionOrdinalInAxis,
048 memberOrdinalInPosition,
049 cellSet);
050 }
051
052 public static MdxQueryTransform createDrillDownOnPositionTransform(
053 Axis axis,
054 int positionOrdinalInAxis,
055 int memberOrdinalInPosition,
056 CellSet cellSet)
057 {
058 return new DrillDownOnPositionTransform(
059 axis,
060 positionOrdinalInAxis,
061 memberOrdinalInPosition,
062 cellSet);
063 }
064
065 public static MdxQueryTransform createRollUpLevelTransform(
066 Axis axis,
067 int positionOrdinalInAxis,
068 int memberOrdinalInPosition,
069 CellSet cellSet)
070 {
071 return new RollUpLevelTransform(
072 axis,
073 positionOrdinalInAxis,
074 memberOrdinalInPosition,
075 cellSet);
076 }
077
078 // many other transforms ...
079 }
080
081 // End StandardTransformLibrary.java