Package org.saiku.olap.dto.filter

Examples of org.saiku.olap.dto.filter.SaikuFilter


      @FormParam("filter") String filterJSON) {
    try {

      ObjectMapper mapper = new ObjectMapper();
      mapper.setVisibilityChecker(mapper.getVisibilityChecker().withFieldVisibility(Visibility.ANY));
      SaikuFilter filter = mapper.readValue(filterJSON, SaikuFilter.class);
      String username = sessionService.getAllSessionObjects().get("username").toString();
      filter.setOwner(username);
      Map<String, SaikuFilter> filters = getFiltersInternal();
      filters.put(filter.getName(), filter);
      serialize(getUserFile(), filters);
      return Response.ok(filter).build();
    } catch (Exception e) {
      LOG.error("Cannot save filter (" + filterJSON + ")", e);
      String error = ExceptionUtils.getRootCauseMessage(e);
View Full Code Here


//System.out.println("Rest   Time: " + new Double(end- body).intValue());
      members = ObjectUtil.convert2Simple(mset);
      Collections.sort(members, new SaikuUniqueNameComparator());
      LOG.debug("Create Filters: Found members in the result or query: " + members.size());

      return new SaikuFilter(filtername, null, dimension, hierarchy, members);
    } catch (Exception e) {
      throw new SaikuServiceException("Error getFilter:" + filtername + " for query: " + queryName, e);
    }
  }
View Full Code Here

  @NotNull
  public SaikuQuery removeFilter(String queryname) {
    IQuery query = getIQuery(queryname);
    if (query != null && query.getFilter() != null) {
      SaikuFilter filter = query.getFilter();
      QueryDimension qDim = query.getDimension(filter.getDimension().getName());
      if (qDim != null) {
        qDim.clearInclusions();
        query.moveDimension(qDim, null);
      }
      query.removeFilter();
View Full Code Here

      @QueryParam("level") String level) {
    if (LOG.isDebugEnabled()) {
      LOG.debug("TRACK\t" + "\t/query/" + queryName + "/filter\tGET");
    }
    try {
      SaikuFilter t = olapQueryService.getFilter(queryName, "new", dimension, hierarchy, level);
      return Response.ok(t).build();
    } catch (Exception e) {
      LOG.error("Cannot get filter for query (" + queryName + ")", e);
      String error = ExceptionUtils.getRootCauseMessage(e);
      return Response.serverError().entity(error).build();
View Full Code Here

      LOG.debug("TRACK\t" + "\t/query/" + queryName + "/tags\tPUT");
    }
    try {
      ObjectMapper mapper = new ObjectMapper();
      mapper.setVisibilityChecker(mapper.getVisibilityChecker().withFieldVisibility(Visibility.ANY));
      SaikuFilter filter = mapper.readValue(filterJSON, SaikuFilter.class);
      SaikuQuery sq = olapQueryService.applyFilter(queryName, filter);
      return Response.ok(sq).build();
    } catch (Exception e) {
      LOG.error("Cannot activate filter for query (" + queryName + "), json:" + filterJSON, e);
      String error = ExceptionUtils.getRootCauseMessage(e);
View Full Code Here

TOP

Related Classes of org.saiku.olap.dto.filter.SaikuFilter

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.