Mercurial > hg > LGServices
comparison src/main/webapp/methods/getDataverseForm.jsp @ 43:9dbbbfd474f4
new: 1.existing topic in search result. 2.difference-set of book for topic
author | Zoe Hong <zhong@mpiwg-berlin.mpg.de> |
---|---|
date | Wed, 23 Dec 2015 16:03:32 +0100 |
parents | cbc2c83022c7 |
children | f106f2487ac1 |
comparison
equal
deleted
inserted
replaced
42:815cd86bb9ec | 43:9dbbbfd474f4 |
---|---|
1 <%@page import="de.mpiwg.gazetteer.dataverse.DataverseUtils"%> | 1 <%@page import="de.mpiwg.gazetteer.dataverse.DataverseUtils"%> |
2 <%@page import="de.mpiwg.gazetteer.dataverse.bo.Study"%> | 2 <%@page import="de.mpiwg.gazetteer.dataverse.bo.Study"%> |
3 <%@page import="de.mpiwg.gazetteer.dataverse.bo.Datasets"%> | 3 <%@page import="de.mpiwg.gazetteer.dataverse.bo.Datasets"%> |
4 <%@page import="java.util.List"%> | 4 <%@page import="java.util.List"%> |
5 | |
5 <jsp:useBean id="sessionBean" class="de.mpiwg.web.jsp.SessionBean" scope="session" /> | 6 <jsp:useBean id="sessionBean" class="de.mpiwg.web.jsp.SessionBean" scope="session" /> |
7 | |
8 <% if (sessionBean == null || sessionBean.getUser() == null) { %> | |
9 <form name="timeoutForm" | |
10 action="<%=sessionBean.getApplicationBean().getRootServer()%>/proxy.jsp" | |
11 method="post"> | |
12 <input name="bean" type="hidden" value="loginBean" /> | |
13 | |
14 <h3>Timeout or Logout at another page! Please Login again.</h3> | |
15 <input type="image" width="40" height="40" | |
16 onclick="setAction('logout', 'timeoutForm');" | |
17 src="<%=sessionBean.getApplicationBean().getOkImage() %>"/> | |
18 | |
19 </form> | |
20 | |
21 <% } else { | |
22 | |
23 //List<Study> studies = DataverseUtils.getStudies(sessionBean.getUser().getUserName(), sessionBean.getUser().getPassword()); | |
24 // List<Datasets> studies = DataverseUtils.getDatasets(sessionBean.getUser().getUserName(), sessionBean.getUser().getPassword()); | |
25 List<Datasets> studies = DataverseUtils.getDatasetsInAllDataverse(sessionBean.getUser().getUserName(), sessionBean.getUser().getPassword()); | |
26 | |
27 System.out.println("%%%%% Studies: " + studies.size()); | |
28 | |
29 if(studies.isEmpty()){ | |
30 %> | |
31 | |
32 <label>The system does not find studies for the user <%= sessionBean.getUser().getUserName()%>.</label> | |
33 | |
34 <% | |
35 } else { | |
36 %> | |
37 | |
38 <form name="dataverseForm" | |
39 action="<%=sessionBean.getApplicationBean().getRootServer()%>/proxy.jsp" | |
40 method="post"> | |
41 <input name="bean" type="hidden" value="branchBean" /> | |
42 <input name="fileId" type="hidden" value="<%=request.getParameter("fileId") %>" /> | |
43 | |
44 | |
45 <table class="pageTable"> | |
46 <tbody> | |
47 <tr> | |
48 <th><label class="tableTitle">Dataverse</label></th> | |
49 <!-- | |
50 <th><label class="tableTitle">Dataset ID</label></th> | |
51 --> | |
52 <th><label class="tableTitle">Dataset</label></th> | |
53 <th><label class="tableTitle">Created</label></th> | |
54 <th><label class="tableTitle">State</label></th> | |
55 <th><label class="tableTitle">Version</label></th> | |
56 <th><label class="tableTitle">Publish</label></th> | |
57 <!-- | |
58 <th><label class="tableTitle">Release Date</label></th> | |
59 <th><label class="tableTitle">Last Updated</label></th> | |
60 <th><label class="tableTitle">Number of Files </label></th> | |
61 --> | |
62 </tr> | |
63 </tbody> | |
64 <% | |
65 for(Datasets study : studies){ | |
66 %> | |
67 | |
68 <tr> | |
69 <!-- <td>Chinese Local Gazetteers </td> --> | |
70 <td><%= study.getDvIdInDataverse() %></td> | |
71 | |
72 <!-- <td><%= study.getId()%></td> | |
73 --> | |
74 <td><%= study.getTitle() %></td> | |
75 <td><%= study.getCreateTime() %></td> | |
76 <td><%= study.getVersionState().toLowerCase() %></td> | |
77 | |
78 <td><%= study.getVersion() %></td> | |
79 <td> | |
80 <input type="image" | |
81 onclick="<%=sessionBean.getApplicationBean().getJSConfirmationPublish() %> setAction0('publishFile', 'dataverseForm', 'datasetId', '<%=study.getId() %>');" | |
82 src="<%=sessionBean.getApplicationBean().getPublishImage()%>"/> | |
83 </td> | |
84 </tr> | |
85 | |
86 <% | |
87 } | |
88 %> | |
89 </table> | |
90 </form> | |
91 | |
6 <% | 92 <% |
7 | 93 } |
8 //List<Study> studies = DataverseUtils.getStudies(sessionBean.getUser().getUserName(), sessionBean.getUser().getPassword()); | |
9 // List<Datasets> studies = DataverseUtils.getDatasets(sessionBean.getUser().getUserName(), sessionBean.getUser().getPassword()); | |
10 List<Datasets> studies = DataverseUtils.getDatasetsInAllDataverse(sessionBean.getUser().getUserName(), sessionBean.getUser().getPassword()); | |
11 | |
12 System.out.println("%%%%% Studies: " + studies.size()); | |
13 | |
14 if(studies.isEmpty()){ | |
15 %> | |
16 | |
17 <label>The system does not find studies for the user <%= sessionBean.getUser().getUserName()%>.</label> | |
18 | |
19 <% | |
20 } else { | |
21 %> | |
22 | |
23 <form name="dataverseForm" | |
24 action="<%=sessionBean.getApplicationBean().getRootServer()%>/proxy.jsp" | |
25 method="post"> | |
26 <input name="bean" type="hidden" value="branchBean" /> | |
27 <input name="fileId" type="hidden" value="<%=request.getParameter("fileId") %>" /> | |
28 | |
29 | |
30 <table class="pageTable"> | |
31 <tbody> | |
32 <tr> | |
33 <th><label class="tableTitle">Dataverse</label></th> | |
34 <!-- | |
35 <th><label class="tableTitle">Dataset ID</label></th> | |
36 --> | |
37 <th><label class="tableTitle">Dataset</label></th> | |
38 <th><label class="tableTitle">Created</label></th> | |
39 <th><label class="tableTitle">State</label></th> | |
40 <th><label class="tableTitle">Version</label></th> | |
41 <th><label class="tableTitle">Publish</label></th> | |
42 <!-- | |
43 <th><label class="tableTitle">Release Date</label></th> | |
44 <th><label class="tableTitle">Last Updated</label></th> | |
45 <th><label class="tableTitle">Number of Files </label></th> | |
46 --> | |
47 </tr> | |
48 </tbody> | |
49 <% | |
50 for(Datasets study : studies){ | |
51 %> | |
52 | |
53 <tr> | |
54 <!-- <td>Chinese Local Gazetteers </td> --> | |
55 <td><%= study.getDvIdInDataverse() %></td> | |
56 | |
57 <!-- <td><%= study.getId()%></td> | |
58 --> | |
59 <td><%= study.getTitle() %></td> | |
60 <td><%= study.getCreateTime() %></td> | |
61 <td><%= study.getVersionState().toLowerCase() %></td> | |
62 | |
63 <td><%= study.getVersion() %></td> | |
64 <td> | |
65 <input type="image" | |
66 onclick="<%=sessionBean.getApplicationBean().getJSConfirmationPublish() %> setAction0('publishFile', 'dataverseForm', 'datasetId', '<%=study.getId() %>');" | |
67 src="<%=sessionBean.getApplicationBean().getPublishImage()%>"/> | |
68 </td> | |
69 </tr> | |
70 | |
71 <% | |
72 } | |
73 %> | |
74 </table> | |
75 </form> | |
76 <% | |
77 } | 94 } |
78 %> | 95 %> |