comparison artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadDataValueFilter.java @ 8060:25feef564d09

Sediment load: More of official epochs.
author Sascha L. Teichmann <teichmann@intevation.de>
date Fri, 18 Jul 2014 18:55:39 +0200
parents cd35b76f1ef8
children 9ecd6267323b
comparison
equal deleted inserted replaced
8059:bde5f5ec7c72 8060:25feef564d09
141 } else { 141 } else {
142 this.a = a; 142 this.a = a;
143 this.b = b; 143 this.b = b;
144 } 144 }
145 } 145 }
146
146 @Override 147 @Override
147 public boolean accept(Value value) { 148 public boolean accept(Value value) {
148 Date c = value.getLoad().getStartTime(); 149 Date c = value.getLoad().getStartTime();
149 Date d = value.getLoad().getStopTime(); 150 Date d = value.getLoad().getStopTime();
150 return d == null 151 return d == null
151 ? c.compareTo(a) >= 0 && c.compareTo(b) <= 0 152 ? c.compareTo(a) >= 0 && c.compareTo(b) <= 0
152 : !(a.after(d) || c.after(b)); 153 : !(a.after(d) || c.after(b));
153 } 154 }
154 } // class TimeRangeIntersects 155 } // class TimeRangeIntersects
156
157 public static final class IsOfficial implements Filter {
158
159 public static final IsOfficial INSTANCE = new IsOfficial();
160
161 private IsOfficial() {
162 }
163
164 @Override
165 public boolean accept(Value value) {
166 return value.getLoad().getKind() == 1;
167 }
168 } // class IsOfficial
155 } 169 }
156 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : 170 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
157 171

http://dive4elements.wald.intevation.org