comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/WINFOArtifact.java @ 2045:d13be39cfd1d

#242 Added header with meta information into CSV exports. flys-artifacts/trunk@3531 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Thu, 22 Dec 2011 13:22:55 +0000
parents bf62cc7052d4
children 16e74c5e636f
comparison
equal deleted inserted replaced
2044:5d6e82abe859 2045:d13be39cfd1d
912 * Returns the gauge based on the current distance and river. 912 * Returns the gauge based on the current distance and river.
913 * 913 *
914 * @return the gauge. 914 * @return the gauge.
915 */ 915 */
916 public Gauge getGauge() { 916 public Gauge getGauge() {
917 River river = FLYSUtils.getRiver(this); 917 return FLYSUtils.getGauge(this);
918
919 if (river == null) {
920 logger.debug("no river found");
921 return null;
922 }
923
924 double[] dist = FLYSUtils.getKmRange(this);
925
926 if (dist == null) {
927 logger.debug("no range found");
928 return null;
929 }
930
931 if (logger.isDebugEnabled()) {
932 logger.debug("Determine gauge for:");
933 logger.debug("... river: " + river.getName());
934 logger.debug("... distance: " + dist[0] + " - " + dist[1]);
935 }
936
937 Gauge gauge = river.determineGauge(dist[0], dist[1]);
938
939 String name = gauge != null ? gauge.getName() : "'n/a";
940 logger.debug("Found gauge: " + name);
941
942 return gauge;
943 } 918 }
944 919
945 920
946 /** 921 /**
947 * Returns the gauges that match the selected kilometer range. 922 * Returns the gauges that match the selected kilometer range.

http://dive4elements.wald.intevation.org