annotate flys-artifacts/src/main/java/org/dive4elements/river/artifacts/model/ManualPointsFacet.java @ 5831:bd047b71ab37

Repaired internal references
author Sascha L. Teichmann <teichmann@intevation.de>
date Thu, 25 Apr 2013 12:06:39 +0200
parents flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/ManualPointsFacet.java@049ccd2c5935
children
rev   line source
5831
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 3225
diff changeset
1 package org.dive4elements.river.artifacts.model;
2172
3ecc76ef25a9 New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
2
3ecc76ef25a9 New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
3 import org.apache.log4j.Logger;
3ecc76ef25a9 New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
4
5831
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 3225
diff changeset
5 import org.dive4elements.artifacts.Artifact;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 3225
diff changeset
6 import org.dive4elements.artifacts.CallContext;
2172
3ecc76ef25a9 New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
7
5831
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 3225
diff changeset
8 import org.dive4elements.river.artifacts.ManualPointsArtifact;
2172
3ecc76ef25a9 New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
9
5831
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 3225
diff changeset
10 import org.dive4elements.artifactdatabase.state.DefaultFacet;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 3225
diff changeset
11 import org.dive4elements.artifactdatabase.state.Facet;
2172
3ecc76ef25a9 New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
12
3ecc76ef25a9 New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
13
3ecc76ef25a9 New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
14 /**
3ecc76ef25a9 New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
15 * Facet to access ManualPoints that where added by user.
3ecc76ef25a9 New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
16 */
3ecc76ef25a9 New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
17 public class ManualPointsFacet
3ecc76ef25a9 New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
18 extends DefaultFacet
3ecc76ef25a9 New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
19 {
3ecc76ef25a9 New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
20 /** Logger for this class. */
3ecc76ef25a9 New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
21 private static final Logger logger = Logger.getLogger(ManualPointsFacet.class);
3ecc76ef25a9 New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
22
3ecc76ef25a9 New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
23
3ecc76ef25a9 New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
24 /**
3ecc76ef25a9 New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
25 * Trivial Constructor.
3ecc76ef25a9 New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
26 */
3ecc76ef25a9 New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
27 public ManualPointsFacet() {
3ecc76ef25a9 New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
28 }
3ecc76ef25a9 New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
29
3ecc76ef25a9 New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
30
3ecc76ef25a9 New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
31 /**
3ecc76ef25a9 New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
32 * Trivial Constructor for a ManualPointsFacet.
3ecc76ef25a9 New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
33 *
3ecc76ef25a9 New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
34 * @param index Database-Index to use.
3ecc76ef25a9 New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
35 * @param name Name (~type) of Facet.
3ecc76ef25a9 New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
36 * @param description Description of Facet.
3ecc76ef25a9 New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
37 */
3ecc76ef25a9 New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
38 public ManualPointsFacet(int index, String name, String description) {
3ecc76ef25a9 New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
39 super(index, name, description);
3ecc76ef25a9 New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
40 }
3ecc76ef25a9 New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
41
3ecc76ef25a9 New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
42
3ecc76ef25a9 New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
43 /**
3225
049ccd2c5935 Cosmetics.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2206
diff changeset
44 * Get List of ManualPoints for river from Artifact.
2172
3ecc76ef25a9 New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
45 *
3ecc76ef25a9 New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
46 * @param artifact (ManualPoints-)Artifact to query for list of ManualPoints.
3ecc76ef25a9 New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
47 * @param context Ignored.
3ecc76ef25a9 New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
48 */
3ecc76ef25a9 New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
49 @Override
3ecc76ef25a9 New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
50 public Object getData(Artifact artifact, CallContext context) {
3ecc76ef25a9 New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
51 ManualPointsArtifact pointsArtifact = (ManualPointsArtifact) artifact;
2206
e2124ca11adb Add manual point handling for many different chart types.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2173
diff changeset
52 return pointsArtifact.getPointsData(this.name);
2172
3ecc76ef25a9 New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
53 }
3ecc76ef25a9 New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
54
3ecc76ef25a9 New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
55
3ecc76ef25a9 New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
56 /** Do a deep copy. */
3ecc76ef25a9 New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
57 @Override
3ecc76ef25a9 New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
58 public Facet deepCopy() {
3ecc76ef25a9 New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
59 ManualPointsFacet copy = new ManualPointsFacet();
3ecc76ef25a9 New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
60 copy.set(this);
3ecc76ef25a9 New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
61 return copy;
3ecc76ef25a9 New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
62 }
3ecc76ef25a9 New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
63 }
3ecc76ef25a9 New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
64 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org