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