2305 |
22 May 06 |
jari |
1 |
<%-- $Id$ |
2305 |
22 May 06 |
jari |
2 |
------------------------------------------------------------------ |
5425 |
23 Sep 10 |
nicklas |
Copyright (C) 2006 Jari Häkkinen, Nicklas Nordborg, Martin Svensson, Gregory Vincic |
3675 |
16 Aug 07 |
jari |
Copyright (C) 2007 Nicklas Nordborg, Martin Svensson |
2305 |
22 May 06 |
jari |
5 |
|
2304 |
22 May 06 |
jari |
6 |
This file is part of BASE - BioArray Software Environment. |
2304 |
22 May 06 |
jari |
7 |
Available at http://base.thep.lu.se/ |
2305 |
22 May 06 |
jari |
8 |
|
2305 |
22 May 06 |
jari |
9 |
BASE is free software; you can redistribute it and/or |
2305 |
22 May 06 |
jari |
10 |
modify it under the terms of the GNU General Public License |
4476 |
05 Sep 08 |
jari |
11 |
as published by the Free Software Foundation; either version 3 |
2305 |
22 May 06 |
jari |
12 |
of the License, or (at your option) any later version. |
2305 |
22 May 06 |
jari |
13 |
|
2305 |
22 May 06 |
jari |
14 |
BASE is distributed in the hope that it will be useful, |
2305 |
22 May 06 |
jari |
15 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
2305 |
22 May 06 |
jari |
16 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2305 |
22 May 06 |
jari |
17 |
GNU General Public License for more details. |
2305 |
22 May 06 |
jari |
18 |
|
2305 |
22 May 06 |
jari |
19 |
You should have received a copy of the GNU General Public License |
4511 |
11 Sep 08 |
jari |
20 |
along with BASE. If not, see <http://www.gnu.org/licenses/>. |
2305 |
22 May 06 |
jari |
21 |
------------------------------------------------------------------ |
2305 |
22 May 06 |
jari |
22 |
|
2305 |
22 May 06 |
jari |
23 |
@author Nicklas |
2305 |
22 May 06 |
jari |
24 |
@version 2.0 |
2305 |
22 May 06 |
jari |
25 |
--%> |
5426 |
24 Sep 10 |
nicklas |
26 |
<%@ page pageEncoding="UTF-8" session="false" |
2305 |
22 May 06 |
jari |
27 |
import="net.sf.basedb.core.SessionControl" |
2305 |
22 May 06 |
jari |
28 |
import="net.sf.basedb.core.DbControl" |
2305 |
22 May 06 |
jari |
29 |
import="net.sf.basedb.core.Item" |
2305 |
22 May 06 |
jari |
30 |
import="net.sf.basedb.core.ItemContext" |
2305 |
22 May 06 |
jari |
31 |
import="net.sf.basedb.core.Permission" |
2305 |
22 May 06 |
jari |
32 |
import="net.sf.basedb.core.Experiment" |
5878 |
17 Nov 11 |
nicklas |
33 |
import="net.sf.basedb.core.VirtualDb" |
2305 |
22 May 06 |
jari |
34 |
import="net.sf.basedb.core.RawBioAssay" |
6909 |
18 May 15 |
nicklas |
35 |
import="net.sf.basedb.core.RootRawBioAssay" |
2164 |
18 Apr 06 |
nicklas |
36 |
import="net.sf.basedb.core.AnnotationType" |
2164 |
18 Apr 06 |
nicklas |
37 |
import="net.sf.basedb.core.AnnotationSet" |
2164 |
18 Apr 06 |
nicklas |
38 |
import="net.sf.basedb.core.Annotation" |
3498 |
15 Jun 07 |
nicklas |
39 |
import="net.sf.basedb.core.Annotatable" |
4548 |
26 Sep 08 |
nicklas |
40 |
import="net.sf.basedb.core.Unit" |
3498 |
15 Jun 07 |
nicklas |
41 |
import="net.sf.basedb.core.Type" |
2305 |
22 May 06 |
jari |
42 |
import="net.sf.basedb.core.User" |
3547 |
03 Jul 07 |
martin |
43 |
import="net.sf.basedb.core.Group" |
6143 |
20 Sep 12 |
nicklas |
44 |
import="net.sf.basedb.core.VirtualTable" |
2305 |
22 May 06 |
jari |
45 |
import="net.sf.basedb.core.ItemQuery" |
2305 |
22 May 06 |
jari |
46 |
import="net.sf.basedb.core.ItemResultList" |
3547 |
03 Jul 07 |
martin |
47 |
import="net.sf.basedb.core.ItemResultIterator" |
2305 |
22 May 06 |
jari |
48 |
import="net.sf.basedb.core.Include" |
3547 |
03 Jul 07 |
martin |
49 |
import="net.sf.basedb.core.MultiPermissions" |
2305 |
22 May 06 |
jari |
50 |
import="net.sf.basedb.core.PermissionDeniedException" |
2305 |
22 May 06 |
jari |
51 |
import="net.sf.basedb.core.PluginDefinition" |
2305 |
22 May 06 |
jari |
52 |
import="net.sf.basedb.core.plugin.GuiContext" |
2305 |
22 May 06 |
jari |
53 |
import="net.sf.basedb.core.plugin.Plugin" |
3547 |
03 Jul 07 |
martin |
54 |
import="net.sf.basedb.core.Project" |
2305 |
22 May 06 |
jari |
55 |
import="net.sf.basedb.core.query.Orders" |
2305 |
22 May 06 |
jari |
56 |
import="net.sf.basedb.core.query.Hql" |
2305 |
22 May 06 |
jari |
57 |
import="net.sf.basedb.clients.web.Base" |
2386 |
15 Jun 06 |
martin |
58 |
import="net.sf.basedb.clients.web.PermissionUtil" |
5069 |
20 Aug 09 |
nicklas |
59 |
import="net.sf.basedb.clients.web.ChangeHistoryUtil" |
2305 |
22 May 06 |
jari |
60 |
import="net.sf.basedb.clients.web.util.HTML" |
2753 |
20 Oct 06 |
nicklas |
61 |
import="net.sf.basedb.util.Values" |
5120 |
08 Oct 09 |
nicklas |
62 |
import="net.sf.basedb.core.snapshot.SnapshotManager" |
5120 |
08 Oct 09 |
nicklas |
63 |
import="net.sf.basedb.core.snapshot.AnnotationSetSnapshot" |
5120 |
08 Oct 09 |
nicklas |
64 |
import="net.sf.basedb.core.snapshot.AnnotationSnapshot" |
5131 |
14 Oct 09 |
nicklas |
65 |
import="net.sf.basedb.core.snapshot.AnnotationTypeFilter" |
2942 |
22 Nov 06 |
nicklas |
66 |
import="net.sf.basedb.util.formatter.Formatter" |
2942 |
22 Nov 06 |
nicklas |
67 |
import="net.sf.basedb.clients.web.formatter.FormatterFactory" |
4871 |
01 Apr 09 |
nicklas |
68 |
import="net.sf.basedb.clients.web.extensions.ExtensionsControl" |
4871 |
01 Apr 09 |
nicklas |
69 |
import="net.sf.basedb.clients.web.extensions.JspContext" |
4871 |
01 Apr 09 |
nicklas |
70 |
import="net.sf.basedb.clients.web.extensions.renderer.PrefixSuffixRenderer" |
7604 |
25 Feb 19 |
nicklas |
71 |
import="net.sf.basedb.clients.web.extensions.toolbar.ButtonAction" |
4871 |
01 Apr 09 |
nicklas |
72 |
import="net.sf.basedb.clients.web.extensions.toolbar.ToolbarUtil" |
4871 |
01 Apr 09 |
nicklas |
73 |
import="net.sf.basedb.util.extensions.ExtensionsInvoker" |
3547 |
03 Jul 07 |
martin |
74 |
import="java.util.Collections" |
2305 |
22 May 06 |
jari |
75 |
import="java.util.Date" |
2305 |
22 May 06 |
jari |
76 |
import="java.util.Map" |
3498 |
15 Jun 07 |
nicklas |
77 |
import="java.util.HashMap" |
2305 |
22 May 06 |
jari |
78 |
import="java.util.Set" |
3498 |
15 Jun 07 |
nicklas |
79 |
import="java.util.HashSet" |
3498 |
15 Jun 07 |
nicklas |
80 |
import="java.util.List" |
3875 |
24 Oct 07 |
nicklas |
81 |
import="java.util.LinkedList" |
2942 |
22 Nov 06 |
nicklas |
82 |
import="java.util.Date" |
6909 |
18 May 15 |
nicklas |
83 |
import="org.json.simple.JSONObject" |
6909 |
18 May 15 |
nicklas |
84 |
import="org.json.simple.JSONArray" |
2305 |
22 May 06 |
jari |
85 |
%> |
2305 |
22 May 06 |
jari |
86 |
<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> |
2305 |
22 May 06 |
jari |
87 |
<%@ taglib prefix="tbl" uri="/WEB-INF/table.tld" %> |
2305 |
22 May 06 |
jari |
88 |
<%@ taglib prefix="t" uri="/WEB-INF/tab.tld" %> |
2305 |
22 May 06 |
jari |
89 |
<%@ taglib prefix="p" uri="/WEB-INF/path.tld" %> |
4871 |
01 Apr 09 |
nicklas |
90 |
<%@ taglib prefix="ext" uri="/WEB-INF/extensions.tld" %> |
2305 |
22 May 06 |
jari |
91 |
<%! |
2305 |
22 May 06 |
jari |
92 |
private static final Item itemType = Item.EXPERIMENT; |
2305 |
22 May 06 |
jari |
93 |
private static final GuiContext guiContext = new GuiContext(itemType, GuiContext.Type.ITEM); |
2305 |
22 May 06 |
jari |
94 |
%> |
2305 |
22 May 06 |
jari |
95 |
<% |
2305 |
22 May 06 |
jari |
96 |
final SessionControl sc = Base.getExistingSessionControl(pageContext, true); |
2305 |
22 May 06 |
jari |
97 |
final String ID = sc.getId(); |
2305 |
22 May 06 |
jari |
98 |
final ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, null); |
2305 |
22 May 06 |
jari |
99 |
final int itemId = cc.getId(); |
4746 |
10 Feb 09 |
nicklas |
100 |
final String tab = Values.getString(request.getParameter("tab"), "properties"); |
2305 |
22 May 06 |
jari |
101 |
final float scale = Base.getScale(sc); |
2305 |
22 May 06 |
jari |
102 |
final String root = request.getContextPath(); |
7954 |
12 May 21 |
nicklas |
103 |
final DbControl dc = sc.newDbControl(":View "+itemType); |
2305 |
22 May 06 |
jari |
104 |
try |
2305 |
22 May 06 |
jari |
105 |
{ |
2942 |
22 Nov 06 |
nicklas |
106 |
Formatter<Date> dateFormatter = FormatterFactory.getDateFormatter(sc); |
2305 |
22 May 06 |
jari |
107 |
Map<Plugin.MainType, Integer> pluginCount = PluginDefinition.countPlugins(dc, guiContext); |
2305 |
22 May 06 |
jari |
108 |
|
2305 |
22 May 06 |
jari |
109 |
String title = null; |
2305 |
22 May 06 |
jari |
110 |
Experiment experiment = Experiment.getById(dc, itemId); |
5878 |
17 Nov 11 |
nicklas |
111 |
VirtualDb virtualDb = experiment.getVirtualDb(); |
2305 |
22 May 06 |
jari |
112 |
|
2305 |
22 May 06 |
jari |
113 |
final boolean writePermission = experiment.hasPermission(Permission.WRITE); |
2305 |
22 May 06 |
jari |
114 |
final boolean deletePermission = experiment.hasPermission(Permission.DELETE); |
2305 |
22 May 06 |
jari |
115 |
final boolean sharePermission = experiment.hasPermission(Permission.SET_PERMISSION); |
2918 |
15 Nov 06 |
nicklas |
116 |
final boolean setOwnerPermission = experiment.hasPermission(Permission.SET_OWNER); |
2918 |
15 Nov 06 |
nicklas |
117 |
final boolean isOwner = experiment.isOwner(); |
4003 |
26 Nov 07 |
nicklas |
118 |
final boolean isRemoved = experiment.isRemoved(); |
4003 |
26 Nov 07 |
nicklas |
119 |
final boolean isUsed = isRemoved && experiment.isUsed(); |
4003 |
26 Nov 07 |
nicklas |
120 |
final boolean deletePermanentlyPermission = deletePermission && !isUsed; |
3498 |
15 Jun 07 |
nicklas |
121 |
|
3498 |
15 Jun 07 |
nicklas |
122 |
Map<AnnotationType, Set<Object>> usedFactorValues = |
3498 |
15 Jun 07 |
nicklas |
123 |
new HashMap<AnnotationType, Set<Object>>(); |
4630 |
07 Nov 08 |
nicklas |
124 |
Map<AnnotationType, Integer> factorValuesCount = new HashMap<AnnotationType, Integer>(); |
4872 |
02 Apr 09 |
nicklas |
125 |
JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, guiContext, experiment); |
7604 |
25 Feb 19 |
nicklas |
126 |
ExtensionsInvoker<ButtonAction> invoker = ToolbarUtil.useExtensions(jspContext); |
2305 |
22 May 06 |
jari |
127 |
%> |
6315 |
06 Sep 13 |
nicklas |
128 |
<base:page title="<%=title%>" id="view-page"> |
6315 |
06 Sep 13 |
nicklas |
129 |
<base:head scripts="table.js,tabcontrol-2.js,~experiments.js" styles="table.css,toolbar.css,headertabcontrol.css,path.css"> |
4871 |
01 Apr 09 |
nicklas |
130 |
<ext:scripts context="<%=jspContext%>" /> |
4871 |
01 Apr 09 |
nicklas |
131 |
<ext:stylesheets context="<%=jspContext%>" /> |
2305 |
22 May 06 |
jari |
132 |
</base:head> |
6315 |
06 Sep 13 |
nicklas |
133 |
<base:body> |
5939 |
30 Jan 12 |
nicklas |
134 |
<p:path><p:pathelement |
5939 |
30 Jan 12 |
nicklas |
135 |
title="Experiments" href="<%="index.jsp?ID="+ID%>" |
5939 |
30 Jan 12 |
nicklas |
136 |
/><p:pathelement title="<%=HTML.encodeTags(experiment.getName())%>" |
5939 |
30 Jan 12 |
nicklas |
137 |
/></p:path> |
6315 |
06 Sep 13 |
nicklas |
138 |
<div id="page-data" data-item-id="<%=itemId%>"></div> |
2305 |
22 May 06 |
jari |
139 |
|
5939 |
30 Jan 12 |
nicklas |
140 |
<t:tabcontrol |
5939 |
30 Jan 12 |
nicklas |
141 |
id="main" |
5939 |
30 Jan 12 |
nicklas |
142 |
subclass="content mastertabcontrol" |
6315 |
06 Sep 13 |
nicklas |
143 |
active="<%=tab%>" remember="false"> |
2305 |
22 May 06 |
jari |
144 |
<t:tab id="properties" title="Properties"> |
5939 |
30 Jan 12 |
nicklas |
145 |
<div> |
5939 |
30 Jan 12 |
nicklas |
146 |
<table class="fullform"> |
5939 |
30 Jan 12 |
nicklas |
147 |
<tr> |
5939 |
30 Jan 12 |
nicklas |
148 |
<th class="itemstatus"> |
4003 |
26 Nov 07 |
nicklas |
149 |
<base:icon |
5946 |
03 Feb 12 |
nicklas |
150 |
image="shared.png" |
5939 |
30 Jan 12 |
nicklas |
151 |
visible="<%=experiment.isShared()%>" |
5939 |
30 Jan 12 |
nicklas |
152 |
tooltip="This item is shared to other users, groups and/or projects" |
5939 |
30 Jan 12 |
nicklas |
153 |
/> |
5939 |
30 Jan 12 |
nicklas |
154 |
<base:icon |
6315 |
06 Sep 13 |
nicklas |
155 |
id="btnDeletePermanently" |
5946 |
03 Feb 12 |
nicklas |
156 |
image="deleted.png" |
5939 |
30 Jan 12 |
nicklas |
157 |
tooltip="This item has been flagged for deletion. Click to delete it now." |
5939 |
30 Jan 12 |
nicklas |
158 |
enabled="<%=deletePermanentlyPermission %>" |
5939 |
30 Jan 12 |
nicklas |
159 |
visible="<%=isRemoved%>" |
5939 |
30 Jan 12 |
nicklas |
160 |
/> |
6315 |
06 Sep 13 |
nicklas |
161 |
<base:icon |
6315 |
06 Sep 13 |
nicklas |
162 |
id="btnUsingItems" |
6315 |
06 Sep 13 |
nicklas |
163 |
image="used.png" |
5939 |
30 Jan 12 |
nicklas |
164 |
tooltip="This item is used by other items and can't be permanently deleted. Show the items that are using this one" |
5939 |
30 Jan 12 |
nicklas |
165 |
visible="<%=isRemoved && isUsed%>" /> |
5939 |
30 Jan 12 |
nicklas |
166 |
</th> |
5939 |
30 Jan 12 |
nicklas |
167 |
<td style="padding: 0px;"> |
6605 |
18 Nov 14 |
nicklas |
168 |
<tbl:toolbar subclass="bottomborder bg-filled-50"> |
5939 |
30 Jan 12 |
nicklas |
169 |
<tbl:button |
6315 |
06 Sep 13 |
nicklas |
170 |
id="btnEdit" |
5942 |
01 Feb 12 |
nicklas |
171 |
disabled="<%=!writePermission%>" |
5945 |
02 Feb 12 |
nicklas |
172 |
image="edit.png" |
5939 |
30 Jan 12 |
nicklas |
173 |
title="Edit…" |
5939 |
30 Jan 12 |
nicklas |
174 |
tooltip="<%=writePermission ? "Edit this experiment" : "You do not have permission to edit this experiment"%>" |
5939 |
30 Jan 12 |
nicklas |
175 |
/> |
5939 |
30 Jan 12 |
nicklas |
176 |
<tbl:button |
6315 |
06 Sep 13 |
nicklas |
177 |
id="btnDelete" |
5942 |
01 Feb 12 |
nicklas |
178 |
disabled="<%=!deletePermission%>" |
5946 |
03 Feb 12 |
nicklas |
179 |
image="delete.png" |
5939 |
30 Jan 12 |
nicklas |
180 |
title="Delete" |
5939 |
30 Jan 12 |
nicklas |
181 |
visible="<%=!experiment.isRemoved()%>" |
5939 |
30 Jan 12 |
nicklas |
182 |
tooltip="<%=deletePermission ? "Delete this experiment" : "You do not have permission to delete this experiment"%>" |
5939 |
30 Jan 12 |
nicklas |
183 |
/> |
5939 |
30 Jan 12 |
nicklas |
184 |
<tbl:button |
6315 |
06 Sep 13 |
nicklas |
185 |
id="btnRestore" |
5942 |
01 Feb 12 |
nicklas |
186 |
disabled="<%=!writePermission%>" |
5946 |
03 Feb 12 |
nicklas |
187 |
image="restore.png" |
5939 |
30 Jan 12 |
nicklas |
188 |
title="Restore" |
5939 |
30 Jan 12 |
nicklas |
189 |
visible="<%=experiment.isRemoved()%>" |
5939 |
30 Jan 12 |
nicklas |
190 |
tooltip="<%=writePermission ? "Restore this experiment" : "You do not have permission to restore this experiment"%>" |
5939 |
30 Jan 12 |
nicklas |
191 |
/> |
5939 |
30 Jan 12 |
nicklas |
192 |
<tbl:button |
6315 |
06 Sep 13 |
nicklas |
193 |
id="btnShare" |
5942 |
01 Feb 12 |
nicklas |
194 |
disabled="<%=!sharePermission%>" |
5945 |
02 Feb 12 |
nicklas |
195 |
image="share.png" |
5939 |
30 Jan 12 |
nicklas |
196 |
title="Share…" |
5939 |
30 Jan 12 |
nicklas |
197 |
tooltip="<%=sharePermission ? "Share this experiment to other user, groups and projects" : "You do not have permission to share this experiment"%>" |
5939 |
30 Jan 12 |
nicklas |
198 |
/> |
5939 |
30 Jan 12 |
nicklas |
199 |
<tbl:button |
6315 |
06 Sep 13 |
nicklas |
200 |
id="btnSetOwner" |
5942 |
01 Feb 12 |
nicklas |
201 |
disabled="<%=!setOwnerPermission%>" |
5939 |
30 Jan 12 |
nicklas |
202 |
image="take_ownership.png" |
5939 |
30 Jan 12 |
nicklas |
203 |
title="Set owner…" |
5939 |
30 Jan 12 |
nicklas |
204 |
tooltip="<%=setOwnerPermission ? "Change owner of this item" : "You do not have permission to change ownership of this item"%>" |
5939 |
30 Jan 12 |
nicklas |
205 |
/> |
5939 |
30 Jan 12 |
nicklas |
206 |
<tbl:button |
6315 |
06 Sep 13 |
nicklas |
207 |
id="btnCloneReporters" |
5939 |
30 Jan 12 |
nicklas |
208 |
visible="<%=writePermission && (virtualDb.hasTable(VirtualTable.POSITION) || experiment.getRawDataType().isStoredInDb()) %>" |
5946 |
03 Feb 12 |
nicklas |
209 |
image="copy.png" |
5939 |
30 Jan 12 |
nicklas |
210 |
title="Clone reporters…" |
5939 |
30 Jan 12 |
nicklas |
211 |
tooltip="Clone reporter annotations for all reporters that are used in this experiment" |
5939 |
30 Jan 12 |
nicklas |
212 |
/> |
5939 |
30 Jan 12 |
nicklas |
213 |
<tbl:button |
6315 |
06 Sep 13 |
nicklas |
214 |
id="btnRemoveClonedReporters" |
5939 |
30 Jan 12 |
nicklas |
215 |
visible="<%=writePermission && virtualDb.hasClonedReporters() %>" |
5939 |
30 Jan 12 |
nicklas |
216 |
image="delete_permanently.png" |
5939 |
30 Jan 12 |
nicklas |
217 |
title="Remove cloned reporters…" |
5939 |
30 Jan 12 |
nicklas |
218 |
tooltip="Remove all cloned reporter annotations" |
5939 |
30 Jan 12 |
nicklas |
219 |
/> |
5939 |
30 Jan 12 |
nicklas |
220 |
<tbl:button |
6315 |
06 Sep 13 |
nicklas |
221 |
id="btnImport" |
5946 |
03 Feb 12 |
nicklas |
222 |
image="import.png" |
6315 |
06 Sep 13 |
nicklas |
223 |
data-plugin-type="IMPORT" |
5939 |
30 Jan 12 |
nicklas |
224 |
title="Import…" |
5939 |
30 Jan 12 |
nicklas |
225 |
tooltip="Import data" |
5939 |
30 Jan 12 |
nicklas |
226 |
visible="<%=pluginCount.containsKey(Plugin.MainType.IMPORT)%>" |
5939 |
30 Jan 12 |
nicklas |
227 |
/> |
5939 |
30 Jan 12 |
nicklas |
228 |
<tbl:button |
6315 |
06 Sep 13 |
nicklas |
229 |
id="btnExport" |
6315 |
06 Sep 13 |
nicklas |
230 |
image="export.png" |
6315 |
06 Sep 13 |
nicklas |
231 |
data-plugin-type="EXPORT" |
5939 |
30 Jan 12 |
nicklas |
232 |
title="Export…" |
5939 |
30 Jan 12 |
nicklas |
233 |
tooltip="Export data" |
5939 |
30 Jan 12 |
nicklas |
234 |
visible="<%=pluginCount.containsKey(Plugin.MainType.EXPORT)%>" |
5939 |
30 Jan 12 |
nicklas |
235 |
/> |
5939 |
30 Jan 12 |
nicklas |
236 |
<tbl:button |
6315 |
06 Sep 13 |
nicklas |
237 |
id="btnRunPlugin" |
6315 |
06 Sep 13 |
nicklas |
238 |
image="runplugin.png" |
6315 |
06 Sep 13 |
nicklas |
239 |
data-plugin-type="OTHER" |
5939 |
30 Jan 12 |
nicklas |
240 |
title="Run plugin…" |
5939 |
30 Jan 12 |
nicklas |
241 |
tooltip="Run a plugin" |
5939 |
30 Jan 12 |
nicklas |
242 |
visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>" |
5939 |
30 Jan 12 |
nicklas |
243 |
/> |
5939 |
30 Jan 12 |
nicklas |
244 |
<ext:render extensions="<%=invoker%>" context="<%=jspContext%>" |
7604 |
25 Feb 19 |
nicklas |
245 |
wrapper="<%=new PrefixSuffixRenderer<ButtonAction>(jspContext, "<td>", "</td>") %>"/> |
5939 |
30 Jan 12 |
nicklas |
246 |
<tbl:button |
5939 |
30 Jan 12 |
nicklas |
247 |
image="help.png" |
6315 |
06 Sep 13 |
nicklas |
248 |
subclass="auto-init" |
6315 |
06 Sep 13 |
nicklas |
249 |
data-auto-init="help" |
6315 |
06 Sep 13 |
nicklas |
250 |
data-help-id="experiment.view.properties" |
5939 |
30 Jan 12 |
nicklas |
251 |
title="Help…" |
5939 |
30 Jan 12 |
nicklas |
252 |
tooltip="Get help about this page" |
5939 |
30 Jan 12 |
nicklas |
253 |
/> |
5939 |
30 Jan 12 |
nicklas |
254 |
</tbl:toolbar> |
5939 |
30 Jan 12 |
nicklas |
255 |
</td> |
2305 |
22 May 06 |
jari |
256 |
</tr> |
5939 |
30 Jan 12 |
nicklas |
257 |
</table> |
5939 |
30 Jan 12 |
nicklas |
258 |
<table style="width: 100%; height: 16em;" class="bottomborder"> |
6143 |
20 Sep 12 |
nicklas |
259 |
<tr> |
5939 |
30 Jan 12 |
nicklas |
260 |
<td style="width: 50%; height: 100%;"> |
5939 |
30 Jan 12 |
nicklas |
261 |
<table class="fullform" > |
5939 |
30 Jan 12 |
nicklas |
262 |
<tr> |
5939 |
30 Jan 12 |
nicklas |
263 |
<th>Name</th> |
5939 |
30 Jan 12 |
nicklas |
264 |
<td><%=HTML.encodeTags(experiment.getName())%></td> |
5939 |
30 Jan 12 |
nicklas |
265 |
</tr> |
5939 |
30 Jan 12 |
nicklas |
266 |
<tr> |
5939 |
30 Jan 12 |
nicklas |
267 |
<th>Registered</th> |
5939 |
30 Jan 12 |
nicklas |
268 |
<td><%=dateFormatter.format(experiment.getEntryDate())%></td> |
5939 |
30 Jan 12 |
nicklas |
269 |
</tr> |
5939 |
30 Jan 12 |
nicklas |
270 |
<tr> |
5939 |
30 Jan 12 |
nicklas |
271 |
<th>Raw data type</th> |
5939 |
30 Jan 12 |
nicklas |
272 |
<td><base:catch><%=HTML.encodeTags(experiment.getRawDataType().getName())%></base:catch></td> |
5939 |
30 Jan 12 |
nicklas |
273 |
</tr> |
5939 |
30 Jan 12 |
nicklas |
274 |
<tr> |
5939 |
30 Jan 12 |
nicklas |
275 |
<th>Directory</th> |
5939 |
30 Jan 12 |
nicklas |
276 |
<td><base:propertyvalue item="<%=experiment%>" property="directory" /></td> |
5939 |
30 Jan 12 |
nicklas |
277 |
</tr> |
5939 |
30 Jan 12 |
nicklas |
278 |
<tr> |
5939 |
30 Jan 12 |
nicklas |
279 |
<th>Reporter clone template</th> |
5939 |
30 Jan 12 |
nicklas |
280 |
<td><base:propertyvalue item="<%=experiment%>" property="virtualDb.reporterCloneTemplate" nulltext="<i>- no cloned reporters -</i>" /></td> |
5939 |
30 Jan 12 |
nicklas |
281 |
</tr> |
5939 |
30 Jan 12 |
nicklas |
282 |
<tr> |
5939 |
30 Jan 12 |
nicklas |
283 |
<th>Bytes</th> |
5939 |
30 Jan 12 |
nicklas |
284 |
<td><%=Values.formatBytes(experiment.getBytes())%></td> |
5939 |
30 Jan 12 |
nicklas |
285 |
</tr> |
5939 |
30 Jan 12 |
nicklas |
286 |
<tr> |
5939 |
30 Jan 12 |
nicklas |
287 |
<th>Owner</th> |
5939 |
30 Jan 12 |
nicklas |
288 |
<td><base:propertyvalue item="<%=experiment%>" property="owner" /></td> |
5939 |
30 Jan 12 |
nicklas |
289 |
</tr> |
5939 |
30 Jan 12 |
nicklas |
290 |
<tr> |
5939 |
30 Jan 12 |
nicklas |
291 |
<th>Permissions</th> |
5939 |
30 Jan 12 |
nicklas |
292 |
<td><%=PermissionUtil.getFullPermissionNames(experiment)%></td> |
5939 |
30 Jan 12 |
nicklas |
293 |
</tr> |
5939 |
30 Jan 12 |
nicklas |
294 |
<tr class="dynamic"> |
5939 |
30 Jan 12 |
nicklas |
295 |
<th>Description</th> |
5939 |
30 Jan 12 |
nicklas |
296 |
<td><%=HTML.niceFormat(experiment.getDescription())%></td> |
5939 |
30 Jan 12 |
nicklas |
297 |
</tr> |
5939 |
30 Jan 12 |
nicklas |
298 |
</table> |
5939 |
30 Jan 12 |
nicklas |
299 |
</td> |
5939 |
30 Jan 12 |
nicklas |
300 |
<td style="width: 50%; height: 100%;" class="leftborder"> |
5939 |
30 Jan 12 |
nicklas |
301 |
<table class="fullform"> |
5939 |
30 Jan 12 |
nicklas |
302 |
<tr> |
5939 |
30 Jan 12 |
nicklas |
303 |
<th>PubMed ID</th> |
5939 |
30 Jan 12 |
nicklas |
304 |
<td> |
5939 |
30 Jan 12 |
nicklas |
305 |
<%=HTML.encodeTags(experiment.getPubMedId())%> |
5939 |
30 Jan 12 |
nicklas |
306 |
<% |
5939 |
30 Jan 12 |
nicklas |
307 |
int pubMedId = Values.getInt(experiment.getPubMedId(), -1); |
5939 |
30 Jan 12 |
nicklas |
308 |
if (pubMedId != -1) |
5939 |
30 Jan 12 |
nicklas |
309 |
{ |
5939 |
30 Jan 12 |
nicklas |
310 |
%> |
5939 |
30 Jan 12 |
nicklas |
311 |
<b>Link to:</b> |
5939 |
30 Jan 12 |
nicklas |
312 |
<a href="http://www.ebi.ac.uk/citexplore/citationDetails.do?externalId=<%=pubMedId%>&dataSource=MED" |
6139 |
19 Sep 12 |
nicklas |
313 |
target="_blank" title="External link to EBI Citation database" |
5939 |
30 Jan 12 |
nicklas |
314 |
>EBI Citation database</a>, |
5939 |
30 Jan 12 |
nicklas |
315 |
<a href="http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=PureSearch&db=pubmed&details_term=<%=pubMedId%>" |
6139 |
19 Sep 12 |
nicklas |
316 |
target="_blank" title="External link to NCBI Entrez PubMed">NCBI Entrez PubMed</a> |
5939 |
30 Jan 12 |
nicklas |
317 |
<% |
5939 |
30 Jan 12 |
nicklas |
318 |
} |
2694 |
03 Oct 06 |
nicklas |
319 |
%> |
5939 |
30 Jan 12 |
nicklas |
320 |
</td> |
5939 |
30 Jan 12 |
nicklas |
321 |
</tr> |
5939 |
30 Jan 12 |
nicklas |
322 |
<tr> |
5939 |
30 Jan 12 |
nicklas |
323 |
<th>Title</th> |
5939 |
30 Jan 12 |
nicklas |
324 |
<td><%=HTML.niceFormat(experiment.getTitle())%></td> |
5939 |
30 Jan 12 |
nicklas |
325 |
</tr> |
5939 |
30 Jan 12 |
nicklas |
326 |
<tr> |
5939 |
30 Jan 12 |
nicklas |
327 |
<th>Publication date</th> |
5939 |
30 Jan 12 |
nicklas |
328 |
<td><%=dateFormatter.format(experiment.getPublicationDate())%></td> |
5939 |
30 Jan 12 |
nicklas |
329 |
</tr> |
5939 |
30 Jan 12 |
nicklas |
330 |
<tr> |
5939 |
30 Jan 12 |
nicklas |
331 |
<th>Abstract</th> |
5939 |
30 Jan 12 |
nicklas |
332 |
<td><%=HTML.niceFormat(experiment.getAbstract())%></td> |
5939 |
30 Jan 12 |
nicklas |
333 |
</tr> |
5939 |
30 Jan 12 |
nicklas |
334 |
<tr> |
5939 |
30 Jan 12 |
nicklas |
335 |
<th>Experiment design</th> |
5939 |
30 Jan 12 |
nicklas |
336 |
<td><%=HTML.niceFormat(experiment.getExperimentDesign())%></td> |
5939 |
30 Jan 12 |
nicklas |
337 |
</tr> |
5939 |
30 Jan 12 |
nicklas |
338 |
<tr> |
5939 |
30 Jan 12 |
nicklas |
339 |
<th>Experiment type</th> |
5939 |
30 Jan 12 |
nicklas |
340 |
<td><%=HTML.niceFormat(experiment.getExperimentType())%></td> |
5939 |
30 Jan 12 |
nicklas |
341 |
</tr> |
5939 |
30 Jan 12 |
nicklas |
342 |
<tr> |
5939 |
30 Jan 12 |
nicklas |
343 |
<th>Affiliations</th> |
5939 |
30 Jan 12 |
nicklas |
344 |
<td><%=HTML.niceFormat(experiment.getAffiliations())%></td> |
5939 |
30 Jan 12 |
nicklas |
345 |
</tr> |
5939 |
30 Jan 12 |
nicklas |
346 |
<tr> |
5939 |
30 Jan 12 |
nicklas |
347 |
<th>Authors</th> |
5939 |
30 Jan 12 |
nicklas |
348 |
<td><%=HTML.niceFormat(experiment.getAuthors())%></td> |
5939 |
30 Jan 12 |
nicklas |
349 |
</tr> |
5939 |
30 Jan 12 |
nicklas |
350 |
<tr class="dynamic"> |
5939 |
30 Jan 12 |
nicklas |
351 |
<th>Publication</th> |
5939 |
30 Jan 12 |
nicklas |
352 |
<td><%=HTML.niceFormat(experiment.getPublication())%></td> |
5939 |
30 Jan 12 |
nicklas |
353 |
</tr> |
5939 |
30 Jan 12 |
nicklas |
354 |
</table> |
5939 |
30 Jan 12 |
nicklas |
355 |
</td> |
5939 |
30 Jan 12 |
nicklas |
356 |
</tr> |
5939 |
30 Jan 12 |
nicklas |
357 |
</table> |
5939 |
30 Jan 12 |
nicklas |
358 |
</div> |
2305 |
22 May 06 |
jari |
359 |
|
2164 |
18 Apr 06 |
nicklas |
360 |
<% |
2164 |
18 Apr 06 |
nicklas |
361 |
ItemQuery<AnnotationType> efQuery = experiment.getExperimentalFactors(); |
3888 |
29 Oct 07 |
nicklas |
362 |
efQuery.include(Include.ALL); |
2164 |
18 Apr 06 |
nicklas |
363 |
efQuery.order(Orders.asc(Hql.property("name"))); |
2164 |
18 Apr 06 |
nicklas |
364 |
ItemResultList<AnnotationType> experimentalFactors = efQuery.list(dc); |
2164 |
18 Apr 06 |
nicklas |
365 |
%> |
5939 |
30 Jan 12 |
nicklas |
366 |
<base:section |
5939 |
30 Jan 12 |
nicklas |
367 |
id="experimentalFactors" |
5939 |
30 Jan 12 |
nicklas |
368 |
title="<%="Experimental factors (" + experimentalFactors.size() +")"%>" |
5939 |
30 Jan 12 |
nicklas |
369 |
context="<%=cc%>" |
5939 |
30 Jan 12 |
nicklas |
370 |
> |
2305 |
22 May 06 |
jari |
371 |
<% |
5939 |
30 Jan 12 |
nicklas |
372 |
if (experimentalFactors.size() == 0) |
2164 |
18 Apr 06 |
nicklas |
373 |
{ |
2164 |
18 Apr 06 |
nicklas |
374 |
%> |
5939 |
30 Jan 12 |
nicklas |
375 |
<div class="messagecontainer note"> |
5939 |
30 Jan 12 |
nicklas |
376 |
No experimental factors has been added to this experiment |
5939 |
30 Jan 12 |
nicklas |
377 |
(or, you don't have permission to view them). |
5939 |
30 Jan 12 |
nicklas |
378 |
</div> |
2164 |
18 Apr 06 |
nicklas |
379 |
<% |
2164 |
18 Apr 06 |
nicklas |
380 |
} |
5939 |
30 Jan 12 |
nicklas |
381 |
else |
5939 |
30 Jan 12 |
nicklas |
382 |
{ |
5939 |
30 Jan 12 |
nicklas |
383 |
%> |
6963 |
02 Oct 15 |
nicklas |
384 |
|
5939 |
30 Jan 12 |
nicklas |
385 |
<tbl:table |
6143 |
20 Sep 12 |
nicklas |
386 |
id="tbl.experimentalFactors" |
5939 |
30 Jan 12 |
nicklas |
387 |
columns="all" |
5939 |
30 Jan 12 |
nicklas |
388 |
action="index.jsp" |
5939 |
30 Jan 12 |
nicklas |
389 |
> |
5939 |
30 Jan 12 |
nicklas |
390 |
<tbl:hidden name="item_id" value="<%=Integer.toString(itemId)%>" /> |
5939 |
30 Jan 12 |
nicklas |
391 |
<tbl:columndef |
5939 |
30 Jan 12 |
nicklas |
392 |
id="name" |
5939 |
30 Jan 12 |
nicklas |
393 |
title="Name" |
5939 |
30 Jan 12 |
nicklas |
394 |
/> |
5939 |
30 Jan 12 |
nicklas |
395 |
<tbl:columndef |
5939 |
30 Jan 12 |
nicklas |
396 |
id="type" |
5939 |
30 Jan 12 |
nicklas |
397 |
title="Value type" |
5939 |
30 Jan 12 |
nicklas |
398 |
/> |
5939 |
30 Jan 12 |
nicklas |
399 |
<tbl:columndef |
5939 |
30 Jan 12 |
nicklas |
400 |
id="values" |
5939 |
30 Jan 12 |
nicklas |
401 |
title="Used values" |
5939 |
30 Jan 12 |
nicklas |
402 |
/> |
5939 |
30 Jan 12 |
nicklas |
403 |
<tbl:columndef |
5939 |
30 Jan 12 |
nicklas |
404 |
id="description" |
5939 |
30 Jan 12 |
nicklas |
405 |
title="Description" |
5939 |
30 Jan 12 |
nicklas |
406 |
/> |
5939 |
30 Jan 12 |
nicklas |
407 |
<tbl:columndef |
5939 |
30 Jan 12 |
nicklas |
408 |
id="status" |
5939 |
30 Jan 12 |
nicklas |
409 |
title="Status" |
5939 |
30 Jan 12 |
nicklas |
410 |
/> |
5939 |
30 Jan 12 |
nicklas |
411 |
<tbl:data> |
5939 |
30 Jan 12 |
nicklas |
412 |
<tbl:headers> |
5939 |
30 Jan 12 |
nicklas |
413 |
<tbl:headerrow> |
5939 |
30 Jan 12 |
nicklas |
414 |
<tbl:columnheaders /> |
5939 |
30 Jan 12 |
nicklas |
415 |
</tbl:headerrow> |
5939 |
30 Jan 12 |
nicklas |
416 |
</tbl:headers> |
5939 |
30 Jan 12 |
nicklas |
417 |
<tbl:rows> |
2164 |
18 Apr 06 |
nicklas |
418 |
<% |
5939 |
30 Jan 12 |
nicklas |
419 |
for (AnnotationType item : experimentalFactors) |
2164 |
18 Apr 06 |
nicklas |
420 |
{ |
5939 |
30 Jan 12 |
nicklas |
421 |
Type valueType = item.getValueType(); |
5939 |
30 Jan 12 |
nicklas |
422 |
usedFactorValues.put(item, new HashSet<Object>()); |
5939 |
30 Jan 12 |
nicklas |
423 |
factorValuesCount.put(item, 0); |
5939 |
30 Jan 12 |
nicklas |
424 |
%> |
5939 |
30 Jan 12 |
nicklas |
425 |
<tbl:row> |
5939 |
30 Jan 12 |
nicklas |
426 |
<tbl:cell column="name"><base:icon |
5946 |
03 Feb 12 |
nicklas |
427 |
image="deleted.png" |
5939 |
30 Jan 12 |
nicklas |
428 |
tooltip="This item has been scheduled for deletion" |
5939 |
30 Jan 12 |
nicklas |
429 |
visible="<%=item.isRemoved()%>" |
5939 |
30 Jan 12 |
nicklas |
430 |
/><%=Base.getLinkedName(ID, item, false, true)%></tbl:cell> |
5939 |
30 Jan 12 |
nicklas |
431 |
<tbl:cell column="description"><%=HTML.encodeTags(item.getDescription())%></tbl:cell> |
5939 |
30 Jan 12 |
nicklas |
432 |
<tbl:cell column="type"> |
5939 |
30 Jan 12 |
nicklas |
433 |
<%=valueType%> |
5939 |
30 Jan 12 |
nicklas |
434 |
<%=item.isEnumeration() ? "(enumeration)" : ""%> |
5939 |
30 Jan 12 |
nicklas |
435 |
</tbl:cell> |
5939 |
30 Jan 12 |
nicklas |
436 |
<tbl:cell column="values"> |
5939 |
30 Jan 12 |
nicklas |
437 |
<% |
5939 |
30 Jan 12 |
nicklas |
438 |
if (!item.isEnumeration() && (valueType == Type.TEXT || valueType == Type.STRING)) |
3875 |
24 Oct 07 |
nicklas |
439 |
{ |
5939 |
30 Jan 12 |
nicklas |
440 |
%> |
5939 |
30 Jan 12 |
nicklas |
441 |
N/A |
5939 |
30 Jan 12 |
nicklas |
442 |
<% |
3875 |
24 Oct 07 |
nicklas |
443 |
} |
5939 |
30 Jan 12 |
nicklas |
444 |
else |
3875 |
24 Oct 07 |
nicklas |
445 |
{ |
5939 |
30 Jan 12 |
nicklas |
446 |
%> |
5939 |
30 Jan 12 |
nicklas |
447 |
<div id="usedvalues.<%=item.getId()%>">Loading...</div> |
5939 |
30 Jan 12 |
nicklas |
448 |
<% |
3875 |
24 Oct 07 |
nicklas |
449 |
} |
3875 |
24 Oct 07 |
nicklas |
450 |
%> |
5939 |
30 Jan 12 |
nicklas |
451 |
</tbl:cell> |
5939 |
30 Jan 12 |
nicklas |
452 |
<tbl:cell column="status" id="<%="status." + item.getId()%>"> |
5939 |
30 Jan 12 |
nicklas |
453 |
</tbl:cell> |
5939 |
30 Jan 12 |
nicklas |
454 |
</tbl:row> |
3498 |
15 Jun 07 |
nicklas |
455 |
<% |
2164 |
18 Apr 06 |
nicklas |
456 |
} |
2305 |
22 May 06 |
jari |
457 |
%> |
5939 |
30 Jan 12 |
nicklas |
458 |
</tbl:rows> |
5939 |
30 Jan 12 |
nicklas |
459 |
</tbl:data> |
5939 |
30 Jan 12 |
nicklas |
460 |
</tbl:table> |
6143 |
20 Sep 12 |
nicklas |
461 |
<div id="warning.missing" style="display: none; text-align: right;"> |
5946 |
03 Feb 12 |
nicklas |
462 |
<base:icon image="warning.png" /> = Some raw bioassays are missing this factor value |
5939 |
30 Jan 12 |
nicklas |
463 |
</div> |
2305 |
22 May 06 |
jari |
464 |
<% |
5939 |
30 Jan 12 |
nicklas |
465 |
} |
5939 |
30 Jan 12 |
nicklas |
466 |
%> |
5939 |
30 Jan 12 |
nicklas |
467 |
</base:section> |
5939 |
30 Jan 12 |
nicklas |
468 |
<% |
6909 |
18 May 15 |
nicklas |
469 |
ItemQuery<RootRawBioAssay> rbaQuery = experiment.getRootRawBioAssays(); |
5939 |
30 Jan 12 |
nicklas |
470 |
rbaQuery.include(Include.ALL); |
6909 |
18 May 15 |
nicklas |
471 |
rbaQuery.order(Orders.asc(Hql.property("rawBioAssay.name"))); |
6909 |
18 May 15 |
nicklas |
472 |
ItemResultList<RootRawBioAssay> rawBioAssays = rbaQuery.list(dc); |
5504 |
18 Nov 10 |
nicklas |
473 |
%> |
5939 |
30 Jan 12 |
nicklas |
474 |
<base:section |
5939 |
30 Jan 12 |
nicklas |
475 |
id="rawbioassays" |
6916 |
22 May 15 |
nicklas |
476 |
title="<%="Root raw bioassays (" + rawBioAssays.size() +")"%>" |
5939 |
30 Jan 12 |
nicklas |
477 |
context="<%=cc%>"> |
5939 |
30 Jan 12 |
nicklas |
478 |
<% |
5939 |
30 Jan 12 |
nicklas |
479 |
if (rawBioAssays.size() == 0) |
5939 |
30 Jan 12 |
nicklas |
480 |
{ |
5939 |
30 Jan 12 |
nicklas |
481 |
%> |
6037 |
29 Mar 12 |
nicklas |
482 |
<div class="messagecontainer note"> |
5939 |
30 Jan 12 |
nicklas |
483 |
No raw bioassays has been added to this experiment |
5939 |
30 Jan 12 |
nicklas |
484 |
(or, you don't have permission to view them). |
6037 |
29 Mar 12 |
nicklas |
485 |
</div> |
5939 |
30 Jan 12 |
nicklas |
486 |
<% |
5939 |
30 Jan 12 |
nicklas |
487 |
} |
5939 |
30 Jan 12 |
nicklas |
488 |
else |
5939 |
30 Jan 12 |
nicklas |
489 |
{ |
5939 |
30 Jan 12 |
nicklas |
490 |
%> |
5939 |
30 Jan 12 |
nicklas |
491 |
<tbl:table |
6143 |
20 Sep 12 |
nicklas |
492 |
id="tbl.rawbioassays" |
5939 |
30 Jan 12 |
nicklas |
493 |
columns="all" |
5939 |
30 Jan 12 |
nicklas |
494 |
> |
3547 |
03 Jul 07 |
martin |
495 |
<tbl:columndef |
3547 |
03 Jul 07 |
martin |
496 |
id="name" |
3547 |
03 Jul 07 |
martin |
497 |
title="Name" |
3547 |
03 Jul 07 |
martin |
498 |
/> |
3547 |
03 Jul 07 |
martin |
499 |
<tbl:columndef |
5939 |
30 Jan 12 |
nicklas |
500 |
id="description" |
5939 |
30 Jan 12 |
nicklas |
501 |
title="Description" |
3547 |
03 Jul 07 |
martin |
502 |
/> |
5939 |
30 Jan 12 |
nicklas |
503 |
<% |
5939 |
30 Jan 12 |
nicklas |
504 |
for (AnnotationType at : experimentalFactors) |
5939 |
30 Jan 12 |
nicklas |
505 |
{ |
7604 |
25 Feb 19 |
nicklas |
506 |
Formatter<?> formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType()); |
5939 |
30 Jan 12 |
nicklas |
507 |
%> |
5939 |
30 Jan 12 |
nicklas |
508 |
<tbl:columndef |
5939 |
30 Jan 12 |
nicklas |
509 |
id="<%="at"+at.getId()%>" |
5939 |
30 Jan 12 |
nicklas |
510 |
title="<%=HTML.encodeTags(at.getName())%>" |
5939 |
30 Jan 12 |
nicklas |
511 |
formatter="<%=formatter%>" |
5939 |
30 Jan 12 |
nicklas |
512 |
/> |
5939 |
30 Jan 12 |
nicklas |
513 |
<% |
5939 |
30 Jan 12 |
nicklas |
514 |
} |
5939 |
30 Jan 12 |
nicklas |
515 |
%> |
3547 |
03 Jul 07 |
martin |
516 |
<tbl:data> |
5939 |
30 Jan 12 |
nicklas |
517 |
<tbl:headers> |
5939 |
30 Jan 12 |
nicklas |
518 |
<tbl:headerrow> |
5939 |
30 Jan 12 |
nicklas |
519 |
<tbl:columnheaders /> |
5939 |
30 Jan 12 |
nicklas |
520 |
</tbl:headerrow> |
5939 |
30 Jan 12 |
nicklas |
521 |
</tbl:headers> |
3547 |
03 Jul 07 |
martin |
522 |
<tbl:rows> |
3547 |
03 Jul 07 |
martin |
523 |
<% |
5939 |
30 Jan 12 |
nicklas |
524 |
SnapshotManager manager = new SnapshotManager(); |
5939 |
30 Jan 12 |
nicklas |
525 |
AnnotationTypeFilter annotationTypeFilter = new AnnotationTypeFilter(); |
6909 |
18 May 15 |
nicklas |
526 |
for (RootRawBioAssay item : rawBioAssays) |
3547 |
03 Jul 07 |
martin |
527 |
{ |
7030 |
25 Nov 15 |
nicklas |
528 |
RawBioAssay rba = null; |
7030 |
25 Nov 15 |
nicklas |
529 |
try |
7030 |
25 Nov 15 |
nicklas |
530 |
{ |
7030 |
25 Nov 15 |
nicklas |
531 |
rba = item.getRawBioAssay(); |
7030 |
25 Nov 15 |
nicklas |
532 |
} |
7030 |
25 Nov 15 |
nicklas |
533 |
catch (PermissionDeniedException ex) |
7030 |
25 Nov 15 |
nicklas |
534 |
{} |
5939 |
30 Jan 12 |
nicklas |
535 |
AnnotationSet as = item.isAnnotated() ? item.getAnnotationSet() : null; |
5939 |
30 Jan 12 |
nicklas |
536 |
AnnotationSetSnapshot snapshot = as == null ? null : manager.getSnapshot(dc, as.getId()); |
5939 |
30 Jan 12 |
nicklas |
537 |
%> |
3547 |
03 Jul 07 |
martin |
538 |
<tbl:row> |
3888 |
29 Oct 07 |
nicklas |
539 |
<tbl:cell column="name"><base:icon |
5946 |
03 Feb 12 |
nicklas |
540 |
image="deleted.png" |
5939 |
30 Jan 12 |
nicklas |
541 |
tooltip="This item has been scheduled for deletion" |
7030 |
25 Nov 15 |
nicklas |
542 |
visible="<%=rba != null && rba.isRemoved()%>" |
6916 |
22 May 15 |
nicklas |
543 |
/><%=Base.getLinkedName(ID, item, false, true)%></tbl:cell> |
6916 |
22 May 15 |
nicklas |
544 |
<tbl:cell column="description"><%=HTML.encodeTags(item.getDescription())%></tbl:cell> |
5939 |
30 Jan 12 |
nicklas |
545 |
<% |
5939 |
30 Jan 12 |
nicklas |
546 |
for (AnnotationType at : experimentalFactors) |
5939 |
30 Jan 12 |
nicklas |
547 |
{ |
5939 |
30 Jan 12 |
nicklas |
548 |
Unit unit = at.getDefaultUnit(); |
5939 |
30 Jan 12 |
nicklas |
549 |
String unitSymbol = unit == null ? "" : " " + unit.getDisplaySymbol(); |
5939 |
30 Jan 12 |
nicklas |
550 |
|
5939 |
30 Jan 12 |
nicklas |
551 |
annotationTypeFilter.setAnnotationType(at); |
5939 |
30 Jan 12 |
nicklas |
552 |
List<AnnotationSnapshot> all = snapshot == null ? |
5939 |
30 Jan 12 |
nicklas |
553 |
null : manager.findAnnotations(dc, snapshot, annotationTypeFilter, true); |
5939 |
30 Jan 12 |
nicklas |
554 |
%> |
6315 |
06 Sep 13 |
nicklas |
555 |
<tbl:cell column="<%="at"+at.getId()%>"> |
5939 |
30 Jan 12 |
nicklas |
556 |
<% |
6942 |
31 Aug 15 |
nicklas |
557 |
if (all != null && all.size() > 0) |
5939 |
30 Jan 12 |
nicklas |
558 |
{ |
6942 |
31 Aug 15 |
nicklas |
559 |
for (AnnotationSnapshot a : all) |
5939 |
30 Jan 12 |
nicklas |
560 |
{ |
7210 |
19 Oct 16 |
nicklas |
561 |
boolean annotatePermission = a.hasPermission(dc, Permission.WRITE); |
6942 |
31 Aug 15 |
nicklas |
562 |
factorValuesCount.put(at, factorValuesCount.get(at)+1); |
7604 |
25 Feb 19 |
nicklas |
563 |
List<?> values = a.getActualValues(); |
6962 |
01 Oct 15 |
nicklas |
564 |
boolean isUpToDate = a.isUpToDate(); |
6942 |
31 Aug 15 |
nicklas |
565 |
usedFactorValues.get(at).addAll(values); |
6942 |
31 Aug 15 |
nicklas |
566 |
%> |
6942 |
31 Aug 15 |
nicklas |
567 |
<tbl:cellvalue list="<%=values%>" suffix="<%=unitSymbol%>"/> |
6942 |
31 Aug 15 |
nicklas |
568 |
<base:icon |
6942 |
31 Aug 15 |
nicklas |
569 |
subclass="link auto-init" |
6942 |
31 Aug 15 |
nicklas |
570 |
data-auto-init="edit-experimental-factor" |
6942 |
31 Aug 15 |
nicklas |
571 |
data-item-type="<%=a.getThisItemType().name()%>" |
6942 |
31 Aug 15 |
nicklas |
572 |
data-item-id="<%=a.getThisItemId() %>" |
6942 |
31 Aug 15 |
nicklas |
573 |
data-annotation-type="<%=at.getId() %>" |
6942 |
31 Aug 15 |
nicklas |
574 |
data-annotation="<%=a.getThisAnnotationId()%>" |
7210 |
19 Oct 16 |
nicklas |
575 |
visible="<%=annotatePermission%>" |
6962 |
01 Oct 15 |
nicklas |
576 |
image="<%=isUpToDate ? "edit.png" : "edit-outofsync.png"%>" |
6942 |
31 Aug 15 |
nicklas |
577 |
tooltip="Modify the values of this experimental factor" |
6942 |
31 Aug 15 |
nicklas |
578 |
/> |
5939 |
30 Jan 12 |
nicklas |
579 |
<% |
5939 |
30 Jan 12 |
nicklas |
580 |
} |
5939 |
30 Jan 12 |
nicklas |
581 |
} |
5939 |
30 Jan 12 |
nicklas |
582 |
%> |
5939 |
30 Jan 12 |
nicklas |
583 |
</tbl:cell> |
5939 |
30 Jan 12 |
nicklas |
584 |
<% |
5939 |
30 Jan 12 |
nicklas |
585 |
} |
5939 |
30 Jan 12 |
nicklas |
586 |
%> |
3547 |
03 Jul 07 |
martin |
587 |
</tbl:row> |
3547 |
03 Jul 07 |
martin |
588 |
<% |
3547 |
03 Jul 07 |
martin |
589 |
} |
3547 |
03 Jul 07 |
martin |
590 |
%> |
3547 |
03 Jul 07 |
martin |
591 |
</tbl:rows> |
3547 |
03 Jul 07 |
martin |
592 |
</tbl:data> |
3547 |
03 Jul 07 |
martin |
593 |
</tbl:table> |
3547 |
03 Jul 07 |
martin |
594 |
<% |
2305 |
22 May 06 |
jari |
595 |
} |
2305 |
22 May 06 |
jari |
596 |
%> |
5939 |
30 Jan 12 |
nicklas |
597 |
</base:section> |
5939 |
30 Jan 12 |
nicklas |
598 |
<jsp:include page="../../common/anytoany/list_anytoany.jsp"> |
5939 |
30 Jan 12 |
nicklas |
599 |
<jsp:param name="ID" value="<%=ID%>" /> |
5939 |
30 Jan 12 |
nicklas |
600 |
<jsp:param name="item_type" value="<%=itemType.name()%>" /> |
5939 |
30 Jan 12 |
nicklas |
601 |
<jsp:param name="item_id" value="<%=itemId%>" /> |
5939 |
30 Jan 12 |
nicklas |
602 |
<jsp:param name="title" value="Other items related to this experiment" /> |
5939 |
30 Jan 12 |
nicklas |
603 |
</jsp:include> |
5939 |
30 Jan 12 |
nicklas |
604 |
<jsp:include page="../../common/share/list_share.jsp"> |
5939 |
30 Jan 12 |
nicklas |
605 |
<jsp:param name="ID" value="<%=ID%>" /> |
5939 |
30 Jan 12 |
nicklas |
606 |
<jsp:param name="item_type" value="<%=itemType.name()%>" /> |
5939 |
30 Jan 12 |
nicklas |
607 |
<jsp:param name="item_id" value="<%=itemId%>" /> |
5939 |
30 Jan 12 |
nicklas |
608 |
<jsp:param name="title" value="Shared to" /> |
5939 |
30 Jan 12 |
nicklas |
609 |
</jsp:include> |
3498 |
15 Jun 07 |
nicklas |
610 |
|
6315 |
06 Sep 13 |
nicklas |
611 |
<% |
6315 |
06 Sep 13 |
nicklas |
612 |
JSONArray jsonFactorValues = new JSONArray(); |
6315 |
06 Sep 13 |
nicklas |
613 |
for (Map.Entry<AnnotationType, Set<Object>> entry : usedFactorValues.entrySet()) |
3498 |
15 Jun 07 |
nicklas |
614 |
{ |
6315 |
06 Sep 13 |
nicklas |
615 |
AnnotationType at = entry.getKey(); |
6315 |
06 Sep 13 |
nicklas |
616 |
|
6315 |
06 Sep 13 |
nicklas |
617 |
JSONObject jsonAt = new JSONObject(); |
6315 |
06 Sep 13 |
nicklas |
618 |
jsonAt.put("id", at.getId()); |
6730 |
13 Feb 15 |
nicklas |
619 |
jsonAt.put("disableInheritance", at.getDisableInheritance() ? 1 : 0); |
7210 |
19 Oct 16 |
nicklas |
620 |
jsonAt.put("usePermission", at.hasPermission(Permission.USE) ? 1 : 0); |
6315 |
06 Sep 13 |
nicklas |
621 |
jsonAt.put("numRawBioAssaysWithFactor", factorValuesCount.get(at)); |
6315 |
06 Sep 13 |
nicklas |
622 |
|
6315 |
06 Sep 13 |
nicklas |
623 |
Type valueType = at.getValueType(); |
6315 |
06 Sep 13 |
nicklas |
624 |
if (at.isEnumeration() || (valueType != Type.TEXT && valueType != Type.STRING)) |
6315 |
06 Sep 13 |
nicklas |
625 |
{ |
6315 |
06 Sep 13 |
nicklas |
626 |
Set<Object> values = entry.getValue(); |
7605 |
26 Feb 19 |
nicklas |
627 |
Formatter<Object> formatter = FormatterFactory.getTypeFormatter(sc, valueType); |
6315 |
06 Sep 13 |
nicklas |
628 |
Unit unit = at.getDefaultUnit(); |
6315 |
06 Sep 13 |
nicklas |
629 |
if (unit != null) formatter = unit.getFormatter(formatter); |
6315 |
06 Sep 13 |
nicklas |
630 |
String formattedValues = HTML.encodeTags(Values.getString(values, ", ", true, formatter)); |
6315 |
06 Sep 13 |
nicklas |
631 |
jsonAt.put("usedValues", formattedValues); |
6315 |
06 Sep 13 |
nicklas |
632 |
} |
6315 |
06 Sep 13 |
nicklas |
633 |
|
6315 |
06 Sep 13 |
nicklas |
634 |
jsonFactorValues.add(jsonAt); |
3498 |
15 Jun 07 |
nicklas |
635 |
} |
5117 |
05 Oct 09 |
nicklas |
636 |
%> |
6387 |
18 Dec 13 |
nicklas |
637 |
<div id="factor-values" class="datacontainer" |
6315 |
06 Sep 13 |
nicklas |
638 |
data-num-raw-bioassays="<%=rawBioAssays.size() %>" |
6315 |
06 Sep 13 |
nicklas |
639 |
data-factor-values="<%=HTML.encodeTags(jsonFactorValues.toJSONString()) %>" |
6315 |
06 Sep 13 |
nicklas |
640 |
></div> |
6315 |
06 Sep 13 |
nicklas |
641 |
|
2097 |
21 Mar 06 |
nicklas |
642 |
</t:tab> |
5966 |
16 Feb 12 |
nicklas |
643 |
<t:tab id="annotations" title="Annotations" |
6315 |
06 Sep 13 |
nicklas |
644 |
tooltip="View annotation values" clazz="white"> |
6255 |
22 Mar 13 |
nicklas |
645 |
<jsp:include page="../../common/annotations/list_frameset.jsp"> |
5966 |
16 Feb 12 |
nicklas |
646 |
<jsp:param name="item_type" value="<%=itemType.name()%>" /> |
5966 |
16 Feb 12 |
nicklas |
647 |
<jsp:param name="item_id" value="<%=itemId%>" /> |
5966 |
16 Feb 12 |
nicklas |
648 |
<jsp:param name="ID" value="<%=ID%>" /> |
5966 |
16 Feb 12 |
nicklas |
649 |
</jsp:include> |
5966 |
16 Feb 12 |
nicklas |
650 |
</t:tab> |
2097 |
21 Mar 06 |
nicklas |
651 |
|
2097 |
21 Mar 06 |
nicklas |
652 |
<t:tab id="bioassaysets" title="Bioassay sets" /> |
5897 |
02 Dec 11 |
nicklas |
653 |
<t:tab id="clonedreporters" |
5897 |
02 Dec 11 |
nicklas |
654 |
title="Cloned reporters" |
5897 |
02 Dec 11 |
nicklas |
655 |
visible="<%=virtualDb.hasClonedReporters() %>" |
5897 |
02 Dec 11 |
nicklas |
656 |
tooltip="Show information about cloned reporters" |
5897 |
02 Dec 11 |
nicklas |
657 |
/> |
3033 |
15 Dec 06 |
nicklas |
658 |
<t:tab id="overview" title="Overview" |
6315 |
06 Sep 13 |
nicklas |
659 |
tooltip="Display a tree overview of related items"> |
6242 |
25 Feb 13 |
nicklas |
660 |
<jsp:include page="../../common/overview/overview.jsp"> |
6242 |
25 Feb 13 |
nicklas |
661 |
<jsp:param name="item_type" value="<%=itemType.name()%>" /> |
6242 |
25 Feb 13 |
nicklas |
662 |
<jsp:param name="item_id" value="<%=itemId%>" /> |
6242 |
25 Feb 13 |
nicklas |
663 |
<jsp:param name="ID" value="<%=ID%>" /> |
6242 |
25 Feb 13 |
nicklas |
664 |
</jsp:include> |
4767 |
17 Feb 09 |
nicklas |
665 |
</t:tab> |
7166 |
07 Jun 16 |
nicklas |
666 |
<t:tab id="history" title="History" |
7166 |
07 Jun 16 |
nicklas |
667 |
tooltip="Displays a log with the history of this item" |
6315 |
06 Sep 13 |
nicklas |
668 |
visible="<%=ChangeHistoryUtil.showChangeHistoryTab(sc)%>"> |
6244 |
25 Feb 13 |
nicklas |
669 |
<jsp:include page="../../common/history/frameset.jsp"> |
6244 |
25 Feb 13 |
nicklas |
670 |
<jsp:param name="item_type" value="<%=itemType.name()%>" /> |
6244 |
25 Feb 13 |
nicklas |
671 |
<jsp:param name="item_id" value="<%=itemId%>" /> |
6244 |
25 Feb 13 |
nicklas |
672 |
<jsp:param name="ID" value="<%=ID%>" /> |
6244 |
25 Feb 13 |
nicklas |
673 |
</jsp:include> |
5069 |
20 Aug 09 |
nicklas |
674 |
</t:tab> |
2305 |
22 May 06 |
jari |
675 |
</t:tabcontrol> |
2305 |
22 May 06 |
jari |
676 |
|
2305 |
22 May 06 |
jari |
677 |
</base:body> |
2305 |
22 May 06 |
jari |
678 |
</base:page> |
2305 |
22 May 06 |
jari |
679 |
<% |
2305 |
22 May 06 |
jari |
680 |
} |
2305 |
22 May 06 |
jari |
681 |
finally |
2305 |
22 May 06 |
jari |
682 |
{ |
2305 |
22 May 06 |
jari |
683 |
if (dc != null) dc.close(); |
2305 |
22 May 06 |
jari |
684 |
} |
2305 |
22 May 06 |
jari |
685 |
|
2305 |
22 May 06 |
jari |
686 |
%> |