comparison artifacts/src/main/java/org/dive4elements/river/artifacts/model/HYKFacet.java @ 8202:e4606eae8ea5

sed src/**/*.java 's/logger/log/g'
author Sascha L. Teichmann <teichmann@intevation.de>
date Fri, 05 Sep 2014 12:58:17 +0200
parents af13ceeba52a
children 5e38e2924c07
comparison
equal deleted inserted replaced
8201:4b8c5a08de04 8202:e4606eae8ea5
26 */ 26 */
27 public class HYKFacet 27 public class HYKFacet
28 extends DataFacet 28 extends DataFacet
29 implements FacetTypes { 29 implements FacetTypes {
30 30
31 /** House logger. */ 31 /** House log. */
32 private static Logger logger = Logger.getLogger(HYKFacet.class); 32 private static Logger log = Logger.getLogger(HYKFacet.class);
33 33
34 /** Trivial constructor, set (maybe localized) description. */ 34 /** Trivial constructor, set (maybe localized) description. */
35 public HYKFacet(int idx, String description) { 35 public HYKFacet(int idx, String description) {
36 super(idx, HYK, description, ComputeType.FEED, null, null); 36 super(idx, HYK, description, ComputeType.FEED, null, null);
37 } 37 }
44 * @param art artifact to get data from. 44 * @param art artifact to get data from.
45 * @param context ignored 45 * @param context ignored
46 */ 46 */
47 @Override 47 @Override
48 public Object getData(Artifact art, CallContext context) { 48 public Object getData(Artifact art, CallContext context) {
49 logger.debug("HYKFacet.getData"); 49 log.debug("HYKFacet.getData");
50 50
51 String dataKey = CrossSectionFacet.BLACKBOARD_CS_MASTER_DATA; 51 String dataKey = CrossSectionFacet.BLACKBOARD_CS_MASTER_DATA;
52 52
53 List<DataProvider> providers = context.getDataProvider(dataKey); 53 List<DataProvider> providers = context.getDataProvider(dataKey);
54 if (providers.size() < 1) { 54 if (providers.size() < 1) {
55 logger.warn("Could not find Cross-Section data provider to get master cs km."); 55 log.warn("Could not find Cross-Section data provider to get master cs km.");
56 return null; 56 return null;
57 } 57 }
58 58
59 FastCrossSectionLine crossSection = (FastCrossSectionLine) providers.get(0) 59 FastCrossSectionLine crossSection = (FastCrossSectionLine) providers.get(0)
60 .provideData(dataKey, null, context); 60 .provideData(dataKey, null, context);
61 61
62 if(crossSection == null) { 62 if(crossSection == null) {
63 logger.debug("getData: crossSection is null"); 63 log.debug("getData: crossSection is null");
64 return null; 64 return null;
65 } 65 }
66 66
67 double km = crossSection.getKm(); 67 double km = crossSection.getKm();
68 logger.debug("HYKFacet.getData: Master Cross Section is at km: " + km); 68 log.debug("HYKFacet.getData: Master Cross Section is at km: " + km);
69 69
70 // Set this km at hyk artifact to be evaluated. 70 // Set this km at hyk artifact to be evaluated.
71 HYKArtifact hyk = (HYKArtifact) art; 71 HYKArtifact hyk = (HYKArtifact) art;
72 hyk.setKm(km); 72 hyk.setKm(km);
73 73

http://dive4elements.wald.intevation.org