annotate flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/MainValuesQFacet.java @ 1112:aeae4d20f32f

Fix translations of Main Values Facets. flys-artifacts/trunk@2619 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Wed, 31 Aug 2011 10:34:45 +0000
parents 07878836ee0d
children 5b38cdf65307
rev   line source
1085
07878836ee0d Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
1 package de.intevation.flys.artifacts.model;
07878836ee0d Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
2
07878836ee0d Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
3 import de.intevation.artifacts.Artifact;
07878836ee0d Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
4 import de.intevation.artifacts.CallContext;
07878836ee0d Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
5 import de.intevation.artifactdatabase.state.DefaultFacet;
07878836ee0d Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
6 import de.intevation.flys.artifacts.model.FacetTypes;
07878836ee0d Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
7 import de.intevation.flys.artifacts.MainValuesArtifact;
1112
aeae4d20f32f Fix translations of Main Values Facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1085
diff changeset
8 import de.intevation.flys.artifacts.resources.Resources;
1085
07878836ee0d Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
9
07878836ee0d Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
10 /**
07878836ee0d Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
11 * Facet to show Main Q Values.
07878836ee0d Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
12 */
07878836ee0d Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
13 public class MainValuesQFacet
07878836ee0d Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
14 extends DefaultFacet
07878836ee0d Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
15 implements FacetTypes {
07878836ee0d Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
16
07878836ee0d Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
17 /** Trivial Constructor. */
1112
aeae4d20f32f Fix translations of Main Values Facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1085
diff changeset
18 public MainValuesQFacet(String description) {
aeae4d20f32f Fix translations of Main Values Facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1085
diff changeset
19 this.description = description;
1085
07878836ee0d Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
20 name = COMPUTED_DISCHARGE_MAINVALUES_Q;
07878836ee0d Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
21 index = 0;
07878836ee0d Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
22 }
07878836ee0d Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
23
07878836ee0d Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
24
07878836ee0d Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
25 /**
07878836ee0d Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
26 * Returns the data this facet requires.
07878836ee0d Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
27 *
07878836ee0d Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
28 * @param artifact the owner artifact.
07878836ee0d Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
29 * @param context the CallContext (ignored).
07878836ee0d Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
30 *
07878836ee0d Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
31 * @return the data.
07878836ee0d Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
32 */
07878836ee0d Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
33 @Override
07878836ee0d Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
34 public Object getData(Artifact artifact, CallContext context) {
07878836ee0d Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
35 MainValuesArtifact mvArtifact = (MainValuesArtifact) artifact;
07878836ee0d Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
36 return mvArtifact.getMainValuesQ();
07878836ee0d Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
37 }
07878836ee0d Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
38
07878836ee0d Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
39
07878836ee0d Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
40 /**
07878836ee0d Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
41 * Create a deep copy of this Facet.
07878836ee0d Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
42 * @return a deep copy.
07878836ee0d Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
43 */
07878836ee0d Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
44 @Override
07878836ee0d Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
45 public MainValuesQFacet deepCopy() {
1112
aeae4d20f32f Fix translations of Main Values Facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1085
diff changeset
46 MainValuesQFacet copy = new MainValuesQFacet(description);
1085
07878836ee0d Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
47 copy.set(this);
07878836ee0d Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
48 return copy;
07878836ee0d Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
49 }
07878836ee0d Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
50 }

http://dive4elements.wald.intevation.org