source: extensions/net.sf.basedb.mev/trunk/resources/test.xjsp @ 1061

Last change on this file since 1061 was 1061, checked in by Nicklas Nordborg, 13 years ago

References #214: Move TDMS export to this extension

The new exporter is in place with some test code. Still needs a plug-in interface for this. Updated requirements to BASE 2.12.

File size: 2.3 KB
Line 
1<%-- $Id: launch_export.jsp 1026 2009-04-07 06:06:22Z nicklas $
2  ------------------------------------------------------------------
3  Copyright (C) 2009 Nicklas Nordborg
4
5  This file is part of BASE - BioArray Software Environment.
6  Available at http://base.thep.lu.se/
7
8  BASE is free software; you can redistribute it and/or
9  modify it under the terms of the GNU General Public License
10  as published by the Free Software Foundation; either version 2
11  of the License, or (at your option) any later version.
12
13  BASE is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  GNU General Public License for more details.
17
18  You should have received a copy of the GNU General Public License
19  along with this program; if not, write to the Free Software
20  Foundation, Inc., 59 Temple Place - Suite 330,
21  Boston, MA  02111-1307, USA.
22  ------------------------------------------------------------------
23
24  @author Jari, Nicklas
25--%>
26<%@ page
27  contentType="text/plain; charset=UTF-8"
28  pageEncoding="UTF-8"
29  session="false"
30  import="net.sf.basedb.core.Application"
31  import="net.sf.basedb.core.BioAssaySet"
32  import="net.sf.basedb.core.Experiment"
33  import="net.sf.basedb.core.Directory"
34  import="net.sf.basedb.core.User"
35  import="net.sf.basedb.core.DbControl"
36  import="net.sf.basedb.core.SessionControl"
37  import="net.sf.basedb.core.ItemContext"
38  import="net.sf.basedb.core.Item"
39  import="net.sf.basedb.core.Path"
40  import="net.sf.basedb.clients.web.Base"
41  import="net.sf.basedb.clients.web.util.HTML"
42  import="net.sf.basedb.clients.web.extensions.ExtensionsControl"
43  import="net.sf.basedb.util.Values"
44 
45  import="net.sf.basedb.mev.export.TdmsExporter"
46  import="net.sf.basedb.util.export.TableWriter"
47%>
48<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %>
49<%
50final SessionControl sc = Base.getExistingSessionControl(request, true);
51final String ID = sc.getId();
52final int bioAssaySetId = Values.getInt(request.getParameter("bioassayset_id"));
53DbControl dc = null;
54try
55{
56  dc = sc.newDbControl();
57  BioAssaySet bas = BioAssaySet.getById(dc, bioAssaySetId);
58  out.clear();
59  TdmsExporter tdms = new TdmsExporter();
60  tdms.setDbControl(dc);
61  tdms.setWriter(new TableWriter(response.getWriter()));
62  tdms.setSource(bas);
63  tdms.doExport();
64}
65finally
66{
67  if (dc != null) dc.close();
68}
69%>
Note: See TracBrowser for help on using the repository browser.