Ignore:
Timestamp:
Jan 15, 2008, 5:35:49 PM (13 years ago)
Author:
mbayer
Message:

-major expansion of system to allow for different use cases

  • now includes several new JSP pages which allow the user to make choices
Location:
branches/uk_ac_ebi_Tab2MageImporter/jsp/uk/ac/ebi/nugo/plugins
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/uk_ac_ebi_Tab2MageImporter/jsp/uk/ac/ebi/nugo/plugins/experiment.jsp

    r531 r532  
    44<%@ page import="java.util.*"%>
    55
    6 <jsp:useBean id="inputDataBean" class="uk.ac.ebi.nugo.plugins.DataBean" scope="application"/>
     6<jsp:useBean id="inputDataBean" class="uk.ac.ebi.nugo.plugins.DataBean" scope="session"/>
    77<!-- 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 -->
    88<jsp:setProperty name="inputDataBean" property="*"/>
    99
    1010<%
    11 final SessionControl sc = Base.getExistingSessionControl(pageContext, true);
    12 final String ID = sc.getId();
    13 final String requestId = request.getParameter("requestId");
    14 
    15 //we also need to figure out the name/id of the currently selected experiment that this import is getting initiated from
    16 ItemContext cc = sc.getCurrentContext(Item.EXPERIMENT);
    17 int experimentID = cc.getId();
    18 DbControl dc = sc.newDbControl();
    19 Experiment experiment = Experiment.getById(dc,experimentID);
    20 String expName = experiment.getName();
    21 dc.close();
    22 
    23 //set the experiment id in the bean so we can get at it later in the plugin
    24 inputDataBean.setExperimentId(new Integer(experimentID).toString());
    25  %>
     11  final SessionControl sc = Base.getExistingSessionControl(pageContext, true);
     12  final String ID = sc.getId();
     13  final String requestId = request.getParameter("requestId");
     14
     15  //we also need to figure out the name/id of the currently selected experiment that this import is getting initiated from
     16  ItemContext cc = sc.getCurrentContext(Item.EXPERIMENT);
     17  int experimentID = cc.getId();
     18  DbControl dc = sc.newDbControl();
     19  Experiment experiment = Experiment.getById(dc, experimentID);
     20  String expName = experiment.getName();
     21  dc.close();
     22
     23  //set the experiment id in the bean so we can get at it later in the plugin
     24  inputDataBean.setExperimentId(new Integer(experimentID).toString());
     25%>
    2626
    2727<html>
     
    123123 
    124124
    125 <h1>Tab2MAGE Importer -- Your Experiment</h1>
    126 Page 1 of 4
     125<h1>Tab2MAGE Import Wizard -- Your Experiment</h1>
    127126<p>
    128127
     
    372371      <td class="boldText">Experiment Name:</td>
    373372      <td class="input"><textarea rows="4" cols="30"
    374         name="experimentName"><%=expName %></textarea></td>
     373        name="experimentName"><%=expName%></textarea></td>
    375374      <td class="helpText">The name you have chosen for the Experiment.</td>
    376375    </tr>
  • branches/uk_ac_ebi_Tab2MageImporter/jsp/uk/ac/ebi/nugo/plugins/hybridizations.jsp

    r531 r532  
    44<%@ page import="java.util.*"%>
    55
    6 <jsp:useBean id="inputDataBean" class="uk.ac.ebi.nugo.plugins.DataBean" scope="application" />
     6<jsp:useBean id="inputDataBean" class="uk.ac.ebi.nugo.plugins.DataBean" scope="session" />
    77<!-- 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 -->
    88<jsp:setProperty name="inputDataBean" property="*" />
     
    8585
    8686
    87 <form name="hybridizations"action="<%= request.getContextPath()%>/plugins/uk/ac/ebi/nugo/plugins/mappings.jsp" method="post">
    88 <input type="hidden" name="ID" value="<%=ID%>"> <input type="hidden" name="cmd" value="SetParameters">
     87<form name="hybridizations"action="<%= request.getContextPath()%>/plugins/uk/ac/ebi/nugo/plugins/userchoice2.jsp" method="post">
     88<input type="hidden" name="ID" value="<%=ID%>">
     89<input type="hidden" name="cmd" value="SetParameters">
    8990<input type="hidden"name="requestId" value="<%=requestId%>">
    9091
     
    9293<input type="hidden" name="zipFile" value=""  id="zipFile">
    9394
    94 <h1>Tab2MAGE Importer -- Your Hybridizations</h1>
    95 Page 3 of 4
     95<h1>Tab2MAGE Import Wizard -- Your Hybridizations</h1>
     96
    9697<p>
    9798<!--  table with the input form -->
  • branches/uk_ac_ebi_Tab2MageImporter/jsp/uk/ac/ebi/nugo/plugins/mappings.jsp

    r531 r532  
    77<%@ page import="uk.ac.ebi.nugo.plugins.*"%>
    88
    9 <jsp:useBean id="inputDataBean" class="uk.ac.ebi.nugo.plugins.DataBean" scope="application" />
     9<jsp:useBean id="inputDataBean" class="uk.ac.ebi.nugo.plugins.DataBean" scope="session" />
    1010<!-- 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 -->
    1111<jsp:setProperty name="inputDataBean" property="*" />
     
    8686
    8787
    88 <form name="mappings" action="<%= request.getContextPath()%>/common/plugin/index.jsp" method="post">
     88<form name="mappings" action="<%= request.getContextPath()%>/plugins/uk/ac/ebi/nugo/plugins/submit.jsp" method="post">
    8989
    9090<input type="hidden" name="ID" value="<%=ID%>">
    9191<input type="hidden" name="cmd" value="SetParameters">
    9292<input type="hidden" name="requestId" value="<%=requestId%>">
    93 <input type="hidden" id="fileList" name="parameter:fileList" value""/>
    94 <input type="hidden" id="subjectList" name="parameter:subjectList" value""/>
    95 <input type="hidden" id="tissueList" name="parameter:tissueList" value""/>
    96 
    97 <!-- these are the parameters from the previous input pages; need to pick them up individually from the bean here; ugly as hell but can't be done any other way -->
    98 
    99 <!-- inputs from experiment.jsp page -->
    100 <input type="hidden" name="parameter:domain" value="<%=inputDataBean.getDomain()%>">
    101 <input type="hidden" name="parameter:accession" value="<%=inputDataBean.getAccession()%>">
    102 <input type="hidden" name="parameter:qualityControl" value="<%=inputDataBean.getQualityControl()%>">
    103 <input type="hidden" name="parameter:experimentalDesign" value="<%=inputDataBean.getExperimentalDesign()%>">
    104 <input type="hidden" name="parameter:experimentName" value="<%=inputDataBean.getExperimentName()%>">
    105 <input type="hidden" name="parameter:description" value="<%=inputDataBean.getDescription()%>">
    106 <input type="hidden" name="parameter:releaseDate" value="<%=inputDataBean.getReleaseDate()%>">
    107 <input type="hidden" name="parameter:submissionDate" value="<%=inputDataBean.getSubmissionDate()%>">
    108 <input type="hidden" name="parameter:submitter" value="<%=inputDataBean.getSubmitter()%>">
    109 <input type="hidden" name="parameter:organization" value="<%=inputDataBean.getOrganization()%>">
    110 <input type="hidden" name="parameter:publicationTitle" value="<%=inputDataBean.getPublicationTitle()%>">
    111 <input type="hidden" name="parameter:authors" value="<%=inputDataBean.getAuthors()%>">
    112 <input type="hidden" name="parameter:journal" value="<%=inputDataBean.getJournal()%>">
    113 <input type="hidden" name="parameter:volume" value="<%=inputDataBean.getVolume()%>">
    114 <input type="hidden" name="parameter:issue" value="<%=inputDataBean.getIssue()%>">
    115 <input type="hidden" name="parameter:pages" value="<%=inputDataBean.getPages()%>">
    116 <input type="hidden" name="parameter:year" value="<%=inputDataBean.getYear()%>">
    117 <input type="hidden" name="parameter:pubmedId" value="<%=inputDataBean.getPubmedId()%>">
    118 <input type="hidden" name="parameter:experimentId" value="<%=inputDataBean.getExperimentId()%>">
    119 <!-- inputs from protocols.jsp page -->
    120 <input type="hidden" name="parameter:treatmentProtocol" value="<%=inputDataBean.getTreatmentProtocol()%>">
    121 <input type="hidden" name="parameter:extractionProtocol" value="<%=inputDataBean.getExtractionProtocol()%>">
    122 <input type="hidden" name="parameter:labelingProtocol" value="<%=inputDataBean.getLabelingProtocol()%>">
    123 <input type="hidden" name="parameter:hybridizationProtocol" value="<%=inputDataBean.getHybridizationProtocol()%>">
    124 <input type="hidden" name="parameter:scanningProtocol" value="<%=inputDataBean.getScanningProtocol()%>">
    125 <input type="hidden" name="parameter:treatmentProtocolParams" value="<%=inputDataBean.getTreatmentProtocolParams()%>">
    126 <input type="hidden" name="parameter:extractionProtocolParams" value="<%=inputDataBean.getExtractionProtocolParams()%>">
    127 <input type="hidden" name="parameter:labelingProtocolParams" value="<%=inputDataBean.getLabelingProtocolParams()%>">
    128 <input type="hidden" name="parameter:hybridizationProtocolParams" value="<%=inputDataBean.getHybridizationProtocolParams()%>">
    129 <input type="hidden" name="parameter:scanningProtocolParams" value="<%=inputDataBean.getScanningProtocolParams()%>">
    130 <!-- inputs from hybridizations.jsp page -->
    131 <input type="hidden" name="parameter:platform" value="<%=inputDataBean.getPlatform()%>">
    132 <input type="hidden" name="parameter:organism" value="<%=inputDataBean.getOrganism()%>">
    133 <input type="hidden" name="parameter:numDesigns" value="<%=inputDataBean.getNumDesigns()%>">
    134 <input type="hidden" name="parameter:dyeSwap" value="<%=inputDataBean.getDyeSwap()%>">
    135 <input type="hidden" name="parameter:refSample" value="<%=inputDataBean.getRefSample()%>">
    136 <input type="hidden" name="parameter:numTreatmentGroups" value="<%=inputDataBean.getNumTreatmentGroups()%>">
    137 <input type="hidden" name="parameter:expFactors" value="<%=inputDataBean.getExpFactors()%>">
    138 <input type="hidden" name="parameter:numReplicates" value="<%=inputDataBean.getNumReplicates()%>">
    139 <input type="hidden" name="parameter:tissues" value="<%=inputDataBean.getTissues()%>">
    140 <input type="hidden" name="parameter:pooling" value="<%=inputDataBean.getPooling()%>">
    141 <input type="hidden" name="parameter:zipFile" value="<%=request.getParameter("path") %>" id="zipFile">
    142 <input type="hidden" name="parameter:subjectNames" value="<%=inputDataBean.getSubjectNames()%>">
     93
     94<input type="hidden" id="fileList" name="fileList" value""/>
     95<input type="hidden" id="subjectList" name="subjectList" value""/>
     96<input type="hidden" id="tissueList" name="tissueList" value""/>
     97
    14398
    14499
    145100<%
    146   System.out.println("all parameter values for mappings.jsp:");
    147   for (java.util.Enumeration e = request.getParameterNames(); e.hasMoreElements();)
    148   {
    149     String name = (String) e.nextElement();
    150     String value = request.getParameter(name);
    151     System.out.println("parameter " + name + " = " + value);
    152   }
    153101
    154102  //first extract the factor names and the possible values
     
    177125
    178126  //first parse the filepath from the input page 
    179   String zipFilePath = (String) request.getParameter("path");
     127  String zipFilePath = inputDataBean.getPath();
     128  System.out.println("zipFilePath = " + zipFilePath);
    180129  String zipFileDirStr = zipFilePath.substring(0, zipFilePath.lastIndexOf("/"));
    181130  String zipFileName = zipFilePath.substring(zipFilePath.lastIndexOf("/")+1);
     
    204153  //next get the subjectNames and make up select boxes with these
    205154  //they too have to be mapped to filenames
    206   String [] subjectNames = request.getParameter("subjectNames").split("\n");
     155  String [] subjectNames = inputDataBean.getSubjectNames().split("\n");
    207156 
    208157  //we also need to parse out the tissues string to produce another column of select boxes
    209   String [] tissueNames = request.getParameter("tissues").split("\n");
     158  String [] tissueNames = inputDataBean.getTissues().split("\n");
    210159%>
    211160
    212 <h1>Tab2MAGE Importer -- File Mappings</h1>
    213 Page 4 of 4
     161<h1>Tab2MAGE Import Wizard -- File Mappings</h1>
    214162<p>
    215163
  • branches/uk_ac_ebi_Tab2MageImporter/jsp/uk/ac/ebi/nugo/plugins/protocols.jsp

    r531 r532  
    55<%@ page import="java.lang.*"%>
    66
    7 <jsp:useBean id="inputDataBean" class="uk.ac.ebi.nugo.plugins.DataBean" scope="application" />
     7<jsp:useBean id="inputDataBean" class="uk.ac.ebi.nugo.plugins.DataBean" scope="session" />
    88<!-- 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 -->
    99<jsp:setProperty name="inputDataBean" property="*" />
     
    122122<input type="hidden"name="requestId" value="<%=requestId%>">
    123123
    124 <h1>Tab2MAGE Importer -- Your Protocols</h1>
    125 Page 2 of 4
     124<h1>Tab2MAGE Import Wizard -- Your Protocols</h1>
    126125<p>
    127126<table cellpadding="10">
Note: See TracChangeset for help on using the changeset viewer.