Tabnine Logo
Result.getCell
Code IndexAdd Tabnine to your IDE (free)

How to use
getCell
method
in
mondrian.olap.Result

Best Java code snippets using mondrian.olap.Result.getCell (Showing top 11 results out of 315)

origin: pentaho/pentaho-kettle

private static void outputFlattenedRecurse( Result result, List<List<Object>> rows, List<Object> rowValues,
 int[] coords, int axisOrdinal ) {
 final Axis[] axes = result.getAxes();
 if ( axisOrdinal == axes.length ) {
  final Cell cell = result.getCell( coords );
  // Output the raw (unformatted) value of the cell.
  // NOTE: We could output other properties of the cell here, such as its
  // formatted value, too.
  rowValues.add( cell.getValue() );
  // Add a copy of the completed row to the list of rows.
  rows.add( new ArrayList<>( rowValues ) );
 } else {
  final Axis axis = axes[axisOrdinal];
  int k = -1;
  int saveLength = rowValues.size();
  for ( Position position : axis.getPositions() ) {
   coords[axisOrdinal] = ++k;
   for ( Member member : position ) {
    rowValues.add( member.getUniqueName() );
   }
   outputFlattenedRecurse( result, rows, rowValues, coords, axisOrdinal + 1 );
   while ( rowValues.size() > saveLength ) {
    rowValues.remove( rowValues.size() - 1 );
   }
  }
 }
}
origin: pentaho/pentaho-kettle

final Cell cell = result.getCell( coords );
rowValues.add( cell.getValue() );
origin: pentaho/mondrian

public synchronized Cell getCell(int[] externalPos) {
  try {
    System.arraycopy(
      externalPos, 0, this.pos, 0, externalPos.length);
    int offset = externalPos[axis];
    int mappedOffset = mapOffsetToUnderlying(offset);
    this.pos[axis] = mappedOffset;
    return underlying.getCell(this.pos);
  } catch (NullPointerException npe) {
    return underlying.getCell(externalPos);
  }
}
origin: pentaho/mondrian

private void buildRows0Dim(Element parent) {
  int[] cellIndex = new int[0];
  Element row = elem("row", parent);
  Cell cell = result.getCell(cellIndex);
  buildCell(cell, row, false);
}
origin: pentaho/mondrian

private void buildCells(Element row, int[] cellIndex, boolean even) {
  int columns = result.getAxes()[0].getPositions().size();
  for (int i = 0; i < columns; i++) {
    cellIndex[0] = i;
    Cell cell = result.getCell(cellIndex);
    buildCell(cell, row, even);
  }
}
origin: pentaho/mondrian

private Cell getCellInternal(int[] pos) {
  RolapCell cell;
  try {
    cell = (RolapCell) result.getCell(pos);
  } catch (MondrianException e) {
    if (e.getMessage().indexOf("coordinates out of range") >= 0) {
      int[] dimensions = new int[getAxes().size()];
      for (int i = 0; i < axisList.size(); i++) {
        dimensions[i] = axisList.get(i).getPositions().size();
      }
      throw new IndexOutOfBoundsException(
        "Cell coordinates (" + getCoordsAsString(pos)
          + ") fall outside CellSet bounds ("
          + getCoordsAsString(dimensions) + ")");
    } else if (e.getMessage().indexOf(
        "coordinates should have dimension") >= 0)
    {
      throw new IllegalArgumentException(
        "Cell coordinates should have dimension "
          + axisList.size());
    } else {
      throw e;
    }
  }
  return new MondrianOlap4jCell(pos, this, cell);
}
origin: pentaho/mondrian

  result.getCell(new int[]{0}).getFormattedValue();
mdxResult = resultString;
clearError();
origin: pentaho/mondrian

private boolean isEmptyRecurse(int fixedAxis, int axis) {
  if (axis < 0) {
    RolapCell cell = (RolapCell) underlying.getCell(pos);
    return cell.isNull();
  } else if (axis == fixedAxis) {
    return isEmptyRecurse(fixedAxis, axis - 1);
  } else {
    List<Position> positions = getAxes()[axis].getPositions();
    final int positionCount = positions.size();
    for (int i = 0; i < positionCount; i++) {
      pos[axis] = i;
      if (!isEmptyRecurse(fixedAxis, axis - 1)) {
        return false;
      }
    }
    return true;
  }
}
origin: pentaho/mondrian

final Query query = connection.parseQuery(mdx);
final Result result = connection.execute(query);
final Object o = result.getCell(new int[0]).getValue();
return o instanceof Number
  ? ((Number) o).doubleValue()
origin: pentaho/mondrian

    showCell(html, result.getCell(new int[] {j, i}));
html.append("<tr>");
for (int i = 0; i < columns.size(); i++) {
  showCell(html, result.getCell(new int[] {i}));
origin: jasperreports/jasperreports

public JROlapCell getCell(int[] axisPositions)
{
  Cell dataCell = result.getCell(axisPositions);
  JRMondrianCell cell = new JRMondrianCell(dataCell);
  return cell;
}
mondrian.olapResultgetCell

Javadoc

Returns the cell at a given set of coordinates. For example, in a result with 4 columns and 6 rows, the top-left cell has coordinates [0, 0], and the bottom-right cell has coordinates [3, 5].

Popular methods of Result

  • close
  • getAxes
  • getQuery
  • print
  • getSlicerAxis
    Returns the slicer axis.

Popular in Java

  • Making http requests using okhttp
  • setScale (BigDecimal)
  • putExtra (Intent)
  • getExternalFilesDir (Context)
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • Socket (java.net)
    Provides a client-side TCP socket.
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • BoxLayout (javax.swing)
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now