Package org.saiku.olap.util.formatter

Examples of org.saiku.olap.util.formatter.ICellSetFormatter


      @FormParam("limit") @DefaultValue("0") int limit) {
    if (LOG.isDebugEnabled()) {
      LOG.debug("TRACK\t" + "\t/query/" + queryName + "/result" + formatter + "\tPOST");
    }
    try {
      ICellSetFormatter icf;
      formatter = formatter == null ? "" : formatter.toLowerCase();
      if (formatter.equals("flat")) {
        icf = new CellSetFormatter();
      } else if (formatter.equals("hierarchical")) {
        icf = new HierarchicalCellSetFormatter();
View Full Code Here


  private OlapResultSetUtil() {
  }

  @NotNull
  public static CellDataSet cellSet2Matrix(final CellSet cellSet) {
    final ICellSetFormatter formatter = new HierarchicalCellSetFormatter();
    return cellSet2Matrix(cellSet, formatter);
  }
View Full Code Here

  }

  @NotNull
  public CellDataSet execute(@NotNull ThinQuery tq, @Nullable String formatter) {
    String formatterName = formatter == null ? "" : formatter.toLowerCase();
    ICellSetFormatter cf = cff.forName(formatterName);
    return execute(tq, cf);
  }
View Full Code Here

  public CellDataSet getFormattedResult(String query, @NotNull String format) throws Exception {
    QueryContext qc = getContext(query);
    ThinQuery tq = qc.getOlapQuery();
    CellSet cs = qc.getOlapResult();
    String formatterName = StringUtils.isBlank(format) ? "" : format.toLowerCase();
    ICellSetFormatter cf = cff.forName(formatterName);
    CellDataSet result = OlapResultSetUtil.cellSet2Matrix(cs, cf);

    if (ThinQuery.Type.QUERYMODEL.equals(tq.getType()) && cf instanceof FlattenedCellSetFormatter && tq
        .hasAggregators()) {
      calculateTotals(tq, result, cs, cf);
View Full Code Here

    return getExport(queryName, type, new FlattenedCellSetFormatter());
  }

  public byte[] getExport(String queryName, @NotNull String type, @Nullable String formatter) {
    String formatterName = formatter == null ? "" : formatter.toLowerCase();
    ICellSetFormatter cf = cff.forName(formatterName);
    return getExport(queryName, type, cf);
  }
View Full Code Here

TOP

Related Classes of org.saiku.olap.util.formatter.ICellSetFormatter

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.