Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/WINFOArtifact.java @ 3444:f903f1e5aed6
Preparing W/Q per gauge input for FixationArtifact.
flys-artifacts/trunk@5107 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Mon, 23 Jul 2012 15:08:28 +0000 |
parents | 31168ac9c7e7 |
children | fc351f12b906 |
comparison
equal
deleted
inserted
replaced
3443:ee2ae91c96e5 | 3444:f903f1e5aed6 |
---|---|
528 StateData wqValues = getData("wq_values"); | 528 StateData wqValues = getData("wq_values"); |
529 if (wqValues == null) { | 529 if (wqValues == null) { |
530 logger.warn("no wq_values given"); | 530 logger.warn("no wq_values given"); |
531 return Collections.emptyList(); | 531 return Collections.emptyList(); |
532 } | 532 } |
533 String input = (String)wqValues.getValue(); | 533 String input = (String) wqValues.getValue(); |
534 if (input == null || (input = input.trim()).length() == 0) { | 534 if (input == null || (input = input.trim()).length() == 0) { |
535 logger.warn("wq_values are empty"); | 535 logger.warn("wq_values are empty"); |
536 return Collections.emptyList(); | 536 return Collections.emptyList(); |
537 } | 537 } |
538 return Segment.parseSegments(input); | 538 return Segment.parseSegments(input); |
886 public Gauge getGauge() { | 886 public Gauge getGauge() { |
887 return FLYSUtils.getGauge(this); | 887 return FLYSUtils.getGauge(this); |
888 } | 888 } |
889 | 889 |
890 | 890 |
891 /** | |
892 * Returns the gauges that match the selected kilometer range. | |
893 * | |
894 * @return the gauges based on the selected kilometer range. | |
895 */ | |
896 public List<Gauge> getGauges() { | |
897 | |
898 River river = FLYSUtils.getRiver(this); | |
899 if (river == null) { | |
900 return null; | |
901 } | |
902 | |
903 double [] dist = FLYSUtils.getKmRange(this); | |
904 if (dist == null) { | |
905 return null; | |
906 } | |
907 | |
908 return river.determineGauges(dist[0], dist[1]); | |
909 } | |
910 | 891 |
911 | 892 |
912 /** | 893 /** |
913 * This method returns the Q values. | 894 * This method returns the Q values. |
914 * | 895 * |