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 ); } } } }
private void showCell(StringBuilder out, Cell cell) { out.append("<td class='cell'>") .append(cell.getFormattedValue()) .append("</td>"); }
public boolean isError() { return cell.isError(); }
public boolean isNull() { return cell.isNull(); }
private void buildCell(Cell cell, Element row, boolean even) { Element cellElem = elem("cell", row); String s = cell.getFormattedValue(); if (s == null || s.length() == 0 || s.equals("(null)")) { s = "\u00a0"; // } cellElem.setAttribute("value", s); cellElem.setAttribute("style", even ? "even" : "odd"); }
coords[0] = columnOrdinal; final Cell cell = result.getCell( coords ); rowValues.add( cell.getValue() );
private void printCell(PrintWriter pw, int[] pos) { Cell cell = getCell(pos); pw.print(cell.getFormattedValue()); }
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()
result.getCell(new int[]{0}).getFormattedValue(); mdxResult = resultString; clearError();
public Object getValue() { return cell.getValue(); }
public String getFormattedValue() { return cell.getFormattedValue(); }