Mercurial > dive4elements > river
diff 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 |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/inundationduration/InundationDurationAccess.java Tue Jun 26 16:17:30 2018 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/inundationduration/InundationDurationAccess.java Tue Jun 26 19:48:35 2018 +0200 @@ -10,12 +10,8 @@ package org.dive4elements.river.artifacts.uinfo.inundationduration; -import java.util.List; - -import org.dive4elements.artifacts.common.utils.DateUtils; import org.dive4elements.river.artifacts.access.RangeAccess; import org.dive4elements.river.artifacts.common.EpochYearAccessHelper; -import org.dive4elements.river.artifacts.model.DateRange; import org.dive4elements.river.artifacts.uinfo.UINFOArtifact; import org.dive4elements.river.artifacts.uinfo.UinfoCalcMode; @@ -70,12 +66,16 @@ return null; } - public int[] getTotalEpoch() { - final List<DateRange> epochs = this.helper.getEpochs("state.uinfo.totalepoch", "totalepoch"); - if (!epochs.isEmpty()) { - return new int[] { DateUtils.getYearFromDate(epochs.get(0).getFrom()), DateUtils.getYearFromDate(epochs.get(0).getTo()) }; + // TODO: eigentlich nur die WMS-Url des gewählten dingens (jahr, oder epoche) + public String getWMSUrl() { + + final UedauernPropertiesHelper helper = UedauernPropertiesHelper.getInstance(getRiverName()); + if (this.getYear() != null) { + return helper.urlFromYear(this.getYear()); + } else { + return helper.getMittelUrl(); // nur 2 cases... } - return null; + } public String getVegZones() {