comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/AnnotationRiverState.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 a39511688679
children e1691b74f3aa
comparison
equal deleted inserted replaced
2987:98c7a46ec5ae 3318:dbe2f85bf160
1 package de.intevation.flys.artifacts.states;
2
3 import java.util.List;
4
5 import org.apache.log4j.Logger;
6
7 import de.intevation.artifacts.CallMeta;
8
9 import de.intevation.artifactdatabase.state.Facet;
10
11 import de.intevation.flys.artifacts.FLYSArtifact;
12
13 import de.intevation.flys.artifacts.model.AnnotationFacet;
14 import de.intevation.flys.artifacts.model.FacetTypes;
15
16 import de.intevation.flys.artifacts.resources.Resources;
17
18
19 /**
20 * The only state for an AnnotationArtifact (River is known).
21 */
22 public class AnnotationRiverState
23 extends DefaultState
24 implements FacetTypes
25 {
26 /** Developer-centric description of facet. */
27 public static final String I18N_DESCRIPTION = "facet.longitudinal_section.annotations";
28
29 /** The logger that is used in this state. */
30 private static final Logger logger = Logger.getLogger(AnnotationRiverState.class);
31
32
33 /**
34 * Add an AnnotationFacet to list of Facets.
35 *
36 * @param artifact Ignored.
37 * @param hash Ignored.
38 * @param context Ignored.
39 * @param meta CallMeta to be used for internationalization.
40 * @param facets List to add AnnotationFacet to.
41 *
42 * @return null.
43 */
44 @Override
45 public Object computeInit(
46 FLYSArtifact artifact,
47 String hash,
48 Object context,
49 CallMeta meta,
50 List<Facet> facets
51 ) {
52 logger.debug("AnnotationRiverState.computeInit()");
53
54 AnnotationFacet facet = new AnnotationFacet(
55 0,
56 LONGITUDINAL_ANNOTATION,
57 Resources.getMsg(meta, I18N_DESCRIPTION, I18N_DESCRIPTION));
58 facets.add(facet);
59
60 return null;
61 }
62 }
63 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :

http://dive4elements.wald.intevation.org