Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/access/FixationArtifactAccess.java @ 3279:5a7b4f890d53
Delta W(t) chart subtitle fixed
flys-artifacts/trunk@4930 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Christian Lins <christian.lins@intevation.de> |
---|---|
date | Wed, 11 Jul 2012 10:53:38 +0000 |
parents | b888c5eb65b3 |
children | 4a70525c5b0d |
comparison
equal
deleted
inserted
replaced
3278:c27c4e06dd87 | 3279:5a7b4f890d53 |
---|---|
1 package de.intevation.flys.artifacts.access; | 1 package de.intevation.flys.artifacts.access; |
2 | 2 |
3 import de.intevation.artifactdatabase.data.StateData; | 3 import de.intevation.artifactdatabase.data.StateData; |
4 | |
5 import de.intevation.flys.artifacts.FLYSArtifact; | 4 import de.intevation.flys.artifacts.FLYSArtifact; |
6 | |
7 import de.intevation.flys.artifacts.model.DateRange; | 5 import de.intevation.flys.artifacts.model.DateRange; |
8 | 6 |
9 import java.util.Arrays; | 7 import java.util.Arrays; |
10 import java.util.Date; | 8 import java.util.Date; |
11 | 9 |
204 analysisPeriods = getDateRange("ana_data"); | 202 analysisPeriods = getDateRange("ana_data"); |
205 } | 203 } |
206 | 204 |
207 return analysisPeriods; | 205 return analysisPeriods; |
208 } | 206 } |
207 | |
208 /** | |
209 * @return DateRange object ranging from eldest to youngest date | |
210 * of analysis and reference periods. | |
211 */ | |
212 public DateRange getDateRange() { | |
213 DateRange refP = getReferencePeriod(); | |
214 | |
215 Date from = refP.getFrom(); | |
216 Date to = refP.getTo(); | |
217 | |
218 DateRange[] rs = getAnalysisPeriods(); | |
219 for(DateRange r : rs) { | |
220 if(r.getFrom().before(from)) { | |
221 from = r.getFrom(); | |
222 } | |
223 if(r.getTo().after(to)) { | |
224 to = r.getTo(); | |
225 } | |
226 } | |
227 | |
228 return new DateRange(from, to); | |
229 } | |
209 | 230 |
210 public Boolean getPreprocessing() { | 231 public Boolean getPreprocessing() { |
211 if (preprocessing == null) { | 232 if (preprocessing == null) { |
212 preprocessing = getBoolean("preprocessing"); | 233 preprocessing = getBoolean("preprocessing"); |
213 } | 234 } |