Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/MainValuesArtifact.java @ 1765:5d8b3880a553
Do not store association of states to facets, let artifacts keep facets in a pure list.
flys-artifacts/trunk@3083 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Wed, 26 Oct 2011 12:23:47 +0000 |
parents | 33ade8153d74 |
children | c62ff9e72cea |
comparison
equal
deleted
inserted
replaced
1764:87c82499b98f | 1765:5d8b3880a553 |
---|---|
69 Object context, | 69 Object context, |
70 CallMeta callMeta, | 70 CallMeta callMeta, |
71 Document data) | 71 Document data) |
72 { | 72 { |
73 logger.debug("MainValuesArtifact.setup"); | 73 logger.debug("MainValuesArtifact.setup"); |
74 state = new StaticState("state.mainvalue.static", "state.mainvalue.static"); | 74 state = new StaticState( |
75 List<Facet> fs = new ArrayList<Facet>(); | 75 "state.mainvalue.static", |
76 Facet qfacet = new MainValuesQFacet(Resources.getMsg(callMeta, | 76 "state.mainvalue.static"); |
77 "facet.discharge_curves.mainvalues.q", | 77 Facet qfacet = new MainValuesQFacet(Resources.getMsg( |
78 "facet.discharge_curves.mainvalues.q")); | 78 callMeta, |
79 Facet wfacet = new MainValuesWFacet(Resources.getMsg(callMeta, | 79 "facet.discharge_curves.mainvalues.q", |
80 "facet.discharge_curves.mainvalues.w", | 80 "facet.discharge_curves.mainvalues.q")); |
81 "facet.discharge_curves.mainvalues.w")); | 81 Facet wfacet = new MainValuesWFacet(Resources.getMsg( |
82 fs.add(qfacet); | 82 callMeta, |
83 fs.add(wfacet); | 83 "facet.discharge_curves.mainvalues.w", |
84 facets.put(state.getID(), fs); | 84 "facet.discharge_curves.mainvalues.w")); |
85 facets.add(qfacet); | |
86 facets.add(wfacet); | |
85 spawnState(); | 87 spawnState(); |
86 super.setup(identifier, factory, context, callMeta, data); | 88 super.setup(identifier, factory, context, callMeta, data); |
87 } | 89 } |
88 | 90 |
89 protected State spawnState() { | 91 protected State spawnState() { |
90 state = new StaticState("state.mainvalue.static", "state.mainvalue.static"); | 92 state = new StaticState("state.mainvalue.static", "state.mainvalue.static"); |
91 List<Facet> fs = (List<Facet>) facets.get("state.mainvalue.static"); | |
92 DefaultOutput mainValuesOutput2 = new DefaultOutput( | 93 DefaultOutput mainValuesOutput2 = new DefaultOutput( |
93 "computed_discharge_curve", | 94 "computed_discharge_curve", |
94 "output.computed_discharge_curve", "image/png", | 95 "output.computed_discharge_curve", "image/png", |
95 fs, | 96 facets, |
96 "chart"); | 97 "chart"); |
97 | 98 |
98 state.getOutputs().add(mainValuesOutput2); | 99 state.getOutputs().add(mainValuesOutput2); |
99 return state; | 100 return state; |
100 } | 101 } |
101 | 102 |