comparison artifacts/src/main/java/org/dive4elements/river/artifacts/model/CrossSectionWaterLineFacet.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
30 */ 30 */
31 public class CrossSectionWaterLineFacet 31 public class CrossSectionWaterLineFacet
32 extends BlackboardDataFacet 32 extends BlackboardDataFacet
33 implements FacetTypes { 33 implements FacetTypes {
34 34
35 /** Private logger to use. */ 35 /** Private log to use. */
36 private static Logger logger = 36 private static Logger log =
37 Logger.getLogger(CrossSectionWaterLineFacet.class); 37 Logger.getLogger(CrossSectionWaterLineFacet.class);
38 38
39 39
40 /** Trivial constructor, set (maybe localized) description. */ 40 /** Trivial constructor, set (maybe localized) description. */
41 public CrossSectionWaterLineFacet(int idx, String description) { 41 public CrossSectionWaterLineFacet(int idx, String description) {
56 56
57 /** 57 /**
58 * Gets waterline (crossed with cross section) of waterlevel. 58 * Gets waterline (crossed with cross section) of waterlevel.
59 */ 59 */
60 public Object getData(Artifact artifact, CallContext context) { 60 public Object getData(Artifact artifact, CallContext context) {
61 logger.debug("Get data for cross section water line"); 61 log.debug("Get data for cross section water line");
62 62
63 List<DataProvider> providers = context. 63 List<DataProvider> providers = context.
64 getDataProvider(CrossSectionFacet.BLACKBOARD_CS_MASTER_DATA); 64 getDataProvider(CrossSectionFacet.BLACKBOARD_CS_MASTER_DATA);
65 if (providers.size() < 1) { 65 if (providers.size() < 1) {
66 logger.warn("Could not find Cross-Section data provider."); 66 log.warn("Could not find Cross-Section data provider.");
67 return new Lines.LineData(new double[][] {}, 0d, 0d); 67 return new Lines.LineData(new double[][] {}, 0d, 0d);
68 } 68 }
69 69
70 Object crossSection = providers.get(0) 70 Object crossSection = providers.get(0)
71 .provideData(CrossSectionFacet.BLACKBOARD_CS_MASTER_DATA, 71 .provideData(CrossSectionFacet.BLACKBOARD_CS_MASTER_DATA,
78 prevKm = new Double(-1d); 78 prevKm = new Double(-1d);
79 if (nextKm == null) 79 if (nextKm == null)
80 nextKm = new Double(-1d); 80 nextKm = new Double(-1d);
81 81
82 if (!(artifact instanceof WaterLineArtifact)) { 82 if (!(artifact instanceof WaterLineArtifact)) {
83 logger.error("CrossSectionWaterLineFacet needs WaterLineArtifact"); 83 log.error("CrossSectionWaterLineFacet needs WaterLineArtifact");
84 return new Lines.LineData(new double[][] {}, 0d,0d); 84 return new Lines.LineData(new double[][] {}, 0d,0d);
85 } 85 }
86 WaterLineArtifact lineArtifact = (WaterLineArtifact) artifact; 86 WaterLineArtifact lineArtifact = (WaterLineArtifact) artifact;
87 87
88 if (crossSection != null) { 88 if (crossSection != null) {

http://dive4elements.wald.intevation.org