source: branches/uk_ac_ebi_Tab2MageImporter/jsp/uk/ac/ebi/nugo/plugins/protocols.jsp @ 512

Last change on this file since 512 was 512, checked in by mbayer, 14 years ago
  • have tied the interface to the importer plugin class now -- all parameters get picked up fine by the plugin
File size: 5.5 KB
Line 
1<%@ page import="net.sf.basedb.core.*"%>
2<%@ page import="net.sf.basedb.clients.web.*"%>
3<%@ page import="net.sf.basedb.util.*"%>
4<%@ page import="java.util.*"%>
5<%@ page import="java.lang.*"%>
6
7<jsp:useBean id="inputDataBean" class="uk.ac.ebi.nugo.plugins.DataBean" scope="session" />
8<!-- submits the form data back to the bean assuming that each form element is matched to a variable in the bean by the same name -->
9<jsp:setProperty name="inputDataBean" property="*" />
10
11
12<html>
13<head>
14<link rel="stylesheet" type="text/css" href="<%= request.getContextPath()%>/plugins/uk/ac/ebi/nugo/plugins/styles.css" />
15</head>
16<body>
17
18
19<%
20final SessionControl sc = Base.getExistingSessionControl(pageContext, true);
21final String ID = sc.getId();
22final String requestID = request.getParameter("requestId");
23
24
25//here we also need to deal with the multiple select inputs from the previous page
26//their selected values need to be extracted from the request and concatenated into a single String
27
28//first deal with quality control input
29String[] items = request.getParameterValues("qualityControl");
30StringBuilder qualControl = new StringBuilder();
31for(int i = 0; i< items.length; i++)
32{
33    qualControl.append(items[i] );
34    //last one does not get a comma
35    if(i!=items.length-1)
36    {
37    qualControl.append(",");
38    }
39}
40//store this in the bean
41inputDataBean.setQualityControl(qualControl.toString());
42
43//next deal with the experiment design type
44//this is slightly more complex as we are dealing with six separate list boxes and we need to combine all their inputs
45StringBuilder experimentalDesign = new StringBuilder();
46
47String [] biologicalPropertyItems = request.getParameterValues("biologicalProperty");
48if(biologicalPropertyItems !=null)
49{
50  for(int i = 0; i< biologicalPropertyItems.length; i++)
51  {
52    experimentalDesign.append(biologicalPropertyItems[i] +",");
53  }
54}
55
56String [] bioMolecularAnnotationItems = request.getParameterValues("bioMolecularAnnotation");
57if(bioMolecularAnnotationItems !=null)
58{
59  for(int i = 0; i<bioMolecularAnnotationItems.length; i++)
60  {
61    experimentalDesign.append(bioMolecularAnnotationItems[i] +",");
62  }
63}
64
65String [] epidemiologicalDesignItems = request.getParameterValues("epidemiologicalDesign");
66if(epidemiologicalDesignItems !=null)
67{
68  for(int i = 0; i< epidemiologicalDesignItems.length; i++)
69  {
70    experimentalDesign.append(epidemiologicalDesignItems[i] +",");
71  }
72}
73
74String [] methodologicalDesignItems = request.getParameterValues("methodologicalDesign");
75if(methodologicalDesignItems !=null)
76{
77  for(int i = 0; i< methodologicalDesignItems.length; i++)
78  {
79    experimentalDesign.append(methodologicalDesignItems[i] +",");
80  }
81}
82
83String [] perturbationalDesignItems = request.getParameterValues("perturbationalDesign");
84if(perturbationalDesignItems !=null)
85{
86  for(int i = 0; i< perturbationalDesignItems.length; i++)
87  {
88    experimentalDesign.append(perturbationalDesignItems[i] +",");
89  }
90}
91
92String [] technologicalDesignItems = request.getParameterValues("technologicalDesign");
93if(technologicalDesignItems !=null)
94{
95  for(int i = 0; i< technologicalDesignItems.length; i++)
96  {
97    experimentalDesign.append(technologicalDesignItems[i]+",");
98  }
99}
100
101//store the combined String in the bean
102inputDataBean.setExperimentalDesign(experimentalDesign.toString());
103
104 %>
105
106<form action="<%= request.getContextPath()%>/plugins/uk/ac/ebi/nugo/plugins/hybridizations.jsp" method="post">
107<input type="hidden" name="ID" value="<%=ID%>">
108
109<h2>Tab2MAGE Importer -- Your Protocols</h2>
110Page 2 of 3
111<p>
112<table cellpadding="10">
113
114  <tr>
115    <td class="header">
116    <h3>Protocol name</h3>
117    </td>
118    <td class="header">
119    <h3>Protocol Text</h3>
120    <p>The full text of the protocol.
121    </td>
122    <td class="header">
123    <h3>Parameters</h3>
124    <p>A list of parameters for this protocol, separated by semicolons, in the format 'name(units)'. <br />
125    Each parameter name should be unique within this form.<br />
126    Leave blank if the protocol is unparameterized.</p>
127    </td>
128  </tr>
129
130  <tr>
131    <td class="boldText">Treatment</td>
132    <td class="input"><textarea rows="8" cols="35" name="treatmentProtocol">my treatment protocol text </textarea></td>
133    <td><textarea rows="4" cols="25" name="treatmentProtocolParams">param1</textarea></td>
134  </tr>
135
136  <tr>
137    <td class="boldText">Extraction</td>
138    <td class="input"><textarea rows="8" cols="35" name="extractionProtocol"> my extraction protocol text  </textarea></td>
139    <td><textarea rows="4" cols="25" name="extractionProtocolParams">param2</textarea></td>
140  </tr>
141
142  <tr>
143    <td class="boldText">Labeling</td>
144    <td class="input"><textarea rows="8" cols="35" name="labelingProtocol"> my labeling protocol text  </textarea></td>
145    <td><textarea rows="4" cols="25" name="labelingProtocolParams">param3</textarea></td>
146  </tr>
147
148  <tr>
149    <td class="boldText">Hybridization</td>
150    <td class="input"><textarea rows="8" cols="35" name="hybridizationProtocol">my hybs protocol text   </textarea></td>
151    <td><textarea rows="4" cols="25" name="hybridizationProtocolParams">param4</textarea></td>
152  </tr>
153
154  <tr>
155    <td class="boldText">Scanning</td>
156    <td class="input"><textarea rows="8" cols="35"name="scanningProtocol"> my scanning protocol text </textarea></td>
157    <td><textarea rows="4" cols="25" name="scanningProtocolParams"> param5</textarea></td>
158  </tr>
159
160</table>
161
162<p>
163<table class="noBorder" width="100%">
164  <tr class="noBorder">
165    <td class="centered"><input type="submit" value="Continue" /></td>
166  </tr>
167</table>
168
169
170
171</form>
172
173</body>
174</html>
175
Note: See TracBrowser for help on using the repository browser.