Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WaterlevelState.java @ 2123:907322e269e3
Cosmetics.
flys-artifacts/trunk@3693 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Tue, 17 Jan 2012 08:09:03 +0000 |
parents | e384d78ff78b |
children | ce9b15673f3f |
comparison
equal
deleted
inserted
replaced
2122:81312f84689a | 2123:907322e269e3 |
---|---|
35 protected String getUIProvider() { | 35 protected String getUIProvider() { |
36 return "continue"; | 36 return "continue"; |
37 } | 37 } |
38 | 38 |
39 | 39 |
40 /** | |
41 * Compute result or returned object from cache, create facets. | |
42 * @param old Object that was cached. | |
43 */ | |
40 protected Object compute( | 44 protected Object compute( |
41 WINFOArtifact winfo, | 45 WINFOArtifact winfo, |
42 CallContext cc, | 46 CallContext cc, |
43 String hash, | 47 String hash, |
44 List<Facet> facets, | 48 List<Facet> facets, |
45 Object old | 49 Object old |
46 ) { | 50 ) { |
47 String id = getID(); | 51 String id = getID(); |
48 | 52 |
49 CalculationResult res = old instanceof CalculationResult | 53 CalculationResult res = old instanceof CalculationResult |
50 ? (CalculationResult)old | 54 ? (CalculationResult) old |
51 : winfo.getWaterlevelData(); | 55 : winfo.getWaterlevelData(); |
52 | 56 |
53 if (facets == null) { | 57 if (facets == null) { |
54 return res; | 58 return res; |
55 } | 59 } |
56 | 60 |
57 WQKms [] wqkms = (WQKms [])res.getData(); | 61 WQKms [] wqkms = (WQKms []) res.getData(); |
58 | 62 |
59 for (int i = 0; i < wqkms.length; i++) { | 63 for (int i = 0; i < wqkms.length; i++) { |
60 String name = wqkms[i].getName(); | 64 String name = wqkms[i].getName(); |
61 | 65 |
62 String nameW = FLYSUtils.createWspWTitle(winfo, cc, name); | 66 String nameW = FLYSUtils.createWspWTitle(winfo, cc, name); |
63 String nameQ = FLYSUtils.createWspQTitle(winfo, cc, name); | 67 String nameQ = FLYSUtils.createWspQTitle(winfo, cc, name); |
64 | 68 |
65 logger.debug("Create facet: " + nameW); | 69 logger.debug("Create facet: " + nameW); |