Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/MainValuesQFacet.java @ 1190:f514894ec2fd
merged flys-artifacts/2.5
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Fri, 28 Sep 2012 12:14:17 +0200 |
parents | 5b38cdf65307 |
children | 69929c471646 |
comparison
equal
deleted
inserted
replaced
917:b48c36076e17 | 1190:f514894ec2fd |
---|---|
1 package de.intevation.flys.artifacts.model; | |
2 | |
3 import de.intevation.artifacts.Artifact; | |
4 import de.intevation.artifacts.CallContext; | |
5 import de.intevation.artifactdatabase.state.DefaultFacet; | |
6 import de.intevation.flys.artifacts.model.FacetTypes; | |
7 import de.intevation.flys.artifacts.MainValuesArtifact; | |
8 | |
9 /** | |
10 * Facet to show Main Q Values. | |
11 */ | |
12 public class MainValuesQFacet | |
13 extends DefaultFacet | |
14 implements FacetTypes { | |
15 | |
16 /** Trivial Constructor. */ | |
17 public MainValuesQFacet(String description) { | |
18 this.description = description; | |
19 name = COMPUTED_DISCHARGE_MAINVALUES_Q; | |
20 index = 0; | |
21 } | |
22 | |
23 | |
24 /** | |
25 * Returns the data this facet requires. | |
26 * | |
27 * @param artifact the owner artifact. | |
28 * @param context the CallContext (ignored). | |
29 * | |
30 * @return the data. | |
31 */ | |
32 @Override | |
33 public Object getData(Artifact artifact, CallContext context) { | |
34 MainValuesArtifact mvArtifact = (MainValuesArtifact) artifact; | |
35 return mvArtifact.getMainValuesQ(); | |
36 } | |
37 | |
38 | |
39 /** | |
40 * Create a deep copy of this Facet. | |
41 * @return a deep copy. | |
42 */ | |
43 @Override | |
44 public MainValuesQFacet deepCopy() { | |
45 MainValuesQFacet copy = new MainValuesQFacet(description); | |
46 copy.set(this); | |
47 return copy; | |
48 } | |
49 } |