Mercurial > dive4elements > gnv-client
annotate gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/context/GNVArtifactContext.java @ 837:43f3c0cd60f2
First implementation of an odv export of a 'Profilschnitt' (issue217).
gnv-artifacts/trunk@944 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Mon, 19 Apr 2010 10:55:25 +0000 |
parents | 05bf8534a35a |
children | f953c9a559d8 |
rev | line source |
---|---|
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.gnv.artifacts.context; |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
2 |
779
b1f5f2a8840f
Ordered imports. Removed needless imports. Removed empty headers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
778
diff
changeset
|
3 import de.intevation.artifactdatabase.DefaultArtifactContext; |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
4 |
521
1bf058f1a2d1
Generate seabed polygon to "Profilschnitte".
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
474
diff
changeset
|
5 import java.awt.Color; |
444
85f48e287fb3
Added configuration for vertical cross sections ("Profilschnitte")
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
443
diff
changeset
|
6 import java.awt.Dimension; |
521
1bf058f1a2d1
Generate seabed polygon to "Profilschnitte".
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
474
diff
changeset
|
7 import java.awt.Paint; |
444
85f48e287fb3
Added configuration for vertical cross sections ("Profilschnitte")
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
443
diff
changeset
|
8 |
472
d6a100d5f74a
Added configuration of directory of "Horizontalschnitt" shape files.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
468
diff
changeset
|
9 import java.io.File; |
d6a100d5f74a
Added configuration of directory of "Horizontalschnitt" shape files.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
468
diff
changeset
|
10 |
779
b1f5f2a8840f
Ordered imports. Removed needless imports. Removed empty headers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
778
diff
changeset
|
11 import org.apache.log4j.Logger; |
b1f5f2a8840f
Ordered imports. Removed needless imports. Removed empty headers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
778
diff
changeset
|
12 |
b1f5f2a8840f
Ordered imports. Removed needless imports. Removed empty headers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
778
diff
changeset
|
13 import org.w3c.dom.Document; |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
14 |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
15 /** |
791
23877dd69444
Added javadoc in Context package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
16 * This class defines some final fields used to store some meta information |
23877dd69444
Added javadoc in Context package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
17 * required during the work with an artifact into a context object which is |
23877dd69444
Added javadoc in Context package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
18 * available in each request specified in |
815
22c18083225e
Removed compiler warnings while JavaDoc generation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
791
diff
changeset
|
19 * <code>de.intevation.gnv.artifacts.Artifacts</code> and further methods called |
22c18083225e
Removed compiler warnings while JavaDoc generation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
791
diff
changeset
|
20 * by those. |
791
23877dd69444
Added javadoc in Context package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
21 * |
780
c4156275c1e1
Bring @author javadoc tags in form '@author <a href="john.doe@example.com">John Doe</a>'
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
779
diff
changeset
|
22 * @author <a href="mailto:tim.englich@intevation.de">Tim Englich</a> |
c4156275c1e1
Bring @author javadoc tags in form '@author <a href="john.doe@example.com">John Doe</a>'
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
779
diff
changeset
|
23 * @author <a href="mailto:sascha.teichmann@intevation.de">Sascha L. Teichmann</a> |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
24 */ |
778
9a828e5a2390
Removed trailing whitespace
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
646
diff
changeset
|
25 public class GNVArtifactContext |
443
da21c256a0ba
"horizontale Schnittprofile" are now configured via conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
171
diff
changeset
|
26 extends DefaultArtifactContext |
da21c256a0ba
"horizontale Schnittprofile" are now configured via conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
171
diff
changeset
|
27 { |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
28 /** |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
29 * the logger, used to log exceptions and additonaly information |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
30 */ |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
31 private static Logger log = Logger.getLogger(GNVArtifactContext.class); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
32 |
443
da21c256a0ba
"horizontale Schnittprofile" are now configured via conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
171
diff
changeset
|
33 public static final String CHART_TEMPLATE_KEY = |
da21c256a0ba
"horizontale Schnittprofile" are now configured via conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
171
diff
changeset
|
34 "gnv.chart.template"; |
da21c256a0ba
"horizontale Schnittprofile" are now configured via conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
171
diff
changeset
|
35 |
da21c256a0ba
"horizontale Schnittprofile" are now configured via conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
171
diff
changeset
|
36 public static final String HORIZONTAL_CROSS_SECTION_PROFILE_SAMPLES_KEY = |
da21c256a0ba
"horizontale Schnittprofile" are now configured via conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
171
diff
changeset
|
37 "gnv.horizontal.cross.section.profile.samples"; |
778
9a828e5a2390
Removed trailing whitespace
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
646
diff
changeset
|
38 |
468
7ba4c7222265
Added ij-Index determination for horizontal-cross-sections.
Tim Englich <tim.englich@intevation.de>
parents:
463
diff
changeset
|
39 public static final String HORIZONTAL_CROSS_SECTION_SAMPLES_KEY = |
7ba4c7222265
Added ij-Index determination for horizontal-cross-sections.
Tim Englich <tim.englich@intevation.de>
parents:
463
diff
changeset
|
40 "gnv.horizontal.cross.section.samples"; |
443
da21c256a0ba
"horizontale Schnittprofile" are now configured via conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
171
diff
changeset
|
41 |
593
b248531fa20b
Added experimental support for extrapolation in "Horizontalschnitte"
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
521
diff
changeset
|
42 public static final String HORIZONTAL_CROSS_SECTION_EXTRAPOLATION_ROUNDS_KEY = |
b248531fa20b
Added experimental support for extrapolation in "Horizontalschnitte"
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
521
diff
changeset
|
43 "gnv.horizontal.cross.section.extrapolation.rounds"; |
b248531fa20b
Added experimental support for extrapolation in "Horizontalschnitte"
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
521
diff
changeset
|
44 |
472
d6a100d5f74a
Added configuration of directory of "Horizontalschnitt" shape files.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
468
diff
changeset
|
45 public static final String |
d6a100d5f74a
Added configuration of directory of "Horizontalschnitt" shape files.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
468
diff
changeset
|
46 HORIZONTAL_CROSS_SECTION_RESULT_SHAPEFILE_PATH_KEY = |
d6a100d5f74a
Added configuration of directory of "Horizontalschnitt" shape files.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
468
diff
changeset
|
47 "gnv.horizontal.cross.section.result.shapefile"; |
d6a100d5f74a
Added configuration of directory of "Horizontalschnitt" shape files.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
468
diff
changeset
|
48 |
d6a100d5f74a
Added configuration of directory of "Horizontalschnitt" shape files.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
468
diff
changeset
|
49 public static final File |
778
9a828e5a2390
Removed trailing whitespace
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
646
diff
changeset
|
50 DEFAULT_HORIZONTAL_CROSS_SECTION_PROFILE_SHAPEFILE_PATH = |
472
d6a100d5f74a
Added configuration of directory of "Horizontalschnitt" shape files.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
468
diff
changeset
|
51 new File(System.getProperty("java.io.tmpdir")); |
d6a100d5f74a
Added configuration of directory of "Horizontalschnitt" shape files.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
468
diff
changeset
|
52 |
778
9a828e5a2390
Removed trailing whitespace
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
646
diff
changeset
|
53 public static final Integer |
443
da21c256a0ba
"horizontale Schnittprofile" are now configured via conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
171
diff
changeset
|
54 DEFAULT_HORIZONTAL_CROSS_SECTION_PROFILE_SAMPLES = Integer.valueOf(250); |
778
9a828e5a2390
Removed trailing whitespace
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
646
diff
changeset
|
55 |
9a828e5a2390
Removed trailing whitespace
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
646
diff
changeset
|
56 public static final Integer |
474
ab29e4ff2fda
Added area interpolation needed for "Horizontalschnitt"
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
472
diff
changeset
|
57 DEFAULT_HORIZONTAL_CROSS_SECTION_SAMPLES = Integer.valueOf(1024); |
ab29e4ff2fda
Added area interpolation needed for "Horizontalschnitt"
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
472
diff
changeset
|
58 |
778
9a828e5a2390
Removed trailing whitespace
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
646
diff
changeset
|
59 public static final Integer |
593
b248531fa20b
Added experimental support for extrapolation in "Horizontalschnitte"
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
521
diff
changeset
|
60 DEFAULT_HORIZONTAL_CROSS_SECTION_EXTRAPOLATION_ROUNDS = Integer.valueOf(0); |
b248531fa20b
Added experimental support for extrapolation in "Horizontalschnitte"
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
521
diff
changeset
|
61 |
474
ab29e4ff2fda
Added area interpolation needed for "Horizontalschnitt"
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
472
diff
changeset
|
62 public static final String HORIZONTAL_CROSS_SECTION_GROUND_INTERPOLATION_KEY = |
ab29e4ff2fda
Added area interpolation needed for "Horizontalschnitt"
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
472
diff
changeset
|
63 "gnv.horizontal.cross.section.ground.interpolation"; |
ab29e4ff2fda
Added area interpolation needed for "Horizontalschnitt"
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
472
diff
changeset
|
64 |
ab29e4ff2fda
Added area interpolation needed for "Horizontalschnitt"
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
472
diff
changeset
|
65 public static final String DEFAULT_HORIZONTAL_CROSS_SECTION_GROUND_INTERPOLATION = |
ab29e4ff2fda
Added area interpolation needed for "Horizontalschnitt"
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
472
diff
changeset
|
66 "bilinear"; |
443
da21c256a0ba
"horizontale Schnittprofile" are now configured via conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
171
diff
changeset
|
67 |
da21c256a0ba
"horizontale Schnittprofile" are now configured via conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
171
diff
changeset
|
68 public static final String PALETTES_KEY = |
da21c256a0ba
"horizontale Schnittprofile" are now configured via conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
171
diff
changeset
|
69 "gnv.color.palettes"; |
da21c256a0ba
"horizontale Schnittprofile" are now configured via conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
171
diff
changeset
|
70 |
444
85f48e287fb3
Added configuration for vertical cross sections ("Profilschnitte")
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
443
diff
changeset
|
71 public static final String VERTICAL_CROSS_SECTION_SAMPLES_KEY = |
85f48e287fb3
Added configuration for vertical cross sections ("Profilschnitte")
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
443
diff
changeset
|
72 "gnv.vertical.cross.section.samples"; |
85f48e287fb3
Added configuration for vertical cross sections ("Profilschnitte")
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
443
diff
changeset
|
73 |
85f48e287fb3
Added configuration for vertical cross sections ("Profilschnitte")
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
443
diff
changeset
|
74 public static final Dimension DEFAULT_VERTICAL_CROSS_SECTION_SAMPLES = |
85f48e287fb3
Added configuration for vertical cross sections ("Profilschnitte")
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
443
diff
changeset
|
75 new Dimension(1024, 768); |
85f48e287fb3
Added configuration for vertical cross sections ("Profilschnitte")
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
443
diff
changeset
|
76 |
85f48e287fb3
Added configuration for vertical cross sections ("Profilschnitte")
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
443
diff
changeset
|
77 public static final String VERTICAL_CROSS_SECTION_FILTER_FACTORIES_KEY = |
85f48e287fb3
Added configuration for vertical cross sections ("Profilschnitte")
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
443
diff
changeset
|
78 "gnv.vertical.cross.section.filter.factories"; |
85f48e287fb3
Added configuration for vertical cross sections ("Profilschnitte")
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
443
diff
changeset
|
79 |
463
07672838fa5f
Make ground interpolation for vertical cross section configurable.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
444
diff
changeset
|
80 public static final String VERTICAL_CROSS_SECTION_GROUND_INTERPOLATION_KEY = |
07672838fa5f
Make ground interpolation for vertical cross section configurable.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
444
diff
changeset
|
81 "gnv.vertical.cross.section.ground.interpolation"; |
07672838fa5f
Make ground interpolation for vertical cross section configurable.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
444
diff
changeset
|
82 |
07672838fa5f
Make ground interpolation for vertical cross section configurable.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
444
diff
changeset
|
83 public static final String DEFAULT_VERTICAL_CROSS_SECTION_GROUND_INTERPOLATION = |
07672838fa5f
Make ground interpolation for vertical cross section configurable.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
444
diff
changeset
|
84 "bilinear"; |
07672838fa5f
Make ground interpolation for vertical cross section configurable.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
444
diff
changeset
|
85 |
521
1bf058f1a2d1
Generate seabed polygon to "Profilschnitte".
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
474
diff
changeset
|
86 public static final String VERTICAL_CROSS_SECTION_GROUND_FILL_KEY = |
1bf058f1a2d1
Generate seabed polygon to "Profilschnitte".
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
474
diff
changeset
|
87 "gnv.vertical.cross.section.ground.fill"; |
1bf058f1a2d1
Generate seabed polygon to "Profilschnitte".
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
474
diff
changeset
|
88 |
646
c8749d83d9b6
Added a configuration section for mapserver relevant stuff. Moved source to write meta files out to an own helper class named MetaWriter.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
593
diff
changeset
|
89 public static final String MAPSERVER_SERVER_PATH_KEY = |
c8749d83d9b6
Added a configuration section for mapserver relevant stuff. Moved source to write meta files out to an own helper class named MetaWriter.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
593
diff
changeset
|
90 "mapserver.server.path"; |
c8749d83d9b6
Added a configuration section for mapserver relevant stuff. Moved source to write meta files out to an own helper class named MetaWriter.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
593
diff
changeset
|
91 |
c8749d83d9b6
Added a configuration section for mapserver relevant stuff. Moved source to write meta files out to an own helper class named MetaWriter.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
593
diff
changeset
|
92 public static final String MAPSERVER_MAP_PATH_KEY = |
c8749d83d9b6
Added a configuration section for mapserver relevant stuff. Moved source to write meta files out to an own helper class named MetaWriter.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
593
diff
changeset
|
93 "mapserver.map.path"; |
c8749d83d9b6
Added a configuration section for mapserver relevant stuff. Moved source to write meta files out to an own helper class named MetaWriter.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
593
diff
changeset
|
94 |
521
1bf058f1a2d1
Generate seabed polygon to "Profilschnitte".
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
474
diff
changeset
|
95 public static final Paint DEFAULT_VERTICAL_CROSS_SECTION_GROUND_FILL = |
1bf058f1a2d1
Generate seabed polygon to "Profilschnitte".
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
474
diff
changeset
|
96 new Color(0x7c8683); |
1bf058f1a2d1
Generate seabed polygon to "Profilschnitte".
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
474
diff
changeset
|
97 |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
98 public GNVArtifactContext() { |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
99 super(); |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
100 log.debug("GNVArtifactContext.Constructor"); |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
101 } |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
102 |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
103 public GNVArtifactContext(Document config) { |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
104 super(config); |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
105 log.debug("GNVArtifactContext.Constructor(config)"); |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
106 } |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
107 } |
836
05bf8534a35a
Using unix line endings only.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
815
diff
changeset
|
108 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |