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

How to use
getAxes
method
in
mondrian.olap.Result

Best Java code snippets using mondrian.olap.Result.getAxes (Showing top 12 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 Axis[] axes = result.getAxes();
rows = new ArrayList<>();
headings = new ArrayList<>();
origin: pentaho/pentaho-kettle

final Axis[] axes = result.getAxes();
if ( axes.length != 2 ) {
 throw new KettleDatabaseException( BaseMessages.getString( PKG, "MondrianInputErrorOnlyTabular" ) );
origin: pentaho/mondrian

private String getBoundsAsString() {
  StringBuilder buf = new StringBuilder();
  Axis[] axes = result.getAxes();
  for (int i = 0; i < axes.length; i++) {
    if (i > 0) {
      buf.append(", ");
    }
    buf.append(axes[i].getPositions().size());
  }
  return buf.toString();
}
origin: pentaho/mondrian

  void buildCornerElement(Element row) {
    Element corner = elem("corner", row);
    corner.setAttribute(
      "rowspan",
      Integer.toString(
        result.getAxes()[0].getPositions().get(0).size()));
    corner.setAttribute(
      "colspan",
      Integer.toString(
        result.getAxes()[1].getPositions().get(0).size()));
  }
}
origin: pentaho/mondrian

private int[] ordinalToCoordinateArray(int ordinal) {
  Axis[] axes = result.getAxes();
  final int[] pos = new int[axes.length];
  int modulo = 1;
  for (int i = 0; i < axes.length; i++) {
    int prevModulo = modulo;
    modulo *= axes[i].getPositions().size();
    pos[i] = (ordinal % modulo) / prevModulo;
  }
  if (ordinal < 0 || ordinal >= modulo) {
    throw new IndexOutOfBoundsException(
      "Cell ordinal " + ordinal
      + ") lies outside CellSet bounds ("
      + getBoundsAsString() + ")");
  }
  return pos;
}
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

html.append(Util.nl);
List<Position> columns = result.getAxes()[0].getPositions();
List<Position> rows = null;
if (result.getAxes().length == 2) {
  rows = result.getAxes()[1].getPositions();
if (result.getAxes().length == 2) {
  rowWidth = result.getAxes()[1].getPositions().get(0).size();
  if (j == 0 && result.getAxes().length > 1) {
if (result.getAxes().length > 1) {
  for (int i = 0; i < rows.size(); i++) {
    html.append("<tr>");
origin: pentaho/mondrian

private Element build() {
  dimCount = result.getAxes().length;
  Element mdxtable = factory.createElement("mdxtable");
  Element query = elem("query", mdxtable);
  cdata(Util.unparse(result.getQuery()), query);
  Element head = elem("head", mdxtable);
  Element body = elem("body", mdxtable);
  switch (dimCount) {
  case 0:
    buildRows0Dim(body);
    break;
  case 1:
    buildColumns(head, result.getAxes()[0]);
    buildRows1Dim(body);
    break;
  case 2:
    buildColumns(head, result.getAxes()[0]);
    buildRows2Dim(body, result.getAxes()[1]);
    break;
  default:
    throw new IllegalArgumentException(
      "DomBuilder requires 0, 1 or 2 dimensional result");
  }
  Element slicers = elem("slicers", mdxtable);
  buildSlicer(slicers);
  return mdxtable;
}
origin: pentaho/mondrian

super(execution, result.getAxes().clone());
int axisCount = underlying.getAxes().length;
this.pos = new int[axisCount];
this.slicerAxis = underlying.getSlicerAxis();
TupleList tupleList =
  ((RolapAxis) underlying.getAxes()[axis]).getTupleList();
origin: pentaho/mondrian

mondrian.olap.Axis[] axes = result.getAxes();
QueryAxis[] queryAxes = result.getQuery().getAxes();
assert axes.length == queryAxes.length;
origin: jasperreports/jasperreports

public JRMondrianResult(Result result)
{
  this.result = result;
  JRMondrianFactory factory = new JRMondrianFactory();
  Query query = result.getQuery();
  Axis[] resultAxes = result.getAxes();
  axes = new JRMondrianAxis[resultAxes.length];
  for (int i = 0; i < resultAxes.length; i++)
  {
    AxisOrdinal ordinal = AxisOrdinal.StandardAxisOrdinal.forLogicalOrdinal(i);
    axes[i] = new JRMondrianAxis(resultAxes[i], query.getMdxHierarchiesOnAxis(ordinal), factory);
  }
}
mondrian.olapResultgetAxes

Javadoc

Returns the non-slicer axes.

Popular methods of Result

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

Popular in Java

  • Reading from database using SQL prepared statement
  • notifyDataSetChanged (ArrayAdapter)
  • getSystemService (Context)
  • setContentView (Activity)
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • Top plugins for WebStorm
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