Package de.laures.cewolf

Examples of de.laures.cewolf.DatasetProduceException


    int period, skip;
    try {
      period = Integer.parseInt((String) params.get("period"));
      skip = Integer.parseInt((String) params.get("skip"));
    } catch (RuntimeException ex) {
      throw new DatasetProduceException("'period' and 'skip' parameters don't seem to have valid integer values");
    }
    if (dataset instanceof XYDataset) {
          return MovingAverage.createMovingAverage((XYDataset)dataset, suffix, period, skip);
    } else {
      throw new DatasetProduceException("moving average only supported for XYDatasets");
    }
  }
View Full Code Here


      while (rs.next()) {
        series.add((Number) rs.getObject(xColIndex), (Number) rs.getObject(yColIndex));
      }
    } catch (Exception namingEx) {
      LOG.warn(namingEx);
      throw new DatasetProduceException(namingEx.getMessage(), namingEx);
    } finally {
      try { if (rs != null) rs.close(); } catch (Exception ex) { }
      try { if (stmt != null) stmt.close(); } catch (Exception ex) { }
      try { if (con != null) con.close(); } catch (Exception ex) { }
    }
View Full Code Here

        try {
            results = null;
            Session session = ThreadSession.get();
            results = session.find(query);
        } catch (Exception e) {
            throw new DatasetProduceException(e.getMessage());
        }
        DefaultPieDataset data = new DefaultPieDataset();
        for (int i = 0; i < results.size(); i++) {
            Object[] objects = (Object[])results.get(i);
            data.setValue(getLabel(objects), getCount(objects));
View Full Code Here

                            .get("txt_periodo_i"), (String) params
                            .get("txt_periodo_f"));

        } catch (SQLException e) {
            e.printStackTrace();
            DatasetProduceException dspe = new DatasetProduceException(
                    "Erro ao gerar os dados de pizza");
            dspe.initCause(e);
            throw dspe;
        }

    }
View Full Code Here

            return null;

        } catch (SQLException e) {
            e.printStackTrace();
            DatasetProduceException dspe = new DatasetProduceException(
                    "Erro ao gerar os dados de pizza");
            dspe.initCause(e);
            throw dspe;
        }

    }
View Full Code Here

    int period = ((Integer)params.get("period")).intValue();
    int skip = ((Integer)params.get("skip")).intValue();
    if(dataset instanceof XYDataset){
          return MovingAverage.createMovingAverage((XYDataset)dataset, suffix, period, skip);
    } else {
      throw new DatasetProduceException("moving average only supported for XYDatasets");
    }
  }
View Full Code Here

      while(rs.next()){
        series.add((Number)rs.getObject(xColIndex), (Number)rs.getObject(yColIndex));
      }
    } catch (Exception namingEx) {
      namingEx.printStackTrace();
      throw new DatasetProduceException(namingEx.getMessage());
    }
    return series;
  }
View Full Code Here

  public Object produceDataset(Map params) throws DatasetProduceException {
    TimeSeries ts = null;
    try {
      ts = getTimeseries();
    } catch (Throwable e) {
      throw new DatasetProduceException("An error occurred generating the TimeSeries Object " + this.getClass().getName());
    }

    return new TimeSeriesCollection(ts);
  }
View Full Code Here

  public Object produceDataset(Map params) throws DatasetProduceException {
    DefaultIntervalCategoryDataset ds = null;
    try{
      ds = getDefaultIntervalCategoryDataset();
    } catch (Throwable e) {
      throw new DatasetProduceException("An error occurred generating the DefaultIntervalCategoryDataset object " + this.getClass().getName());
    }
    return ds;
  }
View Full Code Here

TOP

Related Classes of de.laures.cewolf.DatasetProduceException

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.