comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/ManualPointsFacet.java @ 3318:dbe2f85bf160

merged flys-artifacts/2.8
author Thomas Arendsen Hein <thomas@intevation.de>
date Fri, 28 Sep 2012 12:14:35 +0200
parents 049ccd2c5935
children
comparison
equal deleted inserted replaced
2987:98c7a46ec5ae 3318:dbe2f85bf160
1 package de.intevation.flys.artifacts.model;
2
3 import org.apache.log4j.Logger;
4
5 import de.intevation.artifacts.Artifact;
6 import de.intevation.artifacts.CallContext;
7
8 import de.intevation.flys.artifacts.ManualPointsArtifact;
9
10 import de.intevation.artifactdatabase.state.DefaultFacet;
11 import de.intevation.artifactdatabase.state.Facet;
12
13
14 /**
15 * Facet to access ManualPoints that where added by user.
16 */
17 public class ManualPointsFacet
18 extends DefaultFacet
19 {
20 /** Logger for this class. */
21 private static final Logger logger = Logger.getLogger(ManualPointsFacet.class);
22
23
24 /**
25 * Trivial Constructor.
26 */
27 public ManualPointsFacet() {
28 }
29
30
31 /**
32 * Trivial Constructor for a ManualPointsFacet.
33 *
34 * @param index Database-Index to use.
35 * @param name Name (~type) of Facet.
36 * @param description Description of Facet.
37 */
38 public ManualPointsFacet(int index, String name, String description) {
39 super(index, name, description);
40 }
41
42
43 /**
44 * Get List of ManualPoints for river from Artifact.
45 *
46 * @param artifact (ManualPoints-)Artifact to query for list of ManualPoints.
47 * @param context Ignored.
48 */
49 @Override
50 public Object getData(Artifact artifact, CallContext context) {
51 ManualPointsArtifact pointsArtifact = (ManualPointsArtifact) artifact;
52 return pointsArtifact.getPointsData(this.name);
53 }
54
55
56 /** Do a deep copy. */
57 @Override
58 public Facet deepCopy() {
59 ManualPointsFacet copy = new ManualPointsFacet();
60 copy.set(this);
61 return copy;
62 }
63 }
64 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org