comparison artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/inundationduration/InundationDurationAccess.java @ 9178:2f5052835b76

uinfo inundationduration langjähr. Mittel, Uedauern.properties, Meldung
author gernotbelger
date Tue, 26 Jun 2018 19:48:35 +0200
parents 9b4f5e61c02e
children dace17e26d33
comparison
equal deleted inserted replaced
9177:37db8c4c44b7 9178:2f5052835b76
8 * documentation coming with Dive4Elements River for details. 8 * documentation coming with Dive4Elements River for details.
9 */ 9 */
10 10
11 package org.dive4elements.river.artifacts.uinfo.inundationduration; 11 package org.dive4elements.river.artifacts.uinfo.inundationduration;
12 12
13 import java.util.List;
14
15 import org.dive4elements.artifacts.common.utils.DateUtils;
16 import org.dive4elements.river.artifacts.access.RangeAccess; 13 import org.dive4elements.river.artifacts.access.RangeAccess;
17 import org.dive4elements.river.artifacts.common.EpochYearAccessHelper; 14 import org.dive4elements.river.artifacts.common.EpochYearAccessHelper;
18 import org.dive4elements.river.artifacts.model.DateRange;
19 import org.dive4elements.river.artifacts.uinfo.UINFOArtifact; 15 import org.dive4elements.river.artifacts.uinfo.UINFOArtifact;
20 import org.dive4elements.river.artifacts.uinfo.UinfoCalcMode; 16 import org.dive4elements.river.artifacts.uinfo.UinfoCalcMode;
21 17
22 /** 18 /**
23 * Access to the flow depth calculation type specific SInfo artifact data. 19 * Access to the flow depth calculation type specific SInfo artifact data.
68 return years[0]; 64 return years[0];
69 } 65 }
70 return null; 66 return null;
71 } 67 }
72 68
73 public int[] getTotalEpoch() { 69 // TODO: eigentlich nur die WMS-Url des gewählten dingens (jahr, oder epoche)
74 final List<DateRange> epochs = this.helper.getEpochs("state.uinfo.totalepoch", "totalepoch"); 70 public String getWMSUrl() {
75 if (!epochs.isEmpty()) { 71
76 return new int[] { DateUtils.getYearFromDate(epochs.get(0).getFrom()), DateUtils.getYearFromDate(epochs.get(0).getTo()) }; 72 final UedauernPropertiesHelper helper = UedauernPropertiesHelper.getInstance(getRiverName());
73 if (this.getYear() != null) {
74 return helper.urlFromYear(this.getYear());
75 } else {
76 return helper.getMittelUrl(); // nur 2 cases...
77 } 77 }
78 return null; 78
79 } 79 }
80 80
81 public String getVegZones() { 81 public String getVegZones() {
82 // MIT VegetationzonesAccess zusammenlegen (eine Zeile sparen...) 82 // MIT VegetationzonesAccess zusammenlegen (eine Zeile sparen...)
83 return super.getString("vegzones"); 83 return super.getString("vegzones");

http://dive4elements.wald.intevation.org