diff src/main/java/de/mpiwg/gazetteer/utils/FileManager.java @ 62:824b808a7481

improvements and bug fixed
author Zoe Hong <zhong@mpiwg-berlin.mpg.de>
date Mon, 18 Jul 2016 17:35:32 +0200
parents b8ad346e39a0
children
line wrap: on
line diff
--- a/src/main/java/de/mpiwg/gazetteer/utils/FileManager.java	Wed May 25 11:20:27 2016 +0200
+++ b/src/main/java/de/mpiwg/gazetteer/utils/FileManager.java	Mon Jul 18 17:35:32 2016 +0200
@@ -60,7 +60,7 @@
 		PrintWriter out = new PrintWriter(absolutePath + fileName);
 		
 		String text = new String();	// make it from list
-		text += "Address,LEVEL1,LEVEL2,Name,DYNASTY,PERIOD,ADMIN_TYPE,TimeSpan:begin,TimeSpan:end,Longitude,Latitude,PAGE,SECTION,CONTENT,BOOK_ID,Description\n";
+		text += "Address,LEVEL1,LEVEL2,Name,DYNASTY,PERIOD,ADMIN_TYPE,TimeSpan:begin,TimeSpan:end,Longitude,Latitude,PAGE,SECTION,CONTENT,BOOK_ID,Author,Edition,Volume,Description\n";
 	
 		for (DBContents c : list) {
 			
@@ -85,6 +85,14 @@
 						c.getSection().getName() + "," +
 						c.getContent() + "," +
 						c.getBookId() + "," +
+						
+					
+						// add author, edition, volume
+						book.getAuthor() + "," +
+						book.getEdition() + "," + 
+						book.getVolume() + "," +
+						
+					
 					description + "\n";
 			}
 		}
@@ -153,11 +161,11 @@
 						+ "<td class='tableTitle'>section name</td>"
 						+ "<td class='tableTitle'>page</td>"
 						+ "<td class='tableTitle'>content</td>"
-						+ "<td class='tableTitle'>content id</td>"
-						+ "<td class='tableTitle'>isRemoved</td>"
+						+ "<td class='tableTitle hiddenField'>content id</td>"
+						+ "<td class='tableTitle hiddenField'>isRemoved</td>"
 						
-						// TODO add Author, edition, volume, place name, coordinates (x,y)
-						+ "<td class='tableTitle'>Author</td>"
+						// add author, edition, volume, place name, coordinates (x,y)
+						+ "<td class='tableTitle'>author</td>"
 						+ "<td class='tableTitle'>edition</td>"
 						+ "<td class='tableTitle'>volume</td>"
 						+ "<td class='tableTitle'>place name</td>"
@@ -171,8 +179,14 @@
 			if ( c.getSection() != null){
 						
 				DBBook book = c.getSection().getBook();
-	
-				text += "<tr>" +
+				
+				if (c.isRemoved()) {
+					text += "<tr class='hiddenField'>";
+				} else {
+					text += "<tr>";
+							
+				}
+						text +=
 							"<td>" + c.getInx() + "</td>" +
 							"<td>" + c.getBookId() + "</td>" +
 							"<td>" + book.getName() + "</td>" +
@@ -184,10 +198,9 @@
 							"<td>" + c.getSection().getName() + "</td>" +
 							"<td>" + c.getPage() + "</td>" +
 							"<td class='content'>" + c.getContent() + "</td>" +
-							"<td>" + c.getId() + "</td>" +
-							"<td>" + c.isRemoved() + "</td>" +
+							"<td class='hiddenField'>" + c.getId() + "</td>" +
+							"<td class='hiddenField'>" + c.isRemoved() + "</td>" +
 							
-							// TODO 
 							"<td>" + book.getAuthor() + "</td>" +
 							"<td>" + book.getEdition() + "</td>" +
 							"<td>" + book.getVolume() + "</td>" +