comparison artifacts/src/main/java/org/dive4elements/river/artifacts/states/HistoricalDischargeComputeState.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 1127dbe95083
comparison
equal deleted inserted replaced
8201:4b8c5a08de04 8202:e4606eae8ea5
55 */ 55 */
56 public class HistoricalDischargeComputeState 56 public class HistoricalDischargeComputeState
57 extends DefaultState 57 extends DefaultState
58 implements FacetTypes 58 implements FacetTypes
59 { 59 {
60 private static final Logger logger = Logger 60 private static final Logger log = Logger
61 .getLogger(HistoricalDischargeComputeState.class); 61 .getLogger(HistoricalDischargeComputeState.class);
62 62
63 public static final String DEFAULT_UNIT = "cm"; 63 public static final String DEFAULT_UNIT = "cm";
64 public static final String I18N_WQ_CURVE_FACET_RANGE = "historical_discharge.wq.curve_range"; 64 public static final String I18N_WQ_CURVE_FACET_RANGE = "historical_discharge.wq.curve_range";
65 public static final String I18N_WQ_CURVE_FACET_SINCE = "historical_discharge.wq.curve_since"; 65 public static final String I18N_WQ_CURVE_FACET_SINCE = "historical_discharge.wq.curve_since";
71 } 71 }
72 72
73 @Override 73 @Override
74 public Object computeAdvance(D4EArtifact artifact, String hash, 74 public Object computeAdvance(D4EArtifact artifact, String hash,
75 CallContext context, List<Facet> facets, Object old) { 75 CallContext context, List<Facet> facets, Object old) {
76 logger.debug("HistoricalDischargeComputeState.computeAdvance"); 76 log.debug("HistoricalDischargeComputeState.computeAdvance");
77 77
78 HistoricalDischargeAccess access = 78 HistoricalDischargeAccess access =
79 new HistoricalDischargeAccess(artifact); 79 new HistoricalDischargeAccess(artifact);
80 80
81 CalculationResult res = old instanceof CalculationResult 81 CalculationResult res = old instanceof CalculationResult
117 HistoricalDischargeAccess access 117 HistoricalDischargeAccess access
118 ) { 118 ) {
119 int i = 0; 119 int i = 0;
120 120
121 for (WQTimerange wqt : wqts) { 121 for (WQTimerange wqt : wqts) {
122 logger.debug("Prepare facet for: " + wqt.getName()); 122 log.debug("Prepare facet for: " + wqt.getName());
123 123
124 EvaluationMode evalMode = access.getEvaluationMode(); 124 EvaluationMode evalMode = access.getEvaluationMode();
125 if (evalMode == EvaluationMode.W) { 125 if (evalMode == EvaluationMode.W) {
126 facets.add(new HistoricalDischargeFacet(i, 126 facets.add(new HistoricalDischargeFacet(i,
127 HISTORICAL_DISCHARGE_Q, createFacetTitle(wqt))); 127 HISTORICAL_DISCHARGE_Q, createFacetTitle(wqt)));
128 128
129 if (wqt instanceof HistoricalWQTimerange) { 129 if (wqt instanceof HistoricalWQTimerange) {
130 logger 130 log
131 .debug("Create another facet for historical differences."); 131 .debug("Create another facet for historical differences.");
132 132
133 // TODO CREATE BETTER TITLE FOR FACETS (issue1180) 133 // TODO CREATE BETTER TITLE FOR FACETS (issue1180)
134 facets.add(new HistoricalDischargeDifferenceFacet(i, 134 facets.add(new HistoricalDischargeDifferenceFacet(i,
135 HISTORICAL_DISCHARGE_Q_DIFF, "DIFF: " + wqt.getName())); 135 HISTORICAL_DISCHARGE_Q_DIFF, "DIFF: " + wqt.getName()));
138 else { 138 else {
139 facets.add(new HistoricalDischargeFacet(i, 139 facets.add(new HistoricalDischargeFacet(i,
140 HISTORICAL_DISCHARGE_W, createFacetTitle(wqt))); 140 HISTORICAL_DISCHARGE_W, createFacetTitle(wqt)));
141 141
142 if (wqt instanceof HistoricalWQTimerange) { 142 if (wqt instanceof HistoricalWQTimerange) {
143 logger 143 log
144 .debug("Create another facet for historical differences."); 144 .debug("Create another facet for historical differences.");
145 145
146 // TODO CREATE BETTER TITLE FOR FACETS 146 // TODO CREATE BETTER TITLE FOR FACETS
147 facets.add(new HistoricalDischargeDifferenceFacet(i, 147 facets.add(new HistoricalDischargeDifferenceFacet(i,
148 HISTORICAL_DISCHARGE_W_DIFF, "DIFF: " + wqt.getName())); 148 HISTORICAL_DISCHARGE_W_DIFF, "DIFF: " + wqt.getName()));

http://dive4elements.wald.intevation.org