2298 |
19 May 06 |
nicklas |
1 |
<%-- $Id$ |
2298 |
19 May 06 |
nicklas |
2 |
------------------------------------------------------------------ |
5425 |
23 Sep 10 |
nicklas |
Copyright (C) 2006 Jari Häkkinen, Nicklas Nordborg, Martin Svensson |
5425 |
23 Sep 10 |
nicklas |
Copyright (C) 2007 Johan Enell, Jari Häkkinen, Nicklas Nordborg |
2298 |
19 May 06 |
nicklas |
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/ |
2298 |
19 May 06 |
nicklas |
8 |
|
2298 |
19 May 06 |
nicklas |
9 |
BASE is free software; you can redistribute it and/or |
2298 |
19 May 06 |
nicklas |
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 |
2298 |
19 May 06 |
nicklas |
12 |
of the License, or (at your option) any later version. |
2298 |
19 May 06 |
nicklas |
13 |
|
2298 |
19 May 06 |
nicklas |
14 |
BASE is distributed in the hope that it will be useful, |
2298 |
19 May 06 |
nicklas |
15 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
2298 |
19 May 06 |
nicklas |
16 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2298 |
19 May 06 |
nicklas |
17 |
GNU General Public License for more details. |
2298 |
19 May 06 |
nicklas |
18 |
|
2298 |
19 May 06 |
nicklas |
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/>. |
2298 |
19 May 06 |
nicklas |
21 |
------------------------------------------------------------------ |
2298 |
19 May 06 |
nicklas |
22 |
|
2298 |
19 May 06 |
nicklas |
23 |
@author Nicklas |
2298 |
19 May 06 |
nicklas |
24 |
@version 2.0 |
2298 |
19 May 06 |
nicklas |
25 |
--%> |
5426 |
24 Sep 10 |
nicklas |
26 |
<%@ page pageEncoding="UTF-8" session="false" |
2298 |
19 May 06 |
nicklas |
27 |
import="net.sf.basedb.core.SessionControl" |
2298 |
19 May 06 |
nicklas |
28 |
import="net.sf.basedb.core.DbControl" |
2298 |
19 May 06 |
nicklas |
29 |
import="net.sf.basedb.core.Item" |
2298 |
19 May 06 |
nicklas |
30 |
import="net.sf.basedb.core.ItemContext" |
2298 |
19 May 06 |
nicklas |
31 |
import="net.sf.basedb.core.BasicItem" |
2298 |
19 May 06 |
nicklas |
32 |
import="net.sf.basedb.core.Experiment" |
2298 |
19 May 06 |
nicklas |
33 |
import="net.sf.basedb.core.BioAssaySet" |
2298 |
19 May 06 |
nicklas |
34 |
import="net.sf.basedb.core.Transformation" |
2664 |
26 Sep 06 |
nicklas |
35 |
import="net.sf.basedb.core.ExtraValue" |
2664 |
26 Sep 06 |
nicklas |
36 |
import="net.sf.basedb.core.ExtraValueType" |
2892 |
10 Nov 06 |
nicklas |
37 |
import="net.sf.basedb.core.AnnotationSet" |
2892 |
10 Nov 06 |
nicklas |
38 |
import="net.sf.basedb.core.AnnotationType" |
4560 |
06 Oct 08 |
nicklas |
39 |
import="net.sf.basedb.core.Annotation" |
2745 |
18 Oct 06 |
nicklas |
40 |
import="net.sf.basedb.core.Job" |
2298 |
19 May 06 |
nicklas |
41 |
import="net.sf.basedb.core.ItemQuery" |
2298 |
19 May 06 |
nicklas |
42 |
import="net.sf.basedb.core.Nameable" |
2298 |
19 May 06 |
nicklas |
43 |
import="net.sf.basedb.core.ItemResultIterator" |
2298 |
19 May 06 |
nicklas |
44 |
import="net.sf.basedb.core.ItemResultList" |
2298 |
19 May 06 |
nicklas |
45 |
import="net.sf.basedb.core.Permission" |
2298 |
19 May 06 |
nicklas |
46 |
import="net.sf.basedb.core.PluginDefinition" |
6376 |
06 Dec 13 |
nicklas |
47 |
import="net.sf.basedb.core.PluginConfiguration" |
2298 |
19 May 06 |
nicklas |
48 |
import="net.sf.basedb.core.PermissionDeniedException" |
2298 |
19 May 06 |
nicklas |
49 |
import="net.sf.basedb.core.query.Restrictions" |
2298 |
19 May 06 |
nicklas |
50 |
import="net.sf.basedb.core.query.Expressions" |
2298 |
19 May 06 |
nicklas |
51 |
import="net.sf.basedb.core.query.Orders" |
2298 |
19 May 06 |
nicklas |
52 |
import="net.sf.basedb.core.query.Hql" |
2298 |
19 May 06 |
nicklas |
53 |
import="net.sf.basedb.core.query.Restrictions" |
2298 |
19 May 06 |
nicklas |
54 |
import="net.sf.basedb.core.plugin.GuiContext" |
2298 |
19 May 06 |
nicklas |
55 |
import="net.sf.basedb.core.plugin.Plugin" |
6541 |
29 Sep 14 |
nicklas |
56 |
import="net.sf.basedb.core.snapshot.AnnotationLoaderUtil" |
6541 |
29 Sep 14 |
nicklas |
57 |
import="net.sf.basedb.core.snapshot.AnnotationTypeFilter" |
6541 |
29 Sep 14 |
nicklas |
58 |
import="net.sf.basedb.core.snapshot.AnnotationSnapshot" |
6541 |
29 Sep 14 |
nicklas |
59 |
import="net.sf.basedb.core.snapshot.AnnotationSetSnapshot" |
6541 |
29 Sep 14 |
nicklas |
60 |
import="net.sf.basedb.core.snapshot.SnapshotManager" |
2298 |
19 May 06 |
nicklas |
61 |
import="net.sf.basedb.util.Tree" |
2892 |
10 Nov 06 |
nicklas |
62 |
import="net.sf.basedb.util.Enumeration" |
2298 |
19 May 06 |
nicklas |
63 |
import="net.sf.basedb.clients.web.Base" |
2298 |
19 May 06 |
nicklas |
64 |
import="net.sf.basedb.clients.web.ModeInfo" |
2298 |
19 May 06 |
nicklas |
65 |
import="net.sf.basedb.clients.web.util.HTML" |
2753 |
20 Oct 06 |
nicklas |
66 |
import="net.sf.basedb.util.Values" |
2942 |
22 Nov 06 |
nicklas |
67 |
import="net.sf.basedb.util.formatter.Formatter" |
2942 |
22 Nov 06 |
nicklas |
68 |
import="net.sf.basedb.clients.web.formatter.FormatterFactory" |
4187 |
20 Mar 08 |
nicklas |
69 |
import="net.sf.basedb.clients.web.extensions.ExtensionsControl" |
4187 |
20 Mar 08 |
nicklas |
70 |
import="net.sf.basedb.clients.web.extensions.toolbar.ButtonAction" |
4871 |
01 Apr 09 |
nicklas |
71 |
import="net.sf.basedb.clients.web.extensions.toolbar.ToolbarUtil" |
7604 |
25 Feb 19 |
nicklas |
72 |
import="net.sf.basedb.clients.web.extensions.list.ListColumnAction" |
6040 |
30 Mar 12 |
nicklas |
73 |
import="net.sf.basedb.clients.web.extensions.list.ListColumnUtil" |
4187 |
20 Mar 08 |
nicklas |
74 |
import="net.sf.basedb.clients.web.extensions.JspContext" |
4871 |
01 Apr 09 |
nicklas |
75 |
import="net.sf.basedb.clients.web.extensions.renderer.PrefixSuffixRenderer" |
7337 |
12 Apr 17 |
nicklas |
76 |
import="net.sf.basedb.clients.web.util.ProjectSpecificInfoFilter" |
4187 |
20 Mar 08 |
nicklas |
77 |
import="net.sf.basedb.util.extensions.ExtensionsInvoker" |
4187 |
20 Mar 08 |
nicklas |
78 |
import="net.sf.basedb.util.extensions.Renderer" |
2942 |
22 Nov 06 |
nicklas |
79 |
import="java.util.Date" |
2298 |
19 May 06 |
nicklas |
80 |
import="java.util.List" |
2298 |
19 May 06 |
nicklas |
81 |
import="java.util.ArrayList" |
2298 |
19 May 06 |
nicklas |
82 |
import="java.util.LinkedList" |
2298 |
19 May 06 |
nicklas |
83 |
import="java.util.Map" |
2298 |
19 May 06 |
nicklas |
84 |
import="java.util.HashMap" |
2298 |
19 May 06 |
nicklas |
85 |
import="java.util.Iterator" |
2298 |
19 May 06 |
nicklas |
86 |
import="java.util.Collection" |
6388 |
07 Jan 14 |
nicklas |
87 |
import="org.json.simple.JSONObject" |
6388 |
07 Jan 14 |
nicklas |
88 |
import="org.json.simple.JSONArray" |
2298 |
19 May 06 |
nicklas |
89 |
%> |
2298 |
19 May 06 |
nicklas |
90 |
<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> |
2298 |
19 May 06 |
nicklas |
91 |
<%@ taglib prefix="tbl" uri="/WEB-INF/table.tld" %> |
4202 |
01 Apr 08 |
nicklas |
92 |
<%@ taglib prefix="ext" uri="/WEB-INF/extensions.tld" %> |
2298 |
19 May 06 |
nicklas |
93 |
<%! |
2298 |
19 May 06 |
nicklas |
94 |
private static final Item itemType = Item.BIOASSAYSET; |
2298 |
19 May 06 |
nicklas |
95 |
private static final GuiContext guiContext = new GuiContext(itemType, GuiContext.Type.LIST); |
2298 |
19 May 06 |
nicklas |
96 |
%> |
2298 |
19 May 06 |
nicklas |
97 |
<%! |
2298 |
19 May 06 |
nicklas |
98 |
|
2298 |
19 May 06 |
nicklas |
99 |
private static void addToTree(Tree<BasicItem> tree, BioAssaySet bas) |
2298 |
19 May 06 |
nicklas |
100 |
{ |
2298 |
19 May 06 |
nicklas |
101 |
if (!tree.contains(bas)) |
2298 |
19 May 06 |
nicklas |
102 |
{ |
2298 |
19 May 06 |
nicklas |
103 |
Transformation transformation = bas.getTransformation(); |
2298 |
19 May 06 |
nicklas |
104 |
Tree.Entry<BasicItem> parent = tree.getEntry(transformation); |
2298 |
19 May 06 |
nicklas |
105 |
if (parent == null) |
2298 |
19 May 06 |
nicklas |
106 |
{ |
2298 |
19 May 06 |
nicklas |
107 |
addToTree(tree, transformation); |
2298 |
19 May 06 |
nicklas |
108 |
parent = tree.getEntry(transformation); |
2298 |
19 May 06 |
nicklas |
109 |
} |
2664 |
26 Sep 06 |
nicklas |
110 |
Tree.Entry<BasicItem> basEntry = parent.addChild(bas); |
2664 |
26 Sep 06 |
nicklas |
111 |
for (ExtraValue xv : bas.getExtraValues().list(bas.getDbControl())) |
2664 |
26 Sep 06 |
nicklas |
112 |
{ |
2664 |
26 Sep 06 |
nicklas |
113 |
basEntry.addChild(xv); |
2664 |
26 Sep 06 |
nicklas |
114 |
} |
2298 |
19 May 06 |
nicklas |
115 |
} |
2298 |
19 May 06 |
nicklas |
116 |
} |
2298 |
19 May 06 |
nicklas |
117 |
|
2298 |
19 May 06 |
nicklas |
118 |
private static void addToTree(Tree<BasicItem> tree, Transformation transformation) |
2298 |
19 May 06 |
nicklas |
119 |
{ |
2298 |
19 May 06 |
nicklas |
120 |
if (!tree.contains(transformation)) |
2298 |
19 May 06 |
nicklas |
121 |
{ |
2298 |
19 May 06 |
nicklas |
122 |
BioAssaySet source = transformation.getSource(); |
2298 |
19 May 06 |
nicklas |
123 |
Tree.Entry<BasicItem> parent = tree.getEntry(source); |
2298 |
19 May 06 |
nicklas |
124 |
if (parent == null) |
2298 |
19 May 06 |
nicklas |
125 |
{ |
2298 |
19 May 06 |
nicklas |
126 |
addToTree(tree, source); |
2298 |
19 May 06 |
nicklas |
127 |
parent = tree.getEntry(source); |
2298 |
19 May 06 |
nicklas |
128 |
} |
2298 |
19 May 06 |
nicklas |
129 |
parent.addChild(transformation); |
2298 |
19 May 06 |
nicklas |
130 |
} |
2298 |
19 May 06 |
nicklas |
131 |
} |
2298 |
19 May 06 |
nicklas |
132 |
|
2298 |
19 May 06 |
nicklas |
133 |
private static Tree<BasicItem> getAnalysisTree(DbControl dc, ItemQuery<BioAssaySet> bioAssaySetQuery, ItemQuery<Transformation> transformationQuery) |
2298 |
19 May 06 |
nicklas |
134 |
{ |
2298 |
19 May 06 |
nicklas |
135 |
Tree<BasicItem> tree = new Tree<BasicItem>(null); |
2298 |
19 May 06 |
nicklas |
136 |
ItemResultList<BioAssaySet> allBioAssaySets = bioAssaySetQuery.list(dc); |
2298 |
19 May 06 |
nicklas |
137 |
List<Integer> ids = new ArrayList<Integer>(allBioAssaySets.size()); |
2298 |
19 May 06 |
nicklas |
138 |
|
2298 |
19 May 06 |
nicklas |
139 |
for (BioAssaySet bas : allBioAssaySets) |
2298 |
19 May 06 |
nicklas |
140 |
{ |
2298 |
19 May 06 |
nicklas |
141 |
addToTree(tree, bas); |
2298 |
19 May 06 |
nicklas |
142 |
ids.add(bas.getId()); |
2298 |
19 May 06 |
nicklas |
143 |
} |
2298 |
19 May 06 |
nicklas |
144 |
|
2298 |
19 May 06 |
nicklas |
145 |
transformationQuery.restrict( |
2298 |
19 May 06 |
nicklas |
146 |
Restrictions.in( |
2298 |
19 May 06 |
nicklas |
147 |
Hql.property("source.id"), |
2298 |
19 May 06 |
nicklas |
148 |
Expressions.parameter("bioAssaySets", ids) |
2298 |
19 May 06 |
nicklas |
149 |
) |
2298 |
19 May 06 |
nicklas |
150 |
); |
2298 |
19 May 06 |
nicklas |
151 |
ItemResultList<Transformation> allTransformations = transformationQuery.list(dc); |
2298 |
19 May 06 |
nicklas |
152 |
for (Transformation t: allTransformations) |
2298 |
19 May 06 |
nicklas |
153 |
{ |
2298 |
19 May 06 |
nicklas |
154 |
addToTree(tree, t); |
2298 |
19 May 06 |
nicklas |
155 |
} |
2298 |
19 May 06 |
nicklas |
156 |
return tree; |
2298 |
19 May 06 |
nicklas |
157 |
} |
6388 |
07 Jan 14 |
nicklas |
158 |
|
6388 |
07 Jan 14 |
nicklas |
159 |
JSONArray generateSubTree(JSONObject jsonParent, BasicItem parent, Tree<BasicItem> tree, Collection<String> closed) |
2298 |
19 May 06 |
nicklas |
160 |
{ |
6388 |
07 Jan 14 |
nicklas |
161 |
JSONArray json = new JSONArray(); |
2298 |
19 May 06 |
nicklas |
162 |
|
6388 |
07 Jan 14 |
nicklas |
163 |
Tree.Entry<BasicItem> parentEntry = tree.getEntry(parent); |
6388 |
07 Jan 14 |
nicklas |
164 |
if (parentEntry == null) return json; |
6388 |
07 Jan 14 |
nicklas |
165 |
|
6388 |
07 Jan 14 |
nicklas |
166 |
if (jsonParent == null && parent != null) |
2298 |
19 May 06 |
nicklas |
167 |
{ |
6388 |
07 Jan 14 |
nicklas |
168 |
Item parentType = parent.getType(); |
6388 |
07 Jan 14 |
nicklas |
169 |
if (parentType == Item.BIOASSAYSET) |
6388 |
07 Jan 14 |
nicklas |
170 |
{ |
6388 |
07 Jan 14 |
nicklas |
171 |
jsonParent = newJoustBioAssaySet(null, (BioAssaySet)parent, true); |
6388 |
07 Jan 14 |
nicklas |
172 |
} |
6388 |
07 Jan 14 |
nicklas |
173 |
else if (parentType == Item.TRANSFORMATION) |
6388 |
07 Jan 14 |
nicklas |
174 |
{ |
6388 |
07 Jan 14 |
nicklas |
175 |
jsonParent = newJoustTransformation(null, (Transformation)parent, true); |
6388 |
07 Jan 14 |
nicklas |
176 |
} |
6388 |
07 Jan 14 |
nicklas |
177 |
if (jsonParent != null) |
6388 |
07 Jan 14 |
nicklas |
178 |
{ |
6388 |
07 Jan 14 |
nicklas |
179 |
jsonParent.put("noOutlineIcon", 1); |
6388 |
07 Jan 14 |
nicklas |
180 |
json.add(jsonParent); |
6388 |
07 Jan 14 |
nicklas |
181 |
} |
2298 |
19 May 06 |
nicklas |
182 |
} |
2298 |
19 May 06 |
nicklas |
183 |
|
2298 |
19 May 06 |
nicklas |
184 |
List<Tree.Entry<BasicItem>> children = parentEntry.getChildren(); |
2298 |
19 May 06 |
nicklas |
185 |
if (children != null) |
2298 |
19 May 06 |
nicklas |
186 |
{ |
6388 |
07 Jan 14 |
nicklas |
187 |
for (Tree.Entry<BasicItem> childEntry : children) |
2298 |
19 May 06 |
nicklas |
188 |
{ |
6388 |
07 Jan 14 |
nicklas |
189 |
BasicItem child = childEntry.getNode(); |
6388 |
07 Jan 14 |
nicklas |
190 |
Item childType = child.getType(); |
6388 |
07 Jan 14 |
nicklas |
191 |
JSONObject jsonChild = null; |
6388 |
07 Jan 14 |
nicklas |
192 |
String var = childType.name() + "_" + child.getId(); |
6388 |
07 Jan 14 |
nicklas |
193 |
boolean isOpen = (closed == null || !closed.contains(var)) && childEntry.getNumChildren() > 0; |
6388 |
07 Jan 14 |
nicklas |
194 |
if (childType == Item.BIOASSAYSET) |
6388 |
07 Jan 14 |
nicklas |
195 |
{ |
6388 |
07 Jan 14 |
nicklas |
196 |
jsonChild = newJoustBioAssaySet(jsonParent, (BioAssaySet)child, isOpen); |
6388 |
07 Jan 14 |
nicklas |
197 |
} |
6388 |
07 Jan 14 |
nicklas |
198 |
else if (childType == Item.TRANSFORMATION) |
6388 |
07 Jan 14 |
nicklas |
199 |
{ |
6388 |
07 Jan 14 |
nicklas |
200 |
jsonChild = newJoustTransformation(jsonParent, (Transformation)child, isOpen); |
6388 |
07 Jan 14 |
nicklas |
201 |
} |
6388 |
07 Jan 14 |
nicklas |
202 |
else if (childType == Item.EXTRAVALUE) |
6388 |
07 Jan 14 |
nicklas |
203 |
{ |
6388 |
07 Jan 14 |
nicklas |
204 |
jsonChild = newJoustExtraValue(jsonParent, (ExtraValue)child, isOpen); |
6388 |
07 Jan 14 |
nicklas |
205 |
} |
6388 |
07 Jan 14 |
nicklas |
206 |
if (jsonParent == null) json.add(jsonChild); |
6388 |
07 Jan 14 |
nicklas |
207 |
generateSubTree(jsonChild, child, tree, closed); |
2298 |
19 May 06 |
nicklas |
208 |
} |
2298 |
19 May 06 |
nicklas |
209 |
} |
6388 |
07 Jan 14 |
nicklas |
210 |
return json; |
2298 |
19 May 06 |
nicklas |
211 |
} |
2298 |
19 May 06 |
nicklas |
212 |
|
6388 |
07 Jan 14 |
nicklas |
213 |
|
6388 |
07 Jan 14 |
nicklas |
214 |
JSONObject newJoustBioAssaySet(JSONObject jsonParent, BioAssaySet bas, boolean open) |
2298 |
19 May 06 |
nicklas |
215 |
{ |
6388 |
07 Jan 14 |
nicklas |
216 |
String id = "BIOASSAYSET_"+bas.getId(); |
6388 |
07 Jan 14 |
nicklas |
217 |
String name = bas.getName(); |
6388 |
07 Jan 14 |
nicklas |
218 |
String icon = "BioAssaySet"; |
2298 |
19 May 06 |
nicklas |
219 |
|
6388 |
07 Jan 14 |
nicklas |
220 |
JSONObject json = newJoustEntry(jsonParent, icon, HTML.encodeTags(name), id); |
6388 |
07 Jan 14 |
nicklas |
221 |
json.put("type", "bioassayset"); |
6388 |
07 Jan 14 |
nicklas |
222 |
json.put("isOpen", open ? 1 : 0); |
6388 |
07 Jan 14 |
nicklas |
223 |
return json; |
6388 |
07 Jan 14 |
nicklas |
224 |
} |
6388 |
07 Jan 14 |
nicklas |
225 |
|
6388 |
07 Jan 14 |
nicklas |
226 |
JSONObject newJoustTransformation(JSONObject jsonParent, Transformation t, boolean open) |
6388 |
07 Jan 14 |
nicklas |
227 |
{ |
6388 |
07 Jan 14 |
nicklas |
228 |
String id = "TRANSFORMATION_"+t.getId(); |
6388 |
07 Jan 14 |
nicklas |
229 |
String name = t.getName(); |
6388 |
07 Jan 14 |
nicklas |
230 |
String icon = "Transformation"; |
6388 |
07 Jan 14 |
nicklas |
231 |
try |
2664 |
26 Sep 06 |
nicklas |
232 |
{ |
6388 |
07 Jan 14 |
nicklas |
233 |
if (t.getJob().getPluginDefinition().supports("net.sf.basedb.core.plugin.AnalysisFilterPlugin")) |
3592 |
23 Jul 07 |
nicklas |
234 |
{ |
6388 |
07 Jan 14 |
nicklas |
235 |
icon = "Filter"; |
3592 |
23 Jul 07 |
nicklas |
236 |
} |
2664 |
26 Sep 06 |
nicklas |
237 |
} |
6388 |
07 Jan 14 |
nicklas |
238 |
catch (Throwable tt) |
6388 |
07 Jan 14 |
nicklas |
239 |
{} |
6388 |
07 Jan 14 |
nicklas |
240 |
|
6388 |
07 Jan 14 |
nicklas |
241 |
JSONObject json = newJoustEntry(jsonParent, icon, HTML.encodeTags(name), id); |
6388 |
07 Jan 14 |
nicklas |
242 |
json.put("type", "transformation"); |
6388 |
07 Jan 14 |
nicklas |
243 |
json.put("isOpen", open ? 1 : 0); |
6388 |
07 Jan 14 |
nicklas |
244 |
return json; |
6388 |
07 Jan 14 |
nicklas |
245 |
} |
6388 |
07 Jan 14 |
nicklas |
246 |
|
6388 |
07 Jan 14 |
nicklas |
247 |
JSONObject newJoustExtraValue(JSONObject jsonParent, ExtraValue ev, boolean open) |
6388 |
07 Jan 14 |
nicklas |
248 |
{ |
6388 |
07 Jan 14 |
nicklas |
249 |
String id = "EXTRAVALUE_"+ev.getId(); |
6388 |
07 Jan 14 |
nicklas |
250 |
String name = ev.getValueType().toString(); |
6388 |
07 Jan 14 |
nicklas |
251 |
String icon = "ExtraValue"; |
6388 |
07 Jan 14 |
nicklas |
252 |
|
6388 |
07 Jan 14 |
nicklas |
253 |
try |
2298 |
19 May 06 |
nicklas |
254 |
{ |
6388 |
07 Jan 14 |
nicklas |
255 |
name = ev.getExtraValueType().getName(); |
2298 |
19 May 06 |
nicklas |
256 |
} |
6388 |
07 Jan 14 |
nicklas |
257 |
catch (PermissionDeniedException ex) |
6388 |
07 Jan 14 |
nicklas |
258 |
{} |
6388 |
07 Jan 14 |
nicklas |
259 |
|
6388 |
07 Jan 14 |
nicklas |
260 |
JSONObject json = newJoustEntry(jsonParent, icon, HTML.encodeTags(name), id); |
6388 |
07 Jan 14 |
nicklas |
261 |
json.put("type", "extra-value"); |
6388 |
07 Jan 14 |
nicklas |
262 |
json.put("isOpen", open ? 1 : 0); |
6388 |
07 Jan 14 |
nicklas |
263 |
return json; |
6388 |
07 Jan 14 |
nicklas |
264 |
} |
6388 |
07 Jan 14 |
nicklas |
265 |
|
6388 |
07 Jan 14 |
nicklas |
266 |
JSONObject newJoustEntry(JSONObject jsonParent, String icon, String text, String id) |
6388 |
07 Jan 14 |
nicklas |
267 |
{ |
6388 |
07 Jan 14 |
nicklas |
268 |
JSONObject jsonJoust = new JSONObject(); |
6388 |
07 Jan 14 |
nicklas |
269 |
jsonJoust.put("icon", icon); |
6388 |
07 Jan 14 |
nicklas |
270 |
jsonJoust.put("text", text); |
6388 |
07 Jan 14 |
nicklas |
271 |
jsonJoust.put("id", id); |
6388 |
07 Jan 14 |
nicklas |
272 |
if (jsonParent != null) |
2298 |
19 May 06 |
nicklas |
273 |
{ |
6388 |
07 Jan 14 |
nicklas |
274 |
JSONArray jsonChildren = (JSONArray)jsonParent.get("children"); |
6388 |
07 Jan 14 |
nicklas |
275 |
if (jsonChildren == null) |
6388 |
07 Jan 14 |
nicklas |
276 |
{ |
6388 |
07 Jan 14 |
nicklas |
277 |
jsonChildren = new JSONArray(); |
6388 |
07 Jan 14 |
nicklas |
278 |
jsonParent.put("children", jsonChildren); |
6388 |
07 Jan 14 |
nicklas |
279 |
jsonParent.remove("isLazy"); |
6388 |
07 Jan 14 |
nicklas |
280 |
} |
6388 |
07 Jan 14 |
nicklas |
281 |
jsonChildren.add(jsonJoust); |
2298 |
19 May 06 |
nicklas |
282 |
} |
6388 |
07 Jan 14 |
nicklas |
283 |
return jsonJoust; |
2298 |
19 May 06 |
nicklas |
284 |
} |
2298 |
19 May 06 |
nicklas |
285 |
%> |
2298 |
19 May 06 |
nicklas |
286 |
<% |
2298 |
19 May 06 |
nicklas |
287 |
final int experimentId = Values.getInt(request.getParameter("experiment_id")); |
2298 |
19 May 06 |
nicklas |
288 |
final int bioAssaySetId = Values.getInt(request.getParameter("item_id")); |
2298 |
19 May 06 |
nicklas |
289 |
final int transformationId = Values.getInt(request.getParameter("transformation_id")); |
2298 |
19 May 06 |
nicklas |
290 |
final SessionControl sc = Base.getExistingSessionControl(pageContext, Permission.DENIED, itemType); |
2298 |
19 May 06 |
nicklas |
291 |
final String ID = sc.getId(); |
4187 |
20 Mar 08 |
nicklas |
292 |
final String rootPath = request.getContextPath()+"/"; |
2298 |
19 May 06 |
nicklas |
293 |
final ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, null); |
2298 |
19 May 06 |
nicklas |
294 |
final ItemContext tc = sc.getCurrentContext(Item.TRANSFORMATION); |
2664 |
26 Sep 06 |
nicklas |
295 |
final ItemContext xvc = sc.getCurrentContext(Item.EXTRAVALUE); |
2298 |
19 May 06 |
nicklas |
296 |
|
2298 |
19 May 06 |
nicklas |
297 |
final ModeInfo mode = ModeInfo.get(request.getParameter("mode")); |
2298 |
19 May 06 |
nicklas |
298 |
final String callback = request.getParameter("callback"); |
2298 |
19 May 06 |
nicklas |
299 |
final String title = mode.generateTitle("bioassay set", "bioassay sets"); |
7954 |
12 May 21 |
nicklas |
300 |
final DbControl dc = sc.newDbControl(":Expriment - View analysis tree"); |
2298 |
19 May 06 |
nicklas |
301 |
Tree<BasicItem> analysisTree = null; |
6541 |
29 Sep 14 |
nicklas |
302 |
List<AnnotationLoaderUtil> annotationLoaders = new ArrayList<AnnotationLoaderUtil>(); |
2298 |
19 May 06 |
nicklas |
303 |
try |
2298 |
19 May 06 |
nicklas |
304 |
{ |
2942 |
22 Nov 06 |
nicklas |
305 |
Formatter<Date> dateTimeFormatter = FormatterFactory.getDateTimeFormatter(sc); |
2892 |
10 Nov 06 |
nicklas |
306 |
final ItemQuery<AnnotationType> annotationTypeQuery = Base.getAnnotationTypesQuery(itemType); |
6541 |
29 Sep 14 |
nicklas |
307 |
SnapshotManager manager = new SnapshotManager(); |
7337 |
12 Apr 17 |
nicklas |
308 |
ProjectSpecificInfoFilter psInfo = new ProjectSpecificInfoFilter(); |
6541 |
29 Sep 14 |
nicklas |
309 |
for (AnnotationType at : annotationTypeQuery.list(dc)) |
6541 |
29 Sep 14 |
nicklas |
310 |
{ |
6541 |
29 Sep 14 |
nicklas |
311 |
annotationLoaders.add(new AnnotationLoaderUtil(dc, manager, at)); |
6541 |
29 Sep 14 |
nicklas |
312 |
} |
2298 |
19 May 06 |
nicklas |
313 |
final Experiment experiment = Experiment.getById(dc, experimentId); |
2298 |
19 May 06 |
nicklas |
314 |
final BasicItem root = transformationId == 0 ? |
2298 |
19 May 06 |
nicklas |
315 |
(bioAssaySetId == 0 ? null : BioAssaySet.getById(dc, bioAssaySetId)) |
2298 |
19 May 06 |
nicklas |
316 |
: Transformation.getById(dc, transformationId); |
2303 |
22 May 06 |
nicklas |
317 |
final boolean createPermission = experiment.hasPermission(Permission.USE); |
2298 |
19 May 06 |
nicklas |
318 |
final boolean deletePermission = createPermission; |
2298 |
19 May 06 |
nicklas |
319 |
final boolean writePermission = createPermission; |
2298 |
19 May 06 |
nicklas |
320 |
|
2298 |
19 May 06 |
nicklas |
321 |
final ItemQuery<Transformation> transformationQuery = experiment.getTransformations(); |
2664 |
26 Sep 06 |
nicklas |
322 |
transformationQuery.include(cc.getInclude()); |
4041 |
06 Dec 07 |
nicklas |
323 |
transformationQuery.setFirstResult(0); |
4041 |
06 Dec 07 |
nicklas |
324 |
transformationQuery.setMaxResults(-1); |
2298 |
19 May 06 |
nicklas |
325 |
Map<Plugin.MainType, Integer> pluginCount = PluginDefinition.countPlugins(dc, guiContext); |
7914 |
23 Feb 21 |
nicklas |
326 |
JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, |
7914 |
23 Feb 21 |
nicklas |
327 |
guiContext, root == null ? experiment : root); |
2298 |
19 May 06 |
nicklas |
328 |
try |
2298 |
19 May 06 |
nicklas |
329 |
{ |
7914 |
23 Feb 21 |
nicklas |
330 |
final ItemQuery<BioAssaySet> query = Base.getConfiguredQuery(dc, cc, jspContext, true, experiment.getBioAssaySets(), mode); |
4560 |
06 Oct 08 |
nicklas |
331 |
query.setFirstResult(0); |
4560 |
06 Oct 08 |
nicklas |
332 |
query.setMaxResults(-1); |
2298 |
19 May 06 |
nicklas |
333 |
analysisTree = getAnalysisTree(dc, query, transformationQuery); |
2298 |
19 May 06 |
nicklas |
334 |
} |
2298 |
19 May 06 |
nicklas |
335 |
catch (Throwable t) |
2298 |
19 May 06 |
nicklas |
336 |
{ |
2298 |
19 May 06 |
nicklas |
337 |
cc.setMessage(t.getMessage()); |
4560 |
06 Oct 08 |
nicklas |
338 |
t.printStackTrace(); |
2298 |
19 May 06 |
nicklas |
339 |
} |
2298 |
19 May 06 |
nicklas |
340 |
// Contains the ID:s of the bioassaysets that are closed in the tree |
7605 |
26 Feb 19 |
nicklas |
341 |
Collection<String> closed = cc.getObject("closed"); |
2298 |
19 May 06 |
nicklas |
342 |
int numListed = 0; |
4187 |
20 Mar 08 |
nicklas |
343 |
|
7605 |
26 Feb 19 |
nicklas |
344 |
ExtensionsInvoker<ButtonAction> toolsInvoker = ExtensionsControl.useExtensions(jspContext, |
4202 |
01 Apr 08 |
nicklas |
345 |
"net.sf.basedb.clients.web.bioassayset.list.tools"); |
7604 |
25 Feb 19 |
nicklas |
346 |
ExtensionsInvoker<ButtonAction> toolbarInvoker = ToolbarUtil.useExtensions(jspContext); |
7604 |
25 Feb 19 |
nicklas |
347 |
ExtensionsInvoker<ListColumnAction<BioAssaySet,?>> columnsInvoker = ListColumnUtil.useExtensions(jspContext); |
6388 |
07 Jan 14 |
nicklas |
348 |
|
6388 |
07 Jan 14 |
nicklas |
349 |
JSONArray json = generateSubTree(null, root, analysisTree, closed); |
2298 |
19 May 06 |
nicklas |
350 |
%> |
4871 |
01 Apr 09 |
nicklas |
351 |
<base:page type="include"> |
6402 |
29 Jan 14 |
nicklas |
352 |
<base:head scripts="joust-2.js,/views/experiments/bioassaysets/analysis_tree.js" /> |
2298 |
19 May 06 |
nicklas |
353 |
<base:body> |
4202 |
01 Apr 08 |
nicklas |
354 |
<ext:scripts context="<%=jspContext%>" /> |
4202 |
01 Apr 08 |
nicklas |
355 |
<ext:stylesheets context="<%=jspContext%>" /> |
6388 |
07 Jan 14 |
nicklas |
356 |
|
6315 |
06 Sep 13 |
nicklas |
357 |
<div id="tree-data" class="datacontainer" |
6315 |
06 Sep 13 |
nicklas |
358 |
data-experiment-id="<%=experimentId%>" |
6315 |
06 Sep 13 |
nicklas |
359 |
data-bioassayset-id="<%=bioAssaySetId%>" |
6315 |
06 Sep 13 |
nicklas |
360 |
data-transformation-id="<%=transformationId %>" |
6388 |
07 Jan 14 |
nicklas |
361 |
data-joust-tree="<%=HTML.encodeTags(json.toJSONString()) %>" |
6315 |
06 Sep 13 |
nicklas |
362 |
></div> |
4374 |
04 Jul 08 |
nicklas |
363 |
|
2298 |
19 May 06 |
nicklas |
364 |
<tbl:table |
2298 |
19 May 06 |
nicklas |
365 |
id="bioAssaySets" |
2298 |
19 May 06 |
nicklas |
366 |
columns="<%=cc.getSetting("columns")%>" |
2298 |
19 May 06 |
nicklas |
367 |
sortby="<%=cc.getSortProperty()%>" |
2298 |
19 May 06 |
nicklas |
368 |
direction="<%=cc.getSortDirection()%>" |
2298 |
19 May 06 |
nicklas |
369 |
action="<%=transformationId != 0 ? "../bioassaysets/index.jsp" : "index.jsp"%>" |
2298 |
19 May 06 |
nicklas |
370 |
sc="<%=sc%>" |
2298 |
19 May 06 |
nicklas |
371 |
item="<%=itemType%>" |
6700 |
30 Jan 15 |
nicklas |
372 |
filterrows="<%=cc.getFilterRows()%>" |
5952 |
10 Feb 12 |
nicklas |
373 |
subclass="<%=root == null ? "fulltable" : "" %>" |
7982 |
14 Jun 21 |
nicklas |
374 |
stickyheaders="<%=cc.getSetting("columns.sticky", "name")%>" |
2298 |
19 May 06 |
nicklas |
375 |
> |
2298 |
19 May 06 |
nicklas |
376 |
<tbl:hidden |
2298 |
19 May 06 |
nicklas |
377 |
name="mode" |
2298 |
19 May 06 |
nicklas |
378 |
value="<%=mode.getName()%>" |
2298 |
19 May 06 |
nicklas |
379 |
/> |
2298 |
19 May 06 |
nicklas |
380 |
<tbl:hidden |
2298 |
19 May 06 |
nicklas |
381 |
name="experiment_id" |
2298 |
19 May 06 |
nicklas |
382 |
value="<%=String.valueOf(experimentId)%>" |
2298 |
19 May 06 |
nicklas |
383 |
/> |
2298 |
19 May 06 |
nicklas |
384 |
<tbl:hidden |
2298 |
19 May 06 |
nicklas |
385 |
name="item_id" |
2298 |
19 May 06 |
nicklas |
386 |
value="<%=String.valueOf(bioAssaySetId)%>" |
2298 |
19 May 06 |
nicklas |
387 |
skip="<%=bioAssaySetId == 0%>" |
2298 |
19 May 06 |
nicklas |
388 |
/> |
2298 |
19 May 06 |
nicklas |
389 |
<tbl:hidden |
2298 |
19 May 06 |
nicklas |
390 |
name="transformation_id" |
2298 |
19 May 06 |
nicklas |
391 |
value="<%=String.valueOf(transformationId)%>" |
2298 |
19 May 06 |
nicklas |
392 |
skip="<%=transformationId == 0%>" |
2298 |
19 May 06 |
nicklas |
393 |
/> |
2298 |
19 May 06 |
nicklas |
394 |
<tbl:hidden |
2298 |
19 May 06 |
nicklas |
395 |
name="callback" |
2298 |
19 May 06 |
nicklas |
396 |
value="<%=callback%>" |
2298 |
19 May 06 |
nicklas |
397 |
skip="<%=callback == null%>" |
2298 |
19 May 06 |
nicklas |
398 |
/> |
2298 |
19 May 06 |
nicklas |
399 |
<tbl:hidden |
2298 |
19 May 06 |
nicklas |
400 |
name="closed" |
2298 |
19 May 06 |
nicklas |
401 |
value="<%=closed == null ? "," : ","+Values.getString(closed, ",", true)+","%>" |
2298 |
19 May 06 |
nicklas |
402 |
/> |
2298 |
19 May 06 |
nicklas |
403 |
<tbl:columndef |
2298 |
19 May 06 |
nicklas |
404 |
id="name" |
2298 |
19 May 06 |
nicklas |
405 |
property="name" |
2298 |
19 May 06 |
nicklas |
406 |
datatype="string" |
2298 |
19 May 06 |
nicklas |
407 |
title="Name" |
2298 |
19 May 06 |
nicklas |
408 |
sortable="true" |
2298 |
19 May 06 |
nicklas |
409 |
filterable="true" |
2298 |
19 May 06 |
nicklas |
410 |
exportable="true" |
2298 |
19 May 06 |
nicklas |
411 |
show="always" |
2298 |
19 May 06 |
nicklas |
412 |
/> |
2298 |
19 May 06 |
nicklas |
413 |
<tbl:columndef |
2298 |
19 May 06 |
nicklas |
414 |
id="spots" |
2298 |
19 May 06 |
nicklas |
415 |
property="numSpots" |
2298 |
19 May 06 |
nicklas |
416 |
datatype="int" |
4338 |
17 Jun 08 |
nicklas |
417 |
title="Spots/Values in db" |
2298 |
19 May 06 |
nicklas |
418 |
sortable="true" |
2298 |
19 May 06 |
nicklas |
419 |
filterable="true" |
2298 |
19 May 06 |
nicklas |
420 |
exportable="true" |
2298 |
19 May 06 |
nicklas |
421 |
/> |
2298 |
19 May 06 |
nicklas |
422 |
<tbl:columndef |
2298 |
19 May 06 |
nicklas |
423 |
id="reporters" |
2298 |
19 May 06 |
nicklas |
424 |
property="numReporters" |
2298 |
19 May 06 |
nicklas |
425 |
datatype="int" |
4338 |
17 Jun 08 |
nicklas |
426 |
title="Reporters in db" |
2298 |
19 May 06 |
nicklas |
427 |
sortable="true" |
2298 |
19 May 06 |
nicklas |
428 |
filterable="true" |
2298 |
19 May 06 |
nicklas |
429 |
exportable="true" |
2298 |
19 May 06 |
nicklas |
430 |
/> |
2298 |
19 May 06 |
nicklas |
431 |
<tbl:columndef |
4338 |
17 Jun 08 |
nicklas |
432 |
id="fileSpots" |
4338 |
17 Jun 08 |
nicklas |
433 |
property="numFileSpots" |
4338 |
17 Jun 08 |
nicklas |
434 |
datatype="int" |
4338 |
17 Jun 08 |
nicklas |
435 |
title="Spots/Values in file" |
4338 |
17 Jun 08 |
nicklas |
436 |
sortable="true" |
4338 |
17 Jun 08 |
nicklas |
437 |
filterable="true" |
4338 |
17 Jun 08 |
nicklas |
438 |
exportable="true" |
4338 |
17 Jun 08 |
nicklas |
439 |
/> |
4338 |
17 Jun 08 |
nicklas |
440 |
<tbl:columndef |
4338 |
17 Jun 08 |
nicklas |
441 |
id="fileReporters" |
4338 |
17 Jun 08 |
nicklas |
442 |
property="numFileReporters" |
4338 |
17 Jun 08 |
nicklas |
443 |
datatype="int" |
4338 |
17 Jun 08 |
nicklas |
444 |
title="Reporters in file" |
4338 |
17 Jun 08 |
nicklas |
445 |
sortable="true" |
4338 |
17 Jun 08 |
nicklas |
446 |
filterable="true" |
4338 |
17 Jun 08 |
nicklas |
447 |
exportable="true" |
4338 |
17 Jun 08 |
nicklas |
448 |
/> |
4338 |
17 Jun 08 |
nicklas |
449 |
<tbl:columndef |
2298 |
19 May 06 |
nicklas |
450 |
id="date" |
2298 |
19 May 06 |
nicklas |
451 |
property="transformation.job.ended" |
6040 |
30 Mar 12 |
nicklas |
452 |
datatype="timestamp" |
2298 |
19 May 06 |
nicklas |
453 |
title="Date" |
2298 |
19 May 06 |
nicklas |
454 |
sortable="true" |
2298 |
19 May 06 |
nicklas |
455 |
filterable="true" |
2298 |
19 May 06 |
nicklas |
456 |
exportable="true" |
2298 |
19 May 06 |
nicklas |
457 |
/> |
2298 |
19 May 06 |
nicklas |
458 |
<tbl:columndef |
2298 |
19 May 06 |
nicklas |
459 |
id="plugin" |
2298 |
19 May 06 |
nicklas |
460 |
property="transformation.job.pluginDefinition.name" |
2298 |
19 May 06 |
nicklas |
461 |
datatype="string" |
2298 |
19 May 06 |
nicklas |
462 |
title="Plugin" |
2298 |
19 May 06 |
nicklas |
463 |
sortable="true" |
2298 |
19 May 06 |
nicklas |
464 |
filterable="true" |
2298 |
19 May 06 |
nicklas |
465 |
exportable="true" |
2298 |
19 May 06 |
nicklas |
466 |
/> |
2298 |
19 May 06 |
nicklas |
467 |
<tbl:columndef |
2298 |
19 May 06 |
nicklas |
468 |
id="description" |
2298 |
19 May 06 |
nicklas |
469 |
property="description" |
2298 |
19 May 06 |
nicklas |
470 |
datatype="string" |
2298 |
19 May 06 |
nicklas |
471 |
title="Description" |
2298 |
19 May 06 |
nicklas |
472 |
sortable="true" |
2298 |
19 May 06 |
nicklas |
473 |
filterable="true" |
2298 |
19 May 06 |
nicklas |
474 |
exportable="true" |
2298 |
19 May 06 |
nicklas |
475 |
/> |
2892 |
10 Nov 06 |
nicklas |
476 |
<% |
6541 |
29 Sep 14 |
nicklas |
477 |
for (AnnotationLoaderUtil loader : annotationLoaders) |
2892 |
10 Nov 06 |
nicklas |
478 |
{ |
6541 |
29 Sep 14 |
nicklas |
479 |
AnnotationType at = loader.getAnnotationType(); |
2892 |
10 Nov 06 |
nicklas |
480 |
Enumeration<String, String> annotationEnum = null; |
7605 |
26 Feb 19 |
nicklas |
481 |
Formatter<Object> formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType()); |
2892 |
10 Nov 06 |
nicklas |
482 |
if (at.isEnumeration()) |
2892 |
10 Nov 06 |
nicklas |
483 |
{ |
2892 |
10 Nov 06 |
nicklas |
484 |
annotationEnum = new Enumeration<String, String>(); |
6784 |
18 Mar 15 |
nicklas |
485 |
if (!at.getDisplayAsList()) annotationEnum.add("", "-none-"); |
2892 |
10 Nov 06 |
nicklas |
486 |
List<?> values = at.getValues(); |
2892 |
10 Nov 06 |
nicklas |
487 |
for (Object value : values) |
2892 |
10 Nov 06 |
nicklas |
488 |
{ |
2942 |
22 Nov 06 |
nicklas |
489 |
String encoded = formatter.format(value); |
2892 |
10 Nov 06 |
nicklas |
490 |
annotationEnum.add(encoded, encoded); |
2892 |
10 Nov 06 |
nicklas |
491 |
} |
2892 |
10 Nov 06 |
nicklas |
492 |
} |
2892 |
10 Nov 06 |
nicklas |
493 |
%> |
2892 |
10 Nov 06 |
nicklas |
494 |
<tbl:columndef |
2892 |
10 Nov 06 |
nicklas |
495 |
id="<%="at"+at.getId()%>" |
2892 |
10 Nov 06 |
nicklas |
496 |
title="<%=HTML.encodeTags(at.getName())+" [A]"%>" |
2892 |
10 Nov 06 |
nicklas |
497 |
property="<%="#"+at.getId()%>" |
2892 |
10 Nov 06 |
nicklas |
498 |
annotation="true" |
2892 |
10 Nov 06 |
nicklas |
499 |
datatype="<%=at.getValueType().getStringValue()%>" |
2892 |
10 Nov 06 |
nicklas |
500 |
enumeration="<%=annotationEnum%>" |
5674 |
27 Jun 11 |
nicklas |
501 |
smartenum="<%=at.getDisplayAsList() %>" |
6027 |
23 Mar 12 |
nicklas |
502 |
sortable="<%=at.getMultiplicity() == 1%>" |
2892 |
10 Nov 06 |
nicklas |
503 |
filterable="true" |
2892 |
10 Nov 06 |
nicklas |
504 |
exportable="true" |
2942 |
22 Nov 06 |
nicklas |
505 |
formatter="<%=formatter%>" |
4560 |
06 Oct 08 |
nicklas |
506 |
unit="<%=at.getDefaultUnit()%>" |
2892 |
10 Nov 06 |
nicklas |
507 |
/> |
2892 |
10 Nov 06 |
nicklas |
508 |
<% |
2892 |
10 Nov 06 |
nicklas |
509 |
} |
2892 |
10 Nov 06 |
nicklas |
510 |
%> |
2298 |
19 May 06 |
nicklas |
511 |
<tbl:columndef |
2298 |
19 May 06 |
nicklas |
512 |
id="tools" |
2298 |
19 May 06 |
nicklas |
513 |
title="Tools" |
2298 |
19 May 06 |
nicklas |
514 |
/> |
6040 |
30 Mar 12 |
nicklas |
515 |
<tbl:columndef |
6040 |
30 Mar 12 |
nicklas |
516 |
id="xt-columns" |
6040 |
30 Mar 12 |
nicklas |
517 |
extensions="<%=columnsInvoker%>" |
6040 |
30 Mar 12 |
nicklas |
518 |
jspcontext="<%=jspContext%>" |
6040 |
30 Mar 12 |
nicklas |
519 |
/> |
2298 |
19 May 06 |
nicklas |
520 |
|
5952 |
10 Feb 12 |
nicklas |
521 |
<div class="panelgroup"> |
2298 |
19 May 06 |
nicklas |
522 |
<tbl:toolbar |
2298 |
19 May 06 |
nicklas |
523 |
visible="<%=mode.hasToolbar()%>" |
6700 |
30 Jan 15 |
nicklas |
524 |
subclass="<%=root == null ? "bottomborder bg-filled-50" : "topborder leftborder rightborder bg-filled-50" %>" |
2298 |
19 May 06 |
nicklas |
525 |
> |
2298 |
19 May 06 |
nicklas |
526 |
<tbl:button |
6315 |
06 Sep 13 |
nicklas |
527 |
id="btnNewRootBioAssaySet" |
5942 |
01 Feb 12 |
nicklas |
528 |
disabled="<%=!createPermission%>" |
5945 |
02 Feb 12 |
nicklas |
529 |
image="new.png" |
2298 |
19 May 06 |
nicklas |
530 |
title="New root bioassay set…" |
2309 |
22 May 06 |
nicklas |
531 |
tooltip="<%=createPermission ? "Create a new root bioassay set" : "You do not have permission to create bioassay sets"%>" |
2298 |
19 May 06 |
nicklas |
532 |
visible="<%=root == null && pluginCount.containsKey(Plugin.MainType.INTENSITY)%>" |
2298 |
19 May 06 |
nicklas |
533 |
/> |
2298 |
19 May 06 |
nicklas |
534 |
<tbl:button |
6315 |
06 Sep 13 |
nicklas |
535 |
id="btnDeleteTreeItems" |
5942 |
01 Feb 12 |
nicklas |
536 |
disabled="<%=!deletePermission%>" |
5946 |
03 Feb 12 |
nicklas |
537 |
image="delete.png" |
2298 |
19 May 06 |
nicklas |
538 |
title="Delete" |
2298 |
19 May 06 |
nicklas |
539 |
tooltip="<%=deletePermission ? "Delete the selected items" : "You do not have permission to delete items"%>" |
2298 |
19 May 06 |
nicklas |
540 |
/> |
2298 |
19 May 06 |
nicklas |
541 |
<tbl:button |
6315 |
06 Sep 13 |
nicklas |
542 |
id="btnRestoreTreeItems" |
5942 |
01 Feb 12 |
nicklas |
543 |
disabled="<%=!writePermission%>" |
5946 |
03 Feb 12 |
nicklas |
544 |
image="restore.png" |
2298 |
19 May 06 |
nicklas |
545 |
title="Restore" |
2298 |
19 May 06 |
nicklas |
546 |
tooltip="<%=writePermission ? "Restore the selected (deleted) items" : "You do not have permission to restore items"%>" |
2298 |
19 May 06 |
nicklas |
547 |
/> |
2298 |
19 May 06 |
nicklas |
548 |
<tbl:button |
6315 |
06 Sep 13 |
nicklas |
549 |
id="btnTreeColumns" |
5945 |
02 Feb 12 |
nicklas |
550 |
image="columns.png" |
2298 |
19 May 06 |
nicklas |
551 |
title="Columns…" |
2298 |
19 May 06 |
nicklas |
552 |
tooltip="Show, hide and re-order columns" |
2298 |
19 May 06 |
nicklas |
553 |
/> |
2298 |
19 May 06 |
nicklas |
554 |
<tbl:button |
6315 |
06 Sep 13 |
nicklas |
555 |
id="btnTreeImport" |
6315 |
06 Sep 13 |
nicklas |
556 |
data-plugin-type="IMPORT" |
5946 |
03 Feb 12 |
nicklas |
557 |
image="import.png" |
2298 |
19 May 06 |
nicklas |
558 |
title="Import…" |
2298 |
19 May 06 |
nicklas |
559 |
tooltip="Import data" |
2298 |
19 May 06 |
nicklas |
560 |
visible="<%=pluginCount.containsKey(Plugin.MainType.IMPORT)%>" |
2298 |
19 May 06 |
nicklas |
561 |
/> |
2298 |
19 May 06 |
nicklas |
562 |
<tbl:button |
6315 |
06 Sep 13 |
nicklas |
563 |
id="btnTreeExport" |
6315 |
06 Sep 13 |
nicklas |
564 |
data-plugin-type="EXPORT" |
5946 |
03 Feb 12 |
nicklas |
565 |
image="export.png" |
2298 |
19 May 06 |
nicklas |
566 |
title="Export…" |
2298 |
19 May 06 |
nicklas |
567 |
tooltip="Export data" |
2298 |
19 May 06 |
nicklas |
568 |
visible="<%=pluginCount.containsKey(Plugin.MainType.EXPORT)%>" |
2298 |
19 May 06 |
nicklas |
569 |
/> |
2298 |
19 May 06 |
nicklas |
570 |
<tbl:button |
6315 |
06 Sep 13 |
nicklas |
571 |
id="btnTreeRunPlugin" |
6315 |
06 Sep 13 |
nicklas |
572 |
data-plugin-type="OTHER" |
5945 |
02 Feb 12 |
nicklas |
573 |
image="runplugin.png" |
2298 |
19 May 06 |
nicklas |
574 |
title="Run plugin…" |
2298 |
19 May 06 |
nicklas |
575 |
tooltip="Run a plugin" |
2298 |
19 May 06 |
nicklas |
576 |
visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>" |
2298 |
19 May 06 |
nicklas |
577 |
/> |
4871 |
01 Apr 09 |
nicklas |
578 |
<ext:render extensions="<%=toolbarInvoker%>" context="<%=jspContext%>" |
7604 |
25 Feb 19 |
nicklas |
579 |
wrapper="<%=new PrefixSuffixRenderer<ButtonAction>(jspContext, "<td>", "</td>") %>"/> |
2298 |
19 May 06 |
nicklas |
580 |
</tbl:toolbar> |
5952 |
10 Feb 12 |
nicklas |
581 |
</div> |
5952 |
10 Feb 12 |
nicklas |
582 |
<tbl:data style="<%=root == null ? "top: 1.75em;" : "" %>"> |
5948 |
08 Feb 12 |
nicklas |
583 |
<tbl:headers> |
5948 |
08 Feb 12 |
nicklas |
584 |
<tbl:headerrow> |
7943 |
04 May 21 |
nicklas |
585 |
<tbl:header clazz="row-index bg-filled-100"> |
6182 |
23 Oct 12 |
nicklas |
586 |
<tbl:presetselector |
7943 |
04 May 21 |
nicklas |
587 |
style="border-right: 0px; display: block;" |
6182 |
23 Oct 12 |
nicklas |
588 |
/> |
5952 |
10 Feb 12 |
nicklas |
589 |
</tbl:header> |
5948 |
08 Feb 12 |
nicklas |
590 |
<tbl:columnheaders /> |
5948 |
08 Feb 12 |
nicklas |
591 |
</tbl:headerrow> |
6700 |
30 Jan 15 |
nicklas |
592 |
<% |
6700 |
30 Jan 15 |
nicklas |
593 |
int numFilters = cc.getNumPropertyFilters(); |
6700 |
30 Jan 15 |
nicklas |
594 |
int numRows = cc.getFilterRows(); |
6700 |
30 Jan 15 |
nicklas |
595 |
for (int filterNo = 0; filterNo < numRows; filterNo++) |
6700 |
30 Jan 15 |
nicklas |
596 |
{ |
6700 |
30 Jan 15 |
nicklas |
597 |
boolean lastRow = filterNo == numRows-1; |
6700 |
30 Jan 15 |
nicklas |
598 |
%> |
6700 |
30 Jan 15 |
nicklas |
599 |
<tbl:headerrow> |
7943 |
04 May 21 |
nicklas |
600 |
<tbl:header subclass="row-index bg-filled-100"> |
7943 |
04 May 21 |
nicklas |
601 |
<div class="index-<%=mode.getName()%>"> |
7943 |
04 May 21 |
nicklas |
602 |
<div class="index"></div> |
7943 |
04 May 21 |
nicklas |
603 |
<div class="check"> |
7943 |
04 May 21 |
nicklas |
604 |
<base:icon |
7943 |
04 May 21 |
nicklas |
605 |
subclass="link table-check" |
7943 |
04 May 21 |
nicklas |
606 |
image="check_uncheck.png" |
7943 |
04 May 21 |
nicklas |
607 |
tooltip="Toggle all (use CTRL, ALT or SHIFT to check/uncheck)" |
7943 |
04 May 21 |
nicklas |
608 |
visible="<%=lastRow && mode.hasCheck()%>" |
7943 |
04 May 21 |
nicklas |
609 |
/> |
7943 |
04 May 21 |
nicklas |
610 |
</div> |
7943 |
04 May 21 |
nicklas |
611 |
<div class="icons"> |
7943 |
04 May 21 |
nicklas |
612 |
<base:icon |
7943 |
04 May 21 |
nicklas |
613 |
subclass="link table-filter-row-action" |
7943 |
04 May 21 |
nicklas |
614 |
image="add.png" |
7943 |
04 May 21 |
nicklas |
615 |
tooltip="Add extra filter row" |
7943 |
04 May 21 |
nicklas |
616 |
visible="<%=lastRow%>" |
7943 |
04 May 21 |
nicklas |
617 |
/><base:icon |
7943 |
04 May 21 |
nicklas |
618 |
subclass="link table-filter-row-action" |
7943 |
04 May 21 |
nicklas |
619 |
image="remove.png" |
7943 |
04 May 21 |
nicklas |
620 |
tooltip="Remove this filter row" |
7943 |
04 May 21 |
nicklas |
621 |
visible="<%=numRows > 1 || numFilters > 0 %>" |
7943 |
04 May 21 |
nicklas |
622 |
data-remove-row="<%=filterNo%>" |
7943 |
04 May 21 |
nicklas |
623 |
/> |
7943 |
04 May 21 |
nicklas |
624 |
</div> |
7943 |
04 May 21 |
nicklas |
625 |
</div> |
6700 |
30 Jan 15 |
nicklas |
626 |
</tbl:header> |
6700 |
30 Jan 15 |
nicklas |
627 |
<tbl:propertyfilter row="<%=filterNo%>" /> |
6700 |
30 Jan 15 |
nicklas |
628 |
</tbl:headerrow> |
6700 |
30 Jan 15 |
nicklas |
629 |
<% |
6700 |
30 Jan 15 |
nicklas |
630 |
} |
6700 |
30 Jan 15 |
nicklas |
631 |
%> |
7913 |
22 Feb 21 |
nicklas |
632 |
<tbl:columnsubtitles /> |
5948 |
08 Feb 12 |
nicklas |
633 |
</tbl:headers> |
5948 |
08 Feb 12 |
nicklas |
634 |
<tbl:rows> |
2298 |
19 May 06 |
nicklas |
635 |
<% |
5952 |
10 Feb 12 |
nicklas |
636 |
if (cc.getMessage() != null) |
5952 |
10 Feb 12 |
nicklas |
637 |
{ |
5952 |
10 Feb 12 |
nicklas |
638 |
%> |
6604 |
18 Nov 14 |
nicklas |
639 |
<tbl:panel subclass="bg-filled-50"> |
5952 |
10 Feb 12 |
nicklas |
640 |
<div class="messagecontainer error"><%=cc.getMessage()%></div> |
5952 |
10 Feb 12 |
nicklas |
641 |
</tbl:panel> |
5952 |
10 Feb 12 |
nicklas |
642 |
<% |
5952 |
10 Feb 12 |
nicklas |
643 |
cc.setMessage(null); |
5952 |
10 Feb 12 |
nicklas |
644 |
} |
2298 |
19 May 06 |
nicklas |
645 |
int index = cc.getPage()*cc.getRowsPerPage(); |
2298 |
19 May 06 |
nicklas |
646 |
int selectedItemId = cc.getId(); |
2298 |
19 May 06 |
nicklas |
647 |
if (analysisTree != null) |
2507 |
09 Aug 06 |
martin |
648 |
{ |
2298 |
19 May 06 |
nicklas |
649 |
Iterator<Tree.Entry<BasicItem>> baas = analysisTree.entryIterator(root); |
2298 |
19 May 06 |
nicklas |
650 |
while (baas.hasNext()) |
2298 |
19 May 06 |
nicklas |
651 |
{ |
2298 |
19 May 06 |
nicklas |
652 |
Tree.Entry<BasicItem> entry = baas.next(); |
2298 |
19 May 06 |
nicklas |
653 |
BasicItem item = entry.getNode(); |
2298 |
19 May 06 |
nicklas |
654 |
if (item != null) |
2298 |
19 May 06 |
nicklas |
655 |
{ |
2298 |
19 May 06 |
nicklas |
656 |
int level = entry.getDepth() - 1; |
2298 |
19 May 06 |
nicklas |
657 |
int itemId = item.getId(); |
2298 |
19 May 06 |
nicklas |
658 |
String joustId = item.getType().name() + "_" + itemId; |
6388 |
07 Jan 14 |
nicklas |
659 |
|
6388 |
07 Jan 14 |
nicklas |
660 |
boolean isVisible = true; |
6388 |
07 Jan 14 |
nicklas |
661 |
BasicItem parent = entry.getParent().getNode(); |
6388 |
07 Jan 14 |
nicklas |
662 |
if (parent != null && closed != null) |
6388 |
07 Jan 14 |
nicklas |
663 |
{ |
6388 |
07 Jan 14 |
nicklas |
664 |
String parentId = parent.getType().name()+"_"+parent.getId(); |
6388 |
07 Jan 14 |
nicklas |
665 |
isVisible = !closed.contains(parentId); |
6388 |
07 Jan 14 |
nicklas |
666 |
if (!isVisible) closed.add(joustId); |
6388 |
07 Jan 14 |
nicklas |
667 |
} |
2664 |
26 Sep 06 |
nicklas |
668 |
String name = ""; |
2664 |
26 Sep 06 |
nicklas |
669 |
String description = ""; |
2507 |
09 Aug 06 |
martin |
670 |
String tooltip = mode.isSelectionMode() ? |
2507 |
09 Aug 06 |
martin |
671 |
"Select this item" : "View this item" + (writePermission ? " (use CTRL, ALT or SHIFT to edit)" : ""); |
2298 |
19 May 06 |
nicklas |
672 |
boolean removed = false; |
2298 |
19 May 06 |
nicklas |
673 |
Transformation t = null; |
2298 |
19 May 06 |
nicklas |
674 |
BioAssaySet bas = null; |
2664 |
26 Sep 06 |
nicklas |
675 |
ExtraValue xv = null; |
2745 |
18 Oct 06 |
nicklas |
676 |
PluginDefinition plugin = null; |
2745 |
18 Oct 06 |
nicklas |
677 |
Job job = null; |
2298 |
19 May 06 |
nicklas |
678 |
String prefix = ""; |
2298 |
19 May 06 |
nicklas |
679 |
ItemContext ccc = null; |
2664 |
26 Sep 06 |
nicklas |
680 |
Item itemType = item.getType(); |
2664 |
26 Sep 06 |
nicklas |
681 |
if (itemType == Item.TRANSFORMATION) |
2298 |
19 May 06 |
nicklas |
682 |
{ |
2298 |
19 May 06 |
nicklas |
683 |
t = (Transformation)item; |
2298 |
19 May 06 |
nicklas |
684 |
removed = t.isRemoved(); |
2298 |
19 May 06 |
nicklas |
685 |
prefix = "T:"; |
2298 |
19 May 06 |
nicklas |
686 |
ccc = tc; |
2664 |
26 Sep 06 |
nicklas |
687 |
name = HTML.encodeTags(t.getName()); |
2664 |
26 Sep 06 |
nicklas |
688 |
description = HTML.encodeTags(t.getDescription()); |
2745 |
18 Oct 06 |
nicklas |
689 |
try |
2745 |
18 Oct 06 |
nicklas |
690 |
{ |
2745 |
18 Oct 06 |
nicklas |
691 |
job = t.getJob(); |
2745 |
18 Oct 06 |
nicklas |
692 |
plugin = job.getPluginDefinition(); |
2745 |
18 Oct 06 |
nicklas |
693 |
} |
2745 |
18 Oct 06 |
nicklas |
694 |
catch (Throwable ex) |
2745 |
18 Oct 06 |
nicklas |
695 |
{} |
2298 |
19 May 06 |
nicklas |
696 |
} |
2664 |
26 Sep 06 |
nicklas |
697 |
else if (itemType == Item.BIOASSAYSET) |
2298 |
19 May 06 |
nicklas |
698 |
{ |
2298 |
19 May 06 |
nicklas |
699 |
bas = (BioAssaySet)item; |
2298 |
19 May 06 |
nicklas |
700 |
removed = bas.isRemoved(); |
2298 |
19 May 06 |
nicklas |
701 |
ccc = cc; |
2664 |
26 Sep 06 |
nicklas |
702 |
name = HTML.encodeTags(bas.getName()); |
2664 |
26 Sep 06 |
nicklas |
703 |
description = HTML.encodeTags(bas.getDescription()); |
2298 |
19 May 06 |
nicklas |
704 |
} |
2664 |
26 Sep 06 |
nicklas |
705 |
else if (itemType == Item.EXTRAVALUE) |
2664 |
26 Sep 06 |
nicklas |
706 |
{ |
2664 |
26 Sep 06 |
nicklas |
707 |
xv = (ExtraValue)item; |
2664 |
26 Sep 06 |
nicklas |
708 |
prefix = "X:"; |
2664 |
26 Sep 06 |
nicklas |
709 |
removed = false; |
2664 |
26 Sep 06 |
nicklas |
710 |
ccc = xvc; |
2745 |
18 Oct 06 |
nicklas |
711 |
try |
2745 |
18 Oct 06 |
nicklas |
712 |
{ |
3580 |
20 Jul 07 |
nicklas |
713 |
ExtraValueType xvType = xv.getExtraValueType(); |
3580 |
20 Jul 07 |
nicklas |
714 |
name = HTML.encodeTags(xvType.getName()); |
3580 |
20 Jul 07 |
nicklas |
715 |
description = HTML.encodeTags(xvType.getDescription()); |
3580 |
20 Jul 07 |
nicklas |
716 |
} |
3580 |
20 Jul 07 |
nicklas |
717 |
catch (PermissionDeniedException ex) |
3580 |
20 Jul 07 |
nicklas |
718 |
{ |
3580 |
20 Jul 07 |
nicklas |
719 |
name = xv.getValueType().toString(); |
3580 |
20 Jul 07 |
nicklas |
720 |
description = ""; |
3580 |
20 Jul 07 |
nicklas |
721 |
} |
3580 |
20 Jul 07 |
nicklas |
722 |
try |
3580 |
20 Jul 07 |
nicklas |
723 |
{ |
2745 |
18 Oct 06 |
nicklas |
724 |
job = xv.getJob(); |
2745 |
18 Oct 06 |
nicklas |
725 |
plugin = job.getPluginDefinition(); |
2745 |
18 Oct 06 |
nicklas |
726 |
} |
2745 |
18 Oct 06 |
nicklas |
727 |
catch (Throwable ex) |
2745 |
18 Oct 06 |
nicklas |
728 |
{} |
2664 |
26 Sep 06 |
nicklas |
729 |
} |
2298 |
19 May 06 |
nicklas |
730 |
|
2298 |
19 May 06 |
nicklas |
731 |
index++; |
2298 |
19 May 06 |
nicklas |
732 |
numListed++; |
2298 |
19 May 06 |
nicklas |
733 |
%> |
2298 |
19 May 06 |
nicklas |
734 |
<tbl:row |
2298 |
19 May 06 |
nicklas |
735 |
id="<%="row."+joustId%>" |
6388 |
07 Jan 14 |
nicklas |
736 |
style="<%=isVisible ? "" : "display: none;" %>" |
2298 |
19 May 06 |
nicklas |
737 |
> |
7943 |
04 May 21 |
nicklas |
738 |
<tbl:header clazz="row-index bg-filled-100"> |
7943 |
04 May 21 |
nicklas |
739 |
<div class="index-<%=mode.getName()%>"> |
7943 |
04 May 21 |
nicklas |
740 |
<div class="index <%=index>999?"index-smaller":""%>"><%=index%></div> |
7943 |
04 May 21 |
nicklas |
741 |
<div class="check"> |
7943 |
04 May 21 |
nicklas |
742 |
<base:input |
7943 |
04 May 21 |
nicklas |
743 |
type="checkbox" |
7943 |
04 May 21 |
nicklas |
744 |
name="<%=prefix+itemId%>" |
7943 |
04 May 21 |
nicklas |
745 |
value="<%=itemId%>" |
7943 |
04 May 21 |
nicklas |
746 |
title="<%=name%>" |
7943 |
04 May 21 |
nicklas |
747 |
checked="<%=cc.getSelected().contains(itemId)%>" |
7943 |
04 May 21 |
nicklas |
748 |
visible="<%=mode.hasCheck()%>" |
7943 |
04 May 21 |
nicklas |
749 |
/> |
7943 |
04 May 21 |
nicklas |
750 |
<base:input |
7943 |
04 May 21 |
nicklas |
751 |
type="radio" |
7943 |
04 May 21 |
nicklas |
752 |
name="item_id" |
7943 |
04 May 21 |
nicklas |
753 |
value="<%=itemId%>" |
7943 |
04 May 21 |
nicklas |
754 |
title="<%=name%>" |
7943 |
04 May 21 |
nicklas |
755 |
checked="<%=selectedItemId == itemId%>" |
7943 |
04 May 21 |
nicklas |
756 |
visible="<%=mode.hasRadio()%>" |
7943 |
04 May 21 |
nicklas |
757 |
/> |
7943 |
04 May 21 |
nicklas |
758 |
</div> |
7943 |
04 May 21 |
nicklas |
759 |
<div class="icons"> |
7943 |
04 May 21 |
nicklas |
760 |
<base:icon |
7943 |
04 May 21 |
nicklas |
761 |
image="deleted.png" |
7943 |
04 May 21 |
nicklas |
762 |
id="<%="delete."+itemId %>" |
7943 |
04 May 21 |
nicklas |
763 |
subclass="<%=deletePermission ? "table-delete-item" : "disabled" %>" |
7943 |
04 May 21 |
nicklas |
764 |
data-item-type="<%=itemType.name() %>" |
7943 |
04 May 21 |
nicklas |
765 |
data-item-id="<%=itemId%>" |
7943 |
04 May 21 |
nicklas |
766 |
data-notify="reloadOnNotify" |
7943 |
04 May 21 |
nicklas |
767 |
tooltip="This item has been scheduled for deletion" |
7943 |
04 May 21 |
nicklas |
768 |
visible="<%=removed%>" |
7943 |
04 May 21 |
nicklas |
769 |
/> |
7943 |
04 May 21 |
nicklas |
770 |
</div> |
7943 |
04 May 21 |
nicklas |
771 |
</div> |
7943 |
04 May 21 |
nicklas |
772 |
</tbl:header> |
6388 |
07 Jan 14 |
nicklas |
773 |
<tbl:cell clazz="cell joust" column="name"> |
6388 |
07 Jan 14 |
nicklas |
774 |
<div id="<%=joustId%>" class="link auto-init" |
6315 |
06 Sep 13 |
nicklas |
775 |
data-auto-init="item-link" |
6315 |
06 Sep 13 |
nicklas |
776 |
data-item-type="<%=itemType.name() %>" |
6315 |
06 Sep 13 |
nicklas |
777 |
data-item-id="<%=itemId %>" |
6315 |
06 Sep 13 |
nicklas |
778 |
data-no-edit="<%=writePermission ? 0 : 1 %>" |
6315 |
06 Sep 13 |
nicklas |
779 |
tabindex="0" |
6388 |
07 Jan 14 |
nicklas |
780 |
title="<%=tooltip%>"><%=name%></div> |
2298 |
19 May 06 |
nicklas |
781 |
</tbl:cell> |
2298 |
19 May 06 |
nicklas |
782 |
<% |
2298 |
19 May 06 |
nicklas |
783 |
if (t != null) |
2298 |
19 May 06 |
nicklas |
784 |
{ |
2298 |
19 May 06 |
nicklas |
785 |
%> |
2664 |
26 Sep 06 |
nicklas |
786 |
<tbl:cell column="spots"> </tbl:cell> |
2664 |
26 Sep 06 |
nicklas |
787 |
<tbl:cell column="reporters"> </tbl:cell> |
4338 |
17 Jun 08 |
nicklas |
788 |
<tbl:cell column="fileSpots"> </tbl:cell> |
4338 |
17 Jun 08 |
nicklas |
789 |
<tbl:cell column="fileReporters"> </tbl:cell> |
6143 |
20 Sep 12 |
nicklas |
790 |
<tbl:cell column="tools" style="white-space: nowrap;"> |
2745 |
18 Oct 06 |
nicklas |
791 |
<% |
6372 |
06 Dec 13 |
nicklas |
792 |
if (createPermission && job != null && plugin != null && plugin.isInteractive() && plugin.hasPermission(Permission.USE)) |
2745 |
18 Oct 06 |
nicklas |
793 |
{ |
6372 |
06 Dec 13 |
nicklas |
794 |
// User may not have permission to read plug-in configuration for job |
6372 |
06 Dec 13 |
nicklas |
795 |
boolean copyTransformationAllowed = false; |
6372 |
06 Dec 13 |
nicklas |
796 |
try |
6372 |
06 Dec 13 |
nicklas |
797 |
{ |
6372 |
06 Dec 13 |
nicklas |
798 |
PluginConfiguration pluginConfig = job.getPluginConfiguration(); |
6372 |
06 Dec 13 |
nicklas |
799 |
if (pluginConfig == null || pluginConfig.hasPermission(Permission.USE)) |
6372 |
06 Dec 13 |
nicklas |
800 |
{ |
6372 |
06 Dec 13 |
nicklas |
801 |
copyTransformationAllowed = true; |
6372 |
06 Dec 13 |
nicklas |
802 |
} |
6372 |
06 Dec 13 |
nicklas |
803 |
} |
6372 |
06 Dec 13 |
nicklas |
804 |
catch (Exception e) |
6372 |
06 Dec 13 |
nicklas |
805 |
{} |
6372 |
06 Dec 13 |
nicklas |
806 |
if (copyTransformationAllowed) |
6372 |
06 Dec 13 |
nicklas |
807 |
{ |
6372 |
06 Dec 13 |
nicklas |
808 |
%> |
6372 |
06 Dec 13 |
nicklas |
809 |
<base:icon |
6372 |
06 Dec 13 |
nicklas |
810 |
subclass="link auto-init" |
6372 |
06 Dec 13 |
nicklas |
811 |
data-auto-init="copy-job" |
6372 |
06 Dec 13 |
nicklas |
812 |
data-job-id="<%=job.getId() %>" |
6372 |
06 Dec 13 |
nicklas |
813 |
image="copy.png" |
6372 |
06 Dec 13 |
nicklas |
814 |
tooltip="Copy this transformation" |
6372 |
06 Dec 13 |
nicklas |
815 |
/> |
6372 |
06 Dec 13 |
nicklas |
816 |
<% |
6372 |
06 Dec 13 |
nicklas |
817 |
} |
2745 |
18 Oct 06 |
nicklas |
818 |
} |
2745 |
18 Oct 06 |
nicklas |
819 |
%> |
4871 |
01 Apr 09 |
nicklas |
820 |
<ext:render extensions="<%=toolsInvoker%>" context="<%=jspContext%>" item="<%=item%>" /> |
2745 |
18 Oct 06 |
nicklas |
821 |
</tbl:cell> |
2298 |
19 May 06 |
nicklas |
822 |
<% |
2298 |
19 May 06 |
nicklas |
823 |
} |
2664 |
26 Sep 06 |
nicklas |
824 |
if (bas != null) |
2298 |
19 May 06 |
nicklas |
825 |
{ |
2298 |
19 May 06 |
nicklas |
826 |
%> |
2664 |
26 Sep 06 |
nicklas |
827 |
<tbl:cell column="spots"><%=bas.getNumSpots()%></tbl:cell> |
2664 |
26 Sep 06 |
nicklas |
828 |
<tbl:cell column="reporters"><%=bas.getNumReporters()%></tbl:cell> |
4338 |
17 Jun 08 |
nicklas |
829 |
<tbl:cell column="fileSpots"><%=bas.getNumFileSpots()%></tbl:cell> |
4338 |
17 Jun 08 |
nicklas |
830 |
<tbl:cell column="fileReporters"><%=bas.getNumFileReporters()%></tbl:cell> |
2298 |
19 May 06 |
nicklas |
831 |
<tbl:cell column="date"> </tbl:cell> |
2298 |
19 May 06 |
nicklas |
832 |
<tbl:cell column="plugin"> </tbl:cell> |
2892 |
10 Nov 06 |
nicklas |
833 |
<% |
6541 |
29 Sep 14 |
nicklas |
834 |
if (bas.isAnnotated()) |
2892 |
10 Nov 06 |
nicklas |
835 |
{ |
6541 |
29 Sep 14 |
nicklas |
836 |
AnnotationSetSnapshot snapshot = manager.getSnapshot(dc, bas.getAnnotationSet().getId()); |
6541 |
29 Sep 14 |
nicklas |
837 |
for (AnnotationLoaderUtil loader : annotationLoaders) |
2942 |
22 Nov 06 |
nicklas |
838 |
{ |
6721 |
10 Feb 15 |
nicklas |
839 |
%> |
6721 |
10 Feb 15 |
nicklas |
840 |
<tbl:cell |
6721 |
10 Feb 15 |
nicklas |
841 |
column="<%="at"+loader.getId()%>" |
6721 |
10 Feb 15 |
nicklas |
842 |
><% |
7337 |
12 Apr 17 |
nicklas |
843 |
if (loader.find(snapshot, psInfo.reset())) |
6721 |
10 Feb 15 |
nicklas |
844 |
{ |
6721 |
10 Feb 15 |
nicklas |
845 |
%><tbl:cellvalue |
6541 |
29 Sep 14 |
nicklas |
846 |
list="<%=loader.getValues()%>" |
8160 |
07 Jun 23 |
nicklas |
847 |
bulletlist="<%=loader.useBulletList() %>" |
6541 |
29 Sep 14 |
nicklas |
848 |
suffix="<%=loader.getUnitSymbol()%>" |
8083 |
20 Oct 22 |
nicklas |
849 |
clazz="<%=psInfo.hasProjectSpecificAnnotation() ? "ps-annotation" : null%>" |
6721 |
10 Feb 15 |
nicklas |
850 |
/><% |
6721 |
10 Feb 15 |
nicklas |
851 |
} |
6721 |
10 Feb 15 |
nicklas |
852 |
%></tbl:cell> |
6721 |
10 Feb 15 |
nicklas |
853 |
<% |
2942 |
22 Nov 06 |
nicklas |
854 |
} |
2892 |
10 Nov 06 |
nicklas |
855 |
} |
2892 |
10 Nov 06 |
nicklas |
856 |
%> |
6143 |
20 Sep 12 |
nicklas |
857 |
<tbl:cell column="tools" style="white-space: nowrap;"> |
4338 |
17 Jun 08 |
nicklas |
858 |
<% |
4338 |
17 Jun 08 |
nicklas |
859 |
if (bas.getNumSpots() > 0) |
4338 |
17 Jun 08 |
nicklas |
860 |
{ |
4338 |
17 Jun 08 |
nicklas |
861 |
%> |
6315 |
06 Sep 13 |
nicklas |
862 |
<base:icon |
6315 |
06 Sep 13 |
nicklas |
863 |
subclass="link auto-init" |
6315 |
06 Sep 13 |
nicklas |
864 |
data-auto-init="bioassayset-plotter" |
6315 |
06 Sep 13 |
nicklas |
865 |
data-item-id="<%=itemId %>" |
6315 |
06 Sep 13 |
nicklas |
866 |
image="plotter.png" |
6143 |
20 Sep 12 |
nicklas |
867 |
tooltip="A simple plot tool" |
6143 |
20 Sep 12 |
nicklas |
868 |
/> |
6315 |
06 Sep 13 |
nicklas |
869 |
<base:icon |
6315 |
06 Sep 13 |
nicklas |
870 |
subclass="link auto-init" |
6315 |
06 Sep 13 |
nicklas |
871 |
data-auto-init="experiment-explorer" |
6315 |
06 Sep 13 |
nicklas |
872 |
data-item-id="<%=itemId %>" |
6315 |
06 Sep 13 |
nicklas |
873 |
image="explorer.png" |
6143 |
20 Sep 12 |
nicklas |
874 |
tooltip="Experiment explorer" |
6143 |
20 Sep 12 |
nicklas |
875 |
/> |
4338 |
17 Jun 08 |
nicklas |
876 |
<% |
4338 |
17 Jun 08 |
nicklas |
877 |
} |
4338 |
17 Jun 08 |
nicklas |
878 |
%> |
6315 |
06 Sep 13 |
nicklas |
879 |
<base:icon |
6315 |
06 Sep 13 |
nicklas |
880 |
subclass="link auto-init" |
6315 |
06 Sep 13 |
nicklas |
881 |
data-auto-init="bioassayset-plugin" |
6315 |
06 Sep 13 |
nicklas |
882 |
data-plugin-type="EXPORT" |
6315 |
06 Sep 13 |
nicklas |
883 |
data-item-id="<%=itemId %>" |
6315 |
06 Sep 13 |
nicklas |
884 |
image="export.png" |
6143 |
20 Sep 12 |
nicklas |
885 |
tooltip="Export data" |
6143 |
20 Sep 12 |
nicklas |
886 |
/> |
2309 |
22 May 06 |
nicklas |
887 |
<% |
2309 |
22 May 06 |
nicklas |
888 |
if (createPermission) |
2309 |
22 May 06 |
nicklas |
889 |
{ |
2309 |
22 May 06 |
nicklas |
890 |
%> |
6315 |
06 Sep 13 |
nicklas |
891 |
<base:icon |
6315 |
06 Sep 13 |
nicklas |
892 |
subclass="link auto-init" |
6315 |
06 Sep 13 |
nicklas |
893 |
data-auto-init="bioassayset-plugin" |
6315 |
06 Sep 13 |
nicklas |
894 |
data-plugin-type="ANALYZE" |
6315 |
06 Sep 13 |
nicklas |
895 |
data-cmd="NewFilteredBioAssaySet" |
6315 |
06 Sep 13 |
nicklas |
896 |
data-item-id="<%=itemId %>" |
6315 |
06 Sep 13 |
nicklas |
897 |
image="filter.png" |
6143 |
20 Sep 12 |
nicklas |
898 |
tooltip="Create a filtered bioassay set" |
6143 |
20 Sep 12 |
nicklas |
899 |
/> |
6315 |
06 Sep 13 |
nicklas |
900 |
<base:icon |
6315 |
06 Sep 13 |
nicklas |
901 |
subclass="link auto-init" |
6315 |
06 Sep 13 |
nicklas |
902 |
data-auto-init="bioassayset-plugin" |
6315 |
06 Sep 13 |
nicklas |
903 |
data-plugin-type="ANALYZE" |
6315 |
06 Sep 13 |
nicklas |
904 |
data-item-id="<%=itemId %>" |
6315 |
06 Sep 13 |
nicklas |
905 |
image="runplugin.png" |
6143 |
20 Sep 12 |
nicklas |
906 |
tooltip="Run an analysis plugin" |
6143 |
20 Sep 12 |
nicklas |
907 |
/> |
2309 |
22 May 06 |
nicklas |
908 |
<% |
2309 |
22 May 06 |
nicklas |
909 |
} |
2309 |
22 May 06 |
nicklas |
910 |
%> |
4871 |
01 Apr 09 |
nicklas |
911 |
<ext:render extensions="<%=toolsInvoker%>" context="<%=jspContext%>" item="<%=item%>" /> |
2309 |
22 May 06 |
nicklas |
912 |
</tbl:cell> |
2298 |
19 May 06 |
nicklas |
913 |
<% |
2298 |
19 May 06 |
nicklas |
914 |
} |
2664 |
26 Sep 06 |
nicklas |
915 |
if (xv != null) |
2664 |
26 Sep 06 |
nicklas |
916 |
{ |
2664 |
26 Sep 06 |
nicklas |
917 |
%> |
2664 |
26 Sep 06 |
nicklas |
918 |
<tbl:cell column="spots"><%=xv.getNumValues()%></tbl:cell> |
2664 |
26 Sep 06 |
nicklas |
919 |
<tbl:cell column="reporters"> </tbl:cell> |
4338 |
17 Jun 08 |
nicklas |
920 |
<tbl:cell column="fileSpots"><%=xv.getNumFileValues()%></tbl:cell> |
4338 |
17 Jun 08 |
nicklas |
921 |
<tbl:cell column="fileReporters"> </tbl:cell> |
6143 |
20 Sep 12 |
nicklas |
922 |
<tbl:cell column="tools" style="white-space: nowrap;"> |
2745 |
18 Oct 06 |
nicklas |
923 |
<% |
6372 |
06 Dec 13 |
nicklas |
924 |
if (createPermission && job != null && plugin != null && plugin.isInteractive() && plugin.hasPermission(Permission.USE)) |
2745 |
18 Oct 06 |
nicklas |
925 |
{ |
6372 |
06 Dec 13 |
nicklas |
926 |
// User may not have permission to read plug-in configuration for job |
6372 |
06 Dec 13 |
nicklas |
927 |
boolean copyTransformationAllowed = false; |
6372 |
06 Dec 13 |
nicklas |
928 |
try |
6372 |
06 Dec 13 |
nicklas |
929 |
{ |
6372 |
06 Dec 13 |
nicklas |
930 |
PluginConfiguration pluginConfig = job.getPluginConfiguration(); |
6372 |
06 Dec 13 |
nicklas |
931 |
if (pluginConfig == null || pluginConfig.hasPermission(Permission.USE)) |
6372 |
06 Dec 13 |
nicklas |
932 |
{ |
6372 |
06 Dec 13 |
nicklas |
933 |
copyTransformationAllowed = true; |
6372 |
06 Dec 13 |
nicklas |
934 |
} |
6372 |
06 Dec 13 |
nicklas |
935 |
} |
6372 |
06 Dec 13 |
nicklas |
936 |
catch (Exception e) |
6372 |
06 Dec 13 |
nicklas |
937 |
{} |
6372 |
06 Dec 13 |
nicklas |
938 |
if (copyTransformationAllowed) |
6372 |
06 Dec 13 |
nicklas |
939 |
{ |
6372 |
06 Dec 13 |
nicklas |
940 |
%> |
6372 |
06 Dec 13 |
nicklas |
941 |
<base:icon |
6372 |
06 Dec 13 |
nicklas |
942 |
subclass="link auto-init" |
6372 |
06 Dec 13 |
nicklas |
943 |
data-auto-init="copy-job" |
6372 |
06 Dec 13 |
nicklas |
944 |
data-job-id="<%=job.getId() %>" |
6372 |
06 Dec 13 |
nicklas |
945 |
image="copy.png" |
6372 |
06 Dec 13 |
nicklas |
946 |
tooltip="Copy this extra value" |
6372 |
06 Dec 13 |
nicklas |
947 |
/> |
6372 |
06 Dec 13 |
nicklas |
948 |
<% |
6372 |
06 Dec 13 |
nicklas |
949 |
} |
2745 |
18 Oct 06 |
nicklas |
950 |
} |
2745 |
18 Oct 06 |
nicklas |
951 |
%> |
6143 |
20 Sep 12 |
nicklas |
952 |
<ext:render extensions="<%=toolsInvoker%>" context="<%=jspContext%>" item="<%=item%>" /> |
2745 |
18 Oct 06 |
nicklas |
953 |
</tbl:cell> |
2664 |
26 Sep 06 |
nicklas |
954 |
<% |
2664 |
26 Sep 06 |
nicklas |
955 |
} |
2298 |
19 May 06 |
nicklas |
956 |
%> |
2942 |
22 Nov 06 |
nicklas |
957 |
<tbl:cell column="date"><%=job == null ? "" : dateTimeFormatter.format(job.getEnded())%></tbl:cell> |
2745 |
18 Oct 06 |
nicklas |
958 |
<tbl:cell column="plugin"><%=plugin == null ? "" : Base.getLinkedName(ID, plugin, false, true)%></tbl:cell> |
2298 |
19 May 06 |
nicklas |
959 |
<tbl:cell column="description"><%=description%></tbl:cell> |
6040 |
30 Mar 12 |
nicklas |
960 |
<tbl:xt-cells dc="<%=dc%>" item="<%=item%>"> |
6040 |
30 Mar 12 |
nicklas |
961 |
<tbl:cell column="xt-columns" /> |
6040 |
30 Mar 12 |
nicklas |
962 |
</tbl:xt-cells> |
2298 |
19 May 06 |
nicklas |
963 |
</tbl:row> |
2298 |
19 May 06 |
nicklas |
964 |
<% |
2298 |
19 May 06 |
nicklas |
965 |
} |
2298 |
19 May 06 |
nicklas |
966 |
} |
2298 |
19 May 06 |
nicklas |
967 |
} |
5952 |
10 Feb 12 |
nicklas |
968 |
if (numListed == 0) |
5952 |
10 Feb 12 |
nicklas |
969 |
{ |
5952 |
10 Feb 12 |
nicklas |
970 |
%> |
6604 |
18 Nov 14 |
nicklas |
971 |
<tbl:panel subclass="bg-filled-50"> |
5952 |
10 Feb 12 |
nicklas |
972 |
<div class="messagecontainer note"> |
5952 |
10 Feb 12 |
nicklas |
973 |
No bioassay sets or transformations were found. |
5952 |
10 Feb 12 |
nicklas |
974 |
</div> |
5952 |
10 Feb 12 |
nicklas |
975 |
</tbl:panel> |
5952 |
10 Feb 12 |
nicklas |
976 |
<% |
5952 |
10 Feb 12 |
nicklas |
977 |
} |
2298 |
19 May 06 |
nicklas |
978 |
%> |
5952 |
10 Feb 12 |
nicklas |
979 |
</tbl:rows> |
5952 |
10 Feb 12 |
nicklas |
980 |
</tbl:data> |
2298 |
19 May 06 |
nicklas |
981 |
</tbl:table> |
2298 |
19 May 06 |
nicklas |
982 |
|
6315 |
06 Sep 13 |
nicklas |
983 |
<div id="reloadOnNotify"></div> |
2298 |
19 May 06 |
nicklas |
984 |
</base:body> |
2298 |
19 May 06 |
nicklas |
985 |
</base:page> |
2298 |
19 May 06 |
nicklas |
986 |
<% |
2298 |
19 May 06 |
nicklas |
987 |
} |
2298 |
19 May 06 |
nicklas |
988 |
finally |
2298 |
19 May 06 |
nicklas |
989 |
{ |
2298 |
19 May 06 |
nicklas |
990 |
if (dc != null) dc.close(); |
2298 |
19 May 06 |
nicklas |
991 |
} |
3675 |
16 Aug 07 |
jari |
992 |
%> |