01: package de.laures.cewolf.dp;
02:
03: import java.io.Serializable;
04: import java.util.Date;
05: import java.util.Map;
06:
07: import de.laures.cewolf.DatasetProduceException;
08: import de.laures.cewolf.DatasetProducer;
09:
10: /**
11: * @author glaures
12: *
13: * To change this generated comment edit the template variable "typecomment":
14: * Window>Preferences>Java>Templates.
15: * To enable and disable the creation of type comments go to
16: * Window>Preferences>Java>Code Generation.
17: */
18: public class DataSourceXYDatasetProducer implements DatasetProducer,
19: Serializable {
20:
21: public static final String PARAM_SERIES_LIST = "series";
22:
23: /**
24: * @see de.laures.cewolf.DatasetProducer#produceDataset(Map)
25: */
26: public Object produceDataset(Map params)
27: throws DatasetProduceException {
28: /*
29: DataSourceXYSeries series = new DataSourceXYSeries("select * from xy;");
30: XYSeriesCollection dataset = new XYSeriesCollection();
31: try {
32: DataSource ds = getDataSource((String)params.get(PARAM_DATASOURCE));
33: dataset.addSeries(series.produceXYSeries(ds));
34: } catch (NamingException nEx) {
35: nEx.printStackTrace();
36: throw new DatasetProduceException(nEx.getMessage());
37: }
38: */
39: return null;
40: }
41:
42: /**
43: * @see de.laures.cewolf.DatasetProducer#hasExpired(Map, Date)
44: */
45: public boolean hasExpired(Map params, Date since) {
46: return true;
47: }
48:
49: /**
50: * @see de.laures.cewolf.DatasetProducer#getProducerId()
51: */
52: public String getProducerId() {
53: return toString();
54: }
55:
56: }
|