annotate gnv/src/main/webapp/WEB-INF/jsp/includes/display_diagramm_inc.jsp @ 399:aaf04967bd53

Using a simpler demo WKT polygon in "Horizontalschnitt". gnv/trunk@556 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Sun, 17 Jan 2010 21:18:30 +0000
parents 9005b39c52ac
children b5733f9f386b
rev   line source
29
bba8fd97e549 Export and Diagrammoptions integrated into GUI
Tim Englich <tim.englich@intevation.de>
parents: 22
diff changeset
1 <%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
22
367a00e4b9ad Some GUI-Improvements done
Tim Englich <tim.englich@intevation.de>
parents: 18
diff changeset
2 <%@page import="de.intevation.gnv.action.sessionmodel.SessionModelFactory"%>
30
07e9c137a2f1 Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents: 29
diff changeset
3 <%@page import="de.intevation.gnv.action.sessionmodel.SessionModel"%>
07e9c137a2f1 Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents: 29
diff changeset
4 <%@page import="de.intevation.gnv.action.sessionmodel.DiagrammOptions"%>
07e9c137a2f1 Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents: 29
diff changeset
5 <%@page import="de.intevation.gnv.artifactdatabase.objects.OutputParameter"%>
07e9c137a2f1 Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents: 29
diff changeset
6 <%@page import="java.util.Collection"%>
07e9c137a2f1 Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents: 29
diff changeset
7 <%@page import="java.util.Iterator"%>
284
47e3647af88f Added link in gui to export charts to svg.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 283
diff changeset
8 <%@page import="java.net.URLEncoder"%>
22
367a00e4b9ad Some GUI-Improvements done
Tim Englich <tim.englich@intevation.de>
parents: 18
diff changeset
9 <%Object diagramm = request.getAttribute("diagramm");
30
07e9c137a2f1 Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents: 29
diff changeset
10 SessionModel sm = SessionModelFactory.getInstance().getSessionModel(request);
22
367a00e4b9ad Some GUI-Improvements done
Tim Englich <tim.englich@intevation.de>
parents: 18
diff changeset
11 if (diagramm != null){
29
bba8fd97e549 Export and Diagrammoptions integrated into GUI
Tim Englich <tim.englich@intevation.de>
parents: 22
diff changeset
12 String target = "chart";
bba8fd97e549 Export and Diagrammoptions integrated into GUI
Tim Englich <tim.englich@intevation.de>
parents: 22
diff changeset
13 String targetCSV = "csv";
158
f38a86c2c012 Added link to export data as odv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 31
diff changeset
14 String targetODV = "odv";
283
ef10bf497a16 Added link in gui to export charts to pdf.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 158
diff changeset
15 String targetPDF = "pdf";
284
47e3647af88f Added link in gui to export charts to svg.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 283
diff changeset
16 String targetSVG = "svg";
397
dacfb0755956 Added download links for ZIP files and WMS layers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 284
diff changeset
17 String targetZIP = "zip";
dacfb0755956 Added download links for ZIP files and WMS layers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 284
diff changeset
18 String targetWMS = "wms";
30
07e9c137a2f1 Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents: 29
diff changeset
19 boolean supportChart = sm.getOutputMode(target) != null;
283
ef10bf497a16 Added link in gui to export charts to pdf.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 158
diff changeset
20 boolean supportCSV = sm.getOutputMode(targetCSV) != null;
ef10bf497a16 Added link in gui to export charts to pdf.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 158
diff changeset
21 boolean supportODV = sm.getOutputMode(targetODV) != null;
ef10bf497a16 Added link in gui to export charts to pdf.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 158
diff changeset
22 boolean supportPDF = sm.getOutputMode(targetPDF) != null;
284
47e3647af88f Added link in gui to export charts to svg.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 283
diff changeset
23 boolean supportSVG = sm.getOutputMode(targetSVG) != null;
397
dacfb0755956 Added download links for ZIP files and WMS layers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 284
diff changeset
24 boolean supportZIP = sm.getOutputMode(targetZIP) != null;
dacfb0755956 Added download links for ZIP files and WMS layers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 284
diff changeset
25 boolean supportWMS = sm.getOutputMode(targetWMS) != null;
30
07e9c137a2f1 Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents: 29
diff changeset
26 String mimeType = null;
07e9c137a2f1 Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents: 29
diff changeset
27 String parameterString = "";
07e9c137a2f1 Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents: 29
diff changeset
28 if (supportChart){
07e9c137a2f1 Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents: 29
diff changeset
29 mimeType = sm.getOutputMode(target).getMimeType();
07e9c137a2f1 Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents: 29
diff changeset
30 DiagrammOptions diagrammOptions = sm.getDiagrammOptions();
07e9c137a2f1 Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents: 29
diff changeset
31 Collection<OutputParameter> op = sm.getOutputMode(target).getOutputParameters();
07e9c137a2f1 Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents: 29
diff changeset
32 if (op != null){
07e9c137a2f1 Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents: 29
diff changeset
33 Iterator<OutputParameter> it = op.iterator();
07e9c137a2f1 Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents: 29
diff changeset
34 while (it.hasNext()){
07e9c137a2f1 Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents: 29
diff changeset
35 OutputParameter parameter = it.next();
07e9c137a2f1 Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents: 29
diff changeset
36 parameterString = parameterString +"&"+parameter.getName()+"="+(diagrammOptions != null ? diagrammOptions.getValue(parameter.getName()): parameter.getValue());
07e9c137a2f1 Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents: 29
diff changeset
37 }
07e9c137a2f1 Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents: 29
diff changeset
38 }
07e9c137a2f1 Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents: 29
diff changeset
39 }
283
ef10bf497a16 Added link in gui to export charts to pdf.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 158
diff changeset
40 String mimeTypePDF = null;
ef10bf497a16 Added link in gui to export charts to pdf.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 158
diff changeset
41 if (supportPDF) {
ef10bf497a16 Added link in gui to export charts to pdf.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 158
diff changeset
42 mimeTypePDF = sm.getOutputMode(targetPDF).getMimeType();
ef10bf497a16 Added link in gui to export charts to pdf.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 158
diff changeset
43 }
284
47e3647af88f Added link in gui to export charts to svg.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 283
diff changeset
44 String mimeTypeSVG = null;
47e3647af88f Added link in gui to export charts to svg.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 283
diff changeset
45 if (supportSVG) {
47e3647af88f Added link in gui to export charts to svg.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 283
diff changeset
46 mimeTypeSVG = sm.getOutputMode(targetSVG).getMimeType();
47e3647af88f Added link in gui to export charts to svg.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 283
diff changeset
47 mimeTypeSVG = URLEncoder.encode(mimeTypeSVG, "UTF-8");
47e3647af88f Added link in gui to export charts to svg.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 283
diff changeset
48 }
30
07e9c137a2f1 Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents: 29
diff changeset
49 String mimeTypeCSV = null;
07e9c137a2f1 Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents: 29
diff changeset
50 if (supportCSV){
07e9c137a2f1 Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents: 29
diff changeset
51 mimeTypeCSV = sm.getOutputMode(targetCSV).getMimeType();
07e9c137a2f1 Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents: 29
diff changeset
52 }
158
f38a86c2c012 Added link to export data as odv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 31
diff changeset
53
f38a86c2c012 Added link to export data as odv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 31
diff changeset
54 String mimeTypeODV = null;
f38a86c2c012 Added link to export data as odv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 31
diff changeset
55 if (supportODV){
f38a86c2c012 Added link to export data as odv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 31
diff changeset
56 mimeTypeODV = sm.getOutputMode(targetODV).getMimeType();
f38a86c2c012 Added link to export data as odv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 31
diff changeset
57 }
397
dacfb0755956 Added download links for ZIP files and WMS layers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 284
diff changeset
58
dacfb0755956 Added download links for ZIP files and WMS layers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 284
diff changeset
59 String mimeTypeZIP = null;
dacfb0755956 Added download links for ZIP files and WMS layers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 284
diff changeset
60 if (supportZIP) {
dacfb0755956 Added download links for ZIP files and WMS layers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 284
diff changeset
61 mimeTypeZIP = sm.getOutputMode(targetZIP).getMimeType();
dacfb0755956 Added download links for ZIP files and WMS layers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 284
diff changeset
62 }
dacfb0755956 Added download links for ZIP files and WMS layers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 284
diff changeset
63
dacfb0755956 Added download links for ZIP files and WMS layers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 284
diff changeset
64 String mimeTypeWMS = null;
dacfb0755956 Added download links for ZIP files and WMS layers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 284
diff changeset
65 if (supportWMS) {
dacfb0755956 Added download links for ZIP files and WMS layers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 284
diff changeset
66 mimeTypeWMS = sm.getOutputMode(targetWMS).getMimeType();
dacfb0755956 Added download links for ZIP files and WMS layers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 284
diff changeset
67 }
29
bba8fd97e549 Export and Diagrammoptions integrated into GUI
Tim Englich <tim.englich@intevation.de>
parents: 22
diff changeset
68 %>
30
07e9c137a2f1 Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents: 29
diff changeset
69 <div id="diagram">
07e9c137a2f1 Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents: 29
diff changeset
70 <img src='<%=response.encodeURL("out.do?mimetype="+mimeType+"&target="+target+parameterString+"&uid="+System.currentTimeMillis())%>' alt='<bean:message key="gnviewer.output.options.diagramm.alt"/>'/>
29
bba8fd97e549 Export and Diagrammoptions integrated into GUI
Tim Englich <tim.englich@intevation.de>
parents: 22
diff changeset
71 <br/>
bba8fd97e549 Export and Diagrammoptions integrated into GUI
Tim Englich <tim.englich@intevation.de>
parents: 22
diff changeset
72 <div id="export">
397
dacfb0755956 Added download links for ZIP files and WMS layers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 284
diff changeset
73 <%if (supportChart) { %>
30
07e9c137a2f1 Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents: 29
diff changeset
74 <a href="<%=response.encodeURL("export.do?mimetype="+mimeType+"&target="+target+parameterString+"&uid="+System.currentTimeMillis())%>" title="<bean:message key="gnviewer.output.options.save.title"/>">
29
bba8fd97e549 Export and Diagrammoptions integrated into GUI
Tim Englich <tim.englich@intevation.de>
parents: 22
diff changeset
75 <img src="images/diagram_export.png" border="0"/>
bba8fd97e549 Export and Diagrammoptions integrated into GUI
Tim Englich <tim.englich@intevation.de>
parents: 22
diff changeset
76 </a>
397
dacfb0755956 Added download links for ZIP files and WMS layers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 284
diff changeset
77 <%}%>
283
ef10bf497a16 Added link in gui to export charts to pdf.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 158
diff changeset
78 <%if (supportPDF) { %>
ef10bf497a16 Added link in gui to export charts to pdf.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 158
diff changeset
79 <a href="<%=response.encodeURL("export.do?mimetype="+mimeTypePDF+"&target="+targetPDF+"&uid="+System.currentTimeMillis())%>" title="<bean:message key="gnviewer.output.options.export.pdf.title"/>">
397
dacfb0755956 Added download links for ZIP files and WMS layers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 284
diff changeset
80 <img src="images/pdf.png" border="0"/>
283
ef10bf497a16 Added link in gui to export charts to pdf.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 158
diff changeset
81 </a>
ef10bf497a16 Added link in gui to export charts to pdf.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 158
diff changeset
82 <%}%>
284
47e3647af88f Added link in gui to export charts to svg.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 283
diff changeset
83 <%if (supportSVG) { %>
47e3647af88f Added link in gui to export charts to svg.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 283
diff changeset
84 <a href="<%=response.encodeURL("export.do?mimetype="+mimeTypeSVG+"&target="+targetSVG+"&uid="+System.currentTimeMillis())%>" title="<bean:message key="gnviewer.output.options.export.svg.title"/>">
397
dacfb0755956 Added download links for ZIP files and WMS layers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 284
diff changeset
85 <img src="images/svg.png" border="0"/>
284
47e3647af88f Added link in gui to export charts to svg.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 283
diff changeset
86 </a>
47e3647af88f Added link in gui to export charts to svg.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 283
diff changeset
87 <%}%>
29
bba8fd97e549 Export and Diagrammoptions integrated into GUI
Tim Englich <tim.englich@intevation.de>
parents: 22
diff changeset
88 <%if (supportCSV) { %>
158
f38a86c2c012 Added link to export data as odv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 31
diff changeset
89 <a href="<%=response.encodeURL("export.do?mimetype="+mimeTypeCSV+"&target="+targetCSV+"&uid="+System.currentTimeMillis())%>" title="<bean:message key="gnviewer.output.options.export.csv.title"/>">
f38a86c2c012 Added link to export data as odv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 31
diff changeset
90 <img src="images/data_export.png" border="0"/>
f38a86c2c012 Added link to export data as odv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 31
diff changeset
91 </a>
f38a86c2c012 Added link to export data as odv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 31
diff changeset
92 <%}%>
f38a86c2c012 Added link to export data as odv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 31
diff changeset
93 <%if (supportODV) { %>
f38a86c2c012 Added link to export data as odv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 31
diff changeset
94 <a href="<%=response.encodeURL("export.do?mimetype="+mimeTypeODV+"&target="+targetODV+"&uid="+System.currentTimeMillis())%>" title="<bean:message key="gnviewer.output.options.export.odv.title"/>">
29
bba8fd97e549 Export and Diagrammoptions integrated into GUI
Tim Englich <tim.englich@intevation.de>
parents: 22
diff changeset
95 <img src="images/data_export.png" border="0"/>
bba8fd97e549 Export and Diagrammoptions integrated into GUI
Tim Englich <tim.englich@intevation.de>
parents: 22
diff changeset
96 </a>
bba8fd97e549 Export and Diagrammoptions integrated into GUI
Tim Englich <tim.englich@intevation.de>
parents: 22
diff changeset
97 <%}%>
397
dacfb0755956 Added download links for ZIP files and WMS layers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 284
diff changeset
98 <%if (supportWMS) { %>
dacfb0755956 Added download links for ZIP files and WMS layers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 284
diff changeset
99 <a href="<%=response.encodeURL("export.do?mimetype="+mimeTypeWMS+"&target="+targetWMS+"&uid="+System.currentTimeMillis())%>" title="<bean:message key="gnviewer.output.options.export.wms.title"/>">
dacfb0755956 Added download links for ZIP files and WMS layers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 284
diff changeset
100 <img src="images/map_go.png" border="0"/>
dacfb0755956 Added download links for ZIP files and WMS layers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 284
diff changeset
101 </a>
dacfb0755956 Added download links for ZIP files and WMS layers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 284
diff changeset
102 <%}%>
dacfb0755956 Added download links for ZIP files and WMS layers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 284
diff changeset
103 <%if (supportZIP) { %>
dacfb0755956 Added download links for ZIP files and WMS layers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 284
diff changeset
104 <a href="<%=response.encodeURL("export.do?mimetype="+mimeTypeZIP+"&target="+targetZIP+"&uid="+System.currentTimeMillis())%>" title="<bean:message key="gnviewer.output.options.export.zip.title"/>">
dacfb0755956 Added download links for ZIP files and WMS layers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 284
diff changeset
105 <img src="images/disk.png" border="0"/>
dacfb0755956 Added download links for ZIP files and WMS layers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 284
diff changeset
106 </a>
dacfb0755956 Added download links for ZIP files and WMS layers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 284
diff changeset
107 <%}%>
29
bba8fd97e549 Export and Diagrammoptions integrated into GUI
Tim Englich <tim.englich@intevation.de>
parents: 22
diff changeset
108 </div>
398
9005b39c52ac Only display chart addons if we really display a chart.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 397
diff changeset
109 <%if (supportChart) { %>
30
07e9c137a2f1 Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents: 29
diff changeset
110 <jsp:include page="/WEB-INF/jsp/includes/display_diagramm_adons_inc.jsp"></jsp:include>
398
9005b39c52ac Only display chart addons if we really display a chart.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 397
diff changeset
111 <%}%>
18
87002cbd194c Static UI -integration an some refactoringwork done
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
112 </div>
158
f38a86c2c012 Added link to export data as odv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 31
diff changeset
113 <%}%>

http://dive4elements.wald.intevation.org