Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/exports/HistoricalDischargeCurveGenerator.java @ 5867:59ff03ff48f1
River artifacts: Renamed FLYSArtifact(Collection) to D4EArtifact(Collection).
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Sun, 28 Apr 2013 15:23:01 +0200 |
parents | 73da40528cf2 |
children | af13ceeba52a |
comparison
equal
deleted
inserted
replaced
5866:9a6741ccf6d4 | 5867:59ff03ff48f1 |
---|---|
18 import org.jfree.data.time.TimeSeries; | 18 import org.jfree.data.time.TimeSeries; |
19 import org.jfree.data.time.TimeSeriesCollection; | 19 import org.jfree.data.time.TimeSeriesCollection; |
20 import org.w3c.dom.Document; | 20 import org.w3c.dom.Document; |
21 | 21 |
22 import org.dive4elements.artifactdatabase.state.ArtifactAndFacet; | 22 import org.dive4elements.artifactdatabase.state.ArtifactAndFacet; |
23 import org.dive4elements.river.artifacts.FLYSArtifact; | 23 import org.dive4elements.river.artifacts.D4EArtifact; |
24 import org.dive4elements.river.artifacts.access.HistoricalDischargeAccess; | 24 import org.dive4elements.river.artifacts.access.HistoricalDischargeAccess; |
25 import org.dive4elements.river.artifacts.model.FacetTypes; | 25 import org.dive4elements.river.artifacts.model.FacetTypes; |
26 import org.dive4elements.river.artifacts.model.HistoricalWQTimerange; | 26 import org.dive4elements.river.artifacts.model.HistoricalWQTimerange; |
27 import org.dive4elements.river.artifacts.model.Timerange; | 27 import org.dive4elements.river.artifacts.model.Timerange; |
28 import org.dive4elements.river.artifacts.model.WQTimerange; | 28 import org.dive4elements.river.artifacts.model.WQTimerange; |
81 return msg(I18N_CHART_TITLE, I18N_CHART_TITLE); | 81 return msg(I18N_CHART_TITLE, I18N_CHART_TITLE); |
82 } | 82 } |
83 | 83 |
84 @Override | 84 @Override |
85 protected String getDefaultChartSubtitle() { | 85 protected String getDefaultChartSubtitle() { |
86 FLYSArtifact flys = (FLYSArtifact) master; | 86 D4EArtifact flys = (D4EArtifact) master; |
87 Timerange evalTime = new HistoricalDischargeAccess(flys) | 87 Timerange evalTime = new HistoricalDischargeAccess(flys) |
88 .getEvaluationTimerange(); | 88 .getEvaluationTimerange(); |
89 | 89 |
90 Object[] args = new Object[] { RiverUtils.getReferenceGaugeName(flys), | 90 Object[] args = new Object[] { RiverUtils.getReferenceGaugeName(flys), |
91 evalTime.getStart(), evalTime.getEnd() }; | 91 evalTime.getStart(), evalTime.getEnd() }; |
125 logger.debug("Theme description is: " | 125 logger.debug("Theme description is: " |
126 + artifactFacet.getFacetDescription()); | 126 + artifactFacet.getFacetDescription()); |
127 | 127 |
128 if (name.equals(HISTORICAL_DISCHARGE_Q)) { | 128 if (name.equals(HISTORICAL_DISCHARGE_Q)) { |
129 doHistoricalDischargeOutQ( | 129 doHistoricalDischargeOutQ( |
130 (FLYSArtifact) artifactFacet.getArtifact(), | 130 (D4EArtifact) artifactFacet.getArtifact(), |
131 artifactFacet.getData(context), | 131 artifactFacet.getData(context), |
132 artifactFacet.getFacetDescription(), theme, visible); | 132 artifactFacet.getFacetDescription(), theme, visible); |
133 } | 133 } |
134 else if (name.equals(HISTORICAL_DISCHARGE_W)) { | 134 else if (name.equals(HISTORICAL_DISCHARGE_W)) { |
135 doHistoricalDischargeOutW( | 135 doHistoricalDischargeOutW( |
136 (FLYSArtifact) artifactFacet.getArtifact(), | 136 (D4EArtifact) artifactFacet.getArtifact(), |
137 artifactFacet.getData(context), | 137 artifactFacet.getData(context), |
138 artifactFacet.getFacetDescription(), theme, visible); | 138 artifactFacet.getFacetDescription(), theme, visible); |
139 } | 139 } |
140 else if (name.equals(HISTORICAL_DISCHARGE_Q_DIFF)) { | 140 else if (name.equals(HISTORICAL_DISCHARGE_Q_DIFF)) { |
141 doHistoricalDischargeDifferenceOutQ( | 141 doHistoricalDischargeDifferenceOutQ( |
142 (FLYSArtifact) artifactFacet.getArtifact(), | 142 (D4EArtifact) artifactFacet.getArtifact(), |
143 artifactFacet.getData(context), | 143 artifactFacet.getData(context), |
144 artifactFacet.getFacetDescription(), theme, visible); | 144 artifactFacet.getFacetDescription(), theme, visible); |
145 } | 145 } |
146 else if (name.equals(HISTORICAL_DISCHARGE_W_DIFF)) { | 146 else if (name.equals(HISTORICAL_DISCHARGE_W_DIFF)) { |
147 doHistoricalDischargeDifferenceOutW( | 147 doHistoricalDischargeDifferenceOutW( |
148 (FLYSArtifact) artifactFacet.getArtifact(), | 148 (D4EArtifact) artifactFacet.getArtifact(), |
149 artifactFacet.getData(context), | 149 artifactFacet.getData(context), |
150 artifactFacet.getFacetDescription(), theme, visible); | 150 artifactFacet.getFacetDescription(), theme, visible); |
151 } | 151 } |
152 else if (FacetTypes.IS.MANUALPOINTS(name)) { | 152 else if (FacetTypes.IS.MANUALPOINTS(name)) { |
153 doPoints(artifactFacet.getData(context), artifactFacet, theme, | 153 doPoints(artifactFacet.getData(context), artifactFacet, theme, |
157 logger.warn("doOut(): unknown facet name: " + name); | 157 logger.warn("doOut(): unknown facet name: " + name); |
158 return; | 158 return; |
159 } | 159 } |
160 } | 160 } |
161 | 161 |
162 protected void doHistoricalDischargeOutQ(FLYSArtifact artifact, | 162 protected void doHistoricalDischargeOutQ(D4EArtifact artifact, |
163 Object data, String desc, Document theme, boolean visible) { | 163 Object data, String desc, Document theme, boolean visible) { |
164 logger.debug("doHistoricalDischargeOut(): description = " + desc); | 164 logger.debug("doHistoricalDischargeOut(): description = " + desc); |
165 | 165 |
166 WQTimerange wqt = (WQTimerange) data; | 166 WQTimerange wqt = (WQTimerange) data; |
167 | 167 |
169 wqt.getQs(), theme, desc); | 169 wqt.getQs(), theme, desc); |
170 | 170 |
171 addAxisDataset(tsc, YAXIS.Q.idx, visible); | 171 addAxisDataset(tsc, YAXIS.Q.idx, visible); |
172 } | 172 } |
173 | 173 |
174 protected void doHistoricalDischargeOutW(FLYSArtifact artifact, | 174 protected void doHistoricalDischargeOutW(D4EArtifact artifact, |
175 Object data, String desc, Document theme, boolean visible) { | 175 Object data, String desc, Document theme, boolean visible) { |
176 logger.debug("doHistoricalDischargeOut(): description = " + desc); | 176 logger.debug("doHistoricalDischargeOut(): description = " + desc); |
177 | 177 |
178 WQTimerange wqt = (WQTimerange) data; | 178 WQTimerange wqt = (WQTimerange) data; |
179 | 179 |
181 wqt.getWs(), theme, desc); | 181 wqt.getWs(), theme, desc); |
182 | 182 |
183 addAxisDataset(tsc, YAXIS.W.idx, visible); | 183 addAxisDataset(tsc, YAXIS.W.idx, visible); |
184 } | 184 } |
185 | 185 |
186 protected void doHistoricalDischargeDifferenceOutQ(FLYSArtifact artifact, | 186 protected void doHistoricalDischargeDifferenceOutQ(D4EArtifact artifact, |
187 Object data, String desc, Document theme, boolean visible) { | 187 Object data, String desc, Document theme, boolean visible) { |
188 logger.debug("doHistoricalDischargeDifferenceOut: desc = " + desc); | 188 logger.debug("doHistoricalDischargeDifferenceOut: desc = " + desc); |
189 | 189 |
190 HistoricalWQTimerange wqt = (HistoricalWQTimerange) data; | 190 HistoricalWQTimerange wqt = (HistoricalWQTimerange) data; |
191 | 191 |
193 wqt.getDiffs(), theme, desc); | 193 wqt.getDiffs(), theme, desc); |
194 | 194 |
195 addAxisDataset(tsc, YAXIS.Q.idx, visible); | 195 addAxisDataset(tsc, YAXIS.Q.idx, visible); |
196 } | 196 } |
197 | 197 |
198 protected void doHistoricalDischargeDifferenceOutW(FLYSArtifact artifact, | 198 protected void doHistoricalDischargeDifferenceOutW(D4EArtifact artifact, |
199 Object data, String desc, Document theme, boolean visible) { | 199 Object data, String desc, Document theme, boolean visible) { |
200 logger.debug("doHistoricalDischargeDifferenceOut: desc = " + desc); | 200 logger.debug("doHistoricalDischargeDifferenceOut: desc = " + desc); |
201 | 201 |
202 HistoricalWQTimerange wqt = (HistoricalWQTimerange) data; | 202 HistoricalWQTimerange wqt = (HistoricalWQTimerange) data; |
203 | 203 |