annotate flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/SQRelation.java @ 3109:63ef889eea2b

SQ: Directly sample our Function objects instead of Function2D from JFreeChart. flys-artifacts/trunk@4708 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Tue, 19 Jun 2012 15:39:02 +0000
parents b31397addf2f
children 2feed9b50047
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
3072
0d3dd8230064 Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3058
diff changeset
3 import java.util.ArrayList;
0d3dd8230064 Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3058
diff changeset
4 import java.util.List;
0d3dd8230064 Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3058
diff changeset
5
3058
df4d6b286af8 Added states and transitions for S-Q-relation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
6 import org.apache.log4j.Logger;
df4d6b286af8 Added states and transitions for S-Q-relation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
7
3072
0d3dd8230064 Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3058
diff changeset
8 import de.intevation.artifacts.CallContext;
0d3dd8230064 Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3058
diff changeset
9
0d3dd8230064 Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3058
diff changeset
10 import de.intevation.artifactdatabase.state.Facet;
0d3dd8230064 Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3058
diff changeset
11
0d3dd8230064 Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3058
diff changeset
12 import de.intevation.flys.artifacts.FLYSArtifact;
0d3dd8230064 Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3058
diff changeset
13 import de.intevation.flys.artifacts.MINFOArtifact;
0d3dd8230064 Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3058
diff changeset
14 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
15 import de.intevation.flys.artifacts.model.FacetTypes;
0d3dd8230064 Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3058
diff changeset
16 import de.intevation.flys.artifacts.model.CalculationResult;
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.sq.SQCurveFacet;
3101
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
18 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
19 import de.intevation.flys.artifacts.model.sq.SQMeasurementFacet;
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.SQOutlierFacet;
0d3dd8230064 Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3058
diff changeset
21 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
22 import de.intevation.flys.artifacts.model.sq.SQResult;
3058
df4d6b286af8 Added states and transitions for S-Q-relation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
23 import de.intevation.flys.artifacts.states.DefaultState;
df4d6b286af8 Added states and transitions for S-Q-relation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
24
df4d6b286af8 Added states and transitions for S-Q-relation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
25 /**
df4d6b286af8 Added states and transitions for S-Q-relation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
26 * @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
27 */
3072
0d3dd8230064 Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3058
diff changeset
28 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
29
df4d6b286af8 Added states and transitions for S-Q-relation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
30 private static Logger logger = Logger.getLogger(SQRelation.class);
df4d6b286af8 Added states and transitions for S-Q-relation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
31
df4d6b286af8 Added states and transitions for S-Q-relation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
32
df4d6b286af8 Added states and transitions for S-Q-relation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
33 public SQRelation() {
df4d6b286af8 Added states and transitions for S-Q-relation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
34 }
df4d6b286af8 Added states and transitions for S-Q-relation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
35
3072
0d3dd8230064 Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3058
diff changeset
36
3058
df4d6b286af8 Added states and transitions for S-Q-relation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
37 @Override
3072
0d3dd8230064 Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3058
diff changeset
38 public Object computeAdvance(
0d3dd8230064 Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3058
diff changeset
39 FLYSArtifact artifact,
0d3dd8230064 Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3058
diff changeset
40 String hash,
0d3dd8230064 Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3058
diff changeset
41 CallContext context,
0d3dd8230064 Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3058
diff changeset
42 List<Facet> facets,
0d3dd8230064 Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3058
diff changeset
43 Object old
0d3dd8230064 Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3058
diff changeset
44 ) {
0d3dd8230064 Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3058
diff changeset
45 logger.debug("SQRelation.computeAdvance");
0d3dd8230064 Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3058
diff changeset
46
0d3dd8230064 Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3058
diff changeset
47 List<Facet> newFacets = new ArrayList<Facet>();
0d3dd8230064 Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3058
diff changeset
48
0d3dd8230064 Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3058
diff changeset
49 CalculationResult res = old instanceof CalculationResult
0d3dd8230064 Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3058
diff changeset
50 ? (CalculationResult) old
0d3dd8230064 Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3058
diff changeset
51 : new SQRelationCalculation().calculate((MINFOArtifact) artifact);
0d3dd8230064 Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3058
diff changeset
52
0d3dd8230064 Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3058
diff changeset
53 if (facets == null || res == null) {
0d3dd8230064 Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3058
diff changeset
54 return res;
0d3dd8230064 Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3058
diff changeset
55 }
0d3dd8230064 Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3058
diff changeset
56
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
57 SQResult[] sqr = (SQResult[]) res.getData();
3101
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
58 logger.info("Calculation computed " + sqr.length + " SQResult objects");
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
59
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
60 createFacets(newFacets, sqr, hash);
3072
0d3dd8230064 Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3058
diff changeset
61
0d3dd8230064 Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3058
diff changeset
62 Facet csv = new DataFacet(
0d3dd8230064 Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3058
diff changeset
63 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
64
0d3dd8230064 Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3058
diff changeset
65 Facet pdf = new DataFacet(
0d3dd8230064 Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3058
diff changeset
66 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
67
0d3dd8230064 Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3058
diff changeset
68 newFacets.add(csv);
0d3dd8230064 Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3058
diff changeset
69 newFacets.add(pdf);
0d3dd8230064 Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3058
diff changeset
70
0d3dd8230064 Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3058
diff changeset
71 logger.debug("Created " + newFacets.size() + " new Facets.");
0d3dd8230064 Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3058
diff changeset
72
0d3dd8230064 Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3058
diff changeset
73 facets.addAll(newFacets);
0d3dd8230064 Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3058
diff changeset
74
0d3dd8230064 Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3058
diff changeset
75 return res;
3058
df4d6b286af8 Added states and transitions for S-Q-relation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
76 }
df4d6b286af8 Added states and transitions for S-Q-relation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
77
3072
0d3dd8230064 Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3058
diff changeset
78
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
79 protected void createFacets(
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
80 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
81 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
82 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
83 ) {
3099
ef0dd585b5e0 Display measurements in SQ relation charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3087
diff changeset
84 String stateId = getID();
ef0dd585b5e0 Display measurements in SQ relation charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3087
diff changeset
85
3101
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
86 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
87
3101
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
88 for (int i = 0; i < 6; i++) {
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
89 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
90
3101
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
91 if (result == null) {
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
92 logger.warn("Fraction at index " + i + " is empty!");
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
93 continue;
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
94 }
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
95
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
96 container.add(new SQMeasurementFacet(
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
97 res,
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
98 i,
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
99 getFractionFacetname(1, i),
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
100 "Measurement (Fraction " + i + ")",
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
101 hash,
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
102 stateId
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
103 ));
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
104
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
105 container.add(new SQCurveFacet(
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
106 res,
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
107 i,
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
108 getFractionFacetname(0, i),
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
109 "CURVE AT " + i,
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
110 hash,
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
111 stateId
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
112 ));
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
113
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
114 for (int j = 0, C = result.getOutliersCount(); j < C; j++) {
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
115 container.add(new SQOutlierFacet(
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
116 res,
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
117 i,
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
118 j,
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
119 getFractionFacetname(2, i),
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
120 "OUTLIER AT " + i,
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
121 hash,
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
122 stateId
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
123 ));
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
124 }
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
125 }
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
126 }
3072
0d3dd8230064 Added component stubs for SQ relation calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3058
diff changeset
127 }
3101
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
128
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
129
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
130 protected String getFractionFacetname(int type, int fractionIdx) {
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
131 logger.debug("getFractionFacetname(): " + type + " | " + fractionIdx);
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
132
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
133 switch (type) {
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
134 case 0:
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
135 switch (fractionIdx) {
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
136 case 0: return SQ_A_CURVE;
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
137 case 1: return SQ_B_CURVE;
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
138 case 2: return SQ_C_CURVE;
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
139 case 3: return SQ_D_CURVE;
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
140 case 4: return SQ_E_CURVE;
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
141 case 5: return SQ_F_CURVE;
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
142 }
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
143 case 1:
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
144 switch (fractionIdx) {
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
145 case 0: return SQ_A_MEASUREMENT;
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
146 case 1: return SQ_B_MEASUREMENT;
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
147 case 2: return SQ_C_MEASUREMENT;
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
148 case 3: return SQ_D_MEASUREMENT;
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
149 case 4: return SQ_E_MEASUREMENT;
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
150 case 5: return SQ_F_MEASUREMENT;
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
151 }
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
152 case 2:
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
153 switch (fractionIdx) {
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
154 case 0: return SQ_A_OUTLIER;
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
155 case 1: return SQ_B_OUTLIER;
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
156 case 2: return SQ_C_OUTLIER;
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
157 case 3: return SQ_D_OUTLIER;
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
158 case 4: return SQ_E_OUTLIER;
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
159 case 5: return SQ_F_OUTLIER;
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
160 }
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
161 }
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
162
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
163 return null;
b31397addf2f Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3099
diff changeset
164 }
3058
df4d6b286af8 Added states and transitions for S-Q-relation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
165 }
df4d6b286af8 Added states and transitions for S-Q-relation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
166 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :

http://dive4elements.wald.intevation.org