Mercurial > dive4elements > river
annotate flys-artifacts/src/main/java/de/intevation/flys/artifacts/SQRelationArtifact.java @ 5770:d7d023b2c684
Removed macro from bed height difference datacage config.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Thu, 18 Apr 2013 15:01:43 +0200 |
parents | 9a14eac637ec |
children |
rev | line source |
---|---|
5501
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.artifacts; |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
2 |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
3 import java.util.ArrayList; |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
4 import java.util.List; |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
5 |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
6 import org.apache.log4j.Logger; |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
7 import org.w3c.dom.Document; |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
8 |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
9 import de.intevation.artifactdatabase.data.DefaultStateData; |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
10 import de.intevation.artifactdatabase.state.DefaultOutput; |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
11 import de.intevation.artifactdatabase.state.Facet; |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
12 import de.intevation.artifacts.ArtifactFactory; |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
13 import de.intevation.artifacts.ArtifactNamespaceContext; |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
14 import de.intevation.artifacts.CallMeta; |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
15 import de.intevation.artifacts.common.utils.XMLUtils; |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
16 import de.intevation.flys.artifacts.model.sq.StaticSQRelation; |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
17 import de.intevation.flys.artifacts.resources.Resources; |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
18 import de.intevation.flys.artifacts.states.StaticState; |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
19 import de.intevation.flys.artifacts.states.sq.SQStaticState; |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
20 |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
21 |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
22 public class SQRelationArtifact |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
23 extends AbstractStaticStateArtifact |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
24 { |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
25 private static final Logger logger = |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
26 Logger.getLogger(SQRelationArtifact.class); |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
27 |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
28 public static final String XPATH_RIVER = "/art:action/art:river/@art:name"; |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
29 public static final String XPATH_STATION = |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
30 "/art:action/art:measurement_station/@art:number"; |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
31 public static final String NAME = "staticsqrelation"; |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
32 public static final String STATIC_STATE_NAME = "state.sqrelation.static"; |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
33 public static final String UIPROVIDER = "static_sqrelation"; |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
34 public static final String SQ_RELATION_OUT_A = "sq_relation_a"; |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
35 public static final String SQ_RELATION_OUT_B = "sq_relation_b"; |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
36 public static final String SQ_RELATION_OUT_C = "sq_relation_c"; |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
37 public static final String SQ_RELATION_OUT_D = "sq_relation_d"; |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
38 public static final String SQ_RELATION_OUT_E = "sq_relation_e"; |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
39 public static final String SQ_RELATION_OUT_F = "sq_relation_f"; |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
40 |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
41 |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
42 @Override |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
43 public void setup( |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
44 String identifier, |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
45 ArtifactFactory factory, |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
46 Object context, |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
47 CallMeta callmeta, |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
48 Document data |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
49 ) { |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
50 logger.debug("SQRelationArtifact.setup()"); |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
51 |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
52 String river = XMLUtils.xpathString( |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
53 data, |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
54 XPATH_RIVER, |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
55 ArtifactNamespaceContext.INSTANCE); |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
56 String station = XMLUtils.xpathString( |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
57 data, |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
58 XPATH_STATION, |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
59 ArtifactNamespaceContext.INSTANCE); |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
60 |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
61 addData( |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
62 "river", |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
63 new DefaultStateData( |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
64 "river", |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
65 Resources.getMsg(callmeta, "static.sq.river", "Rivername"), |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
66 "String", |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
67 river)); |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
68 addData( |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
69 "station", |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
70 new DefaultStateData( |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
71 "station", |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
72 Resources.getMsg(callmeta, "static.sq.station", "Station"), |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
73 "String", |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
74 station)); |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
75 super.setup(identifier, factory, context, callmeta, data); |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
76 } |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
77 |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
78 @Override |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
79 protected void initStaticState() { |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
80 StaticState state = new SQStaticState(STATIC_STATE_NAME); |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
81 |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
82 List<Facet> fs = new ArrayList<Facet>(); |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
83 state.staticCompute(fs, this); |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
84 |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
85 if (hasParameter(StaticSQRelation.Parameter.A, fs)) { |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
86 DefaultOutput outputA = new DefaultOutput( |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
87 SQ_RELATION_OUT_A, |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
88 "output.static.sqrelation.a", |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
89 "image/png", |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
90 fs, |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
91 "chart"); |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
92 state.addOutput(outputA); |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
93 } |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
94 if (hasParameter(StaticSQRelation.Parameter.B, fs)) { |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
95 DefaultOutput outputB = new DefaultOutput( |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
96 SQ_RELATION_OUT_B, |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
97 "output.static.sqrelation.b", |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
98 "image/png", |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
99 fs, |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
100 "chart"); |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
101 state.addOutput(outputB); |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
102 } |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
103 if (hasParameter(StaticSQRelation.Parameter.C, fs)) { |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
104 DefaultOutput outputC = new DefaultOutput( |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
105 SQ_RELATION_OUT_C, |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
106 "output.static.sqrelation.c", |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
107 "image/png", |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
108 fs, |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
109 "chart"); |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
110 state.addOutput(outputC); |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
111 } |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
112 if (hasParameter(StaticSQRelation.Parameter.D, fs)) { |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
113 DefaultOutput outputD = new DefaultOutput( |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
114 SQ_RELATION_OUT_D, |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
115 "output.static.sqrelation.d", |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
116 "image/png", |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
117 fs, |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
118 "chart"); |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
119 state.addOutput(outputD); |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
120 } |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
121 if (hasParameter(StaticSQRelation.Parameter.E, fs)) { |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
122 DefaultOutput outputE = new DefaultOutput( |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
123 SQ_RELATION_OUT_E, |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
124 "output.static.sqrelation.e", |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
125 "image/png", |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
126 fs, |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
127 "chart"); |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
128 state.addOutput(outputE); |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
129 } |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
130 if (hasParameter(StaticSQRelation.Parameter.F, fs)) { |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
131 DefaultOutput outputF = new DefaultOutput( |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
132 SQ_RELATION_OUT_F, |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
133 "output.static.sqrelation.f", |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
134 "image/png", |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
135 fs, |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
136 "chart"); |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
137 state.addOutput(outputF); |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
138 } |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
139 addFacets(STATIC_STATE_NAME, fs); |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
140 state.setUIProvider(UIPROVIDER); |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
141 setStaticState(state); |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
142 } |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
143 |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
144 @Override |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
145 public String getName() { |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
146 return NAME; |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
147 } |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
148 |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
149 private boolean hasParameter(StaticSQRelation.Parameter p, List<Facet> fs) { |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
150 for (Facet f : fs) { |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
151 if (f.getName().equals("sq_" + |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
152 p.toString().toLowerCase() + "_curve")) { |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
153 return true; |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
154 } |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
155 } |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
156 return false; |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
157 } |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
158 } |