2102 |
22 Mar 06 |
nicklas |
1 |
<%-- $Id$ |
2102 |
22 Mar 06 |
nicklas |
2 |
------------------------------------------------------------------ |
5425 |
23 Sep 10 |
nicklas |
Copyright (C) 2006 Jari Häkkinen, Nicklas Nordborg, Martin Svensson |
2102 |
22 Mar 06 |
nicklas |
4 |
|
2304 |
22 May 06 |
jari |
5 |
This file is part of BASE - BioArray Software Environment. |
2304 |
22 May 06 |
jari |
6 |
Available at http://base.thep.lu.se/ |
2102 |
22 Mar 06 |
nicklas |
7 |
|
2102 |
22 Mar 06 |
nicklas |
8 |
BASE is free software; you can redistribute it and/or |
2102 |
22 Mar 06 |
nicklas |
9 |
modify it under the terms of the GNU General Public License |
4476 |
05 Sep 08 |
jari |
10 |
as published by the Free Software Foundation; either version 3 |
2102 |
22 Mar 06 |
nicklas |
11 |
of the License, or (at your option) any later version. |
2102 |
22 Mar 06 |
nicklas |
12 |
|
2102 |
22 Mar 06 |
nicklas |
13 |
BASE is distributed in the hope that it will be useful, |
2102 |
22 Mar 06 |
nicklas |
14 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
2102 |
22 Mar 06 |
nicklas |
15 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2102 |
22 Mar 06 |
nicklas |
16 |
GNU General Public License for more details. |
2102 |
22 Mar 06 |
nicklas |
17 |
|
2102 |
22 Mar 06 |
nicklas |
18 |
You should have received a copy of the GNU General Public License |
4511 |
11 Sep 08 |
jari |
19 |
along with BASE. If not, see <http://www.gnu.org/licenses/>. |
2102 |
22 Mar 06 |
nicklas |
20 |
------------------------------------------------------------------ |
2102 |
22 Mar 06 |
nicklas |
21 |
|
2102 |
22 Mar 06 |
nicklas |
22 |
|
2102 |
22 Mar 06 |
nicklas |
23 |
@author Nicklas |
2102 |
22 Mar 06 |
nicklas |
24 |
@version 2.0 |
2102 |
22 Mar 06 |
nicklas |
25 |
--%> |
5426 |
24 Sep 10 |
nicklas |
26 |
<%@ page pageEncoding="UTF-8" session="false" |
2102 |
22 Mar 06 |
nicklas |
27 |
import="net.sf.basedb.core.SessionControl" |
2102 |
22 Mar 06 |
nicklas |
28 |
import="net.sf.basedb.core.DbControl" |
2102 |
22 Mar 06 |
nicklas |
29 |
import="net.sf.basedb.core.Item" |
2102 |
22 Mar 06 |
nicklas |
30 |
import="net.sf.basedb.core.ItemContext" |
2102 |
22 Mar 06 |
nicklas |
31 |
import="net.sf.basedb.core.Permission" |
2102 |
22 Mar 06 |
nicklas |
32 |
import="net.sf.basedb.core.Experiment" |
2102 |
22 Mar 06 |
nicklas |
33 |
import="net.sf.basedb.core.BioAssaySet" |
2102 |
22 Mar 06 |
nicklas |
34 |
import="net.sf.basedb.core.BioAssay" |
2424 |
26 Jun 06 |
nicklas |
35 |
import="net.sf.basedb.core.RawBioAssay" |
6909 |
18 May 15 |
nicklas |
36 |
import="net.sf.basedb.core.RootRawBioAssay" |
6942 |
31 Aug 15 |
nicklas |
37 |
import="net.sf.basedb.core.Unit" |
4093 |
18 Jan 08 |
enell |
38 |
import="net.sf.basedb.core.Annotatable" |
4093 |
18 Jan 08 |
enell |
39 |
import="net.sf.basedb.core.AnnotationSet" |
4093 |
18 Jan 08 |
enell |
40 |
import="net.sf.basedb.core.AnnotationType" |
4093 |
18 Jan 08 |
enell |
41 |
import="net.sf.basedb.core.Annotation" |
2424 |
26 Jun 06 |
nicklas |
42 |
import="net.sf.basedb.core.ItemQuery" |
2424 |
26 Jun 06 |
nicklas |
43 |
import="net.sf.basedb.core.ItemResultList" |
2424 |
26 Jun 06 |
nicklas |
44 |
import="net.sf.basedb.core.Include" |
2102 |
22 Mar 06 |
nicklas |
45 |
import="net.sf.basedb.core.BaseException" |
2102 |
22 Mar 06 |
nicklas |
46 |
import="net.sf.basedb.core.PluginDefinition" |
2102 |
22 Mar 06 |
nicklas |
47 |
import="net.sf.basedb.core.plugin.GuiContext" |
2102 |
22 Mar 06 |
nicklas |
48 |
import="net.sf.basedb.core.plugin.Plugin" |
2424 |
26 Jun 06 |
nicklas |
49 |
import="net.sf.basedb.core.query.Orders" |
2424 |
26 Jun 06 |
nicklas |
50 |
import="net.sf.basedb.core.query.Hql" |
6942 |
31 Aug 15 |
nicklas |
51 |
import="net.sf.basedb.core.snapshot.SnapshotManager" |
6942 |
31 Aug 15 |
nicklas |
52 |
import="net.sf.basedb.core.snapshot.AnnotationSetSnapshot" |
6942 |
31 Aug 15 |
nicklas |
53 |
import="net.sf.basedb.core.snapshot.AnnotationSnapshot" |
6942 |
31 Aug 15 |
nicklas |
54 |
import="net.sf.basedb.core.snapshot.AnnotationTypeFilter" |
4093 |
18 Jan 08 |
enell |
55 |
import="net.sf.basedb.util.formatter.Formatter" |
4093 |
18 Jan 08 |
enell |
56 |
import="net.sf.basedb.clients.web.formatter.FormatterFactory" |
2102 |
22 Mar 06 |
nicklas |
57 |
import="net.sf.basedb.clients.web.Base" |
2386 |
15 Jun 06 |
martin |
58 |
import="net.sf.basedb.clients.web.PermissionUtil" |
2102 |
22 Mar 06 |
nicklas |
59 |
import="net.sf.basedb.clients.web.util.HTML" |
4871 |
01 Apr 09 |
nicklas |
60 |
import="net.sf.basedb.clients.web.extensions.ExtensionsControl" |
4871 |
01 Apr 09 |
nicklas |
61 |
import="net.sf.basedb.clients.web.extensions.JspContext" |
4871 |
01 Apr 09 |
nicklas |
62 |
import="net.sf.basedb.clients.web.extensions.renderer.PrefixSuffixRenderer" |
7604 |
25 Feb 19 |
nicklas |
63 |
import="net.sf.basedb.clients.web.extensions.toolbar.ButtonAction" |
4871 |
01 Apr 09 |
nicklas |
64 |
import="net.sf.basedb.clients.web.extensions.toolbar.ToolbarUtil" |
4871 |
01 Apr 09 |
nicklas |
65 |
import="net.sf.basedb.util.extensions.ExtensionsInvoker" |
2753 |
20 Oct 06 |
nicklas |
66 |
import="net.sf.basedb.util.Values" |
2102 |
22 Mar 06 |
nicklas |
67 |
import="java.util.Map" |
4093 |
18 Jan 08 |
enell |
68 |
import="java.util.List" |
4093 |
18 Jan 08 |
enell |
69 |
import="java.util.HashMap" |
4093 |
18 Jan 08 |
enell |
70 |
import="java.util.LinkedList" |
2102 |
22 Mar 06 |
nicklas |
71 |
%> |
2102 |
22 Mar 06 |
nicklas |
72 |
<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> |
2102 |
22 Mar 06 |
nicklas |
73 |
<%@ taglib prefix="t" uri="/WEB-INF/tab.tld" %> |
2102 |
22 Mar 06 |
nicklas |
74 |
<%@ taglib prefix="p" uri="/WEB-INF/path.tld" %> |
2102 |
22 Mar 06 |
nicklas |
75 |
<%@ taglib prefix="tbl" uri="/WEB-INF/table.tld" %> |
4871 |
01 Apr 09 |
nicklas |
76 |
<%@ taglib prefix="ext" uri="/WEB-INF/extensions.tld" %> |
2102 |
22 Mar 06 |
nicklas |
77 |
<%! |
2102 |
22 Mar 06 |
nicklas |
78 |
private static final Item itemType = Item.BIOASSAY; |
2102 |
22 Mar 06 |
nicklas |
79 |
private static final GuiContext guiContext = new GuiContext(itemType, GuiContext.Type.ITEM); |
2102 |
22 Mar 06 |
nicklas |
80 |
%> |
2102 |
22 Mar 06 |
nicklas |
81 |
<% |
2102 |
22 Mar 06 |
nicklas |
82 |
final Item itemType = Item.BIOASSAY; |
2102 |
22 Mar 06 |
nicklas |
83 |
final SessionControl sc = Base.getExistingSessionControl(pageContext, true); |
2102 |
22 Mar 06 |
nicklas |
84 |
final ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, null); |
2102 |
22 Mar 06 |
nicklas |
85 |
final int itemId = cc.getId(); |
2102 |
22 Mar 06 |
nicklas |
86 |
final String ID = sc.getId(); |
2102 |
22 Mar 06 |
nicklas |
87 |
final float scale = Base.getScale(sc); |
2892 |
10 Nov 06 |
nicklas |
88 |
final String tabId = Values.getString(request.getParameter("tab"), "properties"); |
7954 |
12 May 21 |
nicklas |
89 |
final DbControl dc = sc.newDbControl(":View "+itemType); |
2102 |
22 Mar 06 |
nicklas |
90 |
try |
2102 |
22 Mar 06 |
nicklas |
91 |
{ |
2102 |
22 Mar 06 |
nicklas |
92 |
BioAssay bioAssay = BioAssay.getById(dc, itemId); |
4338 |
17 Jun 08 |
nicklas |
93 |
final boolean hasDbSpots = bioAssay.getNumSpots() > 0; |
2102 |
22 Mar 06 |
nicklas |
94 |
BioAssaySet bioAssaySet = bioAssay.getBioAssaySet(); |
2102 |
22 Mar 06 |
nicklas |
95 |
Experiment experiment = bioAssay.getExperiment(); |
2102 |
22 Mar 06 |
nicklas |
96 |
String title = null; |
2102 |
22 Mar 06 |
nicklas |
97 |
final boolean writePermission = bioAssay.hasPermission(Permission.WRITE); |
2102 |
22 Mar 06 |
nicklas |
98 |
Map<Plugin.MainType, Integer> pluginCount = PluginDefinition.countPlugins(dc, guiContext); |
4872 |
02 Apr 09 |
nicklas |
99 |
JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, guiContext, bioAssay); |
7604 |
25 Feb 19 |
nicklas |
100 |
ExtensionsInvoker<ButtonAction> invoker = ToolbarUtil.useExtensions(jspContext); |
2102 |
22 Mar 06 |
nicklas |
101 |
%> |
6315 |
06 Sep 13 |
nicklas |
102 |
<base:page title="<%=title%>" id="view-page"> |
6315 |
06 Sep 13 |
nicklas |
103 |
<base:head scripts="table.js,tabcontrol-2.js,~bioassays.js" styles="table.css,toolbar.css,headertabcontrol.css,path.css"> |
4871 |
01 Apr 09 |
nicklas |
104 |
<ext:scripts context="<%=jspContext%>" /> |
4871 |
01 Apr 09 |
nicklas |
105 |
<ext:stylesheets context="<%=jspContext%>" /> |
2102 |
22 Mar 06 |
nicklas |
106 |
</base:head> |
2102 |
22 Mar 06 |
nicklas |
107 |
<base:body> |
5940 |
31 Jan 12 |
nicklas |
108 |
<p:path><p:pathelement |
5940 |
31 Jan 12 |
nicklas |
109 |
title="Experiments" href="<%="../index.jsp?ID="+ID%>" |
5940 |
31 Jan 12 |
nicklas |
110 |
/><p:pathelement title="<%=HTML.encodeTags(experiment.getName())%>" |
6143 |
20 Sep 12 |
nicklas |
111 |
href="<%="../bioassaysets/index.jsp?ID="+ID+"&experiment_id="+experiment.getId()%>" |
5940 |
31 Jan 12 |
nicklas |
112 |
/><p:pathelement title="<%=HTML.encodeTags(bioAssaySet.getName())%>" |
6143 |
20 Sep 12 |
nicklas |
113 |
href="<%="index.jsp?ID="+ID+"&bioassayset_id="+bioAssaySet.getId()%>" |
5940 |
31 Jan 12 |
nicklas |
114 |
/><p:pathelement title="<%=HTML.encodeTags(bioAssay.getName())%>" |
5940 |
31 Jan 12 |
nicklas |
115 |
/></p:path> |
6315 |
06 Sep 13 |
nicklas |
116 |
<div id="page-data" data-item-id="<%=itemId%>"></div> |
2102 |
22 Mar 06 |
nicklas |
117 |
|
5940 |
31 Jan 12 |
nicklas |
118 |
<t:tabcontrol |
5940 |
31 Jan 12 |
nicklas |
119 |
id="main" |
5940 |
31 Jan 12 |
nicklas |
120 |
subclass="content mastertabcontrol" |
6315 |
06 Sep 13 |
nicklas |
121 |
active="<%=tabId%>"> |
2102 |
22 Mar 06 |
nicklas |
122 |
<t:tab id="properties" title="Properties"> |
5940 |
31 Jan 12 |
nicklas |
123 |
<div> |
5940 |
31 Jan 12 |
nicklas |
124 |
<table class="fullform bottomborder"> |
2102 |
22 Mar 06 |
nicklas |
125 |
<tr> |
5940 |
31 Jan 12 |
nicklas |
126 |
<th class="itemstatus"> |
5940 |
31 Jan 12 |
nicklas |
127 |
</th> |
5940 |
31 Jan 12 |
nicklas |
128 |
<td style="padding: 0px;"> |
6605 |
18 Nov 14 |
nicklas |
129 |
<tbl:toolbar subclass="bottomborder bg-filled-50"> |
5940 |
31 Jan 12 |
nicklas |
130 |
<tbl:button |
6315 |
06 Sep 13 |
nicklas |
131 |
id="btnEdit" |
5942 |
01 Feb 12 |
nicklas |
132 |
disabled="<%=!writePermission%>" |
5945 |
02 Feb 12 |
nicklas |
133 |
image="edit.png" |
5940 |
31 Jan 12 |
nicklas |
134 |
title="Edit…" |
5940 |
31 Jan 12 |
nicklas |
135 |
tooltip="<%=writePermission ? "Edit this bioassay" : "You do not have permission to edit this bioassay"%>" |
5940 |
31 Jan 12 |
nicklas |
136 |
/> |
5940 |
31 Jan 12 |
nicklas |
137 |
<tbl:button |
6315 |
06 Sep 13 |
nicklas |
138 |
id="btnImport" |
5946 |
03 Feb 12 |
nicklas |
139 |
image="import.png" |
6315 |
06 Sep 13 |
nicklas |
140 |
data-plugin-type="IMPORT" |
5940 |
31 Jan 12 |
nicklas |
141 |
title="Import…" |
5940 |
31 Jan 12 |
nicklas |
142 |
tooltip="Import data" |
5940 |
31 Jan 12 |
nicklas |
143 |
visible="<%=pluginCount.containsKey(Plugin.MainType.IMPORT)%>" |
5940 |
31 Jan 12 |
nicklas |
144 |
/> |
5940 |
31 Jan 12 |
nicklas |
145 |
<tbl:button |
6315 |
06 Sep 13 |
nicklas |
146 |
id="btnExport" |
6315 |
06 Sep 13 |
nicklas |
147 |
image="export.png" |
6315 |
06 Sep 13 |
nicklas |
148 |
data-plugin-type="EXPORT" |
5940 |
31 Jan 12 |
nicklas |
149 |
title="Export…" |
5940 |
31 Jan 12 |
nicklas |
150 |
tooltip="Export data" |
5940 |
31 Jan 12 |
nicklas |
151 |
visible="<%=pluginCount.containsKey(Plugin.MainType.EXPORT)%>" |
5940 |
31 Jan 12 |
nicklas |
152 |
/> |
5940 |
31 Jan 12 |
nicklas |
153 |
<tbl:button |
6315 |
06 Sep 13 |
nicklas |
154 |
id="btnRunPlugin" |
6315 |
06 Sep 13 |
nicklas |
155 |
image="runplugin.png" |
6315 |
06 Sep 13 |
nicklas |
156 |
data-plugin-type="OTHER" |
5940 |
31 Jan 12 |
nicklas |
157 |
title="Run plugin…" |
5940 |
31 Jan 12 |
nicklas |
158 |
tooltip="Run a plugin" |
5940 |
31 Jan 12 |
nicklas |
159 |
visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>" |
5940 |
31 Jan 12 |
nicklas |
160 |
/> |
5940 |
31 Jan 12 |
nicklas |
161 |
<tbl:button |
6315 |
06 Sep 13 |
nicklas |
162 |
id="btnPlotter" |
5946 |
03 Feb 12 |
nicklas |
163 |
image="plotter.png" |
5940 |
31 Jan 12 |
nicklas |
164 |
title="Plot tool…" |
5940 |
31 Jan 12 |
nicklas |
165 |
tooltip="A simple tool for generating plots" |
5940 |
31 Jan 12 |
nicklas |
166 |
visible="<%=hasDbSpots%>" |
5940 |
31 Jan 12 |
nicklas |
167 |
/> |
5940 |
31 Jan 12 |
nicklas |
168 |
<ext:render extensions="<%=invoker%>" context="<%=jspContext%>" |
7604 |
25 Feb 19 |
nicklas |
169 |
wrapper="<%=new PrefixSuffixRenderer<ButtonAction>(jspContext, "<td>", "</td>") %>"/> |
5940 |
31 Jan 12 |
nicklas |
170 |
<tbl:button |
5940 |
31 Jan 12 |
nicklas |
171 |
image="help.png" |
6315 |
06 Sep 13 |
nicklas |
172 |
subclass="auto-init" |
6315 |
06 Sep 13 |
nicklas |
173 |
data-auto-init="help" |
6315 |
06 Sep 13 |
nicklas |
174 |
data-help-id="bioassay.view.properties" |
5940 |
31 Jan 12 |
nicklas |
175 |
title="Help…" |
5940 |
31 Jan 12 |
nicklas |
176 |
tooltip="Get help about this page" |
5940 |
31 Jan 12 |
nicklas |
177 |
/> |
5940 |
31 Jan 12 |
nicklas |
178 |
</tbl:toolbar> |
5940 |
31 Jan 12 |
nicklas |
179 |
</td> |
5940 |
31 Jan 12 |
nicklas |
180 |
</tr> |
5940 |
31 Jan 12 |
nicklas |
181 |
<tr> |
5940 |
31 Jan 12 |
nicklas |
182 |
<th>Name</th> |
2102 |
22 Mar 06 |
nicklas |
183 |
<td><%=HTML.encodeTags(bioAssay.getName())%></td> |
2102 |
22 Mar 06 |
nicklas |
184 |
</tr> |
2102 |
22 Mar 06 |
nicklas |
185 |
<tr> |
5940 |
31 Jan 12 |
nicklas |
186 |
<th>Spots</th> |
4338 |
17 Jun 08 |
nicklas |
187 |
<td>db: <%=bioAssay.getNumSpots()%>; file: <%=bioAssay.getNumFileSpots()%></td> |
2102 |
22 Mar 06 |
nicklas |
188 |
</tr> |
5905 |
12 Dec 11 |
nicklas |
189 |
<tr > |
5940 |
31 Jan 12 |
nicklas |
190 |
<th>Description</th> |
2102 |
22 Mar 06 |
nicklas |
191 |
<td><%=HTML.encodeTags(bioAssay.getDescription())%></td> |
2102 |
22 Mar 06 |
nicklas |
192 |
</tr> |
2102 |
22 Mar 06 |
nicklas |
193 |
</table> |
5940 |
31 Jan 12 |
nicklas |
194 |
</div> |
4338 |
17 Jun 08 |
nicklas |
195 |
|
4338 |
17 Jun 08 |
nicklas |
196 |
<jsp:include page="../../../common/datafiles/list_files.jsp"> |
4338 |
17 Jun 08 |
nicklas |
197 |
<jsp:param name="item_type" value="BIOASSAYSET" /> |
4338 |
17 Jun 08 |
nicklas |
198 |
<jsp:param name="item_id" value="<%=bioAssaySet.getId()%>" /> |
4338 |
17 Jun 08 |
nicklas |
199 |
<jsp:param name="ID" value="<%=ID%>" /> |
4338 |
17 Jun 08 |
nicklas |
200 |
</jsp:include> |
2424 |
26 Jun 06 |
nicklas |
201 |
|
2424 |
26 Jun 06 |
nicklas |
202 |
<% |
6909 |
18 May 15 |
nicklas |
203 |
ItemQuery<RootRawBioAssay> rawQuery = bioAssay.getRootRawBioAssays(); |
2424 |
26 Jun 06 |
nicklas |
204 |
rawQuery.include(Include.MINE, Include.SHARED, Include.OTHERS, Include.IN_PROJECT); |
6909 |
18 May 15 |
nicklas |
205 |
rawQuery.order(Orders.asc(Hql.property("rawBioAssay.name"))); |
6909 |
18 May 15 |
nicklas |
206 |
ItemResultList<RootRawBioAssay> rawBioAssays = rawQuery.list(dc); |
5940 |
31 Jan 12 |
nicklas |
207 |
%> |
5940 |
31 Jan 12 |
nicklas |
208 |
<base:section |
5940 |
31 Jan 12 |
nicklas |
209 |
id="rawBioAssaySection" |
6942 |
31 Aug 15 |
nicklas |
210 |
title="<%="Root raw bioassays (" + rawBioAssays.size() + ")"%>" |
5940 |
31 Jan 12 |
nicklas |
211 |
context="<%=cc%>" |
5940 |
31 Jan 12 |
nicklas |
212 |
> |
2424 |
26 Jun 06 |
nicklas |
213 |
<% |
5940 |
31 Jan 12 |
nicklas |
214 |
if (rawBioAssays.size() == 0) |
5940 |
31 Jan 12 |
nicklas |
215 |
{ |
5940 |
31 Jan 12 |
nicklas |
216 |
%> |
5940 |
31 Jan 12 |
nicklas |
217 |
<div class="messagecontainer note"> |
5940 |
31 Jan 12 |
nicklas |
218 |
No raw bioassays are linked to this bioassay |
5940 |
31 Jan 12 |
nicklas |
219 |
(or, you don't have permission to view them). |
5940 |
31 Jan 12 |
nicklas |
220 |
</div> |
5940 |
31 Jan 12 |
nicklas |
221 |
<% |
5940 |
31 Jan 12 |
nicklas |
222 |
} |
5940 |
31 Jan 12 |
nicklas |
223 |
else |
5940 |
31 Jan 12 |
nicklas |
224 |
{ |
5940 |
31 Jan 12 |
nicklas |
225 |
%> |
5045 |
12 Aug 09 |
martin |
226 |
<tbl:table |
5045 |
12 Aug 09 |
martin |
227 |
id="rawBioAssays" |
5045 |
12 Aug 09 |
martin |
228 |
columns="all" |
5045 |
12 Aug 09 |
martin |
229 |
> |
5940 |
31 Jan 12 |
nicklas |
230 |
<tbl:columndef |
5940 |
31 Jan 12 |
nicklas |
231 |
id="name" |
5940 |
31 Jan 12 |
nicklas |
232 |
title="Name" |
5940 |
31 Jan 12 |
nicklas |
233 |
/> |
5045 |
12 Aug 09 |
martin |
234 |
<tbl:columndef |
5940 |
31 Jan 12 |
nicklas |
235 |
id="spots" |
5940 |
31 Jan 12 |
nicklas |
236 |
title="Spots" |
5045 |
12 Aug 09 |
martin |
237 |
/> |
5940 |
31 Jan 12 |
nicklas |
238 |
<tbl:columndef |
5940 |
31 Jan 12 |
nicklas |
239 |
id="description" |
5940 |
31 Jan 12 |
nicklas |
240 |
title="Description" |
5940 |
31 Jan 12 |
nicklas |
241 |
/> |
5045 |
12 Aug 09 |
martin |
242 |
<% |
5940 |
31 Jan 12 |
nicklas |
243 |
ItemQuery<AnnotationType> efQuery = experiment.getExperimentalFactors(); |
5940 |
31 Jan 12 |
nicklas |
244 |
efQuery.include(Include.ALL); |
5940 |
31 Jan 12 |
nicklas |
245 |
efQuery.order(Orders.asc(Hql.property("name"))); |
5940 |
31 Jan 12 |
nicklas |
246 |
ItemResultList<AnnotationType> experimentalFactors = efQuery.list(dc); |
5940 |
31 Jan 12 |
nicklas |
247 |
for (AnnotationType at : experimentalFactors) |
5045 |
12 Aug 09 |
martin |
248 |
{ |
7604 |
25 Feb 19 |
nicklas |
249 |
Formatter<?> formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType()); |
5045 |
12 Aug 09 |
martin |
250 |
%> |
5940 |
31 Jan 12 |
nicklas |
251 |
<tbl:columndef |
5940 |
31 Jan 12 |
nicklas |
252 |
id="<%="at"+at.getId()%>" |
5940 |
31 Jan 12 |
nicklas |
253 |
title="<%=HTML.encodeTags(at.getName())%>" |
5940 |
31 Jan 12 |
nicklas |
254 |
formatter="<%=formatter%>" |
5940 |
31 Jan 12 |
nicklas |
255 |
/> |
5940 |
31 Jan 12 |
nicklas |
256 |
<% |
5940 |
31 Jan 12 |
nicklas |
257 |
} |
5940 |
31 Jan 12 |
nicklas |
258 |
%> |
5940 |
31 Jan 12 |
nicklas |
259 |
<tbl:data> |
5940 |
31 Jan 12 |
nicklas |
260 |
<tbl:headers> |
5940 |
31 Jan 12 |
nicklas |
261 |
<tbl:headerrow> |
5940 |
31 Jan 12 |
nicklas |
262 |
<tbl:columnheaders /> |
5940 |
31 Jan 12 |
nicklas |
263 |
</tbl:headerrow> |
5940 |
31 Jan 12 |
nicklas |
264 |
</tbl:headers> |
5940 |
31 Jan 12 |
nicklas |
265 |
<tbl:rows> |
5940 |
31 Jan 12 |
nicklas |
266 |
<% |
6942 |
31 Aug 15 |
nicklas |
267 |
SnapshotManager manager = new SnapshotManager(); |
6942 |
31 Aug 15 |
nicklas |
268 |
AnnotationTypeFilter annotationTypeFilter = new AnnotationTypeFilter(); |
6909 |
18 May 15 |
nicklas |
269 |
for (RootRawBioAssay item : rawBioAssays) |
5940 |
31 Jan 12 |
nicklas |
270 |
{ |
6909 |
18 May 15 |
nicklas |
271 |
RawBioAssay rba = item.getRawBioAssay(); |
6942 |
31 Aug 15 |
nicklas |
272 |
AnnotationSet as = item.isAnnotated() ? item.getAnnotationSet() : null; |
6942 |
31 Aug 15 |
nicklas |
273 |
AnnotationSetSnapshot snapshot = as == null ? null : manager.getSnapshot(dc, as.getId()); |
5940 |
31 Jan 12 |
nicklas |
274 |
%> |
5940 |
31 Jan 12 |
nicklas |
275 |
<tbl:row> |
6942 |
31 Aug 15 |
nicklas |
276 |
<tbl:cell column="name"><%=Base.getLinkedName(ID, item, false, true)%></tbl:cell> |
6909 |
18 May 15 |
nicklas |
277 |
<tbl:cell column="spots"><%=rba.getSpots()%></tbl:cell> |
6942 |
31 Aug 15 |
nicklas |
278 |
<tbl:cell column="description"><%=HTML.encodeTags(item.getDescription())%></tbl:cell> |
5940 |
31 Jan 12 |
nicklas |
279 |
<% |
5940 |
31 Jan 12 |
nicklas |
280 |
for (AnnotationType at : experimentalFactors) |
4093 |
18 Jan 08 |
enell |
281 |
{ |
6942 |
31 Aug 15 |
nicklas |
282 |
Unit unit = at.getDefaultUnit(); |
6942 |
31 Aug 15 |
nicklas |
283 |
String unitSymbol = unit == null ? "" : " " + unit.getDisplaySymbol(); |
6942 |
31 Aug 15 |
nicklas |
284 |
|
6942 |
31 Aug 15 |
nicklas |
285 |
annotationTypeFilter.setAnnotationType(at); |
6942 |
31 Aug 15 |
nicklas |
286 |
List<AnnotationSnapshot> all = snapshot == null ? |
6942 |
31 Aug 15 |
nicklas |
287 |
null : manager.findAnnotations(dc, snapshot, annotationTypeFilter, true); |
5940 |
31 Jan 12 |
nicklas |
288 |
%> |
6942 |
31 Aug 15 |
nicklas |
289 |
<tbl:cell column="<%="at"+at.getId()%>"> |
4093 |
18 Jan 08 |
enell |
290 |
<% |
6942 |
31 Aug 15 |
nicklas |
291 |
if (all != null && all.size() > 0) |
5045 |
12 Aug 09 |
martin |
292 |
{ |
6942 |
31 Aug 15 |
nicklas |
293 |
for (AnnotationSnapshot a : all) |
5940 |
31 Jan 12 |
nicklas |
294 |
{ |
7210 |
19 Oct 16 |
nicklas |
295 |
boolean annotatePermission = a.hasPermission(dc, Permission.WRITE); |
7604 |
25 Feb 19 |
nicklas |
296 |
List<?> values = a.getActualValues(); |
6962 |
01 Oct 15 |
nicklas |
297 |
boolean isUpToDate = a.isUpToDate(); |
6942 |
31 Aug 15 |
nicklas |
298 |
%> |
6942 |
31 Aug 15 |
nicklas |
299 |
<tbl:cellvalue list="<%=values%>" suffix="<%=unitSymbol%>"/> |
6942 |
31 Aug 15 |
nicklas |
300 |
<base:icon |
6942 |
31 Aug 15 |
nicklas |
301 |
subclass="link auto-init" |
6942 |
31 Aug 15 |
nicklas |
302 |
data-auto-init="edit-experimental-factor" |
6942 |
31 Aug 15 |
nicklas |
303 |
data-item-type="<%=a.getThisItemType().name()%>" |
6942 |
31 Aug 15 |
nicklas |
304 |
data-item-id="<%=a.getThisItemId() %>" |
6942 |
31 Aug 15 |
nicklas |
305 |
data-annotation-type="<%=at.getId() %>" |
6942 |
31 Aug 15 |
nicklas |
306 |
data-annotation="<%=a.getThisAnnotationId()%>" |
7210 |
19 Oct 16 |
nicklas |
307 |
visible="<%=annotatePermission%>" |
6962 |
01 Oct 15 |
nicklas |
308 |
image="<%=isUpToDate ? "edit.png" : "edit-outofsync.png"%>" |
6942 |
31 Aug 15 |
nicklas |
309 |
tooltip="Modify the values of this experimental factor" |
6942 |
31 Aug 15 |
nicklas |
310 |
/> |
5940 |
31 Jan 12 |
nicklas |
311 |
<% |
5940 |
31 Jan 12 |
nicklas |
312 |
} |
5045 |
12 Aug 09 |
martin |
313 |
} |
5940 |
31 Jan 12 |
nicklas |
314 |
%> |
5940 |
31 Jan 12 |
nicklas |
315 |
</tbl:cell> |
5940 |
31 Jan 12 |
nicklas |
316 |
<% |
5940 |
31 Jan 12 |
nicklas |
317 |
} |
5940 |
31 Jan 12 |
nicklas |
318 |
%> |
5940 |
31 Jan 12 |
nicklas |
319 |
</tbl:row> |
5940 |
31 Jan 12 |
nicklas |
320 |
<% |
5940 |
31 Jan 12 |
nicklas |
321 |
} |
5940 |
31 Jan 12 |
nicklas |
322 |
%> |
5940 |
31 Jan 12 |
nicklas |
323 |
</tbl:rows> |
5940 |
31 Jan 12 |
nicklas |
324 |
</tbl:data> |
5045 |
12 Aug 09 |
martin |
325 |
</tbl:table> |
5940 |
31 Jan 12 |
nicklas |
326 |
<% |
5940 |
31 Jan 12 |
nicklas |
327 |
} |
5940 |
31 Jan 12 |
nicklas |
328 |
%> |
5940 |
31 Jan 12 |
nicklas |
329 |
</base:section> |
5504 |
18 Nov 10 |
nicklas |
330 |
<jsp:include page="../../../common/anytoany/list_anytoany.jsp"> |
5504 |
18 Nov 10 |
nicklas |
331 |
<jsp:param name="ID" value="<%=ID%>" /> |
5504 |
18 Nov 10 |
nicklas |
332 |
<jsp:param name="item_type" value="<%=itemType.name()%>" /> |
5504 |
18 Nov 10 |
nicklas |
333 |
<jsp:param name="item_id" value="<%=itemId%>" /> |
5504 |
18 Nov 10 |
nicklas |
334 |
<jsp:param name="title" value="Other items related to this bioassay" /> |
5504 |
18 Nov 10 |
nicklas |
335 |
</jsp:include> |
2102 |
22 Mar 06 |
nicklas |
336 |
</t:tab> |
2102 |
22 Mar 06 |
nicklas |
337 |
|
2892 |
10 Nov 06 |
nicklas |
338 |
<t:tab id="annotations" title="Annotations" |
6315 |
06 Sep 13 |
nicklas |
339 |
tooltip="View annotation values" clazz="white"> |
6255 |
22 Mar 13 |
nicklas |
340 |
<jsp:include page="../../../common/annotations/list_frameset.jsp"> |
2892 |
10 Nov 06 |
nicklas |
341 |
<jsp:param name="item_type" value="<%=itemType.name()%>" /> |
2892 |
10 Nov 06 |
nicklas |
342 |
<jsp:param name="item_id" value="<%=itemId%>" /> |
2892 |
10 Nov 06 |
nicklas |
343 |
<jsp:param name="ID" value="<%=ID%>" /> |
2892 |
10 Nov 06 |
nicklas |
344 |
</jsp:include> |
2892 |
10 Nov 06 |
nicklas |
345 |
</t:tab> |
2892 |
10 Nov 06 |
nicklas |
346 |
|
6315 |
06 Sep 13 |
nicklas |
347 |
<t:tab id="spotdata" title="Spot data" visible="<%=hasDbSpots%>"> |
6612 |
21 Nov 14 |
nicklas |
348 |
<div class="bg-filled-50 absolutefull"> |
6315 |
06 Sep 13 |
nicklas |
349 |
<table style="margin: auto; height: 100%;"><tr><td> |
6315 |
06 Sep 13 |
nicklas |
350 |
<b>Please wait. The spot data is loading...</b> |
6315 |
06 Sep 13 |
nicklas |
351 |
</td></tr></table> |
6315 |
06 Sep 13 |
nicklas |
352 |
</div> |
6315 |
06 Sep 13 |
nicklas |
353 |
</t:tab> |
2102 |
22 Mar 06 |
nicklas |
354 |
</t:tabcontrol> |
2102 |
22 Mar 06 |
nicklas |
355 |
|
2102 |
22 Mar 06 |
nicklas |
356 |
</base:body> |
2102 |
22 Mar 06 |
nicklas |
357 |
</base:page> |
2102 |
22 Mar 06 |
nicklas |
358 |
<% |
2102 |
22 Mar 06 |
nicklas |
359 |
} |
2102 |
22 Mar 06 |
nicklas |
360 |
finally |
2102 |
22 Mar 06 |
nicklas |
361 |
{ |
2102 |
22 Mar 06 |
nicklas |
362 |
if (dc != null) dc.close(); |
2102 |
22 Mar 06 |
nicklas |
363 |
} |
2102 |
22 Mar 06 |
nicklas |
364 |
%> |