comparison artifacts/src/main/java/org/dive4elements/river/artifacts/model/WKmsFacet.java @ 5838:5aa05a7a34b7

Rename modules to more fitting names.
author Sascha L. Teichmann <teichmann@intevation.de>
date Thu, 25 Apr 2013 15:23:37 +0200
parents flys-artifacts/src/main/java/org/dive4elements/river/artifacts/model/WKmsFacet.java@bd047b71ab37
children 4897a58c8746
comparison
equal deleted inserted replaced
5837:d9901a08d0a6 5838:5aa05a7a34b7
1 package org.dive4elements.river.artifacts.model;
2
3 import org.dive4elements.artifacts.Artifact;
4 import org.dive4elements.artifacts.CallContext;
5
6 import org.dive4elements.river.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