comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WKmsFacet.java @ 3468:f37e7e8907cb

merged flys-artifacts/2.8.1
author Thomas Arendsen Hein <thomas@intevation.de>
date Fri, 28 Sep 2012 12:14:39 +0200
parents 0f7abd95c6e2
children
comparison
equal deleted inserted replaced
3387:5ffad8bde8ad 3468:f37e7e8907cb
1 package de.intevation.flys.artifacts.model;
2
3 import de.intevation.artifacts.Artifact;
4 import de.intevation.artifacts.CallContext;
5
6 import de.intevation.flys.artifacts.StaticWKmsArtifact;
7
8 /**
9 * Facet to show W|km Values.
10 */
11 public class WKmsFacet
12 extends BlackboardDataFacet
13 implements FacetTypes {
14
15 /** Trivial Constructor. */
16 public WKmsFacet(String description) {
17 this(STATIC_WKMS, description);
18 }
19
20 public WKmsFacet(String name, String description) {
21 this.name = name;
22 this.description = description;
23 this.index = 0;
24 }
25
26
27 /**
28 * Returns the data this facet requires.
29 *
30 * @param artifact the owner artifact.
31 * @param context the CallContext (ignored).
32 *
33 * @return the data.
34 */
35 @Override
36 public Object getData(Artifact artifact, CallContext context) {
37 StaticWKmsArtifact staticData =
38 (StaticWKmsArtifact) artifact;
39 return staticData.getWKms(0);
40 }
41
42
43 /**
44 * Create a deep copy of this Facet.
45 * @return a deep copy.
46 */
47 @Override
48 public WKmsFacet deepCopy() {
49 WKmsFacet copy = new WKmsFacet(description);
50 copy.set(this);
51 return copy;
52 }
53 }
54 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org