Mercurial > dive4elements > gnv-client
comparison gnv-artifacts/src/main/java/de/intevation/gnv/state/timeseries/TimeSeriesOutputState.java @ 838:e91ebe3696ec
Iterate through former states as well when searching for an input collection (issue226).
gnv-artifacts/trunk@945 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Mon, 19 Apr 2010 12:31:02 +0000 |
parents | 2423cefe7d39 |
children | ac5988f27714 |
comparison
equal
deleted
inserted
replaced
837:43f3c0cd60f2 | 838:e91ebe3696ec |
---|---|
43 import de.intevation.gnv.exports.Export.Profile; | 43 import de.intevation.gnv.exports.Export.Profile; |
44 import de.intevation.gnv.geobackend.base.Result; | 44 import de.intevation.gnv.geobackend.base.Result; |
45 import de.intevation.gnv.histogram.HistogramHelper; | 45 import de.intevation.gnv.histogram.HistogramHelper; |
46 import de.intevation.gnv.state.InputData; | 46 import de.intevation.gnv.state.InputData; |
47 import de.intevation.gnv.state.OutputStateBase; | 47 import de.intevation.gnv.state.OutputStateBase; |
48 import de.intevation.gnv.state.State; | |
48 import de.intevation.gnv.state.describedata.DefaultKeyValueDescribeData; | 49 import de.intevation.gnv.state.describedata.DefaultKeyValueDescribeData; |
49 import de.intevation.gnv.state.describedata.KeyValueDescibeData; | 50 import de.intevation.gnv.state.describedata.KeyValueDescibeData; |
50 import de.intevation.gnv.state.describedata.MinMaxDescribeData; | 51 import de.intevation.gnv.state.describedata.MinMaxDescribeData; |
51 import de.intevation.gnv.state.describedata.NamedArrayList; | 52 import de.intevation.gnv.state.describedata.NamedArrayList; |
52 import de.intevation.gnv.state.describedata.NamedCollection; | 53 import de.intevation.gnv.state.describedata.NamedCollection; |
1228 */ | 1229 */ |
1229 protected Collection<KeyValueDescibeData> getCollection( | 1230 protected Collection<KeyValueDescibeData> getCollection( |
1230 String collectionName, | 1231 String collectionName, |
1231 String uuid) | 1232 String uuid) |
1232 { | 1233 { |
1234 log.debug("Search for input data: " + collectionName); | |
1233 NamedCollection<KeyValueDescibeData> c = new NamedArrayList<KeyValueDescibeData>(collectionName); | 1235 NamedCollection<KeyValueDescibeData> c = new NamedArrayList<KeyValueDescibeData>(collectionName); |
1234 | 1236 |
1235 InputData data = inputData.get(collectionName); | 1237 InputData data = null; |
1238 State parent = this; | |
1239 do { | |
1240 data = parent.inputData().get(collectionName); | |
1241 | |
1242 if (data != null) { | |
1243 break; | |
1244 } | |
1245 } | |
1246 while ((parent = parent.getParent()) != null); | |
1247 | |
1236 if (data == null) { | 1248 if (data == null) { |
1237 log.warn("No collection found with name: " + collectionName); | 1249 log.warn("No collection found with name: " + collectionName); |
1238 return c; | 1250 return c; |
1239 } | 1251 } |
1240 | 1252 |