source: extensions/net.sf.basedb.mev/trunk/resources/mev_jnlp.jsp @ 1163

Last change on this file since 1163 was 1163, checked in by Nicklas Nordborg, 14 years ago

References #242: Implement "Save to BASE" function in the MeV gui

The menu item is in place as well as the file saving/upload functionality. There is need for more error handling. The possibility of creating a new child bioassay set is not yet implemented. The file will always be attached to the same bioassay set as it was loaded from. The functionality has only been tested when the original file is an analysis file. Some slight adjustments are probably needed when starting with TDMS or CGH files.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Date Id
File size: 5.3 KB
Line 
1<%-- $Id: mev_jnlp.jsp 1163 2009-09-22 11:52:00Z 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<%
42response.setHeader("Expires", "0");
43
44final SessionControl sc = Base.getExistingSessionControl(request, true);
45final String ID = sc.getId();
46final int bioAssaySetId = Values.getInt(request.getParameter("bioassayset_id"));
47final String fileType = Values.getString(request.getParameter("filetype"));
48final String mevFileType = fileType.substring(4);
49final String scheme = request.getScheme();
50final String serverName = request.getServerName();
51final int serverPort = request.getServerPort();
52final String homePath = ExtensionsControl.getHomeUrl("net.sf.basedb.mev.launchmev");
53final String servletPath = ExtensionsControl.getServletUrl("net.sf.basedb.mev.launchmev", "");
54final String serverUrl = scheme + "://" + serverName + ":" + serverPort;
55final int jvmMaxMemory = Values.getInt(sc.getUserClientSetting("net.sf.basedb.mev.launchmev.jvm.maxmemory"), 512);
56String filePath = "";
57DbControl dc = sc.newDbControl();
58try
59{
60  BioAssaySet bas = BioAssaySet.getById(dc, bioAssaySetId);
61  File mevFile = FileStoreUtil.getDataFile(dc, bas, fileType);
62  if (mevFile == null)
63  {
64    throw new ItemNotFoundException("No " + fileType + " file found on bioassay set: " + 
65      bas.getName());
66  }
67  filePath = mevFile.getPath().toURLString("UTF-8");
68}
69finally
70{
71  if (dc != null) dc.close();
72}
73out.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="<%=serverUrl + homePath%>/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>-base:servletdir</argument>
150    <argument><%=serverUrl+servletPath%></argument>
151    <argument>-base:session</argument>
152    <argument><%=ID%></argument>
153    <argument>-base:file</argument>
154    <argument><%=filePath%></argument>
155    <argument>-fileType</argument>
156    <argument><%=mevFileType%></argument>
157    <argument>-base:bioAssaySet</argument>
158    <argument><%=bioAssaySetId%></argument>
159  </application-desc>
160</jnlp>
Note: See TracBrowser for help on using the repository browser.