1 | <%-- $Id: mev_jnlp.jsp 1157 2009-09-15 10:46:01Z nicklas $ |
---|
2 | ------------------------------------------------------------------ |
---|
3 | Copyright (C) 2007 Jari Häkkinen |
---|
4 | Copyright (C) 2009 Nicklas Nordborg |
---|
5 | |
---|
6 | This file is part of BASE - BioArray Software Environment. |
---|
7 | Available at http://base.thep.lu.se/ |
---|
8 | |
---|
9 | BASE is free software; you can redistribute it and/or |
---|
10 | modify it under the terms of the GNU General Public License |
---|
11 | as published by the Free Software Foundation; either version 2 |
---|
12 | of the License, or (at your option) any later version. |
---|
13 | |
---|
14 | BASE is distributed in the hope that it will be useful, |
---|
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
17 | GNU General Public License for more details. |
---|
18 | |
---|
19 | You should have received a copy of the GNU General Public License |
---|
20 | along with this program; if not, write to the Free Software |
---|
21 | Foundation, Inc., 59 Temple Place - Suite 330, |
---|
22 | Boston, MA 02111-1307, USA. |
---|
23 | ------------------------------------------------------------------ |
---|
24 | |
---|
25 | @author Jari, Nicklas |
---|
26 | --%> |
---|
27 | <%@ page |
---|
28 | pageEncoding="UTF-8" |
---|
29 | contentType="application/x-java-jnlp-file" |
---|
30 | session="false" |
---|
31 | import="net.sf.basedb.core.SessionControl" |
---|
32 | import="net.sf.basedb.core.DbControl" |
---|
33 | import="net.sf.basedb.core.BioAssaySet" |
---|
34 | import="net.sf.basedb.core.File" |
---|
35 | import="net.sf.basedb.core.FileStoreUtil" |
---|
36 | import="net.sf.basedb.core.ItemNotFoundException" |
---|
37 | import="net.sf.basedb.clients.web.Base" |
---|
38 | import="net.sf.basedb.clients.web.extensions.ExtensionsControl" |
---|
39 | import="net.sf.basedb.util.Values" |
---|
40 | %> |
---|
41 | <% |
---|
42 | response.setHeader("Expires", "0"); |
---|
43 | |
---|
44 | final SessionControl sc = Base.getExistingSessionControl(request, true); |
---|
45 | final String ID = sc.getId(); |
---|
46 | final int bioAssaySetId = Values.getInt(request.getParameter("bioassayset_id")); |
---|
47 | final String fileType = Values.getString(request.getParameter("filetype")); |
---|
48 | final String mevFileType = fileType.substring(4); |
---|
49 | final String scheme = request.getScheme(); |
---|
50 | final String serverName = request.getServerName(); |
---|
51 | final int serverPort = request.getServerPort(); |
---|
52 | final String homeUrl = ExtensionsControl.getHomeUrl("net.sf.basedb.mev.launchmev"); |
---|
53 | final String fullHomeUrl = scheme + "://" + serverName + ":" + serverPort + homeUrl; |
---|
54 | final int jvmMaxMemory = Values.getInt(sc.getUserClientSetting("net.sf.basedb.mev.launchmev.jvm.maxmemory"), 512); |
---|
55 | String extraFileName = ""; |
---|
56 | DbControl dc = sc.newDbControl(); |
---|
57 | try |
---|
58 | { |
---|
59 | BioAssaySet bas = BioAssaySet.getById(dc, bioAssaySetId); |
---|
60 | File mevFile = FileStoreUtil.getDataFile(dc, bas, fileType); |
---|
61 | |
---|
62 | if (mevFile == null) |
---|
63 | { |
---|
64 | throw new ItemNotFoundException("No " + fileType + " file found on bioassay set: " + |
---|
65 | bas.getName()); |
---|
66 | } |
---|
67 | extraFileName = "-" + mevFile.getId() + "." + mevFile.getLastUpdate().getTime(); |
---|
68 | } |
---|
69 | finally |
---|
70 | { |
---|
71 | if (dc != null) dc.close(); |
---|
72 | } |
---|
73 | out.clearBuffer(); |
---|
74 | %><?xml version="1.0" encoding="UTF-8"?> |
---|
75 | <!DOCTYPE jnlp PUBLIC "-//Sun Microsystems, Inc.//DTD JNLP 1.5//EN" "http://www.netbeans.org/jnlp/DTD/jnlp.dtd"> |
---|
76 | <jnlp spec="1.0+" |
---|
77 | codebase="<%=fullHomeUrl%>/jar" |
---|
78 | version="4.4.1"> |
---|
79 | |
---|
80 | <information> |
---|
81 | <title>MeV: MultiExperiment Viewer</title> |
---|
82 | <vendor>http://www.tm4.org</vendor> |
---|
83 | <homepage href="http://www.tm4.org"/> |
---|
84 | </information> |
---|
85 | |
---|
86 | <security> |
---|
87 | <all-permissions/> |
---|
88 | </security> |
---|
89 | |
---|
90 | <resources> |
---|
91 | <jar href="base-mev-wrapper.jar" /><!-- must be first since main class is here --> |
---|
92 | <jar href="mev-base.jar"/> |
---|
93 | <jar href="mev-algorithm-impl.jar"/> |
---|
94 | <jar href="mev-algorithm-support.jar"/> |
---|
95 | <jar href="mev-gui-impl.jar"/> |
---|
96 | <jar href="mev-gui-support.jar"/> |
---|
97 | <jar href="mev-util.jar"/> |
---|
98 | |
---|
99 | <jar href="args4j-2.0.9.jar"/> |
---|
100 | <jar href="base64.jar"/> |
---|
101 | <jar href="colt.jar"/> |
---|
102 | <jar href="comcgh.jar"/> |
---|
103 | <jar href="commons-net-1.4.1.jar"/> |
---|
104 | <jar href="dialogHelp.jar"/> |
---|
105 | <jar href="educgh.jar"/> |
---|
106 | <jar href="ftpbean.jar"/> |
---|
107 | <jar href="HTTPClient.jar"/> |
---|
108 | <jar href="images.jar"/> |
---|
109 | <jar href="j3daudio.jar"/> |
---|
110 | <jar href="j3dcore.jar"/> |
---|
111 | <jar href="j3dutils.jar"/> |
---|
112 | <jar href="jai_codec.jar"/> |
---|
113 | <jar href="jai_core.jar"/> |
---|
114 | <jar href="jama.jar"/> |
---|
115 | <jar href="jaxp.jar"/> |
---|
116 | <jar href="jbcl.jar"/> |
---|
117 | <jar href="jconn2.jar"/> |
---|
118 | <jar href="jdom-1.0.jar"/> |
---|
119 | <jar href="jfreechart-0.9.20.jar"/> |
---|
120 | <jar href="jfreechart-common-0.9.5.jar"/> |
---|
121 | <jar href="jsch-0.1.39.jar"/> |
---|
122 | <jar href="JSciCore.jar"/> |
---|
123 | <jar href="JSciPartial.jar"/> |
---|
124 | <jar href="magetab-parser.jar" /> |
---|
125 | <jar href="normalization.jar"/> |
---|
126 | <jar href="piccolo.jar"/> |
---|
127 | <jar href="piccolox.jar"/> |
---|
128 | <jar href="servlet.jar"/> |
---|
129 | <jar href="soap.jar"/> |
---|
130 | <jar href="swing-layout-1.0.1.jar"/> |
---|
131 | <jar href="swingx-2006_10_27.jar"/> |
---|
132 | <jar href="tar.jar"/> |
---|
133 | <jar href="Text_JDBC30.jar"/> |
---|
134 | <jar href="vecmath.jar"/> |
---|
135 | <jar href="weka.jar"/> |
---|
136 | <jar href="xerces.jar"/> |
---|
137 | <jar href="xml-apis.jar"/> |
---|
138 | |
---|
139 | <extension name="mail" href="../others.jsp?mail"/> |
---|
140 | <extension name="goose" href="../others.jsp?goose"/> |
---|
141 | |
---|
142 | <j2se version="1.6.0+" |
---|
143 | max-heap-size="<%=jvmMaxMemory%>M" |
---|
144 | href="http://java.sun.com/products/autodl/j2se" |
---|
145 | /> |
---|
146 | </resources> |
---|
147 | |
---|
148 | <application-desc main-class="net.sf.basedb.mev.webstart.StartMev"> |
---|
149 | <argument>-fileType</argument> |
---|
150 | <argument><%=mevFileType%></argument> |
---|
151 | <argument>-fileUrl</argument> |
---|
152 | <argument><%=fullHomeUrl%>/MevExport/<%=ID%>/<%=bioAssaySetId%>/<%=fileType%><%=extraFileName%>.servlet</argument> |
---|
153 | </application-desc> |
---|
154 | </jnlp> |
---|