comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WKmsFacet.java @ 3814:8083f6384023

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

http://dive4elements.wald.intevation.org