Mercurial > dive4elements > river
annotate flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/RiverAxisState.java @ 954:a5ea28339e5b
Set the extent of created WMSLayerFacets.
flys-artifacts/trunk@2372 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Wed, 20 Jul 2011 12:42:06 +0000 |
parents | 796c54058dc4 |
children | ae198bef4ba0 |
rev | line source |
---|---|
942
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.artifacts.states; |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
2 |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
3 import java.util.List; |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
4 |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
5 import org.apache.log4j.Logger; |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
6 |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
7 import de.intevation.artifacts.CallMeta; |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
8 |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
9 import de.intevation.artifactdatabase.state.Facet; |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
10 |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
11 import de.intevation.flys.artifacts.FLYSArtifact; |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
12 import de.intevation.flys.artifacts.model.WMSLayerFacet; |
954
a5ea28339e5b
Set the extent of created WMSLayerFacets.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
942
diff
changeset
|
13 import de.intevation.flys.artifacts.resources.Resources; |
942
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
14 import de.intevation.flys.artifacts.states.DefaultState.ComputeType; |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
15 |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
16 |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
17 public class RiverAxisState extends OutputState { |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
18 |
954
a5ea28339e5b
Set the extent of created WMSLayerFacets.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
942
diff
changeset
|
19 public static final String I18N_DESCRIPTION = "floodmap.riveraxis"; |
a5ea28339e5b
Set the extent of created WMSLayerFacets.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
942
diff
changeset
|
20 |
a5ea28339e5b
Set the extent of created WMSLayerFacets.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
942
diff
changeset
|
21 |
942
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
22 private static final Logger logger = Logger.getLogger(RiverAxisState.class); |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
23 |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
24 @Override |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
25 public Object computeInit( |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
26 FLYSArtifact artifact, |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
27 String hash, |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
28 CallMeta meta, |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
29 List<Facet> facets |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
30 ) { |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
31 logger.debug("RiverAxisState.computeInit()"); |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
32 |
954
a5ea28339e5b
Set the extent of created WMSLayerFacets.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
942
diff
changeset
|
33 // TODO Add config for background layer |
942
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
34 WMSLayerFacet facet = new WMSLayerFacet( |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
35 0, |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
36 FLOODMAP_RIVERAXIS, |
954
a5ea28339e5b
Set the extent of created WMSLayerFacets.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
942
diff
changeset
|
37 Resources.getMsg(meta, I18N_DESCRIPTION, I18N_DESCRIPTION), |
942
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
38 ComputeType.INIT, |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
39 getID(), hash, |
954
a5ea28339e5b
Set the extent of created WMSLayerFacets.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
942
diff
changeset
|
40 "http://denmark.atlas/cgi-bin/flys-wms"); // TODO add correct WMS URL |
942
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
41 |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
42 facet.addLayer("riveraxis"); |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
43 |
954
a5ea28339e5b
Set the extent of created WMSLayerFacets.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
942
diff
changeset
|
44 // TODO determine extent based on the given geometry |
a5ea28339e5b
Set the extent of created WMSLayerFacets.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
942
diff
changeset
|
45 facet.setExtent("6.5 49.1 7.0 49.7"); |
a5ea28339e5b
Set the extent of created WMSLayerFacets.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
942
diff
changeset
|
46 |
942
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
47 facets.add(facet); |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
48 |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
49 return null; |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
50 } |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
51 } |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
52 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |