Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/DurationCurveState.java @ 705:853dceead0f4
Only generate facets when needed.
flys-artifacts/trunk@2157 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Sat, 18 Jun 2011 17:03:17 +0000 |
parents | af3b5d9e91a4 |
children | 3b7e9ddf6bb1 |
comparison
equal
deleted
inserted
replaced
704:eab5e5089d77 | 705:853dceead0f4 |
---|---|
56 logger.debug("No results given."); | 56 logger.debug("No results given."); |
57 return null; | 57 return null; |
58 } | 58 } |
59 } | 59 } |
60 | 60 |
61 Object[] args = new Object[] { | 61 if (facets != null) { |
62 winfo.getRiver().getName() | 62 Object[] args = new Object[] { |
63 }; | 63 winfo.getRiver().getName() |
64 }; | |
64 | 65 |
65 String nameW = Resources.getMsg( | 66 String nameW = Resources.getMsg( |
66 context.getMeta(), | 67 context.getMeta(), |
67 "chart.duration.curve.curve.w", | 68 "chart.duration.curve.curve.w", |
68 "", | 69 "", |
69 args); | 70 args); |
70 | 71 |
71 String nameQ = Resources.getMsg( | 72 String nameQ = Resources.getMsg( |
72 context.getMeta(), | 73 context.getMeta(), |
73 "chart.duration.curve.curve.q", | 74 "chart.duration.curve.curve.q", |
74 "", | 75 "", |
75 args); | 76 args); |
76 | 77 |
77 Facet w = new DurationCurveFacet(0, DURATION_W, nameW); | 78 Facet w = new DurationCurveFacet(0, DURATION_W, nameW); |
78 Facet q = new DurationCurveFacet(0, DURATION_Q, nameQ); | 79 Facet q = new DurationCurveFacet(0, DURATION_Q, nameQ); |
79 | 80 |
80 facets.add(w); | 81 facets.add(w); |
81 facets.add(q); | 82 facets.add(q); |
82 | 83 |
83 facets.add(new DataFacet(CSV, "CSV data")); | 84 facets.add(new DataFacet(CSV, "CSV data")); |
85 } | |
84 | 86 |
85 return new WQDay[] { res }; | 87 return new WQDay[] { res }; |
86 } | 88 } |
87 } | 89 } |
88 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : | 90 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : |