Package mondrian.olap

Examples of mondrian.olap.Axis


  private String calcColumnNameFromRowHeader(final int columnNumber)
  {
    // Flatten out the column headers into one column-name
    final Axis[] axes = this.resultSet.getAxes();
    final Axis axis = axes[AXIS_ROW];
    final List<Position> positions = axis.getPositions();
    final Position firstPosition = positions.get(0);
    if (columnNumber < firstPosition.size())
    {
      final Member member = firstPosition.get(columnNumber);
      return member.getHierarchy().getName();
View Full Code Here


    final Axis[] axes = this.resultSet.getAxes();
    if (axes.length < 1)
    {
      return new GenericObjectTable();
    }
    final Axis axis = axes[AXIS_COLUMN];
    final List<Position> positions = axis.getPositions();
    final int colCount = positions.size();
    final GenericObjectTable result = new GenericObjectTable(20, Math.max(1, colCount));
    for (int c = 0; c < colCount; c++)
    {
      final Position position = positions.get(c);
View Full Code Here

    final Axis[] axes = this.resultSet.getAxes();
    if (axes.length < 2)
    {
      return new GenericObjectTable();
    }
    final Axis axis = axes[AXIS_ROW];
    final List<Position> positions = axis.getPositions();
    final int rowCount = positions.size();
    final GenericObjectTable result = new GenericObjectTable(Math.max(1, rowCount), 5);

    for (int r = 0; r < rowCount; r++)
    {
View Full Code Here

  public static int[] computeItemsPerAxis(final Axis[] axes)
  {
    int[] axesSize = new int[axes.length];
    for (int axesIndex = 0; axesIndex < axes.length; axesIndex += 1)
    {
      final Axis axis = axes[axesIndex];
      axesSize[axesIndex] = axis.getPositions().size();
    }
    return axesSize;
  }
View Full Code Here

  {
    final int[] membersPerAxis = new int[axes.length];
    // Axis contains (zero or more) positions, which contains (zero or more) members
    for (int axesIndex = startAxis; axesIndex < axes.length; axesIndex++)
    {
      Axis axis = axes[axesIndex];
      membersPerAxis[axesIndex] = ResultSetProcessingLib.computeMemberCountForAxis(axis, membersOnAxisSorted);
    }

    return membersPerAxis;
  }
View Full Code Here

                                                               final boolean membersOnAxisSorted)
  {
    final ArrayList<Member> columnToMemberMapper = new ArrayList<Member>();
    for (int axesIndex = axes.length - 1; axesIndex >= startAxis; axesIndex -= 1)
    {
      final Axis axis = axes[axesIndex];
      final List<Position> positions = axis.getPositions();

      final MemberAddingStrategy strategy = membersOnAxisSorted ?
          new SortedMemberAddingStrategy(positions) :
          new ResultSetOrderMemberAddingStrategy();
View Full Code Here

  private String calcColumnNameFromRowHeader(final int columnNumber)
  {
    // Flatten out the column headers into one column-name
    final Axis[] axes = this.resultSet.getAxes();
    final Axis axis = axes[AXIS_ROW];
    final List<Position> positions = axis.getPositions();
    final Position firstPosition = positions.get(0);
    if (columnNumber < firstPosition.size())
    {
      final Member member = firstPosition.get(columnNumber);
      return member.getHierarchy().getName();
View Full Code Here

    final Axis[] axes = this.resultSet.getAxes();
    if (axes.length < 1)
    {
      return new GenericObjectTable();
    }
    final Axis axis = axes[AXIS_COLUMN];
    final List<Position> positions = axis.getPositions();
    final int colCount = positions.size();
    final GenericObjectTable result = new GenericObjectTable(20, Math.max(1, colCount));
    for (int c = 0; c < colCount; c++)
    {
      final Position position = positions.get(c);
View Full Code Here

    final Axis[] axes = this.resultSet.getAxes();
    if (axes.length < 2)
    {
      return new GenericObjectTable();
    }
    final Axis axis = axes[AXIS_ROW];
    final List<Position> positions = axis.getPositions();
    final int rowCount = positions.size();
    final GenericObjectTable result = new GenericObjectTable(Math.max(1, rowCount), 5);

    for (int r = 0; r < rowCount; r++)
    {
View Full Code Here

      columnNames.add(member.getLevel().getUniqueName());
    }
    if (axes.length > 0)
    {
      // now create the column names for the column-axis
      final Axis axis = axes[0];
      final List<Position> positions = axis.getPositions();
      for (int i = 0; i < positions.size(); i++)
      {
        final Position position = positions.get(i);
        columnNames.add(ResultSetProcessingLib.computeUniqueColumnName(position));
      }
View Full Code Here

TOP

Related Classes of mondrian.olap.Axis

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.