annotate src/main/java/de/mpiwg/web/jsp/FullTextSearchPage.java @ 67:0a9937b06cc3

save full text search table (filtered)
author Zoe Hong <zhong@mpiwg-berlin.mpg.de>
date Thu, 04 Aug 2016 14:50:58 +0200
parents bc0219c2600b
children 7e161f2e6660
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
39
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1 package de.mpiwg.web.jsp;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
2
54
a00efd5d9e77 new: adding delete saved table function
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 51
diff changeset
3 import java.io.IOException;
39
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
4 import java.util.ArrayList;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
5 import java.util.Collections;
55
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
6 import java.util.Date;
39
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
7 import java.util.List;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
8
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
9 import javax.servlet.http.HttpServletRequest;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
10 import javax.servlet.http.HttpServletResponse;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
11
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
12 import org.apache.commons.lang.StringUtils;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
13 import org.apache.log4j.Logger;
49
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
14 import org.jsoup.Jsoup;
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
15 import org.jsoup.nodes.Document;
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
16 import org.jsoup.nodes.Element;
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
17 import org.jsoup.select.Elements;
39
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
18
54
a00efd5d9e77 new: adding delete saved table function
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 51
diff changeset
19 import de.mpiwg.gazetteer.bo.LGBranch;
a00efd5d9e77 new: adding delete saved table function
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 51
diff changeset
20 import de.mpiwg.gazetteer.bo.LGFile;
39
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
21 import de.mpiwg.gazetteer.bo.LGFullTextSearchFile;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
22 import de.mpiwg.gazetteer.db.DBContents;
59
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
23 import de.mpiwg.gazetteer.db.DBSection;
39
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
24 import de.mpiwg.gazetteer.utils.DBService;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
25 import de.mpiwg.gazetteer.utils.DataProvider;
49
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
26 import de.mpiwg.gazetteer.utils.FileManager;
39
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
27 import de.mpiwg.web.fullTextSearch.SortContentByAdminType;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
28 import de.mpiwg.web.fullTextSearch.SortContentByBookId;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
29 import de.mpiwg.web.fullTextSearch.SortContentByBookName;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
30 import de.mpiwg.web.fullTextSearch.SortContentByDynasty;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
31 import de.mpiwg.web.fullTextSearch.SortContentById;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
32 import de.mpiwg.web.fullTextSearch.SortContentByInx;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
33 import de.mpiwg.web.fullTextSearch.SortContentByLevel1;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
34 import de.mpiwg.web.fullTextSearch.SortContentByLevel2;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
35 import de.mpiwg.web.fullTextSearch.SortContentByPeriod;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
36 import de.mpiwg.web.fullTextSearch.SortContentByStartPage;
49
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
37
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
38
39
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
39
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
40 public class FullTextSearchPage extends AbstractJSPPage{
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
41
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
42 private static Logger logger = Logger.getLogger(FullTextSearchPage.class);
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
43
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
44 public static String bean = "fullTextSearchBean";
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
45 public static String page = "pages/fullTextSearch.jsp";
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
46
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
47
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
48 private List<DBContents> completeList;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
49 private List<DBContents> filteredList;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
50 private List<DBContents> displayList;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
51
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
52 private String searchTerm = new String();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
53
48
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
54 private String batchSearchTerm = new String();
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
55
39
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
56 private String dynastyFilter = new String();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
57 private String adminTypeFilter = new String();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
58 private String level1Filter = new String();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
59
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
60 private DataPaginator paginator = new DataPaginator();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
61 private String searchMessage;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
62 private String filteringMessage;
51
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
63 private String selectedContentMessage;
39
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
64
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
65 private String bookIdFilter = new String();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
66 private String bookNameFilter = new String();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
67 private String level2Filter = new String();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
68 private String periodFilter = new String();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
69 private String sectionNameFilter = new String();
49
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
70 private String contentFilter = new String();
39
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
71
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
72 private List<LGFullTextSearchFile> fileList = null;
55
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
73 private List<LGFullTextSearchFile> weekFileList = null; // files modified within the past week
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
74 private List<LGFullTextSearchFile> monthFileList = null; // files modified within the past month
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
75 private List<LGFullTextSearchFile> olderFileList = null; // files modified before one month ago
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
76
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
77
39
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
78 private String fileName = new String();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
79
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
80 private String focusedContentId = new String();
51
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
81 private Integer selectedNumOfContent = 0;
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
82
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
83 private String mouseX;
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
84 private String mouseY;
58
b8ad346e39a0 new: modify based on doc 'Improving LGServices interface.docx': user workflow improvement, functions like adding task into a topic and search suggestions.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 55
diff changeset
85
b8ad346e39a0 new: modify based on doc 'Improving LGServices interface.docx': user workflow improvement, functions like adding task into a topic and search suggestions.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 55
diff changeset
86 private LGFullTextSearchFile file = null;
51
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
87
39
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
88
58
b8ad346e39a0 new: modify based on doc 'Improving LGServices interface.docx': user workflow improvement, functions like adding task into a topic and search suggestions.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 55
diff changeset
89
39
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
90 @Override
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
91 public void init(){
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
92 super.init();
51
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
93
39
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
94 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
95
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
96 public void loadParameters(HttpServletRequest request, HttpServletResponse response){
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
97 this.request = request;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
98 this.response = response;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
99
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
100 this.searchTerm = getParameter("searchTerm");
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
101
48
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
102 this.batchSearchTerm = getParameter("batchSearchTerm");
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
103
39
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
104 this.bookIdFilter = getParameter("bookIdFilter");
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
105 this.bookNameFilter = getParameter("bookNameFilter");
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
106
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
107 this.dynastyFilter = getParameter("dynastyFilter");
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
108 this.adminTypeFilter = getParameter("adminTypeFilter");
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
109 this.level1Filter = getParameter("level1Filter");
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
110 this.level2Filter = getParameter("level2Filter");
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
111
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
112 this.periodFilter = getParameter("periodFilter");
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
113 this.sectionNameFilter = getParameter("sectionNameFilter");
49
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
114 this.contentFilter = getParameter("contentFilter");
39
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
115
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
116 this.fileName = getParameter("fileName");
49
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
117
39
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
118 this.focusedContentId = getParameter("focusedContentId");
51
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
119 this.mouseX = getParameter("mouseX");
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
120 this.mouseY = getParameter("mouseY");
39
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
121
49
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
122
51
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
123 this.paginator.setItemsPerPage(20);
39
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
124 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
125
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
126
48
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
127
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
128 public void searchBatch() {
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
129
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
130 logger.debug("Batch Searching: " + this.batchSearchTerm);
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
131
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
132 this.dynastyFilter = new String();
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
133 this.level1Filter = new String();
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
134 this.adminTypeFilter = new String();
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
135
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
136
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
137 if(StringUtils.isNotEmpty(this.batchSearchTerm)){
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
138 try {
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
139
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
140 // parse different keyword set by delimiter ";"
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
141
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
142 List<String> batchSearchKeywords = splitBatchSearchTerm();
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
143 logger.debug("batchSearchKeywords: " + batchSearchKeywords);
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
144
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
145 String countingMessage = new String();
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
146
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
147 for (String aKeywordSet: batchSearchKeywords) {
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
148
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
149 this.setSearchTerm(aKeywordSet);
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
150 List<String> terms = splitTerms();
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
151
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
152 System.out.println("Full Text Search: " + terms.toString());
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
153
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
154 this.completeList = DBService.searchFullText(terms);
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
155
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
156 if (this.completeList.size() != 0 ){
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
157 // save none zero result
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
158 Collections.sort(this.completeList);
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
159 this.filter();
51
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
160 this.calSelectedContentInCompleteList();
48
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
161
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
162 this.setFileName(this.getSearchTerm());
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
163 this.save();
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
164
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
165 }
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
166
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
167 countingMessage += this.completeList.size() + "\t" + terms + "<br>";
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
168 }
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
169 this.setSearchMessage(countingMessage);
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
170
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
171 } catch (Exception e) {
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
172 internalError(e);
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
173 }
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
174 }
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
175
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
176
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
177 }
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
178
39
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
179 public void search(){
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
180 logger.debug("Searching: " + this.searchTerm);
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
181
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
182 this.dynastyFilter = new String();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
183 this.level1Filter = new String();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
184 this.adminTypeFilter = new String();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
185
58
b8ad346e39a0 new: modify based on doc 'Improving LGServices interface.docx': user workflow improvement, functions like adding task into a topic and search suggestions.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 55
diff changeset
186 this.setFile(null);
b8ad346e39a0 new: modify based on doc 'Improving LGServices interface.docx': user workflow improvement, functions like adding task into a topic and search suggestions.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 55
diff changeset
187
39
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
188 if(StringUtils.isNotEmpty(this.searchTerm)){
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
189 try {
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
190 List<String> terms = splitTerms();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
191 System.out.println("Full Text Search: " + terms.toString());
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
192
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
193 this.completeList = DBService.searchFullText(terms);
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
194
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
195 if (this.completeList != null ){
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
196 Collections.sort(this.completeList);
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
197 filter();
51
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
198
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
199 this.calSelectedContentInCompleteList();
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
200
39
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
201 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
202
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
203 } catch (Exception e) {
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
204 internalError(e);
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
205 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
206 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
207 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
208
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
209
51
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
210 private void calSelectedContentInCompleteList() {
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
211 // calculate selectedContent
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
212 this.selectedNumOfContent = 0;
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
213 for (DBContents content: this.completeList) {
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
214 if (!content.isRemoved()) {
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
215 this.selectedNumOfContent += 1;
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
216 }
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
217 }
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
218 this.setSelectedContentMessage(this.selectedNumOfContent.toString() + " section(s) selected");
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
219 }
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
220
55
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
221
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
222 private void dispatchFileListByTime() {
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
223 // set this.weekFileList, this.monthFileList, this.olderFileList from this.fileList
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
224 this.weekFileList = new ArrayList<LGFullTextSearchFile>();
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
225 this.monthFileList = new ArrayList<LGFullTextSearchFile>();
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
226 this.olderFileList = new ArrayList<LGFullTextSearchFile>();
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
227
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
228
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
229 // TODO
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
230 for (LGFullTextSearchFile aFile: this.getFileList()) {
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
231 Date todayDate = new Date();
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
232
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
233 long DAY_IN_MS = 1000 * 60 * 60 * 24;
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
234 Date oneWeekAgo = new Date(todayDate.getTime() - (7 * DAY_IN_MS));
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
235 Date oneMonthAgo = new Date(todayDate.getTime() - (30 * DAY_IN_MS));
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
236
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
237 if ( aFile.getLastChangeDate().after(oneWeekAgo)) {
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
238 this.weekFileList.add(aFile);
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
239
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
240 } else if (aFile.getLastChangeDate().after(oneMonthAgo)) {
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
241 this.monthFileList.add(aFile);
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
242
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
243 } else {
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
244 this.olderFileList.add(aFile);
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
245 }
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
246
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
247 }
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
248
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
249 }
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
250
39
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
251 public void forceLoadFileList(){
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
252 logger.debug("forceLoadFileList");
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
253 logger.debug(this.getSearchTerm());
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
254
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
255 if(getSessionBean().getUser() != null){
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
256 //logger.debug("userId="+ getSessionBean().getUser().getId());
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
257
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
258 // set FileList for the user
55
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
259 this.forceSetFileLists();
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
260
39
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
261 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
262
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
263 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
264
55
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
265 private void forceSetFileLists() {
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
266 // set FileList for the user
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
267 DataProvider.getInstance().setFullTextSearchFileMap(null); // set fullTextSearchFileMap to null, to force reload
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
268 this.setFileList(DataProvider.getInstance().getSearchFileList4User(getSessionBean().getUser().getId()));
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
269 this.dispatchFileListByTime();
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
270 }
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
271
54
a00efd5d9e77 new: adding delete saved table function
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 51
diff changeset
272 public void deleteFile() throws IOException {
a00efd5d9e77 new: adding delete saved table function
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 51
diff changeset
273
51
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
274 Long fileId = getLongParameter("fileId");
54
a00efd5d9e77 new: adding delete saved table function
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 51
diff changeset
275 logger.debug("deleting fileId=" + fileId);
51
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
276
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
277 if(fileId != null){
54
a00efd5d9e77 new: adding delete saved table function
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 51
diff changeset
278
a00efd5d9e77 new: adding delete saved table function
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 51
diff changeset
279 LGFullTextSearchFile file = DataProvider.getInstance().getFullTextSearchFile(fileId);
a00efd5d9e77 new: adding delete saved table function
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 51
diff changeset
280 if(file != null){
a00efd5d9e77 new: adding delete saved table function
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 51
diff changeset
281
a00efd5d9e77 new: adding delete saved table function
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 51
diff changeset
282 DataProvider.getInstance().deleteLGFullTextSearchFile(file);
a00efd5d9e77 new: adding delete saved table function
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 51
diff changeset
283
a00efd5d9e77 new: adding delete saved table function
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 51
diff changeset
284 // update FileList
55
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
285 this.forceSetFileLists();
54
a00efd5d9e77 new: adding delete saved table function
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 51
diff changeset
286
a00efd5d9e77 new: adding delete saved table function
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 51
diff changeset
287 addMsg("The file " + file.getFileName() + " has been deleted.");
a00efd5d9e77 new: adding delete saved table function
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 51
diff changeset
288 }
51
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
289
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
290 }
54
a00efd5d9e77 new: adding delete saved table function
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 51
diff changeset
291
51
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
292 }
39
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
293
49
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
294 public void loadFile() {
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
295 Long fileId = getLongParameter("fileId");
58
b8ad346e39a0 new: modify based on doc 'Improving LGServices interface.docx': user workflow improvement, functions like adding task into a topic and search suggestions.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 55
diff changeset
296
b8ad346e39a0 new: modify based on doc 'Improving LGServices interface.docx': user workflow improvement, functions like adding task into a topic and search suggestions.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 55
diff changeset
297
49
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
298 logger.debug("loading fileId=" + fileId);
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
299
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
300 if(fileId != null){
51
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
301 // load from html file into searching result table
49
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
302 LGFullTextSearchFile file = DataProvider.getInstance().getFullTextSearchFile(fileId);
58
b8ad346e39a0 new: modify based on doc 'Improving LGServices interface.docx': user workflow improvement, functions like adding task into a topic and search suggestions.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 55
diff changeset
303 if(file != null) {
b8ad346e39a0 new: modify based on doc 'Improving LGServices interface.docx': user workflow improvement, functions like adding task into a topic and search suggestions.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 55
diff changeset
304 this.setFile(file);
49
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
305 String html;
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
306 try {
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
307 html = FileManager.getFullTextSearchHtmlFileText(file);
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
308
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
309 Document doc = Jsoup.parse(html);
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
310
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
311 Element body = doc.body();
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
312
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
313 this.setSearchTerm(body.getElementById("searchTerm").text());
54
a00efd5d9e77 new: adding delete saved table function
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 51
diff changeset
314 this.setFileName(file.getFileName());
49
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
315
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
316 Element pageTableBody = body.getElementsByTag("tbody").first();
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
317
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
318 Elements rows = pageTableBody.children();
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
319
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
320 // set completeList by parsing html file
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
321 List<DBContents> completListFromParsedFile = new ArrayList<DBContents>();
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
322
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
323 for (Element row : rows) {
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
324 // make complteListFromParsedFile...
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
325
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
326 Elements cols = row.children();
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
327 //logger.debug(cols.size());
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
328 if (cols.size() < 13) {
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
329
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
330 } else if (StringUtils.equals("#", cols.get(0).text())) {
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
331 // the table header
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
332
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
333 } else {
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
334 DBContents content = new DBContents();
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
335
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
336 String bookId = cols.get(1).text();
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
337
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
338 Integer contentPage = Integer.parseInt(cols.get(9).text());
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
339
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
340 String contentText = cols.get(10).text();
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
341 Long contentId = Long.parseLong(cols.get(11).text());
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
342
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
343 boolean isRemoved = true;
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
344 if (StringUtils.equals(cols.get(12).text(), "false")) {
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
345 isRemoved = false;
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
346 }
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
347
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
348
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
349 content.setInx(Integer.parseInt(cols.get(0).text()));
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
350 content.setId(contentId);
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
351
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
352 content.setBookId(cols.get(1).text());
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
353
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
354 // set this.section by bookId and page
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
355 content.setSection(DBService.getInstance().getSectionByBookIdAndPage(bookId, contentPage));
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
356 // set this.coordinatesBook by bookId
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
357 content.setCoordinatesBook(DBService.getInstance().getCoordinatesBook(bookId));
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
358
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
359 content.setContent(contentText);
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
360 content.setPage(contentPage);
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
361 content.setRemoved(isRemoved);
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
362
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
363 completListFromParsedFile.add(content);
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
364 }
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
365 }
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
366
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
367
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
368 this.setCompleteList(completListFromParsedFile);
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
369
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
370 if (this.completeList != null ){
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
371 Collections.sort(this.completeList);
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
372 filter();
51
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
373 this.calSelectedContentInCompleteList();
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
374
49
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
375 }
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
376
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
377 } catch (Exception e) {
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
378 logger.debug("getFullTextSearchHtmlFileText failed.");
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
379 e.printStackTrace();
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
380 }
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
381
58
b8ad346e39a0 new: modify based on doc 'Improving LGServices interface.docx': user workflow improvement, functions like adding task into a topic and search suggestions.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 55
diff changeset
382 } else {
b8ad346e39a0 new: modify based on doc 'Improving LGServices interface.docx': user workflow improvement, functions like adding task into a topic and search suggestions.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 55
diff changeset
383 this.setFile(null);
49
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
384 }
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
385 }
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
386
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
387 }
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
388
39
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
389
67
0a9937b06cc3 save full text search table (filtered)
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 59
diff changeset
390 public void saveFilteredList() {
0a9937b06cc3 save full text search table (filtered)
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 59
diff changeset
391 logger.debug("saving filtered table...");
0a9937b06cc3 save full text search table (filtered)
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 59
diff changeset
392 logger.debug(this.getFileName() + ", " + this.getSearchTerm() + ", userId= "+ getSessionBean().getUser().getId());
0a9937b06cc3 save full text search table (filtered)
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 59
diff changeset
393
0a9937b06cc3 save full text search table (filtered)
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 59
diff changeset
394 //logger.debug(this.getFilteredList());
0a9937b06cc3 save full text search table (filtered)
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 59
diff changeset
395
0a9937b06cc3 save full text search table (filtered)
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 59
diff changeset
396 if (StringUtils.equals(this.getFileName(), "") ) {
0a9937b06cc3 save full text search table (filtered)
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 59
diff changeset
397 addMsg("Filtered Save failed. Table name cannot be empty.");
0a9937b06cc3 save full text search table (filtered)
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 59
diff changeset
398 return;
0a9937b06cc3 save full text search table (filtered)
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 59
diff changeset
399 }
0a9937b06cc3 save full text search table (filtered)
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 59
diff changeset
400
0a9937b06cc3 save full text search table (filtered)
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 59
diff changeset
401
0a9937b06cc3 save full text search table (filtered)
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 59
diff changeset
402 /* Update db table `LGFullTextSearchFile`: new row with userId, file name, ...*/
0a9937b06cc3 save full text search table (filtered)
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 59
diff changeset
403
0a9937b06cc3 save full text search table (filtered)
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 59
diff changeset
404 Long userId = getSessionBean().getUser().getId();
0a9937b06cc3 save full text search table (filtered)
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 59
diff changeset
405
0a9937b06cc3 save full text search table (filtered)
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 59
diff changeset
406 LGFullTextSearchFile file;
0a9937b06cc3 save full text search table (filtered)
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 59
diff changeset
407 try {
0a9937b06cc3 save full text search table (filtered)
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 59
diff changeset
408
0a9937b06cc3 save full text search table (filtered)
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 59
diff changeset
409 // check if record with (userId, fileName) already existed, update it; otherwise, create one
0a9937b06cc3 save full text search table (filtered)
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 59
diff changeset
410 LGFullTextSearchFile searchFile = new LGFullTextSearchFile();
0a9937b06cc3 save full text search table (filtered)
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 59
diff changeset
411
0a9937b06cc3 save full text search table (filtered)
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 59
diff changeset
412 for (LGFullTextSearchFile aFile: this.getFileList()) {
0a9937b06cc3 save full text search table (filtered)
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 59
diff changeset
413 if ( StringUtils.equals(aFile.getFileName(), fileName) && aFile.getUserId().equals(userId)) {
0a9937b06cc3 save full text search table (filtered)
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 59
diff changeset
414 searchFile = aFile;
0a9937b06cc3 save full text search table (filtered)
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 59
diff changeset
415 break;
0a9937b06cc3 save full text search table (filtered)
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 59
diff changeset
416 }
0a9937b06cc3 save full text search table (filtered)
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 59
diff changeset
417 }
0a9937b06cc3 save full text search table (filtered)
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 59
diff changeset
418
0a9937b06cc3 save full text search table (filtered)
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 59
diff changeset
419 if (searchFile.isEmpty() ) {
0a9937b06cc3 save full text search table (filtered)
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 59
diff changeset
420 searchFile.setFileName(fileName);
0a9937b06cc3 save full text search table (filtered)
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 59
diff changeset
421 searchFile.setUserId(userId);
0a9937b06cc3 save full text search table (filtered)
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 59
diff changeset
422 }
0a9937b06cc3 save full text search table (filtered)
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 59
diff changeset
423
0a9937b06cc3 save full text search table (filtered)
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 59
diff changeset
424 searchFile.setSearchTerms(this.searchTerm);
0a9937b06cc3 save full text search table (filtered)
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 59
diff changeset
425
0a9937b06cc3 save full text search table (filtered)
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 59
diff changeset
426 file = DataProvider.getInstance().saveLGFullTextSearchFile(this.getFilteredList(), userId, searchFile);
0a9937b06cc3 save full text search table (filtered)
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 59
diff changeset
427 //file = DataProvider.getInstance().saveLGFullTextSearchFile(this.getCompleteList(), userId, searchFile);
0a9937b06cc3 save full text search table (filtered)
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 59
diff changeset
428
0a9937b06cc3 save full text search table (filtered)
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 59
diff changeset
429
0a9937b06cc3 save full text search table (filtered)
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 59
diff changeset
430 logger.debug("file: " + file.getInfo());
0a9937b06cc3 save full text search table (filtered)
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 59
diff changeset
431
0a9937b06cc3 save full text search table (filtered)
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 59
diff changeset
432 this.setFile(file);
0a9937b06cc3 save full text search table (filtered)
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 59
diff changeset
433
0a9937b06cc3 save full text search table (filtered)
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 59
diff changeset
434 addMsg("The table has been saved!");
0a9937b06cc3 save full text search table (filtered)
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 59
diff changeset
435
0a9937b06cc3 save full text search table (filtered)
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 59
diff changeset
436
0a9937b06cc3 save full text search table (filtered)
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 59
diff changeset
437 } catch (Exception e) {
0a9937b06cc3 save full text search table (filtered)
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 59
diff changeset
438 addMsg("Saving fails!");
0a9937b06cc3 save full text search table (filtered)
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 59
diff changeset
439 e.printStackTrace();
0a9937b06cc3 save full text search table (filtered)
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 59
diff changeset
440 internalError(e);
0a9937b06cc3 save full text search table (filtered)
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 59
diff changeset
441 }
0a9937b06cc3 save full text search table (filtered)
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 59
diff changeset
442
0a9937b06cc3 save full text search table (filtered)
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 59
diff changeset
443 this.forceSetFileLists();
0a9937b06cc3 save full text search table (filtered)
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 59
diff changeset
444 }
0a9937b06cc3 save full text search table (filtered)
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 59
diff changeset
445
39
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
446 public void save() {
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
447 logger.debug("saving table...");
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
448 logger.debug(this.getFileName() + ", " + this.getSearchTerm() + ", userId= "+ getSessionBean().getUser().getId());
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
449
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
450 //logger.debug(this.getFilteredList());
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
451
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
452 if (StringUtils.equals(this.getFileName(), "") ) {
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
453 addMsg("Save failed. Table name cannot be empty.");
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
454 return;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
455 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
456
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
457
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
458 /* Update db table `LGFullTextSearchFile`: new row with userId, file name, ...*/
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
459
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
460 Long userId = getSessionBean().getUser().getId();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
461
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
462 LGFullTextSearchFile file;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
463 try {
40
35ed4e650a53 bug fixed: full text search when section not found in section_index table. add paginator
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 39
diff changeset
464
35ed4e650a53 bug fixed: full text search when section not found in section_index table. add paginator
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 39
diff changeset
465 // check if record with (userId, fileName) already existed, update it; otherwise, create one
35ed4e650a53 bug fixed: full text search when section not found in section_index table. add paginator
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 39
diff changeset
466 LGFullTextSearchFile searchFile = new LGFullTextSearchFile();
35ed4e650a53 bug fixed: full text search when section not found in section_index table. add paginator
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 39
diff changeset
467
35ed4e650a53 bug fixed: full text search when section not found in section_index table. add paginator
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 39
diff changeset
468 for (LGFullTextSearchFile aFile: this.getFileList()) {
35ed4e650a53 bug fixed: full text search when section not found in section_index table. add paginator
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 39
diff changeset
469 if ( StringUtils.equals(aFile.getFileName(), fileName) && aFile.getUserId().equals(userId)) {
35ed4e650a53 bug fixed: full text search when section not found in section_index table. add paginator
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 39
diff changeset
470 searchFile = aFile;
35ed4e650a53 bug fixed: full text search when section not found in section_index table. add paginator
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 39
diff changeset
471 break;
39
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
472 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
473 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
474
40
35ed4e650a53 bug fixed: full text search when section not found in section_index table. add paginator
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 39
diff changeset
475 if (searchFile.isEmpty() ) {
35ed4e650a53 bug fixed: full text search when section not found in section_index table. add paginator
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 39
diff changeset
476 searchFile.setFileName(fileName);
35ed4e650a53 bug fixed: full text search when section not found in section_index table. add paginator
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 39
diff changeset
477 searchFile.setUserId(userId);
35ed4e650a53 bug fixed: full text search when section not found in section_index table. add paginator
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 39
diff changeset
478 }
35ed4e650a53 bug fixed: full text search when section not found in section_index table. add paginator
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 39
diff changeset
479
35ed4e650a53 bug fixed: full text search when section not found in section_index table. add paginator
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 39
diff changeset
480 searchFile.setSearchTerms(this.searchTerm);
35ed4e650a53 bug fixed: full text search when section not found in section_index table. add paginator
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 39
diff changeset
481
49
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
482 //file = DataProvider.getInstance().saveLGFullTextSearchFile(this.getFilteredList(), userId, searchFile);
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
483 file = DataProvider.getInstance().saveLGFullTextSearchFile(this.getCompleteList(), userId, searchFile);
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
484
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
485
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
486 logger.debug("file: " + file.getInfo());
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
487
58
b8ad346e39a0 new: modify based on doc 'Improving LGServices interface.docx': user workflow improvement, functions like adding task into a topic and search suggestions.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 55
diff changeset
488 this.setFile(file);
b8ad346e39a0 new: modify based on doc 'Improving LGServices interface.docx': user workflow improvement, functions like adding task into a topic and search suggestions.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 55
diff changeset
489
39
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
490 addMsg("The table has been saved!");
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
491
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
492
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
493 } catch (Exception e) {
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
494 addMsg("Saving fails!");
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
495 e.printStackTrace();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
496 internalError(e);
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
497 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
498
55
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
499 this.forceSetFileLists();
54
a00efd5d9e77 new: adding delete saved table function
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 51
diff changeset
500
39
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
501 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
502
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
503
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
504
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
505 public void filter(){
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
506 this.filteredList = new ArrayList<DBContents>();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
507 for(DBContents content : this.completeList){
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
508 if(!this.filteredList.contains(content)){
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
509
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
510 if( (StringUtils.isEmpty(dynastyFilter) || StringUtils.startsWith(content.getSection().getBook().getDynasty(), dynastyFilter)) &&
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
511 (StringUtils.isEmpty(level1Filter) || StringUtils.startsWith(content.getSection().getBook().getLevel1(), level1Filter)) &&
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
512 (StringUtils.isEmpty(level2Filter) || StringUtils.startsWith(content.getSection().getBook().getLevel2(), level2Filter)) &&
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
513 (StringUtils.isEmpty(adminTypeFilter) || StringUtils.startsWith(content.getSection().getBook().getAdmin_type(), adminTypeFilter)) &&
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
514 (StringUtils.isEmpty(bookIdFilter) || StringUtils.startsWith(content.getBookId(), bookIdFilter)) &&
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
515 (StringUtils.isEmpty(bookNameFilter) || StringUtils.startsWith(content.getSection().getBook().getName(), bookNameFilter)) &&
49
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
516 (StringUtils.isEmpty(sectionNameFilter) || StringUtils.startsWith(content.getSection().getName(), sectionNameFilter)) &&
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
517 (StringUtils.isEmpty(contentFilter) || StringUtils.contains(content.getContent(), contentFilter))
51
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
518
39
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
519 ){
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
520 this.filteredList.add(content);
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
521 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
522 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
523 }
40
35ed4e650a53 bug fixed: full text search when section not found in section_index table. add paginator
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 39
diff changeset
524
39
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
525 if(completeList.size() > 0){
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
526 this.searchMessage = completeList.size() + " section(s) found for the term(s): " + this.searchTerm;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
527 this.filteringMessage = this.filteredList.size() + " section(s) listed after the filtering";
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
528
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
529 this.paginator.setCurrentPage(0);
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
530 this.paginator.resetNumberOfPages(filteredList.size());
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
531
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
532 }else{
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
533 this.searchMessage = "No sections found for the term(s): " + this.searchTerm;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
534 this.filteredList = null;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
535 this.filteringMessage = "";
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
536
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
537 this.paginator.setCurrentPage(0);
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
538 this.paginator.resetNumberOfPages(0);
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
539 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
540
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
541 this.updateCurrentSections();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
542
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
543 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
544
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
545
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
546 private void updateCurrentSections() {
40
35ed4e650a53 bug fixed: full text search when section not found in section_index table. add paginator
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 39
diff changeset
547
39
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
548 this.paginator.initCount();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
549 int startRecord = this.paginator.getCurrentPage()
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
550 * this.paginator.getItemsPerPage();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
551 if(this.paginator.getNumberOfPages() == 0){
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
552 this.displayList = new ArrayList<DBContents>();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
553 }else if((this.paginator.getCurrentPage() + 1) == this.paginator.getNumberOfPages()){
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
554 int mod = this.filteredList.size() % paginator.getItemsPerPage();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
555 if(mod == 0){
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
556 this.displayList = filteredList.subList(startRecord, startRecord + this.paginator.getItemsPerPage());
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
557 }else{
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
558 this.displayList = filteredList.subList(startRecord, startRecord + mod);
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
559 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
560
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
561 }else{
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
562 this.displayList = filteredList.subList(startRecord, startRecord + this.paginator.getItemsPerPage());
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
563 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
564
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
565 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
566
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
567
51
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
568
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
569 public void removeFocusedContent(boolean status) {
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
570
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
571 // set isRemove for the content with id=this.focusedContentId
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
572 // status is true: remove;
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
573 // status is false: recover (unremove)
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
574
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
575 for (DBContents content: this.completeList) {
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
576 if (StringUtils.equals(content.getId().toString(), this.focusedContentId)) {
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
577 content.setRemoved(status);
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
578 logger.debug("set remove content id=" + content.getId().toString());
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
579 break;
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
580 }
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
581 }
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
582
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
583 int currentPage = this.getPaginator().getCurrentPage();
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
584
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
585 Collections.sort(this.completeList);
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
586 filter();
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
587
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
588 // update the selectedNumOfContent to selectedMessage
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
589 if (status) {
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
590 this.selectedNumOfContent -= 1;
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
591 } else {
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
592 this.selectedNumOfContent += 1;
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
593 }
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
594
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
595 selectedContentMessage = this.selectedNumOfContent.toString() + " section(s) selected";
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
596 this.setSelectedContentMessage(selectedContentMessage);
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
597
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
598 this.getPaginator().setCurrentPage(currentPage);
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
599 this.updateCurrentSections();
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
600
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
601
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
602
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
603 }
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
604
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
605
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
606
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
607
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
608
48
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
609 private List<String> splitBatchSearchTerm() {
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
610 List<String> rs = new ArrayList<String>();
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
611
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
612 String[] array = this.batchSearchTerm.split(";");
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
613
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
614 for(String tmp : array){
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
615 tmp = tmp.replace(" ", "");
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
616 if(StringUtils.isNotEmpty(tmp)){
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
617 rs.add(tmp);
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
618 }
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
619 }
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
620 return rs;
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
621 }
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
622
39
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
623 private List<String> splitTerms(){
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
624 List<String> rs = new ArrayList<String>();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
625
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
626 String[] array = this.searchTerm.split(",");
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
627
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
628 for(String tmp : array){
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
629 tmp = tmp.replace(" ", "");
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
630 if(StringUtils.isNotEmpty(tmp)){
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
631 rs.add(tmp);
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
632 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
633 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
634 return rs;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
635 }
59
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
636
39
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
637
59
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
638 public List<String> suggestBookName(String term, int limit){
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
639 List<String> list = new ArrayList<String>();
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
640 for(DBContents content : this.completeList){
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
641 String bookName = content.getSection().getBook().getName();
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
642 if(!list.contains(bookName) && bookName.startsWith(term)){
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
643 list.add(bookName);
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
644 }
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
645 if(limit == list.size()){
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
646 break;
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
647 }
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
648 }
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
649 return list;
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
650 }
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
651
39
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
652 public List<String> suggestDynasty(String term, int limit){
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
653 List<String> list = new ArrayList<String>();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
654 for(DBContents content : this.completeList){
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
655 String dynasty = content.getSection().getBook().getDynasty();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
656 if(!list.contains(dynasty) && dynasty.startsWith(term)){
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
657 list.add(dynasty);
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
658 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
659 if(limit == list.size()){
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
660 break;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
661 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
662 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
663 return list;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
664 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
665
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
666 public List<String> suggestLevel1(String term, int limit){
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
667 List<String> list = new ArrayList<String>();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
668 for(DBContents content : this.completeList){
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
669 String level1 = content.getSection().getBook().getLevel1();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
670 if(!list.contains(level1) && level1.startsWith(term)){
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
671 list.add(level1);
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
672 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
673 if(limit == list.size()){
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
674 break;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
675 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
676 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
677 return list;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
678 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
679
59
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
680 public List<String> suggestLevel2(String term, int limit){
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
681 List<String> list = new ArrayList<String>();
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
682 for(DBContents content : this.completeList){
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
683 String level2 = content.getSection().getBook().getLevel2();
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
684 if(!list.contains(level2) && level2.startsWith(term)){
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
685 list.add(level2);
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
686 }
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
687 if(limit == list.size()){
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
688 break;
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
689 }
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
690 }
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
691 return list;
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
692 }
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
693
39
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
694 public List<String> suggestAdminType(String term, int limit){
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
695 List<String> list = new ArrayList<String>();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
696 for(DBContents content : this.completeList){
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
697 String adminType = content.getSection().getBook().getAdmin_type();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
698 if(!list.contains(adminType) && adminType.startsWith(term)){
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
699 list.add(adminType);
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
700 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
701 if(limit == list.size()){
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
702 break;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
703 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
704 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
705 return list;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
706 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
707
59
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
708 public List<String> suggestPeriod(String term, int limit){
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
709 List<String> list = new ArrayList<String>();
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
710 for(DBContents content : this.completeList){
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
711 String period = content.getSection().getBook().getPeriod();
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
712 if(!list.contains(period) && period.startsWith(term)){
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
713 list.add(period);
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
714 }
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
715 if(limit == list.size()){
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
716 break;
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
717 }
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
718 }
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
719 return list;
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
720 }
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
721 public List<String> suggestSectionName(String term, int limit){
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
722 List<String> list = new ArrayList<String>();
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
723 for(DBContents content : this.completeList){
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
724 String sectionName = content.getSection().getName();
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
725 if(!list.contains(sectionName) && sectionName.startsWith(term)){
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
726 list.add(sectionName);
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
727 }
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
728 if(limit == list.size()){
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
729 break;
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
730 }
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
731 }
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
732 return list;
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
733 }
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
734 public List<String> suggestBookId(String term, int limit){
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
735 List<String> list = new ArrayList<String>();
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
736 for(DBContents content : this.completeList){
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
737 String bookId = content.getSection().getBook().getId();
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
738 if(!list.contains(bookId) && bookId.startsWith(term)){
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
739 list.add(bookId);
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
740 }
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
741 if(limit == list.size()){
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
742 break;
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
743 }
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
744 }
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
745 return list;
bc0219c2600b new: minor improvements
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 58
diff changeset
746 }
39
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
747
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
748
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
749 public List<LGFullTextSearchFile> getFileList() {
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
750 return fileList;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
751 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
752
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
753 public void setFileList(List<LGFullTextSearchFile> fileList) {
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
754 this.fileList = fileList;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
755 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
756
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
757
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
758
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
759 public List<DBContents> getCompleteList() {
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
760 return completeList;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
761 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
762
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
763
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
764
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
765 public void setCompleteList(List<DBContents> completeList) {
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
766 this.completeList = completeList;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
767 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
768
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
769
48
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
770 public String getBatchSearchTerm() {
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
771 return batchSearchTerm;
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
772 }
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
773
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
774 public void setBatchSearchTerm(String batchSearchTerm) {
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
775 this.batchSearchTerm = batchSearchTerm;
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
776 }
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 40
diff changeset
777
39
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
778 public String getSearchTerm() {
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
779 return searchTerm;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
780 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
781
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
782
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
783 public void setSearchTerm(String searchTerm) {
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
784 this.searchTerm = searchTerm;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
785 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
786
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
787 public List<DBContents> getFilteredList() {
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
788 return filteredList;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
789 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
790
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
791 public void setFilteredList(List<DBContents> filteredList) {
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
792 this.filteredList = filteredList;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
793 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
794
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
795
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
796 public List<DBContents> getDisplayList() {
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
797 return displayList;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
798 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
799
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
800 public void setDisplayList(List<DBContents> displayList) {
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
801 this.displayList = displayList;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
802 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
803
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
804
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
805 public DataPaginator getPaginator() {
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
806 return paginator;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
807 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
808
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
809 public void setPaginator(DataPaginator paginator) {
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
810 this.paginator = paginator;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
811 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
812
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
813 public void firstPage() {
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
814 this.paginator.first();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
815 this.updateCurrentSections();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
816 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
817
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
818 public void lastPage() {
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
819 this.paginator.last();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
820 this.updateCurrentSections();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
821 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
822
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
823 public void fastForward() {
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
824 this.paginator.fastForward();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
825 this.updateCurrentSections();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
826 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
827
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
828 public void fastRewind() {
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
829 this.paginator.fastRewind();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
830 this.updateCurrentSections();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
831 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
832
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
833 public void previousPage() {
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
834 this.paginator.previous();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
835 this.updateCurrentSections();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
836 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
837
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
838 public void nextPage() {
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
839 this.paginator.next();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
840 this.updateCurrentSections();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
841 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
842
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
843 public String getSearchMessage() {
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
844 return searchMessage;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
845 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
846
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
847 public void setSearchMessage(String searchMessage) {
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
848 this.searchMessage = searchMessage;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
849 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
850
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
851 public String getFilteringMessage() {
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
852 return filteringMessage;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
853 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
854
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
855 public void setFilteringMessage(String filteringMessage) {
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
856 this.filteringMessage = filteringMessage;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
857 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
858
51
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
859
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
860 public String getSelectedContentMessage() {
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
861 return selectedContentMessage;
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
862 }
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
863
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
864 public void setSelectedContentMessage(String selectedContentMessage) {
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
865 this.selectedContentMessage = selectedContentMessage;
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
866 }
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
867
39
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
868 public String getFileName() {
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
869 return fileName;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
870 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
871
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
872 public void setFileName(String fileName) {
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
873 this.fileName = fileName;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
874 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
875
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
876 public String getDynastyFilter() {
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
877 return dynastyFilter;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
878 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
879
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
880 public void setDynastyFilter(String dynastyFilter) {
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
881 this.dynastyFilter = dynastyFilter;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
882 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
883
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
884 public String getAdminTypeFilter() {
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
885 return adminTypeFilter;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
886 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
887
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
888 public void setAdminTypeFilter(String adminTypeFilter) {
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
889 this.adminTypeFilter = adminTypeFilter;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
890 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
891
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
892 public String getLevel1Filter() {
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
893 return level1Filter;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
894 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
895
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
896 public void setLevel1Filter(String level1Filter) {
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
897 this.level1Filter = level1Filter;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
898 }
49
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
899 public String getContentFilter() {
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
900 return contentFilter;
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
901 }
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
902
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
903 public void setContentFilter(String contentFilter) {
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
904 this.contentFilter = contentFilter;
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
905 }
39
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
906
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
907 public String getFocusedContentId() {
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
908 return focusedContentId;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
909 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
910
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
911 public void setFocusedContentId(String focusedContentId) {
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
912 this.focusedContentId = focusedContentId;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
913 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
914
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
915 public String getBookIdFilter() {
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
916 return bookIdFilter;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
917 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
918
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
919 public void setBookIdFilter(String bookIdFilter) {
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
920 this.bookIdFilter = bookIdFilter;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
921 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
922
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
923 public String getBookNameFilter() {
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
924 return bookNameFilter;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
925 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
926
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
927 public void setBookNameFilter(String bookNameFilter) {
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
928 this.bookNameFilter = bookNameFilter;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
929 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
930
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
931 public String getLevel2Filter() {
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
932 return level2Filter;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
933 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
934
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
935 public void setLevel2Filter(String level2Filter) {
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
936 this.level2Filter = level2Filter;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
937 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
938
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
939 public String getPeriodFilter() {
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
940 return periodFilter;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
941 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
942
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
943 public void setPeriodFilter(String periodFilter) {
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
944 this.periodFilter = periodFilter;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
945 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
946
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
947 public String getSectionNameFilter() {
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
948 return sectionNameFilter;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
949 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
950
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
951 public void setSectionNameFilter(String sectionNameFilter) {
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
952 this.sectionNameFilter = sectionNameFilter;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
953 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
954
51
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
955
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
956
55
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
957 public List<LGFullTextSearchFile> getWeekFileList() {
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
958 return weekFileList;
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
959 }
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
960
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
961 public void setWeekFileList(List<LGFullTextSearchFile> weekFileList) {
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
962 this.weekFileList = weekFileList;
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
963 }
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
964
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
965 public List<LGFullTextSearchFile> getMonthFileList() {
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
966 return monthFileList;
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
967 }
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
968
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
969 public void setMonthFileList(List<LGFullTextSearchFile> monthFileList) {
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
970 this.monthFileList = monthFileList;
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
971 }
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
972
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
973 public List<LGFullTextSearchFile> getOlderFileList() {
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
974 return olderFileList;
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
975 }
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
976
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
977 public void setOlderFileList(List<LGFullTextSearchFile> olderFileList) {
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
978 this.olderFileList = olderFileList;
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
979 }
95bf4ac726e6 Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 54
diff changeset
980
51
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
981 public String getMouseX() {
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
982 return mouseX;
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
983 }
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
984
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
985 public void setMouseX(String mouseX) {
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
986 this.mouseX = mouseX;
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
987 }
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
988
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
989 public String getMouseY() {
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
990 return mouseY;
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
991 }
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
992
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
993 public void setMouseY(String mouseY) {
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
994 this.mouseY = mouseY;
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
995 }
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
996
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
997 public Integer getSelectedNumOfContent() {
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
998 return selectedNumOfContent;
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
999 }
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
1000
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
1001 public void setSelectedNumOfContent(Integer selectedNumOfContent) {
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
1002 this.selectedNumOfContent = selectedNumOfContent;
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
1003 }
cf747a960516 new: auto scroll to the last position when de/selecting rows, and add number of selected rows info, in full text search page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 49
diff changeset
1004
58
b8ad346e39a0 new: modify based on doc 'Improving LGServices interface.docx': user workflow improvement, functions like adding task into a topic and search suggestions.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 55
diff changeset
1005 public LGFullTextSearchFile getFile() {
b8ad346e39a0 new: modify based on doc 'Improving LGServices interface.docx': user workflow improvement, functions like adding task into a topic and search suggestions.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 55
diff changeset
1006 return file;
b8ad346e39a0 new: modify based on doc 'Improving LGServices interface.docx': user workflow improvement, functions like adding task into a topic and search suggestions.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 55
diff changeset
1007 }
b8ad346e39a0 new: modify based on doc 'Improving LGServices interface.docx': user workflow improvement, functions like adding task into a topic and search suggestions.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 55
diff changeset
1008
b8ad346e39a0 new: modify based on doc 'Improving LGServices interface.docx': user workflow improvement, functions like adding task into a topic and search suggestions.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 55
diff changeset
1009 public void setFile(LGFullTextSearchFile file) {
b8ad346e39a0 new: modify based on doc 'Improving LGServices interface.docx': user workflow improvement, functions like adding task into a topic and search suggestions.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 55
diff changeset
1010 this.file = file;
b8ad346e39a0 new: modify based on doc 'Improving LGServices interface.docx': user workflow improvement, functions like adding task into a topic and search suggestions.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 55
diff changeset
1011 }
b8ad346e39a0 new: modify based on doc 'Improving LGServices interface.docx': user workflow improvement, functions like adding task into a topic and search suggestions.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 55
diff changeset
1012
49
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
1013
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
1014
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
1015 /////// Sorting
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
1016
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
1017
39
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1018 public void sortByBookNameUp(){
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1019 Collections.sort(this.completeList, new SortContentByBookName());
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1020 filter();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1021 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1022
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1023 public void sortByBookNameDown(){
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1024 Collections.sort(this.completeList, new SortContentByBookName());
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1025 Collections.reverse(this.completeList);
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1026 filter();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1027 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1028
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1029 public void sortBySectionNameUp(){
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1030 Collections.sort(this.completeList);
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1031 filter();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1032 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1033
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1034 public void sortBySectionNameDown(){
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1035 Collections.sort(this.completeList);
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1036 Collections.reverse(this.completeList);
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1037 filter();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1038 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1039
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1040
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1041 public void sortByPeriodUp(){
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1042 Collections.sort(this.completeList, new SortContentByPeriod());
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1043 filter();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1044 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1045
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1046 public void sortByPeriodDown(){
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1047 Collections.sort(this.completeList, new SortContentByPeriod());
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1048 Collections.reverse(this.completeList);
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1049 filter();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1050 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1051
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1052
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1053
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1054 public void sortByIdUp(){
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1055 Collections.sort(this.completeList, new SortContentById());
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1056 this.filter();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1057 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1058
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1059 public void sortByIdDown(){
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1060 Collections.sort(this.completeList, new SortContentById());
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1061 Collections.reverse(completeList);
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1062 this.filter();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1063 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1064
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1065
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1066 public void sortByDynastyUp(){
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1067 Collections.sort(this.completeList, new SortContentByDynasty());
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1068 filter();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1069 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1070
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1071 public void sortByDynastyDown(){
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1072 Collections.sort(this.completeList, new SortContentByDynasty());
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1073 Collections.reverse(completeList);
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1074 filter();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1075 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1076
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1077 public void sortByBookIdUp(){
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1078 Collections.sort(this.completeList, new SortContentByBookId());
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1079 filter();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1080 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1081
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1082 public void sortByBookIdDown(){
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1083 Collections.sort(this.completeList, new SortContentByBookId());
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1084 Collections.reverse(completeList);
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1085 filter();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1086 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1087
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1088 public void sortByLevel1Up(){
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1089 Collections.sort(this.completeList, new SortContentByLevel1());
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1090 filter();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1091 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1092
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1093 public void sortByLevel1Down(){
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1094 Collections.sort(this.completeList, new SortContentByLevel1());
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1095 Collections.reverse(completeList);
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1096 filter();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1097 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1098 public void sortByLevel2Up(){
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1099 Collections.sort(this.completeList, new SortContentByLevel2());
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1100 filter();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1101 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1102
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1103 public void sortByLevel2Down(){
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1104 Collections.sort(this.completeList, new SortContentByLevel2());
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1105 Collections.reverse(completeList);
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1106 filter();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1107 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1108
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1109 public void sortByAdminTypeUp(){
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1110 Collections.sort(this.completeList, new SortContentByAdminType());
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1111 filter();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1112 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1113
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1114 public void sortByAdminTypeDown(){
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1115 Collections.sort(this.completeList, new SortContentByAdminType());
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1116 Collections.reverse(completeList);
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1117 filter();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1118 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1119
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1120 public void sortByStartPageUp(){
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1121 Collections.sort(this.completeList, new SortContentByStartPage());
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1122 filter();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1123 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1124
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1125 public void sortByStartPageDown(){
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1126 Collections.sort(this.completeList, new SortContentByStartPage());
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1127 Collections.reverse(completeList);
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1128 filter();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1129 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1130 public void sortByInxUp(){
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1131 Collections.sort(this.completeList, new SortContentByInx());
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1132 filter();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1133 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1134
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1135 public void sortByInxDown(){
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1136 Collections.sort(this.completeList, new SortContentByInx());
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1137 Collections.reverse(completeList);
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1138 filter();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1139 }
49
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
1140
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
1141
39
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1142
49
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
1143
7c2e1b14b77d new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
1144
39
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1145
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1146
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1147
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1148
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1149 }