source: trunk/www/analyze/index.jsp @ 1918

Last change on this file since 1918 was 1918, checked in by Gregory Vincic, 17 years ago

Initial revision of the JFreePlotServlet

  • Property svn:eol-style set to native
  • Property svn:keywords set to Date Id
File size: 19.9 KB
Line 
1<%-- $Id: index.jsp 1918 2006-02-06 13:59:19Z gregory $
2  ------------------------------------------------------------------
3  BioArray Software Environment (BASE) - http:// base.thep.lu.se/
4  Copyright (C) 2002-2004 Lao Saal, Carl Troein,
5  Johan Vallon-Christersson, Jari Häkkinen, Nicklas Nordborg
6
7  This file is part of BASE.
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
26  @author Nicklas, Gregory
27  @version 2.0
28--%>
29<%@ page
30  import="net.sf.basedb.core.SessionControl"
31  import="net.sf.basedb.core.DbControl"
32  import="net.sf.basedb.core.PluginDefinition"
33  import="net.sf.basedb.core.Include"
34  import="net.sf.basedb.core.User"
35  import="net.sf.basedb.core.Item"
36  import="net.sf.basedb.core.ItemContext"
37  import="net.sf.basedb.core.ItemParameterType"
38  import="net.sf.basedb.core.ItemResultIterator"   
39  import="net.sf.basedb.core.ItemResultList"
40  import="net.sf.basedb.core.SystemItems"
41  import="net.sf.basedb.core.Permission"
42  import="net.sf.basedb.core.Experiment"
43  import="net.sf.basedb.core.BioAssaySet"
44  import="net.sf.basedb.core.DynamicResultIterator"
45  import="net.sf.basedb.core.DynamicSpotQuery"
46  import="net.sf.basedb.core.VirtualColumn"
47  import="net.sf.basedb.core.BioAssay"
48  import="net.sf.basedb.core.Transformation"
49  import="net.sf.basedb.core.Job"
50  import="net.sf.basedb.core.query.SqlResult"
51  import="net.sf.basedb.core.query.Hql"
52  import="net.sf.basedb.core.query.Expressions"
53  import="net.sf.basedb.core.query.Restrictions"
54  import="net.sf.basedb.core.query.Dynamic"
55  import="net.sf.basedb.core.query.JoinType"
56  import="net.sf.basedb.core.RawBioAssay"
57  import="net.sf.basedb.core.RawDataType"
58  import="net.sf.basedb.core.RawDataTypes"
59  import="net.sf.basedb.core.ItemQuery"
60  import="net.sf.basedb.core.PermissionDeniedException"
61  import="net.sf.basedb.core.InvalidDataException"
62  import="net.sf.basedb.core.BaseException"
63  import="net.sf.basedb.clients.web.Base"
64  import="net.sf.basedb.clients.web.taglib.table.TableColumn"
65  import="net.sf.basedb.clients.web.util.HTML"
66  import="net.sf.basedb.clients.web.util.Values"
67  import="net.sf.basedb.clients.web.WebException"
68  import="net.sf.basedb.clients.web.ModeInfo"
69  import="java.util.LinkedList"
70  import="java.util.List"
71  import="java.lang.reflect.Array"
72%>
73<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %>
74<%@ taglib prefix="tbl" uri="/WEB-INF/table.tld" %>
75<%@ taglib prefix="p" uri="/WEB-INF/path.tld" %>
76<%@ taglib prefix="t" uri="/WEB-INF/tab.tld" %>
77
78<%!
79  private static int index = 1;
80
81  private static final ItemContext defaultContext = Base.createDefaultContext("1", "ch1,ch2,externalId");
82 
83  private static String newBioAssaySetRow(BioAssaySet bas, int level)
84  {
85    String row = "<tr class=\"L" + level +"\">";
86    row += "<td class=\"cell\">" + index + "</td>";
87    row += "<td class=\"cell\"><input type=\"checkbox\" name=\"bioassayset_id\" value=\"" + bas.getId() +"\"/></td>";
88    String icon = "bioassayset";
89    if(bas.isRemoved())
90    {
91        icon = "deletedbioassayset";
92    }
93    row += "<td class=\"" + icon + " cell\"><div class=\"link\" onclick=\"viewBioAssaySet(" + bas.getId()+ ")\">" + bas.getName() + "</div></td>";
94   
95    Transformation t = bas.getTransformation();
96    row += "<td class=\"cell\">" + t.getName() + "</td>";
97    row += "<td class=\"cell\">" + bas.getNumSpots() + "</td>";
98    row += "<td class=\"cell\">";
99    Job j = t.getJob();
100    if(j != null) row += Values.formatDate(j.getEnded());
101    row += "</td>";
102    row += "</tr>\n";
103    index++;
104      return row;
105  }
106
107  private static String writeChildTransformations(DbControl dc, BioAssaySet bas, int level)
108  {
109    String output = "";
110    output += newBioAssaySetRow(bas, level);
111    if(!bas.isRemoved())
112    {
113      ItemQuery<Transformation> query = bas.getTransformations();         
114      ItemResultList<Transformation> tList = query.list(dc);
115      for(Transformation t : tList)
116      {
117        ItemQuery<BioAssaySet> basQuery = t.getProducts();
118        basQuery.include( Include.REMOVED );
119        for( BioAssaySet p : basQuery.list(dc))
120        {               
121          output += writeChildTransformations( dc, p, level + 1);
122        }
123      }
124    }
125    return output;
126  }
127
128  private static LinkedList<BioAssaySet> getSelectedItems(DbControl dc, String[] bioassaySetIdList)
129  {
130    LinkedList<BioAssaySet> basList = new LinkedList<BioAssaySet>();
131   
132    if( bioassaySetIdList != null && Array.getLength(bioassaySetIdList) > 0 )
133    {
134      for( String bioassayId : bioassaySetIdList)
135      {     
136        basList.add(BioAssaySet.getById(dc, Integer.decode(bioassayId).intValue()));     
137      }     
138    }
139    return basList;
140  }
141 
142%>
143
144<%
145/* Experiment */
146final Item itemType = Item.EXPERIMENT;
147final int experimentId = Values.getInt(request.getParameter("experiment_id"), 0);
148
149/* Session */
150final SessionControl sc = experimentId == 0 ? 
151    Base.getExistingSessionControl(pageContext, Permission.CREATE, itemType) :
152    Base.getExistingSessionControl(pageContext, true);
153final String ID = sc.getId();
154
155/* Action and Template */
156final String cmd = Values.getString(request.getParameter("cmd"), "");
157final String tabId = Values.getString(request.getParameter("tabId"), "properties");
158final float scale = Base.getScale(sc);
159final String root = request.getContextPath()+"/";
160final String root_img = request.getContextPath()+"/images/treeline/";
161
162/* BioAssaySet */
163final int itemId = Values.getInt(request.getParameter("item_id"), 0);
164BioAssaySet bas = null;
165
166/* BioAssay */
167final Item basType = Item.BIOASSAY;
168final int bioassayId = Values.getInt(request.getParameter("bioassay_id"), 0);
169final ItemContext cc = Base.getAndSetCurrentContext(sc, basType, pageContext, defaultContext);
170final ModeInfo mode = ModeInfo.get(request.getParameter("mode"));
171ItemResultList<BioAssay> baList = null;
172
173/* Command validation */
174DbControl dc = sc.newDbControl();
175try
176{
177  boolean currentBioassaysetWritePermission = false;
178
179  if( cmd.equals("RunPlugin") )
180  {
181    /* Set ItemContext to BioAssaySet and set it's id*/
182    ItemContext ic = sc.getCurrentContext(Item.BIOASSAYSET);
183    bas = BioAssaySet.getById(dc,itemId);
184   
185    if( bas != null )
186    {
187      ic.setId( bas.getId() );
188      response.sendRedirect( root + "common/plugin/index.jsp?ID=" + ID + "&cmd=SelectPlugin&main_type=ANALYZE&item_type=BIOASSAYSET&context_type=ITEM&title=New job");
189    }
190    else
191    {
192      /* No bioassaysets where selected */
193      throw new WebException("popup", "BioAssaySet is null", "BioAssaySet with id " + itemId + " doesn't exsist");
194    }
195  } 
196  else if( cmd.equals("DeleteItems") || cmd.equals("RestoreItems"))
197  {
198    LinkedList<BioAssaySet> basList = getSelectedItems(dc, request.getParameterValues("bioassayset_id"));
199    boolean removedFlag = cmd.equals("DeleteItems") ? true : false;
200    if( basList.size() > 0 )
201    {     
202      for(BioAssaySet b : basList)
203      {       
204        b.setRemoved(removedFlag);     
205      }
206      dc.commit();
207      dc = sc.newDbControl();           
208    }
209    else
210    {
211      /* No bioassaysets where selected */
212      throw new WebException("popup","No items selected", "Please select at least one bioassayset");
213    }   
214  }
215 
216 
217  /* BioAssaySet */
218  if(itemId != 0)
219  {
220    bas = BioAssaySet.getById(dc,itemId);
221    currentBioassaysetWritePermission = bas.hasPermission(Permission.WRITE);
222  }
223 
224  /* Experiment */
225  Experiment experiment = Experiment.getById(dc, experimentId);
226  final boolean writePermission = experiment.hasPermission(Permission.WRITE);
227   
228  boolean readCurrentOwner = true;
229  User currentOwner = null;
230  try
231  {
232    currentOwner = experiment.getOwner();
233  }
234  catch (PermissionDeniedException ex)
235  {
236    readCurrentOwner = false;
237  }
238  %>
239
240  <base:page title="<%=null%>">
241  <base:head scripts="table.js,treeline.js,tabcontrol.js" styles="toolbar.css,headertabcontrol.css,path.css,table.css,treeline.jsp">
242    <title>Experiment Analysis -- <%=HTML.encodeTags(experiment.getName())%></title>
243 
244  <script language="JavaScript">
245    var submitPage = 'index.jsp';
246    var formId = 'bioassaysets';
247    function configureColumns()
248    {
249      Table.configureColumns('<%=ID%>', formId, '<%=itemType.name()%>', '<%=(String)cc.getObject("defaultColumns")%>');
250    }
251    function viewExperiment()
252    {
253      Main.openPopup('<%=root%>/views/experiments/index.jsp?ID=<%=ID%>&item_id=<%=experimentId%>&cmd=ViewItem', 'CreateRootBioAssaySet', 800, 500);
254    }
255    function newRootBioAssaySet()
256    {
257      Main.openPopup('create_root_bioassayset.jsp?ID=<%=ID%>&experiment_id=<%=experimentId%>', 'CreateRootBioAssaySet', 600, 400);
258    }
259    function viewBioAssaySet(itemId)
260    {
261      location.replace('index.jsp?ID=<%=ID%>&experiment_id=<%=experimentId%>&item_id=' + itemId);
262    }
263    function deleteItems()
264    {
265      var frm = document.forms[formId];
266      frm.action = submitPage;
267      frm.cmd.value = 'DeleteItems';
268      frm.submit();
269    }
270    function restoreItems()
271    {
272      var frm = document.forms[formId];
273      frm.action = submitPage;
274      frm.cmd.value = 'RestoreItems';
275      frm.submit();
276    }
277    function createChildCopy()
278    {
279      var frm = document.forms[formId];
280      frm.action = submitPage;
281      frm.cmd.value = 'CreateChildCopy';
282      frm.submit();
283    }
284    function runPlugin()
285    {
286      Main.openPopup('index.jsp?ID=<%=ID%>&cmd=RunPlugin&item_id=<%=itemId%>&experiment_id=<%=experimentId%>', 'SelectPlugin', 600, 600);       
287    }
288    function switchTab(tabControlId, tabId)
289    {
290      if(tabId == 'overviewplots')
291      {
292        location.replace('index.jsp?ID=<%=ID%>&experiment_id=<%=experimentId%>&item_id=<%=itemId%>&tabId=overviewplots');
293      }
294      else
295      {
296        TabControl.setActiveTab(tabControlId, tabId);
297      }
298     
299    }
300  </script>
301
302  <script type="text/javascript" language="javascript1.2">
303    <!-- TreeLine configuration -->
304    COL = 2; <!-- which column contains the title -->
305  </script>
306  </base:head>
307  <base:body>
308
309    <p>
310    <p:path>
311      <p:pathelement title="Experiments" href="<%=root + "views/experiments/index.jsp?ID=" +ID +"&experiment_id=" + experimentId + "&cmd=List"%>" />
312      <p:pathelement title="<%=HTML.encodeTags(experiment.getName())%>" href="<%="index.jsp?ID=" +ID +"&experiment_id=" + experimentId%>" />
313      <%if(bas != null) {%> 
314        <p:pathelement title="<%=HTML.encodeTags(bas.getName())%>" />
315      <%}%>     
316    </p:path>
317 
318    <%if(bas != null) {%> 
319    <br clear="all"/>
320    <t:tabcontrol id="main" active="<%=tabId%>" switch="switchTab">
321   
322    <t:tab id="properties" title="Properties">   
323      <tbl:toolbar
324        > 
325
326        <tbl:button 
327          disabled="<%=bas.isRemoved() ? true : false%>" 
328          image="<%=currentBioassaysetWritePermission ? "" : ""%>" 
329          onclick="runPlugin()" 
330          title="Run plugin&hellip;" 
331          tooltip="<%=currentBioassaysetWritePermission ? "Run plugin" : "You do not have permission to analyze this experiment"%>" 
332        /> 
333         
334      </tbl:toolbar>
335       
336    <div class="boxedbottom">
337    <div class="itemstatus">
338    <base:icon image="deleted.gif" 
339      visible="<%=bas.isRemoved()%>"> This item has been flagged for deletion.<br></base:icon>
340      </div>
341         
342    <%
343    Transformation transformation = bas.getTransformation();
344    if(transformation != null) {%>
345      <h4>Transformation</h4>
346      <table>
347      <tr>
348        <th>Name</th>
349        <td><%=HTML.encodeTags(transformation.getName())%></td>
350        </tr>
351        <tr>
352        <th>Description</th>
353        <td><%=HTML.encodeTags(transformation.getDescription())%></td>
354      </tr>
355      </table>
356    <%}%>
357   
358
359    <h4>Experiment</h4>
360    <table>
361    <tr>
362      <th>Name</th>
363      <td><a href="<%=root%>views/experiments/index.jsp?ID=<%=ID%>&cmd=ViewItem&item_id=<%=experiment.getId()%>"><%=HTML.encodeTags(experiment.getName())%></a></td>
364      </tr>
365      <tr>
366      <th>Description</th>
367      <td><%=HTML.encodeTags(experiment.getDescription())%></td>
368    </tr>
369    </table>
370    </div>
371    </t:tab>
372   
373    <t:tab id="bioassays" title="Bioassays">
374      <form>
375        <input type="hidden" name="ID" value="<%=ID%>">
376        <input type="hidden" name="experiment_id" value="<%=experimentId%>">
377        <input type="hidden" name="item_id" value="<%=itemId%>">
378        <input type="hidden" name="tabId" value="bioassays">
379        <select name="bioassay_id" onChange="this.form.submit()">
380          <option value="0">Select bioassay</option>
381        <% 
382        ItemQuery<BioAssay> baQuery = bas.getBioAssays();
383        baQuery.include(Include.REMOVED);
384        baQuery.include(Include.OTHERS);
385        baList = baQuery.list(dc);
386        for(BioAssay ba : baList) {%>
387          <option value="<%=ba.getId()%>" <%=(bioassayId == ba.getId()) ? "selected=selected": ""%>><%=HTML.encodeTags(ba.getName())%>[<%=ba.getNumSpots()%>]</option>
388        <%}%>
389        </select>
390      </form>
391    <% if(bioassayId != 0) {%>
392    <tbl:table 
393      id="expressionData" 
394      clazz="itemlist" 
395      columns="<%=cc.getSetting("columns")%>"
396      sortby="<%=cc.getSortProperty()%>" 
397      direction="<%=cc.getSortDirection()%>"
398      title="Expression data"
399      action="index.jsp"
400      sc="<%=sc%>"
401      item="<%=basType%>"
402      >
403      <tbl:hidden 
404        name="mode" 
405        value="<%=mode.getName()%>" 
406      />
407      <tbl:hidden 
408        name="bioassay_id" 
409        value="<%=""+bioassayId%>" 
410      />
411      <tbl:hidden 
412        name="experiment_id" 
413        value="<%=""+experimentId%>" 
414      />
415      <tbl:hidden 
416        name="item_id" 
417        value="<%=""+itemId%>" 
418      />
419      <tbl:hidden 
420        name="tabId" 
421        value="bioassays" 
422      />
423      <%
424      BioAssay ba = BioAssay.getById(dc,bioassayId);
425      int index = cc.getPage()*cc.getRowsPerPage()+1;
426      DynamicSpotQuery dynQuery = ba.getSpotData();
427     
428      /*
429        $ --> raw data, eg. $x, $y
430        @ --> reporter, eg. @externalId
431        # --> extra value, not implemented
432        % --> channel, eg. %1, %2
433      */     
434      List<TableColumn> cols = new LinkedList<TableColumn>();
435     
436      /* Column definitions */
437      cols.add( new TableColumn("position", "POSITION", "int", "Position") );
438      cols.add( new TableColumn("ch1", "%1", "float", "Ch 1") );
439      cols.add( new TableColumn("ch2", "%2", "float", "Ch 2") );
440      cols.add( new TableColumn("externalId", "@externalId", "string", "External Id") );
441      cols.add( new TableColumn("name", "@name", "string", "Name") );
442      cols.add( new TableColumn("symbol", "@symbol", "string", "Symbol") );
443      cols.add( new TableColumn("ch1FgMedian", "$ch1FgMedian", "float", "ch1FgMedian") );
444     
445      /* End column definitions */
446      List<String> selectionList = new LinkedList<String>(); // Used when configuring query
447     
448      for(TableColumn c : cols)
449      {
450        selectionList.add(c.getProperty());
451        %>
452        <tbl:columndef 
453          id="<%=c.getId()%>"
454          property="<%=c.getProperty()%>"
455          datatype="<%=c.getDatatype()%>"
456          title="<%=c.getTitle()%>"
457          sortable="<%=c.getSortable()%>" 
458          filterable="<%=c.getFilterable()%>"
459          exportable="<%=c.getExportable()%>"
460          show="<%=c.getShow()%>" 
461        />
462     
463      <%}
464      cc.configureQuery(dynQuery, selectionList);
465      DynamicResultIterator spots = dynQuery.iterate(dc);
466      %>
467     
468      <tbl:toolbar>
469        <tbl:button 
470          image="columns.gif" 
471          onclick="configureColumns()" 
472          title="Columns&hellip;" 
473          tooltip="Show, hide and re-order columns" 
474        />
475      </tbl:toolbar>
476      <tbl:navigator
477        page="<%=cc.getPage()%>" 
478        rowsperpage="<%=cc.getRowsPerPage()%>" 
479        totalrows="<%=spots.getTotalCount()%>" 
480        visible="<%=mode.hasNavigator()%>"
481      />
482      <tbl:data>
483        <tbl:columns>
484          <tbl:presetselector 
485            clazz="columnheader"
486            colspan="3"
487            onchange="presetOnChange()"
488          />
489        </tbl:columns>
490        <tr>         
491        <th colspan="3" class="index">&nbsp;</th>
492         
493          <tbl:propertyfilter />
494        </tr>
495        <tbl:rows>
496          <%         
497          int[] indexValues = new int[cols.size()];
498          int i = 0;
499          for(TableColumn c : cols)
500          {
501            indexValues[i] = spots.getIndex(c.getId());
502            i++;
503          }
504          while(spots.hasNext())
505          {           
506            SqlResult r = spots.next();
507            %>
508            <tbl:row>
509                <th colspan="3" class="index">&nbsp;</th>
510                <%
511                i = 0;
512                for(TableColumn c : cols)
513                {%>
514                <tbl:cell column="<%=c.getId()%>">
515                  <%=r.getString(indexValues[i]) == null ? "" : r.getString(indexValues[i])%>
516                </tbl:cell>
517              <%
518              i++;
519              }%>
520            </tbl:row>
521          <%
522          index++;
523          }
524          spots.close();
525          %>
526        </tbl:rows>
527      </tbl:data>
528      <tbl:navigator
529        page="<%=cc.getPage()%>" 
530        rowsperpage="<%=cc.getRowsPerPage()%>" 
531        totalrows="<%=spots.getTotalCount()%>" 
532        visible="<%=mode.hasNavigator()%>"
533        locked="true"
534      />
535    </tbl:table>
536    <%}%>
537    </t:tab>
538    <t:tab id="overviewplots" title="Overview plots"> 
539    <%if(tabId.equals("overviewplots")){%>
540    <%for(BioAssay ba : baList) {%>
541          <img src="<%=root%>/analyze/jfreeplot/<%=ID%>/<%=itemId%>/<%=ba.getId()%>"/>
542        <%}%>
543    <%}%>
544    </t:tab>
545    </t:tabcontrol>
546    <%}%>
547       
548    <br clear="all"/>
549   
550    <tbl:table 
551      id="bioassaysets" 
552      clazz="itemlist" 
553    >
554      <tbl:hidden 
555        name="experiment_id" 
556        value="<%=String.valueOf(experimentId)%>" 
557      />
558      <tbl:hidden 
559        name="item_id" 
560        value="<%=String.valueOf(itemId)%>" 
561      />
562
563      <tbl:toolbar>
564       
565        <%if(bas == null){%>
566        <tbl:button 
567          disabled="<%=writePermission ? false : true%>" 
568          image="<%=writePermission ? "new.gif" : "new_disabled.gif"%>" 
569          onclick="newRootBioAssaySet()" 
570          title="New root bioassayset&hellip;" 
571          tooltip="<%=writePermission ? "Start a new analysis chain from raw data" : "You do not have permission to analyze this experiment"%>" 
572        />
573        <%}%>
574          <tbl:button 
575          disabled="<%=writePermission ? false : true%>" 
576          image="<%=writePermission ? "delete.gif" : "delete_disabled.gif"%>" 
577          onclick="deleteItems()" 
578          title="Delete&hellip;" 
579          tooltip="<%=writePermission ? "Delete this bioassayset" : "You do not have permission to remove bioassaysets"%>" 
580        /> 
581            <tbl:button 
582          disabled="<%=writePermission ? false : true%>" 
583          image="<%=writePermission ? "restore.gif" : "restore_disabled.gif"%>" 
584          onclick="restoreItems()" 
585          title="Restore&hellip;" 
586          tooltip="<%=writePermission ? "Restore this bioassayset" : "You do not have permission to restore bioassaysets"%>" 
587        /> 
588                <%/*%>
589          <tbl:button 
590          disabled="<%=writePermission ? false : true%>" 
591          image="<%=writePermission ? "" : ""%>" 
592          onclick="runPlugin()" 
593          title="Run plugin&hellip;" 
594          tooltip="<%=writePermission ? "Run plugin on the selected bioassayset" : "You do not have permission to analyze this experiment"%>" 
595        /><%*/%> 
596         
597      </tbl:toolbar>
598
599      <tr>
600        <td class="data">         
601     
602          <%/* writeTransformations is a recursive method building up the output for BioAssaySets and transformations */
603          index = 1;
604          ItemResultIterator<BioAssaySet> iterator = null;
605          if(bas == null)
606          {
607            ItemQuery<BioAssaySet> basQuery = experiment.getBioAssaySets();
608            basQuery.restrict(
609              Restrictions.eq(
610                  Hql.property("transformation.source"), 
611                  null
612              )
613            );
614            basQuery.include(Include.REMOVED);
615            iterator = basQuery.iterate(dc);
616          }
617         
618          if( bas != null || iterator.hasNext())
619          {%>
620
621            <table id="treeLine" border="0" cellspacing="0" width="100%" cellpadding="0">
622            <tr>
623              <td class="columnheader" width="20">&nbsp;</td>
624              <th class="columnheader" width="20">&nbsp;</th>
625              <td class="columnheader" width="100%" style="text-align: center">BioAssaySet</td>
626              <td class="columnheader" width="100%" style="text-align: right">Transformation</td>
627              <td class="columnheader">Spots</td>
628              <td class="columnheader">Date</td>
629            </tr>
630         
631            <%
632            if(bas != null)
633            {%>
634              <%=writeChildTransformations( dc, bas, 0 )%>
635            <%}
636            else
637            {
638              while(iterator.hasNext())
639              {
640                BioAssaySet b = iterator.next();
641                %>
642                <%=writeChildTransformations( dc, b, 0 )%>
643              <%}%>
644            <%}%> 
645          <%} else {%>
646          <table border="0" cellspacing="0">
647            <tr>
648              <td class="cell">
649                No root bioassay sets where found
650              </td>
651            </tr>
652          </table>
653          <%}%>
654          </table>
655        </td>
656      </tr>
657    </tbl:table>
658    </base:body>
659  </base:page>
660  <%
661}
662finally
663{ 
664  if (dc != null) dc.close();
665}
666%>
Note: See TracBrowser for help on using the repository browser.