Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/inundationduration/InundationDurationAccess.java @ 9155:9b4f5e61c02e
Changed to list of DateRange, added methods in DateRange to support year ranges
author | mschaefer |
---|---|
date | Tue, 19 Jun 2018 14:15:32 +0200 |
parents | 611a523fc42f |
children | 2f5052835b76 |
comparison
equal
deleted
inserted
replaced
9154:cd24db77f044 | 9155:9b4f5e61c02e |
---|---|
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; | |
13 import org.dive4elements.river.artifacts.access.RangeAccess; | 16 import org.dive4elements.river.artifacts.access.RangeAccess; |
14 import org.dive4elements.river.artifacts.common.EpochYearAccessHelper; | 17 import org.dive4elements.river.artifacts.common.EpochYearAccessHelper; |
18 import org.dive4elements.river.artifacts.model.DateRange; | |
15 import org.dive4elements.river.artifacts.uinfo.UINFOArtifact; | 19 import org.dive4elements.river.artifacts.uinfo.UINFOArtifact; |
16 import org.dive4elements.river.artifacts.uinfo.UinfoCalcMode; | 20 import org.dive4elements.river.artifacts.uinfo.UinfoCalcMode; |
17 | 21 |
18 /** | 22 /** |
19 * Access to the flow depth calculation type specific SInfo artifact data. | 23 * Access to the flow depth calculation type specific SInfo artifact data. |
65 } | 69 } |
66 return null; | 70 return null; |
67 } | 71 } |
68 | 72 |
69 public int[] getTotalEpoch() { | 73 public int[] getTotalEpoch() { |
70 final int[][] epochs = this.helper.getEpochs("state.uinfo.totalepoch", "totalepoch"); | 74 final List<DateRange> epochs = this.helper.getEpochs("state.uinfo.totalepoch", "totalepoch"); |
71 if (epochs != null) { | 75 if (!epochs.isEmpty()) { |
72 return epochs[0]; | 76 return new int[] { DateUtils.getYearFromDate(epochs.get(0).getFrom()), DateUtils.getYearFromDate(epochs.get(0).getTo()) }; |
73 } | 77 } |
74 return null; | 78 return null; |
75 } | 79 } |
76 | 80 |
77 public String getVegZones() { | 81 public String getVegZones() { |