Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/exports/process/FlowVelocityProcessor.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 | a403dbdb9e81 |
children | cb33de3434a8 |
comparison
equal
deleted
inserted
replaced
8201:4b8c5a08de04 | 8202:e4606eae8ea5 |
---|---|
28 import org.dive4elements.river.artifacts.model.FlowVelocityData; | 28 import org.dive4elements.river.artifacts.model.FlowVelocityData; |
29 import org.dive4elements.river.artifacts.resources.Resources; | 29 import org.dive4elements.river.artifacts.resources.Resources; |
30 | 30 |
31 public class FlowVelocityProcessor extends DefaultProcessor { | 31 public class FlowVelocityProcessor extends DefaultProcessor { |
32 | 32 |
33 private final static Logger logger = | 33 private final static Logger log = |
34 Logger.getLogger(FlowVelocityProcessor.class); | 34 Logger.getLogger(FlowVelocityProcessor.class); |
35 | 35 |
36 public static final String I18N_AXIS_LABEL = | 36 public static final String I18N_AXIS_LABEL = |
37 "chart.flow_velocity.section.yaxis.label"; | 37 "chart.flow_velocity.section.yaxis.label"; |
38 public static final String I18N_AXIS_LABEL_DEFAULT = | 38 public static final String I18N_AXIS_LABEL_DEFAULT = |
58 String facetName = bundle.getFacetName(); | 58 String facetName = bundle.getFacetName(); |
59 Object data = bundle.getData(context); | 59 Object data = bundle.getData(context); |
60 if (data == null) { | 60 if (data == null) { |
61 // Check has been here before so we keep it for security reasons | 61 // Check has been here before so we keep it for security reasons |
62 // this should never happen though. | 62 // this should never happen though. |
63 logger.error("Data is null for facet: " + facetName); | 63 log.error("Data is null for facet: " + facetName); |
64 return; | 64 return; |
65 } | 65 } |
66 double [][] points; | 66 double [][] points; |
67 | 67 |
68 if (facetName.equals(FacetTypes.FLOW_VELOCITY_TOTALCHANNEL) || | 68 if (facetName.equals(FacetTypes.FLOW_VELOCITY_TOTALCHANNEL) || |
76 } else if (facetName.equals(FacetTypes.FLOW_VELOCITY_MEASUREMENT)) { | 76 } else if (facetName.equals(FacetTypes.FLOW_VELOCITY_MEASUREMENT)) { |
77 FastFlowVelocityMeasurementValue fData = | 77 FastFlowVelocityMeasurementValue fData = |
78 (FastFlowVelocityMeasurementValue) data; | 78 (FastFlowVelocityMeasurementValue) data; |
79 points = new double[][] {{fData.getStation()},{fData.getV()}}; | 79 points = new double[][] {{fData.getStation()},{fData.getV()}}; |
80 } else { | 80 } else { |
81 logger.error("Unknown facet name: " + facetName); | 81 log.error("Unknown facet name: " + facetName); |
82 return; | 82 return; |
83 } | 83 } |
84 StyledSeriesBuilder.addPoints(series, points, true); | 84 StyledSeriesBuilder.addPoints(series, points, true); |
85 Double start = (Double)context.getContextValue("startkm"); | 85 Double start = (Double)context.getContextValue("startkm"); |
86 Double end = (Double)context.getContextValue("endkm"); | 86 Double end = (Double)context.getContextValue("endkm"); |
87 if (start != null && end != null) { | 87 if (start != null && end != null) { |
88 logger.debug("start: " + start + " end: " + end); | 88 log.debug("start: " + start + " end: " + end); |
89 D4EArtifact artifact = (D4EArtifact)bundle.getArtifact(); | 89 D4EArtifact artifact = (D4EArtifact)bundle.getArtifact(); |
90 RiverContext fc = (RiverContext)context.globalContext(); | 90 RiverContext fc = (RiverContext)context.globalContext(); |
91 // Adaptive smoothing, based on zoom factor/diagram extents. | 91 // Adaptive smoothing, based on zoom factor/diagram extents. |
92 ZoomScale scales = (ZoomScale)fc.get("zoomscale"); | 92 ZoomScale scales = (ZoomScale)fc.get("zoomscale"); |
93 RiverAccess access = new RiverAccess((D4EArtifact)artifact); | 93 RiverAccess access = new RiverAccess((D4EArtifact)artifact); |