comparison etl/src/main/java/org/dive4elements/river/etl/aft/River.java @ 7009:60c894b71fed

Another tweak for flys/issue1353: Be more tolerant about river names.
author Sascha L. Teichmann <teichmann@intevation.de>
date Fri, 13 Sep 2013 15:24:07 +0200
parents e5675e85ac38
children 7903bacdfba3
comparison
equal deleted inserted replaced
7008:0e7c667018fc 7009:60c894b71fed
80 80
81 ConnectedStatements flysStatements = context.getFlysStatements(); 81 ConnectedStatements flysStatements = context.getFlysStatements();
82 ConnectedStatements aftStatements = context.getAftStatements(); 82 ConnectedStatements aftStatements = context.getAftStatements();
83 83
84 String riverName = getName(); 84 String riverName = getName();
85 String lowerRiverName = riverName.toLowerCase();
85 86
86 Map<Long, DIPSGauge> aftDIPSGauges = new HashMap<Long, DIPSGauge>(); 87 Map<Long, DIPSGauge> aftDIPSGauges = new HashMap<Long, DIPSGauge>();
87 88
88 ResultSet messstellenRs = aftStatements 89 ResultSet messstellenRs = aftStatements
89 .getStatement("select.messstelle") 90 .getStatement("select.messstelle")
113 "DIPS: MESSSTELLE '" + name + "' not found in DIPS. " + 114 "DIPS: MESSSTELLE '" + name + "' not found in DIPS. " +
114 "Gauge number used for lookup: " + number); 115 "Gauge number used for lookup: " + number);
115 continue; 116 continue;
116 } 117 }
117 String gaugeRiver = dipsGauge.getRiverName(); 118 String gaugeRiver = dipsGauge.getRiverName();
118 if (!gaugeRiver.equalsIgnoreCase(riverName)) { 119 if (!lowerRiverName.contains(riverName.toLowerCase())) {
119 log.warn( 120 log.warn(
120 "DIPS: MESSSTELLE '" + name + 121 "DIPS: MESSSTELLE '" + name +
121 "' is assigned to river '" + gaugeRiver + 122 "' is assigned to river '" + gaugeRiver +
122 "'. Needs to be on '" + riverName + "'."); 123 "'. Needs to be on '" + riverName + "'.");
123 continue; 124 continue;

http://dive4elements.wald.intevation.org