diff src/main/webapp/methods/getDataverseForm.jsp @ 27:3b3e2963c8f7 dev_dataverse4

new: rewrite LGServices for LGDataverse with the new dataverse, dataverse4.0
author Zoe Hong <zhong@mpiwg-berlin.mpg.de>
date Tue, 08 Sep 2015 16:33:31 +0200
parents 3e62083dbcbf
children cbc2c83022c7
line wrap: on
line diff
--- a/src/main/webapp/methods/getDataverseForm.jsp	Tue Jun 30 14:31:29 2015 +0200
+++ b/src/main/webapp/methods/getDataverseForm.jsp	Tue Sep 08 16:33:31 2015 +0200
@@ -1,11 +1,12 @@
 <%@page import="de.mpiwg.gazetteer.dataverse.DataverseUtils"%>
 <%@page import="de.mpiwg.gazetteer.dataverse.bo.Study"%>
+<%@page import="de.mpiwg.gazetteer.dataverse.bo.Datasets"%>
 <%@page import="java.util.List"%>
 <jsp:useBean id="sessionBean" class="de.mpiwg.web.jsp.SessionBean" scope="session" />
 <%
 	
-
-	List<Study> studies = DataverseUtils.getStudies(sessionBean.getUser().getUserName(), sessionBean.getUser().getPassword());
+	//List<Study> studies = DataverseUtils.getStudies(sessionBean.getUser().getUserName(), sessionBean.getUser().getPassword());
+	List<Datasets> studies = DataverseUtils.getDatasets(sessionBean.getUser().getUserName(), sessionBean.getUser().getPassword());
 	System.out.println("%%%%% Studies: " + studies.size());
 	
 	if(studies.isEmpty()){
@@ -27,16 +28,16 @@
 	<table class="pageTable">
 		<tbody>
 			<tr>
-				<th><label class="tableTitle">Study Global ID</label></th>
+				<th><label class="tableTitle">Dataset ID</label></th>
 				<th><label class="tableTitle">Title</label></th>
-				<th><label class="tableTitle">Creator</label></th>
 				<th><label class="tableTitle">Created</label></th>
-				<th><label class="tableTitle">Status</label></th>
+				<th><label class="tableTitle">State</label></th>
 				<th><label class="tableTitle">Dataverse</label></th>
+				<th><label class="tableTitle">Version</label></th>
 				<th><label class="tableTitle">Publish</label></th>
 				<!-- 
 				<th><label class="tableTitle">Release Date</label></th>
-				<th><label class="tableTitle">Version</label></th>
+				
 				<th><label class="tableTitle">Last Updated</label></th>
 				 -->
 				
@@ -46,19 +47,19 @@
 			</tr>
 		</tbody>
 		<%
-			for(Study study : studies){
+			for(Datasets study : studies){
 		%>
 			
 			<tr>
-				<td><%= study.getGlobalId()%></td>
+				<td><%= study.getId()%></td>
 				<td><%= study.getTitle() %></td>
-				<td><%= study.getCreator() %></td>
 				<td><%= study.getCreateTime() %></td>
-				<td><%= study.getStatus() %></td>
-				<td><%= study.getDataverse().getName() %></td>
+				<td><%= study.getVersionState().toLowerCase() %></td>
+				<td>Chinese Local Gazetteers </td>
+				<td><%= study.getVersion() %></td>
 				<td>
 					<input type="image" 
-						onclick="<%=sessionBean.getApplicationBean().getJSConfirmationPublish() %> setAction0('publishFile', 'dataverseForm', 'studyGlobalId', '<%=study.getGlobalId() %>');" 
+						onclick="<%=sessionBean.getApplicationBean().getJSConfirmationPublish() %> setAction0('publishFile', 'dataverseForm', 'datasetId', '<%=study.getId() %>');" 
 						src="<%=sessionBean.getApplicationBean().getPublishImage()%>"/>
 				</td>
 			</tr>