Mercurial > dive4elements > river
annotate flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/fixation/FixationCompute.java @ 3049:5e9533687a0c
Added i18n in fix analysis.
flys-artifacts/trunk@4621 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Thu, 07 Jun 2012 09:44:00 +0000 |
parents | fa763b270e78 |
children | bac0b2721451 |
rev | line source |
---|---|
2651
9e9eb9d97548
Initial transition configuration and artifact/state stubs for fixation
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.artifacts.states.fixation; |
9e9eb9d97548
Initial transition configuration and artifact/state stubs for fixation
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
2 |
3048
fa763b270e78
Changed facet description in fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3043
diff
changeset
|
3 import java.text.DateFormat; |
fa763b270e78
Changed facet description in fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3043
diff
changeset
|
4 |
2784
156214e3ca55
FixA: Call computing when reaching the compute state.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2699
diff
changeset
|
5 import de.intevation.artifactdatabase.state.Facet; |
156214e3ca55
FixA: Call computing when reaching the compute state.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2699
diff
changeset
|
6 |
156214e3ca55
FixA: Call computing when reaching the compute state.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2699
diff
changeset
|
7 import de.intevation.artifacts.CallContext; |
156214e3ca55
FixA: Call computing when reaching the compute state.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2699
diff
changeset
|
8 |
156214e3ca55
FixA: Call computing when reaching the compute state.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2699
diff
changeset
|
9 import de.intevation.flys.artifacts.FLYSArtifact; |
156214e3ca55
FixA: Call computing when reaching the compute state.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2699
diff
changeset
|
10 import de.intevation.flys.artifacts.FixationArtifactAccess; |
156214e3ca55
FixA: Call computing when reaching the compute state.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2699
diff
changeset
|
11 |
156214e3ca55
FixA: Call computing when reaching the compute state.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2699
diff
changeset
|
12 import de.intevation.flys.artifacts.model.CalculationResult; |
2992
0abdede5a0b8
FixA: Added facet to return delta w/t as CSV
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2784
diff
changeset
|
13 import de.intevation.flys.artifacts.model.DataFacet; |
0abdede5a0b8
FixA: Added facet to return delta w/t as CSV
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2784
diff
changeset
|
14 import de.intevation.flys.artifacts.model.FacetTypes; |
2784
156214e3ca55
FixA: Call computing when reaching the compute state.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2699
diff
changeset
|
15 import de.intevation.flys.artifacts.model.ReportFacet; |
156214e3ca55
FixA: Call computing when reaching the compute state.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2699
diff
changeset
|
16 |
156214e3ca55
FixA: Call computing when reaching the compute state.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2699
diff
changeset
|
17 import de.intevation.flys.artifacts.model.fixings.FixCalculation; |
2651
9e9eb9d97548
Initial transition configuration and artifact/state stubs for fixation
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
18 |
3028
77b5f5a26700
Added facets for fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2992
diff
changeset
|
19 import de.intevation.flys.artifacts.model.fixings.FixAvSectorFacet; |
3035
b388d888330d
Implemented facets and splitted up the event facet.Implemented facets and splitted up the event facet.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3028
diff
changeset
|
20 import de.intevation.flys.artifacts.model.fixings.FixAnalysisEventsFacet; |
3043
22da13d1b180
Added facet for derivate curve and fixed facet names.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3035
diff
changeset
|
21 import de.intevation.flys.artifacts.model.fixings.FixAnalysisPeriodsFacet; |
3035
b388d888330d
Implemented facets and splitted up the event facet.Implemented facets and splitted up the event facet.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3028
diff
changeset
|
22 import de.intevation.flys.artifacts.model.fixings.FixReferenceEventsFacet; |
3028
77b5f5a26700
Added facets for fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2992
diff
changeset
|
23 import de.intevation.flys.artifacts.model.fixings.FixOutlierFacet; |
77b5f5a26700
Added facets for fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2992
diff
changeset
|
24 import de.intevation.flys.artifacts.model.fixings.FixWQCurveFacet; |
3043
22da13d1b180
Added facet for derivate curve and fixed facet names.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3035
diff
changeset
|
25 import de.intevation.flys.artifacts.model.fixings.FixDerivateFacet; |
3028
77b5f5a26700
Added facets for fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2992
diff
changeset
|
26 |
77b5f5a26700
Added facets for fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2992
diff
changeset
|
27 import de.intevation.flys.artifacts.model.fixings.DateRange; |
77b5f5a26700
Added facets for fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2992
diff
changeset
|
28 |
2651
9e9eb9d97548
Initial transition configuration and artifact/state stubs for fixation
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
29 import de.intevation.flys.artifacts.states.DefaultState; |
9e9eb9d97548
Initial transition configuration and artifact/state stubs for fixation
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
30 |
3049
5e9533687a0c
Added i18n in fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3048
diff
changeset
|
31 import de.intevation.flys.artifacts.resources.Resources; |
5e9533687a0c
Added i18n in fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3048
diff
changeset
|
32 |
2784
156214e3ca55
FixA: Call computing when reaching the compute state.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2699
diff
changeset
|
33 import java.util.List; |
156214e3ca55
FixA: Call computing when reaching the compute state.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2699
diff
changeset
|
34 |
156214e3ca55
FixA: Call computing when reaching the compute state.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2699
diff
changeset
|
35 import org.apache.log4j.Logger; |
156214e3ca55
FixA: Call computing when reaching the compute state.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2699
diff
changeset
|
36 |
2651
9e9eb9d97548
Initial transition configuration and artifact/state stubs for fixation
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
37 /** |
9e9eb9d97548
Initial transition configuration and artifact/state stubs for fixation
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
38 * @author <a href="mailto:raimund.renkert@intevation.de">Raimund Renkert</a> |
9e9eb9d97548
Initial transition configuration and artifact/state stubs for fixation
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
39 */ |
2992
0abdede5a0b8
FixA: Added facet to return delta w/t as CSV
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2784
diff
changeset
|
40 public class FixationCompute |
0abdede5a0b8
FixA: Added facet to return delta w/t as CSV
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2784
diff
changeset
|
41 extends DefaultState |
0abdede5a0b8
FixA: Added facet to return delta w/t as CSV
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2784
diff
changeset
|
42 implements FacetTypes |
0abdede5a0b8
FixA: Added facet to return delta w/t as CSV
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2784
diff
changeset
|
43 { |
2651
9e9eb9d97548
Initial transition configuration and artifact/state stubs for fixation
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
44 |
2784
156214e3ca55
FixA: Call computing when reaching the compute state.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2699
diff
changeset
|
45 /** The log used in this class. */ |
156214e3ca55
FixA: Call computing when reaching the compute state.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2699
diff
changeset
|
46 private static Logger log = Logger.getLogger(FixationCompute.class); |
2651
9e9eb9d97548
Initial transition configuration and artifact/state stubs for fixation
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
47 |
3049
5e9533687a0c
Added i18n in fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3048
diff
changeset
|
48 private static final String I18N_REFERENCEPERIOD = "fix.reference.period"; |
5e9533687a0c
Added i18n in fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3048
diff
changeset
|
49 |
5e9533687a0c
Added i18n in fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3048
diff
changeset
|
50 private static final String I18N_ANALYSISPERIODS = "fix.analysis.periods"; |
5e9533687a0c
Added i18n in fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3048
diff
changeset
|
51 |
5e9533687a0c
Added i18n in fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3048
diff
changeset
|
52 private static final String I18N_DERIVATIVE = "fix.derivative"; |
5e9533687a0c
Added i18n in fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3048
diff
changeset
|
53 |
5e9533687a0c
Added i18n in fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3048
diff
changeset
|
54 private static final String I18N_OUTLIER = "fix.outlier"; |
2651
9e9eb9d97548
Initial transition configuration and artifact/state stubs for fixation
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
55 |
9e9eb9d97548
Initial transition configuration and artifact/state stubs for fixation
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
56 /** |
9e9eb9d97548
Initial transition configuration and artifact/state stubs for fixation
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
57 * The default constructor that initializes an empty State object. |
9e9eb9d97548
Initial transition configuration and artifact/state stubs for fixation
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
58 */ |
9e9eb9d97548
Initial transition configuration and artifact/state stubs for fixation
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
59 public FixationCompute() { |
9e9eb9d97548
Initial transition configuration and artifact/state stubs for fixation
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
60 } |
9e9eb9d97548
Initial transition configuration and artifact/state stubs for fixation
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
61 |
2784
156214e3ca55
FixA: Call computing when reaching the compute state.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2699
diff
changeset
|
62 @Override |
156214e3ca55
FixA: Call computing when reaching the compute state.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2699
diff
changeset
|
63 public Object computeAdvance( |
156214e3ca55
FixA: Call computing when reaching the compute state.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2699
diff
changeset
|
64 FLYSArtifact artifact, |
156214e3ca55
FixA: Call computing when reaching the compute state.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2699
diff
changeset
|
65 String hash, |
156214e3ca55
FixA: Call computing when reaching the compute state.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2699
diff
changeset
|
66 CallContext context, |
156214e3ca55
FixA: Call computing when reaching the compute state.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2699
diff
changeset
|
67 List<Facet> facets, |
156214e3ca55
FixA: Call computing when reaching the compute state.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2699
diff
changeset
|
68 Object old |
156214e3ca55
FixA: Call computing when reaching the compute state.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2699
diff
changeset
|
69 ) { |
156214e3ca55
FixA: Call computing when reaching the compute state.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2699
diff
changeset
|
70 log.debug("FixationCompute.computeAdvance"); |
156214e3ca55
FixA: Call computing when reaching the compute state.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2699
diff
changeset
|
71 |
156214e3ca55
FixA: Call computing when reaching the compute state.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2699
diff
changeset
|
72 CalculationResult res; |
156214e3ca55
FixA: Call computing when reaching the compute state.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2699
diff
changeset
|
73 |
3028
77b5f5a26700
Added facets for fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2992
diff
changeset
|
74 FixationArtifactAccess access = |
77b5f5a26700
Added facets for fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2992
diff
changeset
|
75 new FixationArtifactAccess(artifact); |
77b5f5a26700
Added facets for fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2992
diff
changeset
|
76 |
2784
156214e3ca55
FixA: Call computing when reaching the compute state.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2699
diff
changeset
|
77 if (old instanceof CalculationResult) { |
156214e3ca55
FixA: Call computing when reaching the compute state.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2699
diff
changeset
|
78 res = (CalculationResult)old; |
156214e3ca55
FixA: Call computing when reaching the compute state.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2699
diff
changeset
|
79 } |
156214e3ca55
FixA: Call computing when reaching the compute state.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2699
diff
changeset
|
80 else { |
156214e3ca55
FixA: Call computing when reaching the compute state.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2699
diff
changeset
|
81 FixCalculation calc = |
156214e3ca55
FixA: Call computing when reaching the compute state.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2699
diff
changeset
|
82 new FixCalculation(access); |
156214e3ca55
FixA: Call computing when reaching the compute state.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2699
diff
changeset
|
83 |
156214e3ca55
FixA: Call computing when reaching the compute state.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2699
diff
changeset
|
84 res = calc.calculate(); |
156214e3ca55
FixA: Call computing when reaching the compute state.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2699
diff
changeset
|
85 } |
156214e3ca55
FixA: Call computing when reaching the compute state.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2699
diff
changeset
|
86 |
156214e3ca55
FixA: Call computing when reaching the compute state.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2699
diff
changeset
|
87 if (facets == null) { |
156214e3ca55
FixA: Call computing when reaching the compute state.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2699
diff
changeset
|
88 return res; |
156214e3ca55
FixA: Call computing when reaching the compute state.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2699
diff
changeset
|
89 } |
156214e3ca55
FixA: Call computing when reaching the compute state.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2699
diff
changeset
|
90 |
156214e3ca55
FixA: Call computing when reaching the compute state.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2699
diff
changeset
|
91 if (res.getReport().hasProblems()) { |
156214e3ca55
FixA: Call computing when reaching the compute state.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2699
diff
changeset
|
92 facets.add(new ReportFacet(ComputeType.ADVANCE, hash, id)); |
156214e3ca55
FixA: Call computing when reaching the compute state.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2699
diff
changeset
|
93 } |
2992
0abdede5a0b8
FixA: Added facet to return delta w/t as CSV
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2784
diff
changeset
|
94 facets.add( |
0abdede5a0b8
FixA: Added facet to return delta w/t as CSV
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2784
diff
changeset
|
95 new DataFacet(CSV, "CSV data", ComputeType.ADVANCE, hash, id)); |
2784
156214e3ca55
FixA: Call computing when reaching the compute state.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2699
diff
changeset
|
96 |
3028
77b5f5a26700
Added facets for fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2992
diff
changeset
|
97 int count = access.getAnalysisPeriods().length; |
77b5f5a26700
Added facets for fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2992
diff
changeset
|
98 for (int i = 0; i < count; i++) { |
77b5f5a26700
Added facets for fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2992
diff
changeset
|
99 DateRange period = access.getAnalysisPeriods()[i]; |
77b5f5a26700
Added facets for fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2992
diff
changeset
|
100 for (int j = access.getQSectorStart().intValue(); |
3043
22da13d1b180
Added facet for derivate curve and fixed facet names.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3035
diff
changeset
|
101 j <= access.getQSectorEnd().intValue(); |
3028
77b5f5a26700
Added facets for fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2992
diff
changeset
|
102 j++) { |
3048
fa763b270e78
Changed facet description in fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3043
diff
changeset
|
103 |
fa763b270e78
Changed facet description in fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3043
diff
changeset
|
104 DateFormat df = DateFormat.getDateInstance(DateFormat.MEDIUM); |
fa763b270e78
Changed facet description in fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3043
diff
changeset
|
105 String startDate = df.format(period.getFrom()); |
fa763b270e78
Changed facet description in fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3043
diff
changeset
|
106 String endDate = df.format(period.getTo()); |
fa763b270e78
Changed facet description in fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3043
diff
changeset
|
107 String sector = ""; |
fa763b270e78
Changed facet description in fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3043
diff
changeset
|
108 switch (j) { |
fa763b270e78
Changed facet description in fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3043
diff
changeset
|
109 case 0: sector = "[0 - (MNQ+MQ)/2)"; break; |
fa763b270e78
Changed facet description in fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3043
diff
changeset
|
110 case 1: sector = "[(MNQ+MQ)/2 - (MQ+MHQ)/2)"; break; |
fa763b270e78
Changed facet description in fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3043
diff
changeset
|
111 case 2: sector = "[(MQ+MHQ)/2 - HQ5)"; break; |
fa763b270e78
Changed facet description in fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3043
diff
changeset
|
112 case 3: sector = "[HQ5 - \u221e)"; break; |
fa763b270e78
Changed facet description in fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3043
diff
changeset
|
113 } |
fa763b270e78
Changed facet description in fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3043
diff
changeset
|
114 String description = sector + ": " + |
fa763b270e78
Changed facet description in fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3043
diff
changeset
|
115 startDate + " - " + |
fa763b270e78
Changed facet description in fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3043
diff
changeset
|
116 endDate; |
3028
77b5f5a26700
Added facets for fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2992
diff
changeset
|
117 facets.add( |
77b5f5a26700
Added facets for fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2992
diff
changeset
|
118 new FixAvSectorFacet(j - access.getQSectorStart().intValue(), |
3043
22da13d1b180
Added facet for derivate curve and fixed facet names.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3035
diff
changeset
|
119 FIX_SECTOR_AVERAGE_DWT, |
3028
77b5f5a26700
Added facets for fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2992
diff
changeset
|
120 description)); |
3043
22da13d1b180
Added facet for derivate curve and fixed facet names.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3035
diff
changeset
|
121 facets.add( |
22da13d1b180
Added facet for derivate curve and fixed facet names.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3035
diff
changeset
|
122 new FixAvSectorFacet(j - access.getQSectorStart().intValue(), |
22da13d1b180
Added facet for derivate curve and fixed facet names.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3035
diff
changeset
|
123 FIX_SECTOR_AVERAGE_LS, |
22da13d1b180
Added facet for derivate curve and fixed facet names.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3035
diff
changeset
|
124 description)); |
22da13d1b180
Added facet for derivate curve and fixed facet names.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3035
diff
changeset
|
125 facets.add( |
22da13d1b180
Added facet for derivate curve and fixed facet names.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3035
diff
changeset
|
126 new FixAvSectorFacet(j - access.getQSectorStart().intValue(), |
22da13d1b180
Added facet for derivate curve and fixed facet names.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3035
diff
changeset
|
127 FIX_SECTOR_AVERAGE_WQ, |
22da13d1b180
Added facet for derivate curve and fixed facet names.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3035
diff
changeset
|
128 description)); |
22da13d1b180
Added facet for derivate curve and fixed facet names.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3035
diff
changeset
|
129 |
3028
77b5f5a26700
Added facets for fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2992
diff
changeset
|
130 } |
77b5f5a26700
Added facets for fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2992
diff
changeset
|
131 String eventDesc = period.getFrom().toString() + |
77b5f5a26700
Added facets for fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2992
diff
changeset
|
132 " - " + |
77b5f5a26700
Added facets for fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2992
diff
changeset
|
133 period.getTo().toString(); |
3043
22da13d1b180
Added facet for derivate curve and fixed facet names.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3035
diff
changeset
|
134 facets.add(new FixAnalysisEventsFacet(i, |
22da13d1b180
Added facet for derivate curve and fixed facet names.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3035
diff
changeset
|
135 FIX_ANALYSIS_EVENTS_DWT, |
22da13d1b180
Added facet for derivate curve and fixed facet names.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3035
diff
changeset
|
136 eventDesc)); |
22da13d1b180
Added facet for derivate curve and fixed facet names.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3035
diff
changeset
|
137 facets.add(new FixAnalysisEventsFacet(i, |
22da13d1b180
Added facet for derivate curve and fixed facet names.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3035
diff
changeset
|
138 FIX_ANALYSIS_EVENTS_LS, |
22da13d1b180
Added facet for derivate curve and fixed facet names.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3035
diff
changeset
|
139 eventDesc)); |
22da13d1b180
Added facet for derivate curve and fixed facet names.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3035
diff
changeset
|
140 facets.add(new FixAnalysisEventsFacet(i, |
22da13d1b180
Added facet for derivate curve and fixed facet names.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3035
diff
changeset
|
141 FIX_ANALYSIS_EVENTS_WQ, |
22da13d1b180
Added facet for derivate curve and fixed facet names.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3035
diff
changeset
|
142 eventDesc)); |
3028
77b5f5a26700
Added facets for fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2992
diff
changeset
|
143 } |
3049
5e9533687a0c
Added i18n in fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3048
diff
changeset
|
144 |
5e9533687a0c
Added i18n in fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3048
diff
changeset
|
145 String i18n_ref = Resources.getMsg(context.getMeta(), |
5e9533687a0c
Added i18n in fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3048
diff
changeset
|
146 I18N_REFERENCEPERIOD, |
5e9533687a0c
Added i18n in fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3048
diff
changeset
|
147 I18N_REFERENCEPERIOD); |
5e9533687a0c
Added i18n in fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3048
diff
changeset
|
148 |
3043
22da13d1b180
Added facet for derivate curve and fixed facet names.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3035
diff
changeset
|
149 facets.add(new FixReferenceEventsFacet(0, |
22da13d1b180
Added facet for derivate curve and fixed facet names.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3035
diff
changeset
|
150 FIX_REFERENCE_EVENTS_DWT, |
3049
5e9533687a0c
Added i18n in fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3048
diff
changeset
|
151 i18n_ref)); |
3043
22da13d1b180
Added facet for derivate curve and fixed facet names.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3035
diff
changeset
|
152 facets.add(new FixReferenceEventsFacet(1, |
22da13d1b180
Added facet for derivate curve and fixed facet names.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3035
diff
changeset
|
153 FIX_REFERENCE_EVENTS_LS, |
3049
5e9533687a0c
Added i18n in fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3048
diff
changeset
|
154 i18n_ref)); |
3043
22da13d1b180
Added facet for derivate curve and fixed facet names.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3035
diff
changeset
|
155 facets.add(new FixReferenceEventsFacet(2, |
22da13d1b180
Added facet for derivate curve and fixed facet names.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3035
diff
changeset
|
156 FIX_REFERENCE_EVENTS_WQ, |
3049
5e9533687a0c
Added i18n in fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3048
diff
changeset
|
157 i18n_ref)); |
3043
22da13d1b180
Added facet for derivate curve and fixed facet names.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3035
diff
changeset
|
158 |
3049
5e9533687a0c
Added i18n in fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3048
diff
changeset
|
159 String i18n_ana = Resources.getMsg(context.getMeta(), |
5e9533687a0c
Added i18n in fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3048
diff
changeset
|
160 I18N_ANALYSISPERIODS, |
5e9533687a0c
Added i18n in fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3048
diff
changeset
|
161 I18N_ANALYSISPERIODS); |
3043
22da13d1b180
Added facet for derivate curve and fixed facet names.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3035
diff
changeset
|
162 facets.add(new FixAnalysisPeriodsFacet(0, |
22da13d1b180
Added facet for derivate curve and fixed facet names.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3035
diff
changeset
|
163 FIX_ANALYSIS_PERIODS_DWT, |
3049
5e9533687a0c
Added i18n in fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3048
diff
changeset
|
164 i18n_ana)); |
3043
22da13d1b180
Added facet for derivate curve and fixed facet names.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3035
diff
changeset
|
165 facets.add(new FixAnalysisPeriodsFacet(1, |
22da13d1b180
Added facet for derivate curve and fixed facet names.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3035
diff
changeset
|
166 FIX_ANALYSIS_PERIODS_LS, |
3049
5e9533687a0c
Added i18n in fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3048
diff
changeset
|
167 i18n_ana)); |
3043
22da13d1b180
Added facet for derivate curve and fixed facet names.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3035
diff
changeset
|
168 facets.add(new FixAnalysisPeriodsFacet(2, |
22da13d1b180
Added facet for derivate curve and fixed facet names.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3035
diff
changeset
|
169 FIX_ANALYSIS_PERIODS_WQ, |
3049
5e9533687a0c
Added i18n in fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3048
diff
changeset
|
170 i18n_ana)); |
3043
22da13d1b180
Added facet for derivate curve and fixed facet names.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3035
diff
changeset
|
171 |
3028
77b5f5a26700
Added facets for fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2992
diff
changeset
|
172 facets.add(new FixWQCurveFacet("W/Q")); |
3049
5e9533687a0c
Added i18n in fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3048
diff
changeset
|
173 facets.add(new FixOutlierFacet(FIX_OUTLIER, |
5e9533687a0c
Added i18n in fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3048
diff
changeset
|
174 Resources.getMsg(context.getMeta(), I18N_OUTLIER, I18N_OUTLIER))); |
5e9533687a0c
Added i18n in fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3048
diff
changeset
|
175 facets.add(new FixDerivateFacet(FIX_DERIVATE, |
5e9533687a0c
Added i18n in fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3048
diff
changeset
|
176 Resources.getMsg(context.getMeta(), |
5e9533687a0c
Added i18n in fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3048
diff
changeset
|
177 I18N_DERIVATIVE, |
5e9533687a0c
Added i18n in fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3048
diff
changeset
|
178 I18N_DERIVATIVE))); |
3028
77b5f5a26700
Added facets for fix analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2992
diff
changeset
|
179 |
2784
156214e3ca55
FixA: Call computing when reaching the compute state.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2699
diff
changeset
|
180 return res; |
156214e3ca55
FixA: Call computing when reaching the compute state.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2699
diff
changeset
|
181 } |
2651
9e9eb9d97548
Initial transition configuration and artifact/state stubs for fixation
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
182 } |
9e9eb9d97548
Initial transition configuration and artifact/state stubs for fixation
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
183 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : |