Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/fixation/FixationCompute.java @ 3043:22da13d1b180
Added facet for derivate curve and fixed facet names.
flys-artifacts/trunk@4612 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Wed, 06 Jun 2012 14:58:25 +0000 |
parents | b388d888330d |
children | fa763b270e78 |
comparison
equal
deleted
inserted
replaced
3042:2ff802d66b71 | 3043:22da13d1b180 |
---|---|
14 | 14 |
15 import de.intevation.flys.artifacts.model.fixings.FixCalculation; | 15 import de.intevation.flys.artifacts.model.fixings.FixCalculation; |
16 | 16 |
17 import de.intevation.flys.artifacts.model.fixings.FixAvSectorFacet; | 17 import de.intevation.flys.artifacts.model.fixings.FixAvSectorFacet; |
18 import de.intevation.flys.artifacts.model.fixings.FixAnalysisEventsFacet; | 18 import de.intevation.flys.artifacts.model.fixings.FixAnalysisEventsFacet; |
19 import de.intevation.flys.artifacts.model.fixings.FixAnalysisPeriodsFacet; | |
19 import de.intevation.flys.artifacts.model.fixings.FixReferenceEventsFacet; | 20 import de.intevation.flys.artifacts.model.fixings.FixReferenceEventsFacet; |
20 import de.intevation.flys.artifacts.model.fixings.FixOutlierFacet; | 21 import de.intevation.flys.artifacts.model.fixings.FixOutlierFacet; |
21 import de.intevation.flys.artifacts.model.fixings.FixWQCurveFacet; | 22 import de.intevation.flys.artifacts.model.fixings.FixWQCurveFacet; |
22 | 23 import de.intevation.flys.artifacts.model.fixings.FixDerivateFacet; |
23 | 24 |
24 import de.intevation.flys.artifacts.model.fixings.DateRange; | 25 import de.intevation.flys.artifacts.model.fixings.DateRange; |
25 | 26 |
26 import de.intevation.flys.artifacts.states.DefaultState; | 27 import de.intevation.flys.artifacts.states.DefaultState; |
27 | 28 |
84 | 85 |
85 int count = access.getAnalysisPeriods().length; | 86 int count = access.getAnalysisPeriods().length; |
86 for (int i = 0; i < count; i++) { | 87 for (int i = 0; i < count; i++) { |
87 DateRange period = access.getAnalysisPeriods()[i]; | 88 DateRange period = access.getAnalysisPeriods()[i]; |
88 for (int j = access.getQSectorStart().intValue(); | 89 for (int j = access.getQSectorStart().intValue(); |
89 j < access.getQSectorEnd().intValue(); | 90 j <= access.getQSectorEnd().intValue(); |
90 j++) { | 91 j++) { |
91 //TODO: replace j with q sector string. | 92 //TODO: replace j with q sector string. |
92 String description = j + ": " + | 93 String description = j + ": " + |
93 period.getFrom().toString() + " - " + | 94 period.getFrom().toString() + " - " + |
94 period.getTo().toString(); | 95 period.getTo().toString(); |
95 facets.add( | 96 facets.add( |
96 new FixAvSectorFacet(j - access.getQSectorStart().intValue(), | 97 new FixAvSectorFacet(j - access.getQSectorStart().intValue(), |
98 FIX_SECTOR_AVERAGE_DWT, | |
97 description)); | 99 description)); |
100 facets.add( | |
101 new FixAvSectorFacet(j - access.getQSectorStart().intValue(), | |
102 FIX_SECTOR_AVERAGE_LS, | |
103 description)); | |
104 facets.add( | |
105 new FixAvSectorFacet(j - access.getQSectorStart().intValue(), | |
106 FIX_SECTOR_AVERAGE_WQ, | |
107 description)); | |
108 | |
98 } | 109 } |
99 String eventDesc = period.getFrom().toString() + | 110 String eventDesc = period.getFrom().toString() + |
100 " - " + | 111 " - " + |
101 period.getTo().toString(); | 112 period.getTo().toString(); |
102 facets.add(new FixAnalysisEventsFacet(i, eventDesc)); | 113 facets.add(new FixAnalysisEventsFacet(i, |
114 FIX_ANALYSIS_EVENTS_DWT, | |
115 eventDesc)); | |
116 facets.add(new FixAnalysisEventsFacet(i, | |
117 FIX_ANALYSIS_EVENTS_LS, | |
118 eventDesc)); | |
119 facets.add(new FixAnalysisEventsFacet(i, | |
120 FIX_ANALYSIS_EVENTS_WQ, | |
121 eventDesc)); | |
103 } | 122 } |
104 facets.add(new FixReferenceEventsFacet(0, "Referenceperiod")); | 123 facets.add(new FixReferenceEventsFacet(0, |
124 FIX_REFERENCE_EVENTS_DWT, | |
125 "Referenceperiod")); | |
126 facets.add(new FixReferenceEventsFacet(1, | |
127 FIX_REFERENCE_EVENTS_LS, | |
128 "Referenceperiod")); | |
129 facets.add(new FixReferenceEventsFacet(2, | |
130 FIX_REFERENCE_EVENTS_WQ, | |
131 "Referenceperiod")); | |
132 | |
133 facets.add(new FixAnalysisPeriodsFacet(0, | |
134 FIX_ANALYSIS_PERIODS_DWT, | |
135 "Analysis periods")); | |
136 facets.add(new FixAnalysisPeriodsFacet(1, | |
137 FIX_ANALYSIS_PERIODS_LS, | |
138 "Analysis periods")); | |
139 facets.add(new FixAnalysisPeriodsFacet(2, | |
140 FIX_ANALYSIS_PERIODS_WQ, | |
141 "Analysis periods")); | |
142 | |
105 facets.add(new FixWQCurveFacet("W/Q")); | 143 facets.add(new FixWQCurveFacet("W/Q")); |
106 facets.add(new FixOutlierFacet("Outlier")); | 144 facets.add(new FixOutlierFacet(FIX_OUTLIER, "Outlier")); |
145 facets.add(new FixDerivateFacet(FIX_DERIVATE, "Derivative")); | |
107 | 146 |
108 return res; | 147 return res; |
109 } | 148 } |
110 } | 149 } |
111 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : | 150 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : |