2431 |
27 Jun 06 |
nicklas |
1 |
<%-- $Id$ |
2431 |
27 Jun 06 |
nicklas |
2 |
------------------------------------------------------------------ |
3675 |
16 Aug 07 |
jari |
Copyright (C) 2006 Nicklas Nordborg |
3675 |
16 Aug 07 |
jari |
Copyright (C) 2007 Johan Enell |
2431 |
27 Jun 06 |
nicklas |
5 |
|
2431 |
27 Jun 06 |
nicklas |
6 |
This file is part of BASE - BioArray Software Environment. |
2431 |
27 Jun 06 |
nicklas |
7 |
Available at http://base.thep.lu.se/ |
2431 |
27 Jun 06 |
nicklas |
8 |
|
2431 |
27 Jun 06 |
nicklas |
9 |
BASE is free software; you can redistribute it and/or |
2431 |
27 Jun 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 |
2431 |
27 Jun 06 |
nicklas |
12 |
of the License, or (at your option) any later version. |
2431 |
27 Jun 06 |
nicklas |
13 |
|
2431 |
27 Jun 06 |
nicklas |
14 |
BASE is distributed in the hope that it will be useful, |
2431 |
27 Jun 06 |
nicklas |
15 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
2431 |
27 Jun 06 |
nicklas |
16 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2431 |
27 Jun 06 |
nicklas |
17 |
GNU General Public License for more details. |
2431 |
27 Jun 06 |
nicklas |
18 |
|
2431 |
27 Jun 06 |
nicklas |
19 |
You should have received a copy of the GNU General Public License |
4510 |
11 Sep 08 |
jari |
20 |
along with BASE. If not, see <http://www.gnu.org/licenses/>. |
2431 |
27 Jun 06 |
nicklas |
21 |
------------------------------------------------------------------ |
2431 |
27 Jun 06 |
nicklas |
22 |
|
2431 |
27 Jun 06 |
nicklas |
23 |
@author Nicklas |
2431 |
27 Jun 06 |
nicklas |
24 |
@version 2.0 |
2431 |
27 Jun 06 |
nicklas |
25 |
--%> |
5426 |
24 Sep 10 |
nicklas |
26 |
<%@ page pageEncoding="UTF-8" session="false" |
2431 |
27 Jun 06 |
nicklas |
27 |
import="net.sf.basedb.core.SessionControl" |
2431 |
27 Jun 06 |
nicklas |
28 |
import="net.sf.basedb.core.DbControl" |
2431 |
27 Jun 06 |
nicklas |
29 |
import="net.sf.basedb.core.Item" |
2431 |
27 Jun 06 |
nicklas |
30 |
import="net.sf.basedb.core.Permission" |
4435 |
02 Sep 08 |
nicklas |
31 |
import="net.sf.basedb.core.PluginDefinition" |
2431 |
27 Jun 06 |
nicklas |
32 |
import="net.sf.basedb.core.PluginConfiguration" |
2431 |
27 Jun 06 |
nicklas |
33 |
import="net.sf.basedb.core.PluginType" |
2431 |
27 Jun 06 |
nicklas |
34 |
import="net.sf.basedb.core.ItemContext" |
2431 |
27 Jun 06 |
nicklas |
35 |
import="net.sf.basedb.core.PropertyFilter" |
2431 |
27 Jun 06 |
nicklas |
36 |
import="net.sf.basedb.core.Operator" |
2431 |
27 Jun 06 |
nicklas |
37 |
import="net.sf.basedb.core.Type" |
2431 |
27 Jun 06 |
nicklas |
38 |
import="net.sf.basedb.core.ItemQuery" |
2431 |
27 Jun 06 |
nicklas |
39 |
import="net.sf.basedb.core.ItemResultList" |
2431 |
27 Jun 06 |
nicklas |
40 |
import="net.sf.basedb.core.Include" |
2431 |
27 Jun 06 |
nicklas |
41 |
import="net.sf.basedb.core.File" |
2431 |
27 Jun 06 |
nicklas |
42 |
import="net.sf.basedb.core.Job" |
2431 |
27 Jun 06 |
nicklas |
43 |
import="net.sf.basedb.core.Location" |
2431 |
27 Jun 06 |
nicklas |
44 |
import="net.sf.basedb.core.query.Hql" |
2431 |
27 Jun 06 |
nicklas |
45 |
import="net.sf.basedb.core.query.Expressions" |
2431 |
27 Jun 06 |
nicklas |
46 |
import="net.sf.basedb.core.query.Restrictions" |
2431 |
27 Jun 06 |
nicklas |
47 |
import="net.sf.basedb.core.query.Orders" |
2431 |
27 Jun 06 |
nicklas |
48 |
import="net.sf.basedb.core.plugin.GuiContext" |
2431 |
27 Jun 06 |
nicklas |
49 |
import="net.sf.basedb.core.plugin.Plugin" |
2431 |
27 Jun 06 |
nicklas |
50 |
import="net.sf.basedb.core.plugin.AutoDetectingImporter" |
2431 |
27 Jun 06 |
nicklas |
51 |
import="net.sf.basedb.clients.web.Base" |
2431 |
27 Jun 06 |
nicklas |
52 |
import="net.sf.basedb.clients.web.util.HTML" |
2753 |
20 Oct 06 |
nicklas |
53 |
import="net.sf.basedb.util.Values" |
2431 |
27 Jun 06 |
nicklas |
54 |
%> |
2431 |
27 Jun 06 |
nicklas |
55 |
<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> |
2431 |
27 Jun 06 |
nicklas |
56 |
<%@ taglib prefix="t" uri="/WEB-INF/tab.tld" %> |
2431 |
27 Jun 06 |
nicklas |
57 |
|
2431 |
27 Jun 06 |
nicklas |
58 |
<% |
2431 |
27 Jun 06 |
nicklas |
59 |
final SessionControl sc = Base.getExistingSessionControl(pageContext, true); |
2431 |
27 Jun 06 |
nicklas |
60 |
final String ID = sc.getId(); |
2431 |
27 Jun 06 |
nicklas |
61 |
final int fileId = Values.getInt(request.getParameter("file_id")); |
4435 |
02 Sep 08 |
nicklas |
62 |
final int pluginId = Values.getInt(request.getParameter("plugindefinition_id")); |
2431 |
27 Jun 06 |
nicklas |
63 |
final Item itemType = Item.valueOf(request.getParameter("item_type")); |
2431 |
27 Jun 06 |
nicklas |
64 |
final String subContext = Values.getString(request.getParameter("subcontext"), ""); |
2431 |
27 Jun 06 |
nicklas |
65 |
final GuiContext.Type contextType = GuiContext.Type.valueOf(request.getParameter("context_type")); |
2431 |
27 Jun 06 |
nicklas |
66 |
final GuiContext context = new GuiContext(itemType, contextType); |
7954 |
12 May 21 |
nicklas |
67 |
final DbControl dc = sc.newDbControl(":Import - No matching file format"); |
2431 |
27 Jun 06 |
nicklas |
68 |
|
4435 |
02 Sep 08 |
nicklas |
69 |
PluginDefinition plugin = null; |
4435 |
02 Sep 08 |
nicklas |
70 |
if (pluginId > 0) |
4435 |
02 Sep 08 |
nicklas |
71 |
{ |
4435 |
02 Sep 08 |
nicklas |
72 |
plugin = PluginDefinition.getById(dc, pluginId); |
4435 |
02 Sep 08 |
nicklas |
73 |
} |
2431 |
27 Jun 06 |
nicklas |
74 |
try |
2431 |
27 Jun 06 |
nicklas |
75 |
{ |
2431 |
27 Jun 06 |
nicklas |
76 |
File file = File.getById(dc, fileId); |
2431 |
27 Jun 06 |
nicklas |
77 |
%> |
2431 |
27 Jun 06 |
nicklas |
78 |
<base:page type="popup" title="No matching file format"> |
6200 |
05 Nov 12 |
nicklas |
79 |
<base:head scripts="~no_fileformat.js" /> |
2431 |
27 Jun 06 |
nicklas |
80 |
<base:body> |
5910 |
14 Dec 11 |
nicklas |
81 |
<h1>No matching file format</h1> |
6162 |
10 Oct 12 |
nicklas |
82 |
<form name="import" action="index.jsp" method="post"> |
2431 |
27 Jun 06 |
nicklas |
83 |
<input type="hidden" name="ID" value="<%=ID%>"> |
2431 |
27 Jun 06 |
nicklas |
84 |
<input type="hidden" name="cmd" value="AutoDetect"> |
2431 |
27 Jun 06 |
nicklas |
85 |
<input type="hidden" name="item_type" value="<%=itemType.name()%>"> |
2431 |
27 Jun 06 |
nicklas |
86 |
<input type="hidden" name="subcontext" value="<%=subContext%>"> |
2431 |
27 Jun 06 |
nicklas |
87 |
<input type="hidden" name="context_type" value="<%=contextType.name()%>"> |
2431 |
27 Jun 06 |
nicklas |
88 |
<input type="hidden" name="title" value="<%=HTML.encodeTags(request.getParameter("title"))%>"> |
2431 |
27 Jun 06 |
nicklas |
89 |
<input type="hidden" name="job_name" value="<%=HTML.encodeTags(request.getParameter("job_name"))%>"> |
2431 |
27 Jun 06 |
nicklas |
90 |
<input type="hidden" name="job_description" value="<%=HTML.encodeTags(request.getParameter("job_description"))%>"> |
2431 |
27 Jun 06 |
nicklas |
91 |
<input type="hidden" name="plugindefinition_id" value="<%=request.getParameter("plugindefinition_id")%>"> |
2431 |
27 Jun 06 |
nicklas |
92 |
<input type="hidden" name="file_id" value="<%=fileId%>"> |
2431 |
27 Jun 06 |
nicklas |
93 |
</form> |
2431 |
27 Jun 06 |
nicklas |
94 |
|
5910 |
14 Dec 11 |
nicklas |
95 |
<div class="content"> |
6607 |
19 Nov 14 |
nicklas |
96 |
<table class="fullcc bg-filled-50 bottomborder"><tr><td> |
5910 |
14 Dec 11 |
nicklas |
97 |
<b>No file format that matches the file |
5910 |
14 Dec 11 |
nicklas |
98 |
<code><%=file.getPath().toString()%></code> could be found.</b> |
5910 |
14 Dec 11 |
nicklas |
99 |
</td></tr></table> |
5910 |
14 Dec 11 |
nicklas |
100 |
</div> |
5910 |
14 Dec 11 |
nicklas |
101 |
|
5910 |
14 Dec 11 |
nicklas |
102 |
<base:buttongroup subclass="dialogbuttons"> |
6200 |
05 Nov 12 |
nicklas |
103 |
<base:button id="btnAddFileFormat" |
5945 |
02 Feb 12 |
nicklas |
104 |
image="new.png" title="Add file format…" |
2431 |
27 Jun 06 |
nicklas |
105 |
visible="<%=sc.hasPermission(Permission.CREATE, Item.PLUGINCONFIGURATION)%>"/> |
6200 |
05 Nov 12 |
nicklas |
106 |
<base:button id="btnTryAgain" image="refresh.png" title="Try again" /> |
6200 |
05 Nov 12 |
nicklas |
107 |
<base:button id="btnUseWithout" image="gonext.png" |
4435 |
02 Sep 08 |
nicklas |
108 |
title="Use w/o file format" |
4435 |
02 Sep 08 |
nicklas |
109 |
visible="<%=plugin != null && !plugin.requiresConfiguration() %>" |
4435 |
02 Sep 08 |
nicklas |
110 |
tooltip="Use the plug-in without any file format" /> |
6200 |
05 Nov 12 |
nicklas |
111 |
<base:button id="close" title="Cancel" /> |
2431 |
27 Jun 06 |
nicklas |
112 |
</base:buttongroup> |
2431 |
27 Jun 06 |
nicklas |
113 |
|
2431 |
27 Jun 06 |
nicklas |
114 |
</base:body> |
2431 |
27 Jun 06 |
nicklas |
115 |
</base:page> |
2431 |
27 Jun 06 |
nicklas |
116 |
<% |
2431 |
27 Jun 06 |
nicklas |
117 |
} |
2431 |
27 Jun 06 |
nicklas |
118 |
finally |
2431 |
27 Jun 06 |
nicklas |
119 |
{ |
2431 |
27 Jun 06 |
nicklas |
120 |
if (dc != null) dc.close(); |
2431 |
27 Jun 06 |
nicklas |
121 |
} |
2431 |
27 Jun 06 |
nicklas |
122 |
%> |
2431 |
27 Jun 06 |
nicklas |
123 |
|