annotate src/main/java/de/mpiwg/web/jsp/TopicPage.java @ 75:e5697f7775b2

Display columns named "source" and "year" and implement filter & sorting on them. Hide the column "Start Year"
author Calvin Yeh <cyeh@mpiwg-berlin.mpg.de>
date Mon, 27 Mar 2017 17:50:58 +0200
parents 92ede90bc611
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
41
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1 package de.mpiwg.web.jsp;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
2
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
3 import java.util.ArrayList;
43
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
4 import java.util.Collection;
41
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
5 import java.util.Collections;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
6 import java.util.HashMap;
43
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
7 import java.util.Iterator;
41
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
8 import java.util.List;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
9 import java.util.Map;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
10
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
11 import javax.servlet.http.HttpServletRequest;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
12 import javax.servlet.http.HttpServletResponse;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
13
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
14 import org.apache.commons.lang.StringUtils;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
15 import org.apache.log4j.Logger;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
16
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
17 import cl.maps.duplex.DuplexKey;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
18 import de.mpiwg.gazetteer.bo.LGBranch;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
19 import de.mpiwg.gazetteer.bo.LGTopic;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
20 import de.mpiwg.gazetteer.bo.LGTopicSectionRelation;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
21 import de.mpiwg.gazetteer.dataverse.DataverseUtils;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
22 import de.mpiwg.gazetteer.dataverse.bo.VDCUser;
43
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
23 import de.mpiwg.gazetteer.db.DBBook;
41
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
24 import de.mpiwg.gazetteer.db.DBSection;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
25 import de.mpiwg.gazetteer.utils.DBService;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
26 import de.mpiwg.gazetteer.utils.DataProvider;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
27 import de.mpiwg.web.search.SortSectionByAdminType;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
28 import de.mpiwg.web.search.SortSectionByBookId;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
29 import de.mpiwg.web.search.SortSectionByBookName;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
30 import de.mpiwg.web.search.SortSectionByDynasty;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
31 import de.mpiwg.web.search.SortSectionById;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
32 import de.mpiwg.web.search.SortSectionByLevel1;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
33 import de.mpiwg.web.search.SortSectionByLevel2;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
34 import de.mpiwg.web.search.SortSectionByPeriod;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
35 import de.mpiwg.web.search.SortSectionByStartPage;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
36
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
37
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
38 public class TopicPage extends AbstractJSPPage{
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
39
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
40 private static Logger logger = Logger.getLogger(TopicPage.class);
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
41
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
42 public static String bean = "topicBean";
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
43 public static String page = "pages/topicPage.jsp";
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
44
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
45 private LGTopic topic;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
46 private Long topicId;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
47
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
48 private Long userId;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
49
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
50 private List<VDCUser> suggestionUserList;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
51 private List<VDCUser> contributors;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
52
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
53 private List<DBSection> completeSectionList;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
54 private List<DBSection> filteredSectionList;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
55 private List<DBSection> displaySectionList;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
56
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
57
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
58 private String dynastyFilter = new String();
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
59 private String adminTypeFilter = new String();
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
60 private String level1Filter = new String();
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
61 private String level2Filter = new String();
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
62
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
63 private String bookNameFilter = new String();
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
64 private String bookIdFilter = new String();
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
65 private String periodFilter = new String();
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
66 private String sectionNameFilter = new String();
70
315a6360ea1b add dynasty filter in missing books on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
67
315a6360ea1b add dynasty filter in missing books on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
68
315a6360ea1b add dynasty filter in missing books on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
69 private String dynastyFilterMissingBooks = new String();
71
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
70 private String level1FilterMissingBooks = new String();
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
71 private String level2FilterMissingBooks = new String();
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
72 private String periodFilterMissingBooks = new String();
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
73 private String adminTypeFilterMissingBooks = new String();
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
74 private String bookNameFilterMissingBooks = new String();
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
75
41
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
76
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
77 private DataPaginator paginator = new DataPaginator();
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
78 private String filteringMessage;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
79
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
80 private Map<Long, List<LGBranch>> branchesMap;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
81
43
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
82 private Map<String, DBBook> booksMap;
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
83
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
84 private List<DBBook> pendingBookList;
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
85
70
315a6360ea1b add dynasty filter in missing books on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
86 private List<DBBook> filteredSectionListMissingBooks;
315a6360ea1b add dynasty filter in missing books on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
87
43
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
88
71
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
89
41
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
90 public void loadParameters(HttpServletRequest request, HttpServletResponse response){
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
91
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
92 this.request = request;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
93 this.response = response;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
94 this.userId = getLongParameter("userId");
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
95 this.topicId = getLongParameter("topicId");
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
96
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
97 this.dynastyFilter = getParameter("dynastyFilter");
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
98 this.adminTypeFilter = getParameter("adminTypeFilter");
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
99 this.level1Filter = getParameter("level1Filter");
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
100 this.level2Filter = getParameter("level2Filter");
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
101 this.periodFilter = getParameter("periodFilter");
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
102 this.sectionNameFilter = getParameter("sectionNameFilter");
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
103 this.bookIdFilter = getParameter("bookIdFilter");
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
104 this.bookNameFilter = getParameter("bookNameFilter");
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
105
70
315a6360ea1b add dynasty filter in missing books on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
106
315a6360ea1b add dynasty filter in missing books on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
107 this.dynastyFilterMissingBooks = getParameter("dynastyFilterMissingBooks");
71
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
108 this.level1FilterMissingBooks = getParameter("level1FilterMissingBooks");
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
109 this.level2FilterMissingBooks = getParameter("level2FilterMissingBooks");
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
110 this.periodFilterMissingBooks = getParameter("periodFilterMissingBooks");
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
111 this.adminTypeFilterMissingBooks = getParameter("adminTypeFilterMissingBooks");
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
112 this.bookNameFilterMissingBooks = getParameter("bookNameFilterMissingBooks");
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
113
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
114
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
115
41
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
116 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
117
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
118
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
119
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
120 public void forceLoadTopicSectionRelation() {
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
121
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
122 logger.debug("forceLoadTopicSectionRelation");
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
123 DataProvider.getInstance().setTopicSectionRelationMap(null);
42
815cd86bb9ec bug fixed: some NullPointer situations caused by null topicId
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 41
diff changeset
124
815cd86bb9ec bug fixed: some NullPointer situations caused by null topicId
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 41
diff changeset
125 this.loadTopic(this.topicId);
41
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
126
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
127 }
42
815cd86bb9ec bug fixed: some NullPointer situations caused by null topicId
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 41
diff changeset
128
815cd86bb9ec bug fixed: some NullPointer situations caused by null topicId
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 41
diff changeset
129 public void loadTopic(Long topicId0){
41
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
130
42
815cd86bb9ec bug fixed: some NullPointer situations caused by null topicId
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 41
diff changeset
131 LGTopic topic = DataProvider.getInstance().getTopic(topicId0);
815cd86bb9ec bug fixed: some NullPointer situations caused by null topicId
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 41
diff changeset
132 if(topic != null){
815cd86bb9ec bug fixed: some NullPointer situations caused by null topicId
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 41
diff changeset
133 this.loadTopic(topic);
815cd86bb9ec bug fixed: some NullPointer situations caused by null topicId
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 41
diff changeset
134 }else{
815cd86bb9ec bug fixed: some NullPointer situations caused by null topicId
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 41
diff changeset
135 addMsg("topic [id=" + topicId + "] no found.");
815cd86bb9ec bug fixed: some NullPointer situations caused by null topicId
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 41
diff changeset
136 }
815cd86bb9ec bug fixed: some NullPointer situations caused by null topicId
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 41
diff changeset
137 }
41
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
138
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
139 public void loadTopic(String topicId0){
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
140 try {
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
141
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
142 this.topicId = Long.parseLong(topicId0);
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
143
42
815cd86bb9ec bug fixed: some NullPointer situations caused by null topicId
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 41
diff changeset
144 this.loadTopic(this.topicId);
41
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
145
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
146
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
147 } catch (Exception e) {
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
148 internalError(e);
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
149 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
150
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
151 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
152
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
153 public void addContributor(){
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
154 if(userId != null){
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
155
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
156 VDCUser user = DataverseUtils.getUser(userId);
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
157 System.out.println("Adding user: " + user.getUserName());
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
158
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
159 this.topic.addContributor(userId);
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
160 this.saveTopic0();
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
161 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
162 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
163
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
164
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
165
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
166 public void removeContributor(){
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
167 if(userId != null){
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
168
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
169 VDCUser user = DataverseUtils.getUser(userId);
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
170 System.out.println("Removing user: " + user.getUserName());
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
171
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
172 this.topic.removeContributor(userId);
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
173 this.saveTopic0();
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
174 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
175 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
176
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
177 private void saveTopic0(){
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
178 try {
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
179 DataProvider.getInstance().updateTopic(topic);
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
180 this.loadTopic(topic);
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
181 addMsg("The topic has been updated!");
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
182 } catch (Exception e) {
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
183 internalError(e);
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
184 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
185 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
186
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
187
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
188 public void loadTopic(LGTopic topic){
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
189 logger.info("Loading topic: " + topic.toString());
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
190
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
191 if(topic != null && topic.isPersistent()){
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
192 this.loadBranches();
43
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
193 this.loadBooks();
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
194
41
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
195 try {
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
196 this.topic = (LGTopic)topic.clone();
42
815cd86bb9ec bug fixed: some NullPointer situations caused by null topicId
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 41
diff changeset
197
41
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
198 this.contributors = new ArrayList<VDCUser>();
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
199 for(Long userId : this.topic.getContributorsList()){
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
200 VDCUser user = DataverseUtils.getUser(userId);
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
201 if(user != null){
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
202 this.contributors.add(user);
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
203 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
204
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
205 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
206
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
207 this.loadSuggestionUserList();
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
208
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
209 // all sections in the topic
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
210 this.completeSectionList = DataProvider.getInstance().getAllSectionsInTopic(topic.getId());
48
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 44
diff changeset
211 logger.info("completeSectionList.size=" + completeSectionList.size());
41
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
212
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
213 } catch (Exception e) {
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
214 internalError(e);
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
215 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
216
48
13555aff1f88 new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 44
diff changeset
217
41
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
218 }
43
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
219
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
220
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
221 // pendingBookList
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
222 for(DBSection section :this.completeSectionList) {
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
223 String bookId = section.getBookId();
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
224
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
225 if (this.booksMap.get(bookId) != null) {
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
226 // remove the book with bookId from pendingBookList
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
227 this.booksMap.remove(bookId);
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
228 }
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
229 }
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
230
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
231 this.pendingBookList = new ArrayList<DBBook>();
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
232 this.pendingBookList.addAll(this.booksMap.values());
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
233
70
315a6360ea1b add dynasty filter in missing books on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
234 this.filter();
315a6360ea1b add dynasty filter in missing books on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
235
41
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
236 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
237
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
238
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
239
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
240 public void updateDescription() {
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
241 String description = getParameter("description");
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
242 //logger.info("updateLabel: " + branchLabel + ", for branch id=" + this.getBranchId())
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
243 this.getTopic().setDescription(description);
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
244
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
245 this.saveTopic0();
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
246
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
247 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
248
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
249
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
250
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
251
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
252 public void deleteSection(Long sectionId) throws Exception {
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
253 // delete the record with sectionId, topicId in topicSectionRelation database table
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
254
42
815cd86bb9ec bug fixed: some NullPointer situations caused by null topicId
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 41
diff changeset
255 logger.debug("delete sectionId=" + sectionId + " in topicId=" + this.topicId);
41
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
256
42
815cd86bb9ec bug fixed: some NullPointer situations caused by null topicId
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 41
diff changeset
257 DataProvider.getInstance().deleteTopicSectionRelation(this.topicId, sectionId);
41
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
258
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
259
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
260 // update completeSectionList
42
815cd86bb9ec bug fixed: some NullPointer situations caused by null topicId
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 41
diff changeset
261 this.completeSectionList = DataProvider.getInstance().getAllSectionsInTopic(this.topicId);
41
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
262
42
815cd86bb9ec bug fixed: some NullPointer situations caused by null topicId
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 41
diff changeset
263 this.filter();
41
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
264 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
265
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
266
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
267
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
268 private void loadSuggestionUserList() throws Exception{
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
269 this.suggestionUserList = new ArrayList<VDCUser>();
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
270 for(VDCUser user : DataverseUtils.getAllUsers()){
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
271 if(!topic.hasContributor(user.getId())){
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
272 this.suggestionUserList.add(user);
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
273 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
274 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
275 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
276
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
277 public void reset(){
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
278 this.topic = null;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
279 this.completeSectionList = null;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
280 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
281
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
282 public void filter(){
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
283 this.filteredSectionList = new ArrayList<DBSection>();
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
284 for(DBSection section : this.completeSectionList){
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
285 if(!this.filteredSectionList.contains(section)){
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
286
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
287 if( (StringUtils.isEmpty(dynastyFilter) || StringUtils.startsWith(section.getBook().getDynasty(), dynastyFilter)) &&
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
288 (StringUtils.isEmpty(level1Filter) || StringUtils.startsWith(section.getBook().getLevel1(), level1Filter)) &&
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
289 (StringUtils.isEmpty(level2Filter) || StringUtils.startsWith(section.getBook().getLevel2(), level2Filter)) &&
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
290 (StringUtils.isEmpty(bookIdFilter) || StringUtils.startsWith(section.getBookId(), bookIdFilter)) &&
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
291 (StringUtils.isEmpty(bookNameFilter) || StringUtils.startsWith(section.getBook().getName(), bookNameFilter)) &&
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
292 (StringUtils.isEmpty(periodFilter) || StringUtils.startsWith(section.getBook().getPeriod(), periodFilter)) &&
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
293 (StringUtils.isEmpty(sectionNameFilter) || StringUtils.startsWith(section.getName(), sectionNameFilter)) &&
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
294 (StringUtils.isEmpty(adminTypeFilter) || StringUtils.startsWith(section.getBook().getAdmin_type(), adminTypeFilter))
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
295 ){
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
296 this.filteredSectionList.add(section);
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
297 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
298
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
299 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
300 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
301
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
302 if(completeSectionList.size() > 0){
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
303
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
304 this.filteringMessage = this.filteredSectionList.size() + " section(s) listed after the filtering";
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
305
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
306 this.paginator.setCurrentPage(0);
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
307 this.paginator.resetNumberOfPages(filteredSectionList.size());
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
308
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
309 this.updateCurrentSections();
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
310
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
311 }else{
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
312 this.filteredSectionList = null;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
313 this.filteringMessage = "";
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
314
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
315 this.paginator.setCurrentPage(0);
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
316 this.paginator.resetNumberOfPages(0);
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
317 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
318
70
315a6360ea1b add dynasty filter in missing books on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
319
71
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
320 // filter on pendingBookList
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
321 // complete filters for each field in Missing Books table
70
315a6360ea1b add dynasty filter in missing books on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
322 if (this.pendingBookList != null) {
315a6360ea1b add dynasty filter in missing books on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
323
315a6360ea1b add dynasty filter in missing books on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
324 this.filteredSectionListMissingBooks = new ArrayList<DBBook>();
315a6360ea1b add dynasty filter in missing books on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
325 for(DBBook book : this.pendingBookList){
315a6360ea1b add dynasty filter in missing books on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
326 if(!this.filteredSectionListMissingBooks.contains(book)){
315a6360ea1b add dynasty filter in missing books on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
327
71
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
328 if( (StringUtils.isEmpty(bookNameFilterMissingBooks) || StringUtils.startsWith(book.getName(), bookNameFilterMissingBooks)) &&
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
329 (StringUtils.isEmpty(dynastyFilterMissingBooks) || StringUtils.startsWith(book.getDynasty(), dynastyFilterMissingBooks)) &&
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
330 (StringUtils.isEmpty(level1FilterMissingBooks) || StringUtils.startsWith(book.getLevel1(), level1FilterMissingBooks)) &&
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
331 (StringUtils.isEmpty(level2FilterMissingBooks) || StringUtils.startsWith(book.getLevel2(), level2FilterMissingBooks)) &&
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
332 (StringUtils.isEmpty(periodFilterMissingBooks) || StringUtils.startsWith(book.getPeriod(), periodFilterMissingBooks)) &&
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
333 (StringUtils.isEmpty(adminTypeFilterMissingBooks) || StringUtils.startsWith(book.getAdmin_type(), adminTypeFilterMissingBooks))
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
334
70
315a6360ea1b add dynasty filter in missing books on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
335 ){
315a6360ea1b add dynasty filter in missing books on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
336
315a6360ea1b add dynasty filter in missing books on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
337 this.filteredSectionListMissingBooks.add(book);
315a6360ea1b add dynasty filter in missing books on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
338 }
315a6360ea1b add dynasty filter in missing books on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
339
315a6360ea1b add dynasty filter in missing books on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
340 }
315a6360ea1b add dynasty filter in missing books on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
341 }
315a6360ea1b add dynasty filter in missing books on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
342 }
315a6360ea1b add dynasty filter in missing books on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
343
41
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
344
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
345 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
346
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
347
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
348 private void updateCurrentSections() {
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
349 /* developing... */
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
350 this.displaySectionList = this.filteredSectionList;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
351
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
352 /*
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
353
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
354 this.paginator.initCount();
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
355 int startRecord = this.paginator.getCurrentPage()
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
356 * this.paginator.getItemsPerPage();
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
357 if(this.paginator.getNumberOfPages() == 0){
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
358 this.displaySectionList = new ArrayList<DBSection>();
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
359 }else if((this.paginator.getCurrentPage() + 1) == this.paginator.getNumberOfPages()){
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
360 int mod = this.filteredSectionList.size() % paginator.getItemsPerPage();
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
361 if(mod == 0){
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
362 this.displaySectionList = filteredSectionList.subList(startRecord, startRecord + this.paginator.getItemsPerPage());
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
363 }else{
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
364 this.displaySectionList = filteredSectionList.subList(startRecord, startRecord + mod);
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
365 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
366
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
367 }else{
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
368 this.displaySectionList = filteredSectionList.subList(startRecord, startRecord + this.paginator.getItemsPerPage());
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
369 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
370 */
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
371
44
89d1076df1c3 minor bug fixed
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 43
diff changeset
372 for(DBSection section : this.displaySectionList){// we don't paginate now
43
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
373 section.setBranches(this.branchesMap.get(section.getId()));
41
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
374 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
375
43
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
376
41
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
377
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
378 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
379
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
380
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
381
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
382 public void addSectionToTopic(Long _sectionId, Long _topicId) throws Exception {
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
383 logger.debug("selectedSectionId:" + _sectionId + ", selectedTopicId: " + _topicId);
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
384
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
385
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
386 // create a new record in TopicSectionRelation table
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
387 String status = DataProvider.getInstance().updateTopicSectionRelation(_sectionId, _topicId);
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
388
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
389 if (StringUtils.equals(status, "added") ) {
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
390 addMsg("Added section [id=" + _sectionId + "] to the topic [id=" + _topicId + "]");
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
391 } else if (StringUtils.equals(status, "updated") ) {
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
392 addMsg("The section already in the topic");
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
393 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
394
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
395 this.reset();
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
396 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
397
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
398
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
399
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
400
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
401 private void loadBranches(){
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
402 this.branchesMap = new HashMap<Long, List<LGBranch>>();
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
403 // List<LGBranch> list = DataProvider.getInstance().getBranches(getSessionBean().getUser().getId());
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
404 List<LGBranch> list = DataProvider.getInstance().getAllExistingBranches();
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
405
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
406 for(LGBranch branch : list){
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
407 branch.loadTransientData();
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
408 if(this.branchesMap.get(branch.getSectionId()) == null){
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
409 this.branchesMap.put(branch.getSectionId(), new ArrayList<LGBranch>());
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
410 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
411 this.branchesMap.get(branch.getSectionId()).add(branch);
43
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
412
41
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
413 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
414 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
415
43
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
416
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
417 private void loadBooks(){
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
418
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
419 List<DBBook> bookList = DBService.getInstance().getBooks();
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
420
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
421 this.booksMap = new HashMap<String, DBBook>();
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
422
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
423 for (DBBook book : bookList) {
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
424
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
425 this.booksMap.put(book.getId(), book);
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
426
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
427 }
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
428
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
429 }
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
430
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
431
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
432
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
433 public void addAllSectionsToTopic(List<DBSection> list, Long selectedTopicId) throws Exception {
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
434
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
435 if (list == null) {
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
436 return;
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
437 }
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
438 logger.debug("selectedTopicId: " + selectedTopicId + ", total " + list.size() + " sections.");
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
439
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
440 Integer added = 0;
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
441 Integer existing = 0;
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
442
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
443 for (DBSection section : list) {
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
444 // create a new record in TopicSectionRelation table
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
445 String status = DataProvider.getInstance().updateTopicSectionRelation(section.getId(), selectedTopicId);
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
446
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
447 if (StringUtils.equals(status, "added") ) {
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
448 added++;
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
449 } else if (StringUtils.equals(status, "updated") ) {
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
450 existing++;
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
451 }
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
452
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
453 }
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
454
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
455 addMsg("Added " + added.toString() + " sections. " + existing.toString() + " sections already in the topic.");
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
456
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
457 this.reset();
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
458 }
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
459
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
460
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
461
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
462
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
463
41
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
464 public List<VDCUser> getContributors() {
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
465 return contributors;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
466 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
467
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
468 public void setContributors(List<VDCUser> contributors) {
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
469 this.contributors = contributors;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
470 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
471
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
472 public List<VDCUser> getSuggestionUserList() {
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
473 return suggestionUserList;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
474 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
475 public void setSuggestionUserList(List<VDCUser> suggestionUserList) {
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
476 this.suggestionUserList = suggestionUserList;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
477 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
478
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
479 public Long getUserId() {
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
480 return userId;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
481 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
482
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
483 public void setUserId(Long userId) {
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
484 this.userId = userId;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
485 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
486
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
487
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
488 public LGTopic getTopic() {
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
489 return topic;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
490 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
491
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
492
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
493
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
494 public void setTopic(LGTopic topic) {
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
495 this.topic = topic;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
496 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
497
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
498
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
499
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
500 public Long getTopicId() {
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
501 return topicId;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
502 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
503
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
504
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
505
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
506 public void setTopicId(Long topicId) {
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
507 this.topicId = topicId;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
508 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
509
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
510
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
511
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
512 public String getDynastyFilter() {
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
513 return dynastyFilter;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
514 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
515
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
516
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
517
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
518 public void setDynastyFilter(String dynastyFilter) {
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
519 this.dynastyFilter = dynastyFilter;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
520 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
521
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
522
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
523 public String getAdminTypeFilter() {
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
524 return adminTypeFilter;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
525 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
526
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
527
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
528
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
529 public void setAdminTypeFilter(String adminTypeFilter) {
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
530 this.adminTypeFilter = adminTypeFilter;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
531 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
532
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
533
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
534
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
535 public String getLevel1Filter() {
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
536 return level1Filter;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
537 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
538
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
539
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
540
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
541 public void setLevel1Filter(String level1Filter) {
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
542 this.level1Filter = level1Filter;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
543 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
544
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
545
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
546
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
547 public String getLevel2Filter() {
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
548 return level2Filter;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
549 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
550
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
551
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
552
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
553 public void setLevel2Filter(String level2Filter) {
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
554 this.level2Filter = level2Filter;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
555 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
556
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
557
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
558
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
559 public List<DBSection> getFilteredSectionList() {
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
560 return filteredSectionList;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
561 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
562
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
563
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
564
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
565 public void setFilteredSectionList(List<DBSection> filteredSectionList) {
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
566 this.filteredSectionList = filteredSectionList;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
567 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
568
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
569
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
570
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
571 public List<DBSection> getDisplaySectionList() {
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
572 return displaySectionList;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
573 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
574
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
575
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
576
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
577 public void setDisplaySectionList(List<DBSection> displaySectionList) {
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
578 this.displaySectionList = displaySectionList;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
579 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
580
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
581
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
582
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
583 public DataPaginator getPaginator() {
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
584 return paginator;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
585 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
586
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
587
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
588
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
589 public void setPaginator(DataPaginator paginator) {
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
590 this.paginator = paginator;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
591 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
592
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
593
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
594
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
595 public String getFilteringMessage() {
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
596 return filteringMessage;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
597 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
598
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
599
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
600
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
601 public void setFilteringMessage(String filteringMessage) {
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
602 this.filteringMessage = filteringMessage;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
603 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
604
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
605
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
606
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
607 public Map<Long, List<LGBranch>> getBranchesMap() {
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
608 return branchesMap;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
609 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
610
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
611
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
612
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
613 public void setBranchesMap(Map<Long, List<LGBranch>> branchesMap) {
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
614 this.branchesMap = branchesMap;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
615 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
616
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
617 public String getBookNameFilter() {
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
618 return bookNameFilter;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
619 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
620
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
621
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
622 public void setBookNameFilter(String bookNameFilter) {
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
623 this.bookNameFilter = bookNameFilter;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
624 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
625
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
626
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
627
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
628 public String getBookIdFilter() {
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
629 return bookIdFilter;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
630 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
631
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
632
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
633
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
634 public void setBookIdFilter(String bookIdFilter) {
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
635 this.bookIdFilter = bookIdFilter;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
636 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
637
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
638
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
639
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
640 public String getPeriodFilter() {
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
641 return periodFilter;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
642 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
643
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
644
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
645
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
646 public void setPeriodFilter(String periodFilter) {
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
647 this.periodFilter = periodFilter;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
648 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
649
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
650
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
651
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
652 public String getSectionNameFilter() {
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
653 return sectionNameFilter;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
654 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
655
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
656
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
657
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
658 public void setSectionNameFilter(String sectionNameFilter) {
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
659 this.sectionNameFilter = sectionNameFilter;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
660 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
661
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
662
43
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
663
70
315a6360ea1b add dynasty filter in missing books on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
664 public String getDynastyFilterMissingBooks() {
315a6360ea1b add dynasty filter in missing books on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
665 return dynastyFilterMissingBooks;
315a6360ea1b add dynasty filter in missing books on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
666 }
315a6360ea1b add dynasty filter in missing books on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
667
315a6360ea1b add dynasty filter in missing books on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
668
315a6360ea1b add dynasty filter in missing books on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
669
315a6360ea1b add dynasty filter in missing books on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
670 public void setDynastyFilterMissingBooks(String dynastyFilterMissingBooks) {
315a6360ea1b add dynasty filter in missing books on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
671 this.dynastyFilterMissingBooks = dynastyFilterMissingBooks;
315a6360ea1b add dynasty filter in missing books on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
672 }
43
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
673
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
674
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
675 public List<DBBook> getPendingBookList() {
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
676 return pendingBookList;
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
677 }
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
678
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
679
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
680
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
681 public void setPendingBookList(List<DBBook> pendingBookList) {
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
682 this.pendingBookList = pendingBookList;
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
683 }
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
684
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
685
41
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
686
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
687 public List<DBSection> getCompleteSectionList() {
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
688 return completeSectionList;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
689 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
690
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
691 public void setCompleteSectionList(List<DBSection> completeSectionList) {
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
692 this.completeSectionList = completeSectionList;
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
693 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
694
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
695
70
315a6360ea1b add dynasty filter in missing books on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
696
71
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
697 public String getBookNameFilterMissingBooks() {
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
698 return bookNameFilterMissingBooks;
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
699 }
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
700
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
701
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
702
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
703 public void setBookNameFilterMissingBooks(String bookNameFilterMissingBooks) {
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
704 this.bookNameFilterMissingBooks = bookNameFilterMissingBooks;
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
705 }
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
706
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
707
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
708
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
709 public String getLevel1FilterMissingBooks() {
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
710 return level1FilterMissingBooks;
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
711 }
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
712
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
713
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
714
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
715 public void setLevel1FilterMissingBooks(String level1FilterMissingBooks) {
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
716 this.level1FilterMissingBooks = level1FilterMissingBooks;
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
717 }
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
718
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
719
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
720
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
721 public String getLevel2FilterMissingBooks() {
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
722 return level2FilterMissingBooks;
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
723 }
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
724
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
725
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
726
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
727 public void setLevel2FilterMissingBooks(String level2FilterMissingBooks) {
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
728 this.level2FilterMissingBooks = level2FilterMissingBooks;
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
729 }
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
730
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
731
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
732
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
733 public String getPeriodFilterMissingBooks() {
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
734 return periodFilterMissingBooks;
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
735 }
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
736
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
737
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
738
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
739 public void setPeriodFilterMissingBooks(String periodFilterMissingBooks) {
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
740 this.periodFilterMissingBooks = periodFilterMissingBooks;
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
741 }
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
742
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
743
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
744
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
745 public String getAdminTypeFilterMissingBooks() {
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
746 return adminTypeFilterMissingBooks;
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
747 }
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
748
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
749
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
750
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
751 public void setAdminTypeFilterMissingBooks(String adminTypeFilterMissingBooks) {
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
752 this.adminTypeFilterMissingBooks = adminTypeFilterMissingBooks;
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
753 }
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
754
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
755
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
756
92ede90bc611 complete filters in the missing books table on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 70
diff changeset
757
70
315a6360ea1b add dynasty filter in missing books on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
758 public List<DBBook> getFilteredSectionListMissingBooks() {
315a6360ea1b add dynasty filter in missing books on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
759 return filteredSectionListMissingBooks;
315a6360ea1b add dynasty filter in missing books on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
760 }
315a6360ea1b add dynasty filter in missing books on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
761
315a6360ea1b add dynasty filter in missing books on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
762
315a6360ea1b add dynasty filter in missing books on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
763
315a6360ea1b add dynasty filter in missing books on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
764 public void setFilteredSectionListMissingBooks(
315a6360ea1b add dynasty filter in missing books on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
765 List<DBBook> filteredSectionListMissingBooks) {
315a6360ea1b add dynasty filter in missing books on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
766 this.filteredSectionListMissingBooks = filteredSectionListMissingBooks;
315a6360ea1b add dynasty filter in missing books on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
767 }
315a6360ea1b add dynasty filter in missing books on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
768
315a6360ea1b add dynasty filter in missing books on topicPage
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 48
diff changeset
769
43
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
770
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
771
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
772
41
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
773
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
774 /////// Sorting
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
775
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
776 public void sortByBookNameUp(){
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
777 Collections.sort(this.completeSectionList, new SortSectionByBookName());
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
778 filter();
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
779 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
780
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
781 public void sortByBookNameDown(){
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
782 Collections.sort(this.completeSectionList, new SortSectionByBookName());
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
783 Collections.reverse(this.completeSectionList);
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
784 filter();
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
785 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
786
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
787 public void sortBySectionNameUp(){
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
788 Collections.sort(this.completeSectionList);
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
789 filter();
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
790 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
791
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
792 public void sortBySectionNameDown(){
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
793 Collections.sort(this.completeSectionList);
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
794 Collections.reverse(this.completeSectionList);
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
795 filter();
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
796 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
797
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
798
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
799 public void sortByPeriodUp(){
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
800 Collections.sort(this.completeSectionList, new SortSectionByPeriod());
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
801 filter();
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
802 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
803
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
804 public void sortByPeriodDown(){
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
805 Collections.sort(this.completeSectionList, new SortSectionByPeriod());
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
806 Collections.reverse(this.completeSectionList);
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
807 filter();
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
808 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
809
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
810
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
811
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
812 public void sortBySectionIdUp(){
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
813 Collections.sort(this.completeSectionList, new SortSectionById());
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
814 this.filter();
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
815 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
816
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
817 public void sortBySectionIdDown(){
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
818 Collections.sort(this.completeSectionList, new SortSectionById());
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
819 Collections.reverse(completeSectionList);
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
820 this.filter();
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
821 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
822
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
823
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
824
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
825 public void sortByDynastyUp(){
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
826 Collections.sort(this.completeSectionList, new SortSectionByDynasty());
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
827 filter();
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
828 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
829
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
830 public void sortByDynastyDown(){
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
831 Collections.sort(this.completeSectionList, new SortSectionByDynasty());
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
832 Collections.reverse(completeSectionList);
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
833 filter();
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
834 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
835
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
836 public void sortByBookIdUp(){
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
837 Collections.sort(this.completeSectionList, new SortSectionByBookId());
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
838 filter();
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
839 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
840
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
841 public void sortByBookIdDown(){
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
842 Collections.sort(this.completeSectionList, new SortSectionByBookId());
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
843 Collections.reverse(completeSectionList);
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
844 filter();
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
845 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
846
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
847 public void sortByLevel1Up(){
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
848 Collections.sort(this.completeSectionList, new SortSectionByLevel1());
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
849 filter();
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
850 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
851
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
852 public void sortByLevel1Down(){
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
853 Collections.sort(this.completeSectionList, new SortSectionByLevel1());
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
854 Collections.reverse(completeSectionList);
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
855 filter();
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
856 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
857
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
858 public void sortByLevel2Up(){
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
859 Collections.sort(this.completeSectionList, new SortSectionByLevel2());
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
860 filter();
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
861 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
862
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
863 public void sortByLevel2Down(){
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
864 Collections.sort(this.completeSectionList, new SortSectionByLevel2());
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
865 Collections.reverse(completeSectionList);
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
866 filter();
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
867 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
868
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
869 public void sortByAdminTypeUp(){
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
870 Collections.sort(this.completeSectionList, new SortSectionByAdminType());
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
871 filter();
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
872 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
873
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
874 public void sortByAdminTypeDown(){
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
875 Collections.sort(this.completeSectionList, new SortSectionByAdminType());
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
876 Collections.reverse(completeSectionList);
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
877 filter();
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
878 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
879
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
880 public void sortByStartPageUp(){
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
881 Collections.sort(this.completeSectionList, new SortSectionByStartPage());
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
882 filter();
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
883 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
884
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
885 public void sortByStartPageDown(){
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
886 Collections.sort(this.completeSectionList, new SortSectionByStartPage());
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
887 Collections.reverse(completeSectionList);
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
888 filter();
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
889 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
890
43
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
891
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
892 public void updateKeywords() {
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
893 String keywords = getParameter("keywords");
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
894 this.getTopic().setKeywords(keywords);
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
895
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
896 this.saveTopic0();
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
897
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
898 }
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
899
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
900
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
901
9dbbbfd474f4 new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 42
diff changeset
902
41
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
903
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
904
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
905
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
906
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
907
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
908 }