Mercurial > dive4elements > river
annotate flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/SQRelation.java @ 5649:066f3a2f34d6
Minor refactoring.
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Wed, 10 Apr 2013 13:11:45 +0200 |
parents | 5063c93dfb8e |
children |
rev | line source |
---|---|
3058
df4d6b286af8
Added states and transitions for S-Q-relation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.artifacts.states; |
df4d6b286af8
Added states and transitions for S-Q-relation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
2 |
3222
116b342893e3
SQ: Connect calculation with artifact parameter access.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3119
diff
changeset
|
3 import de.intevation.artifactdatabase.state.Facet; |
3559
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
4 import de.intevation.artifactdatabase.state.FacetActivity; |
3058
df4d6b286af8
Added states and transitions for S-Q-relation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
5 |
3559
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
6 import de.intevation.artifacts.Artifact; |
3072
0d3dd8230064
Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3058
diff
changeset
|
7 import de.intevation.artifacts.CallContext; |
3116
2feed9b50047
SQ relation now creates Facets with proper i18n labels.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3101
diff
changeset
|
8 import de.intevation.artifacts.CallMeta; |
3072
0d3dd8230064
Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3058
diff
changeset
|
9 |
3559
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
10 import de.intevation.artifacts.common.utils.StringUtils; |
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
11 |
3222
116b342893e3
SQ: Connect calculation with artifact parameter access.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3119
diff
changeset
|
12 import de.intevation.flys.artifacts.FLYSArtifact; |
3072
0d3dd8230064
Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3058
diff
changeset
|
13 |
3222
116b342893e3
SQ: Connect calculation with artifact parameter access.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3119
diff
changeset
|
14 import de.intevation.flys.artifacts.access.SQRelationAccess; |
116b342893e3
SQ: Connect calculation with artifact parameter access.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3119
diff
changeset
|
15 |
116b342893e3
SQ: Connect calculation with artifact parameter access.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3119
diff
changeset
|
16 import de.intevation.flys.artifacts.model.CalculationResult; |
3072
0d3dd8230064
Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3058
diff
changeset
|
17 import de.intevation.flys.artifacts.model.DataFacet; |
0d3dd8230064
Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3058
diff
changeset
|
18 import de.intevation.flys.artifacts.model.FacetTypes; |
3222
116b342893e3
SQ: Connect calculation with artifact parameter access.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3119
diff
changeset
|
19 |
3072
0d3dd8230064
Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3058
diff
changeset
|
20 import de.intevation.flys.artifacts.model.sq.SQCurveFacet; |
3101
b31397addf2f
Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3099
diff
changeset
|
21 import de.intevation.flys.artifacts.model.sq.SQFractionResult; |
3072
0d3dd8230064
Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3058
diff
changeset
|
22 import de.intevation.flys.artifacts.model.sq.SQMeasurementFacet; |
3552
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
23 import de.intevation.flys.artifacts.model.sq.SQOutlierCurveFacet; |
3072
0d3dd8230064
Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3058
diff
changeset
|
24 import de.intevation.flys.artifacts.model.sq.SQOutlierFacet; |
3552
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
25 import de.intevation.flys.artifacts.model.sq.SQOutlierMeasurementFacet; |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
26 import de.intevation.flys.artifacts.model.sq.SQOverviewFacet; |
3072
0d3dd8230064
Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3058
diff
changeset
|
27 import de.intevation.flys.artifacts.model.sq.SQRelationCalculation; |
3079
8ad8a227d983
Added model classes for SQ calculation; generate fake results and improved the SQRelationGenerator which now draws the outliers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3072
diff
changeset
|
28 import de.intevation.flys.artifacts.model.sq.SQResult; |
3222
116b342893e3
SQ: Connect calculation with artifact parameter access.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3119
diff
changeset
|
29 |
3116
2feed9b50047
SQ relation now creates Facets with proper i18n labels.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3101
diff
changeset
|
30 import de.intevation.flys.artifacts.resources.Resources; |
3222
116b342893e3
SQ: Connect calculation with artifact parameter access.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3119
diff
changeset
|
31 |
116b342893e3
SQ: Connect calculation with artifact parameter access.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3119
diff
changeset
|
32 import java.util.List; |
116b342893e3
SQ: Connect calculation with artifact parameter access.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3119
diff
changeset
|
33 |
116b342893e3
SQ: Connect calculation with artifact parameter access.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3119
diff
changeset
|
34 import org.apache.log4j.Logger; |
116b342893e3
SQ: Connect calculation with artifact parameter access.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3119
diff
changeset
|
35 |
3058
df4d6b286af8
Added states and transitions for S-Q-relation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
36 /** |
df4d6b286af8
Added states and transitions for S-Q-relation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
37 * @author <a href="mailto:raimund.renkert@intevation.de">Raimund Renkert</a> |
df4d6b286af8
Added states and transitions for S-Q-relation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
38 */ |
3072
0d3dd8230064
Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3058
diff
changeset
|
39 public class SQRelation extends DefaultState implements FacetTypes { |
3058
df4d6b286af8
Added states and transitions for S-Q-relation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
40 |
3222
116b342893e3
SQ: Connect calculation with artifact parameter access.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3119
diff
changeset
|
41 private static Logger log = Logger.getLogger(SQRelation.class); |
3058
df4d6b286af8
Added states and transitions for S-Q-relation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
42 |
df4d6b286af8
Added states and transitions for S-Q-relation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
43 |
3116
2feed9b50047
SQ relation now creates Facets with proper i18n labels.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3101
diff
changeset
|
44 public static final String I18N_FACET_CURVE = |
2feed9b50047
SQ relation now creates Facets with proper i18n labels.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3101
diff
changeset
|
45 "facet.sq_relation.curve"; |
2feed9b50047
SQ relation now creates Facets with proper i18n labels.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3101
diff
changeset
|
46 |
2feed9b50047
SQ relation now creates Facets with proper i18n labels.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3101
diff
changeset
|
47 public static final String I18N_FACET_MEASUREMENTS = |
2feed9b50047
SQ relation now creates Facets with proper i18n labels.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3101
diff
changeset
|
48 "facet.sq_relation.measurements"; |
2feed9b50047
SQ relation now creates Facets with proper i18n labels.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3101
diff
changeset
|
49 |
2feed9b50047
SQ relation now creates Facets with proper i18n labels.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3101
diff
changeset
|
50 public static final String I18N_FACET_OUTLIERS = |
2feed9b50047
SQ relation now creates Facets with proper i18n labels.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3101
diff
changeset
|
51 "facet.sq_relation.outliers"; |
2feed9b50047
SQ relation now creates Facets with proper i18n labels.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3101
diff
changeset
|
52 |
3552
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
53 public static final String I18N_FACET_OUTLIER_CURVE = |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
54 "facet.sq_relation.outlier.curve"; |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
55 |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
56 public static final String I18N_FACET_OUTLIER_MEASUREMENT = |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
57 "facet.sq_relation.outlier.measurement"; |
3116
2feed9b50047
SQ relation now creates Facets with proper i18n labels.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3101
diff
changeset
|
58 |
3559
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
59 public static final int CURVE_INDEX = 0; |
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
60 public static final int MEASURREMENT_INDEX = 1; |
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
61 public static final int OUTLIER_INDEX = 2; |
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
62 public static final int OUTLIER_CURVE_INDEX = 3; |
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
63 public static final int OUTLIER_MEASUREMENT_INDEX = 4; |
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
64 |
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
65 public static final String [][] FACET_NAMES = { |
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
66 { SQ_A_CURVE, SQ_B_CURVE, SQ_C_CURVE, |
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
67 SQ_D_CURVE, SQ_E_CURVE, SQ_F_CURVE |
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
68 }, |
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
69 { SQ_A_MEASUREMENT, SQ_B_MEASUREMENT, SQ_C_MEASUREMENT, |
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
70 SQ_D_MEASUREMENT, SQ_E_MEASUREMENT, SQ_F_MEASUREMENT |
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
71 }, |
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
72 { SQ_A_OUTLIER, SQ_B_OUTLIER, SQ_C_OUTLIER, |
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
73 SQ_D_OUTLIER, SQ_E_OUTLIER, SQ_F_OUTLIER |
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
74 }, |
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
75 { SQ_A_OUTLIER_CURVE, SQ_B_OUTLIER_CURVE, SQ_C_OUTLIER_CURVE, |
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
76 SQ_D_OUTLIER_CURVE, SQ_E_OUTLIER_CURVE, SQ_F_OUTLIER_CURVE |
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
77 }, |
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
78 { SQ_A_OUTLIER_MEASUREMENT, SQ_B_OUTLIER_MEASUREMENT, |
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
79 SQ_C_OUTLIER_MEASUREMENT, SQ_D_OUTLIER_MEASUREMENT, |
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
80 SQ_E_OUTLIER_MEASUREMENT, SQ_F_OUTLIER_MEASUREMENT |
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
81 } |
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
82 }; |
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
83 |
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
84 |
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
85 static { |
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
86 // Active/deactivate facets. |
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
87 FacetActivity.Registry.getInstance().register( |
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
88 "minfo", |
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
89 new FacetActivity() { |
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
90 @Override |
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
91 public Boolean isInitialActive( |
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
92 Artifact artifact, |
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
93 Facet facet, |
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
94 String output |
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
95 ) { |
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
96 String name = facet.getName(); |
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
97 |
3563
5063c93dfb8e
S/Q relation: Setup better initial activity for the facets of the S/Q results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3559
diff
changeset
|
98 if (StringUtils.contains( |
5063c93dfb8e
S/Q relation: Setup better initial activity for the facets of the S/Q results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3559
diff
changeset
|
99 name, FACET_NAMES[CURVE_INDEX]) |
3559
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
100 || StringUtils.contains( |
3563
5063c93dfb8e
S/Q relation: Setup better initial activity for the facets of the S/Q results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3559
diff
changeset
|
101 name, FACET_NAMES[OUTLIER_INDEX]) |
5063c93dfb8e
S/Q relation: Setup better initial activity for the facets of the S/Q results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3559
diff
changeset
|
102 || StringUtils.contains( |
5063c93dfb8e
S/Q relation: Setup better initial activity for the facets of the S/Q results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3559
diff
changeset
|
103 name, FACET_NAMES[MEASURREMENT_INDEX]) |
3559
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
104 ) { |
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
105 // TODO: Only the last should be active. |
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
106 return Boolean.TRUE; |
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
107 } |
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
108 |
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
109 if (StringUtils.contains( |
3563
5063c93dfb8e
S/Q relation: Setup better initial activity for the facets of the S/Q results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3559
diff
changeset
|
110 name, FACET_NAMES[OUTLIER_CURVE_INDEX]) |
5063c93dfb8e
S/Q relation: Setup better initial activity for the facets of the S/Q results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3559
diff
changeset
|
111 || StringUtils.contains( |
5063c93dfb8e
S/Q relation: Setup better initial activity for the facets of the S/Q results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3559
diff
changeset
|
112 name, FACET_NAMES[OUTLIER_MEASUREMENT_INDEX]) |
3559
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
113 ) { |
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
114 return Boolean.FALSE; |
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
115 } |
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
116 |
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
117 return null; |
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
118 } |
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
119 }); |
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
120 } |
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
121 |
3563
5063c93dfb8e
S/Q relation: Setup better initial activity for the facets of the S/Q results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3559
diff
changeset
|
122 |
3058
df4d6b286af8
Added states and transitions for S-Q-relation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
123 public SQRelation() { |
df4d6b286af8
Added states and transitions for S-Q-relation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
124 } |
df4d6b286af8
Added states and transitions for S-Q-relation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
125 |
3072
0d3dd8230064
Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3058
diff
changeset
|
126 |
3058
df4d6b286af8
Added states and transitions for S-Q-relation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
127 @Override |
3072
0d3dd8230064
Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3058
diff
changeset
|
128 public Object computeAdvance( |
0d3dd8230064
Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3058
diff
changeset
|
129 FLYSArtifact artifact, |
0d3dd8230064
Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3058
diff
changeset
|
130 String hash, |
0d3dd8230064
Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3058
diff
changeset
|
131 CallContext context, |
0d3dd8230064
Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3058
diff
changeset
|
132 List<Facet> facets, |
0d3dd8230064
Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3058
diff
changeset
|
133 Object old |
0d3dd8230064
Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3058
diff
changeset
|
134 ) { |
3222
116b342893e3
SQ: Connect calculation with artifact parameter access.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3119
diff
changeset
|
135 log.debug("SQRelation.computeAdvance"); |
3072
0d3dd8230064
Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3058
diff
changeset
|
136 |
0d3dd8230064
Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3058
diff
changeset
|
137 CalculationResult res = old instanceof CalculationResult |
3222
116b342893e3
SQ: Connect calculation with artifact parameter access.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3119
diff
changeset
|
138 ? (CalculationResult)old |
116b342893e3
SQ: Connect calculation with artifact parameter access.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3119
diff
changeset
|
139 : new SQRelationCalculation( |
116b342893e3
SQ: Connect calculation with artifact parameter access.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3119
diff
changeset
|
140 new SQRelationAccess(artifact)).calculate(); |
3072
0d3dd8230064
Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3058
diff
changeset
|
141 |
3222
116b342893e3
SQ: Connect calculation with artifact parameter access.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3119
diff
changeset
|
142 if (facets == null) { |
3072
0d3dd8230064
Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3058
diff
changeset
|
143 return res; |
0d3dd8230064
Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3058
diff
changeset
|
144 } |
0d3dd8230064
Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3058
diff
changeset
|
145 |
3222
116b342893e3
SQ: Connect calculation with artifact parameter access.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3119
diff
changeset
|
146 SQResult [] sqr = (SQResult [])res.getData(); |
116b342893e3
SQ: Connect calculation with artifact parameter access.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3119
diff
changeset
|
147 if (sqr == null) { |
116b342893e3
SQ: Connect calculation with artifact parameter access.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3119
diff
changeset
|
148 return res; |
116b342893e3
SQ: Connect calculation with artifact parameter access.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3119
diff
changeset
|
149 } |
3101
b31397addf2f
Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3099
diff
changeset
|
150 |
3222
116b342893e3
SQ: Connect calculation with artifact parameter access.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3119
diff
changeset
|
151 createFacets(context, facets, sqr, hash); |
3072
0d3dd8230064
Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3058
diff
changeset
|
152 |
0d3dd8230064
Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3058
diff
changeset
|
153 Facet csv = new DataFacet( |
0d3dd8230064
Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3058
diff
changeset
|
154 CSV, "CSV data", ComputeType.ADVANCE, hash, id); |
0d3dd8230064
Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3058
diff
changeset
|
155 |
0d3dd8230064
Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3058
diff
changeset
|
156 Facet pdf = new DataFacet( |
0d3dd8230064
Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3058
diff
changeset
|
157 PDF, "PDF data", ComputeType.ADVANCE, hash, id); |
0d3dd8230064
Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3058
diff
changeset
|
158 |
3222
116b342893e3
SQ: Connect calculation with artifact parameter access.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3119
diff
changeset
|
159 facets.add(csv); |
116b342893e3
SQ: Connect calculation with artifact parameter access.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3119
diff
changeset
|
160 facets.add(pdf); |
3072
0d3dd8230064
Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3058
diff
changeset
|
161 |
0d3dd8230064
Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3058
diff
changeset
|
162 return res; |
3058
df4d6b286af8
Added states and transitions for S-Q-relation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
163 } |
df4d6b286af8
Added states and transitions for S-Q-relation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
164 |
3072
0d3dd8230064
Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3058
diff
changeset
|
165 |
3079
8ad8a227d983
Added model classes for SQ calculation; generate fake results and improved the SQRelationGenerator which now draws the outliers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3072
diff
changeset
|
166 protected void createFacets( |
3116
2feed9b50047
SQ relation now creates Facets with proper i18n labels.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3101
diff
changeset
|
167 CallContext context, |
3079
8ad8a227d983
Added model classes for SQ calculation; generate fake results and improved the SQRelationGenerator which now draws the outliers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3072
diff
changeset
|
168 List<Facet> container, |
8ad8a227d983
Added model classes for SQ calculation; generate fake results and improved the SQRelationGenerator which now draws the outliers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3072
diff
changeset
|
169 SQResult[] sqr, |
8ad8a227d983
Added model classes for SQ calculation; generate fake results and improved the SQRelationGenerator which now draws the outliers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3072
diff
changeset
|
170 String hash |
8ad8a227d983
Added model classes for SQ calculation; generate fake results and improved the SQRelationGenerator which now draws the outliers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3072
diff
changeset
|
171 ) { |
3552
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
172 boolean debug = log.isDebugEnabled(); |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
173 |
3116
2feed9b50047
SQ relation now creates Facets with proper i18n labels.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3101
diff
changeset
|
174 CallMeta meta = context.getMeta(); |
2feed9b50047
SQ relation now creates Facets with proper i18n labels.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3101
diff
changeset
|
175 String stateId = getID(); |
3296
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3222
diff
changeset
|
176 for (int i = 0; i < 6; i++) { |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3222
diff
changeset
|
177 container.add(new SQOverviewFacet( |
3559
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
178 i, |
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
179 i, |
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
180 "sq_chart_overview", |
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
181 Resources.getMsg( |
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
182 meta, |
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
183 I18N_FACET_CURVE, |
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
184 I18N_FACET_CURVE |
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
185 ), |
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
186 hash, |
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
187 getID() |
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
188 )); |
3296
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3222
diff
changeset
|
189 } |
3101
b31397addf2f
Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3099
diff
changeset
|
190 for (int res = 0, n = sqr.length; res < n; res++) { |
3099
ef0dd585b5e0
Display measurements in SQ relation charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3087
diff
changeset
|
191 |
3552
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
192 for (int i = 0; i < SQResult.NUMBER_FRACTIONS; i++) { |
3101
b31397addf2f
Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3099
diff
changeset
|
193 SQFractionResult result = sqr[res].getFraction(i); |
3072
0d3dd8230064
Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3058
diff
changeset
|
194 |
3101
b31397addf2f
Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3099
diff
changeset
|
195 if (result == null) { |
3222
116b342893e3
SQ: Connect calculation with artifact parameter access.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3119
diff
changeset
|
196 log.warn("Fraction at index " + i + " is empty!"); |
3101
b31397addf2f
Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3099
diff
changeset
|
197 continue; |
b31397addf2f
Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3099
diff
changeset
|
198 } |
b31397addf2f
Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3099
diff
changeset
|
199 |
b31397addf2f
Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3099
diff
changeset
|
200 container.add(new SQCurveFacet( |
b31397addf2f
Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3099
diff
changeset
|
201 res, |
b31397addf2f
Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3099
diff
changeset
|
202 i, |
3559
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
203 getFractionFacetname(CURVE_INDEX, i), |
3116
2feed9b50047
SQ relation now creates Facets with proper i18n labels.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3101
diff
changeset
|
204 Resources.getMsg( |
2feed9b50047
SQ relation now creates Facets with proper i18n labels.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3101
diff
changeset
|
205 meta, |
2feed9b50047
SQ relation now creates Facets with proper i18n labels.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3101
diff
changeset
|
206 I18N_FACET_CURVE, |
2feed9b50047
SQ relation now creates Facets with proper i18n labels.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3101
diff
changeset
|
207 I18N_FACET_CURVE |
2feed9b50047
SQ relation now creates Facets with proper i18n labels.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3101
diff
changeset
|
208 ), |
3101
b31397addf2f
Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3099
diff
changeset
|
209 hash, |
b31397addf2f
Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3099
diff
changeset
|
210 stateId |
b31397addf2f
Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3099
diff
changeset
|
211 )); |
b31397addf2f
Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3099
diff
changeset
|
212 |
3552
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
213 for (int j = 0, C = result.numIterations()-1; j < C; j++) { |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
214 |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
215 Object [] round = new Object [] { j + 1 }; |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
216 |
3119
238803b2cb8b
Create a compound index for SQOutlierFacets based on result index and iteration number.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3116
diff
changeset
|
217 int index = res; |
238803b2cb8b
Create a compound index for SQOutlierFacets based on result index and iteration number.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3116
diff
changeset
|
218 index = index << 16; |
238803b2cb8b
Create a compound index for SQOutlierFacets based on result index and iteration number.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3116
diff
changeset
|
219 index = index + j; |
238803b2cb8b
Create a compound index for SQOutlierFacets based on result index and iteration number.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3116
diff
changeset
|
220 |
3552
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
221 if (debug) { |
3222
116b342893e3
SQ: Connect calculation with artifact parameter access.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3119
diff
changeset
|
222 log.debug("new outliers facet (index=" +index+ ")"); |
116b342893e3
SQ: Connect calculation with artifact parameter access.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3119
diff
changeset
|
223 log.debug(" result index = " + res); |
116b342893e3
SQ: Connect calculation with artifact parameter access.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3119
diff
changeset
|
224 log.debug(" fraction idx = " + i); |
116b342893e3
SQ: Connect calculation with artifact parameter access.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3119
diff
changeset
|
225 log.debug(" iteration = " + j); |
3119
238803b2cb8b
Create a compound index for SQOutlierFacets based on result index and iteration number.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3116
diff
changeset
|
226 } |
238803b2cb8b
Create a compound index for SQOutlierFacets based on result index and iteration number.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3116
diff
changeset
|
227 |
3101
b31397addf2f
Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3099
diff
changeset
|
228 container.add(new SQOutlierFacet( |
3119
238803b2cb8b
Create a compound index for SQOutlierFacets based on result index and iteration number.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3116
diff
changeset
|
229 index, |
3101
b31397addf2f
Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3099
diff
changeset
|
230 i, |
3559
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
231 getFractionFacetname(OUTLIER_INDEX, i), |
3116
2feed9b50047
SQ relation now creates Facets with proper i18n labels.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3101
diff
changeset
|
232 Resources.getMsg( |
2feed9b50047
SQ relation now creates Facets with proper i18n labels.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3101
diff
changeset
|
233 meta, |
2feed9b50047
SQ relation now creates Facets with proper i18n labels.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3101
diff
changeset
|
234 I18N_FACET_OUTLIERS, |
2feed9b50047
SQ relation now creates Facets with proper i18n labels.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3101
diff
changeset
|
235 I18N_FACET_OUTLIERS, |
3552
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
236 round |
3116
2feed9b50047
SQ relation now creates Facets with proper i18n labels.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3101
diff
changeset
|
237 ), |
3101
b31397addf2f
Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3099
diff
changeset
|
238 hash, |
b31397addf2f
Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3099
diff
changeset
|
239 stateId |
b31397addf2f
Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3099
diff
changeset
|
240 )); |
3552
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
241 |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
242 container.add(new SQOutlierCurveFacet( |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
243 index, |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
244 i, |
3559
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
245 getFractionFacetname(OUTLIER_CURVE_INDEX, i), |
3552
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
246 Resources.getMsg( |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
247 meta, |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
248 I18N_FACET_OUTLIER_CURVE, |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
249 I18N_FACET_OUTLIER_CURVE, |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
250 round |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
251 ), |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
252 hash, |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
253 stateId |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
254 )); |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
255 |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
256 container.add(new SQOutlierMeasurementFacet( |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
257 index, |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
258 i, |
3559
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
259 getFractionFacetname(OUTLIER_MEASUREMENT_INDEX, i), |
3552
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
260 Resources.getMsg( |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
261 meta, |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
262 I18N_FACET_OUTLIER_MEASUREMENT, |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
263 I18N_FACET_OUTLIER_MEASUREMENT, |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
264 round |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
265 ), |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
266 hash, |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
267 stateId |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
268 )); |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
269 } // for all outliers |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
270 |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
271 container.add(new SQMeasurementFacet( |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
272 res, |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
273 i, |
3559
f9f266504f1d
S/Q relation: Initially activate/deactivate facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3552
diff
changeset
|
274 getFractionFacetname(MEASURREMENT_INDEX, i), |
3552
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
275 Resources.getMsg( |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
276 meta, |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
277 I18N_FACET_MEASUREMENTS, |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
278 I18N_FACET_MEASUREMENTS |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
279 ), |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
280 hash, |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
281 stateId |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
282 )); |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
283 } // for all fractions |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
284 } // for all results |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
285 } |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
286 |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
287 protected static String getFractionFacetname(int type, int idx) { |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
288 if (log.isDebugEnabled()) { |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
289 log.debug("getFractionFacetname(): " + type + " | " + idx); |
3101
b31397addf2f
Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3099
diff
changeset
|
290 } |
3552
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
291 type %= FACET_NAMES.length; |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3317
diff
changeset
|
292 return FACET_NAMES[type][idx % FACET_NAMES[type].length]; |
3101
b31397addf2f
Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3099
diff
changeset
|
293 } |
3058
df4d6b286af8
Added states and transitions for S-Q-relation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
294 } |
df4d6b286af8
Added states and transitions for S-Q-relation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
295 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : |