Mercurial > hg > LGServices
annotate src/main/java/de/mpiwg/gazetteer/bo/LGTopic.java @ 105:16a0796e3871 default tip
remove "console.log" from general.js
author | Calvin Yeh <cyeh@mpipw-berlin.mpg.com> |
---|---|
date | Fri, 29 Sep 2017 16:18:02 +0200 |
parents | 95bf4ac726e6 |
children |
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.gazetteer.bo; |
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.io.Serializable; |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
4 import java.sql.SQLException; |
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.ArrayList; |
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.List; |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
7 |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
8 import javax.persistence.Column; |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
9 import javax.persistence.Entity; |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
10 import javax.persistence.Inheritance; |
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.persistence.InheritanceType; |
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.persistence.Table; |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
13 import javax.persistence.Transient; |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
14 |
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.json.JSONArray; |
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.dataverse.DataverseUtils; |
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.db.DBBook; |
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.db.DBSection; |
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.utils.DBService; |
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.utils.DataProvider; |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
23 |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
24 |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
25 @Entity |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
26 @Table(name="Topic") |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
27 @Inheritance(strategy=InheritanceType.TABLE_PER_CLASS) |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
28 public class LGTopic extends DBEntry implements Cloneable, Serializable { |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
29 private static final long serialVersionUID = 7805209462045170778L; |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
30 |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
31 @Column(name="userId") |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
32 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
|
33 |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
34 @Column(name="contributors") |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
35 private String contributors = "[]"; |
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 @Column(name="nameEn") |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
38 private String nameEn; |
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 @Column(name="nameCh") |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
41 private String nameCh; |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
42 |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
43 @Column(name="namePinyin") |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
44 private String namePinyin; |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
45 |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
46 @Column(name="description") |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
47 private String description; |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
48 |
43
9dbbbfd474f4
new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
41
diff
changeset
|
49 @Column(name="keywords") |
9dbbbfd474f4
new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
41
diff
changeset
|
50 private String keywords; |
9dbbbfd474f4
new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
41
diff
changeset
|
51 |
55
95bf4ac726e6
Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
48
diff
changeset
|
52 @Column(name="tag") |
95bf4ac726e6
Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
48
diff
changeset
|
53 private String tag; |
95bf4ac726e6
Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
48
diff
changeset
|
54 |
95bf4ac726e6
Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
48
diff
changeset
|
55 |
41
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 @Transient |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
58 private List<Long> contributorsList; |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
59 |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
60 |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
61 @Transient |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
62 private boolean transientDataLoaded = false; |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
63 |
48
13555aff1f88
new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
43
diff
changeset
|
64 @Transient |
13555aff1f88
new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
43
diff
changeset
|
65 private Integer numOfSections = 0; |
41
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
66 |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
67 |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
68 public boolean isEmpty() { |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
69 if (nameEn.equals("") || nameCh.equals("") || namePinyin.equals("") ) { |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
70 return true; |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
71 } else { |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
72 return false; |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
73 } |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
74 } |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
75 |
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 |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
78 |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
79 public boolean isTransientDataLoaded() { |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
80 return transientDataLoaded; |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
81 } |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
82 |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
83 |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
84 |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
85 public Object clone() throws CloneNotSupportedException { |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
86 LGTopic clone = (LGTopic)super.clone(); |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
87 clone.setContributorsList(new ArrayList<Long>(clone.getContributorsList())); |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
88 |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
89 return clone; |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
90 } |
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 |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
93 |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
94 public boolean hasContributor(Long userId){ |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
95 for(Long id : getContributorsList()){ |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
96 if(id.equals(userId)){ |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
97 return true; |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
98 } |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
99 } |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
100 return false; |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
101 } |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
102 |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
103 public List<Long> getContributorsList(){ |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
104 if(contributorsList == null){ |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
105 reloadContributorsList(); |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
106 } |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
107 return contributorsList; |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
108 } |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
109 |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
110 public List<String> getContributorsNameList(){ |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
111 List<String> list = new ArrayList<String>(); |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
112 for(Long userId : getContributorsList()){ |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
113 list.add(DataverseUtils.getUsername(userId)); |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
114 } |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
115 return list; |
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 public String getUsername(){ |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
119 if(this.userId != null){ |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
120 return DataverseUtils.getUsername(this.userId); |
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 return null; |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
123 } |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
124 |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
125 private void reloadContributorsList(){ |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
126 this.contributorsList = new ArrayList<Long>(); |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
127 try { |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
128 JSONArray array = new JSONArray(this.contributors); |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
129 for(int i=0; i<array.length(); i++){ |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
130 this.contributorsList.add(array.getLong(i)); |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
131 } |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
132 } 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
|
133 e.printStackTrace(); |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
134 } |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
135 } |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
136 |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
137 public void addContributor(Long userId){ |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
138 if(!getContributorsList().contains(userId)){ |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
139 getContributorsList().add(userId); |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
140 } |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
141 upgradeContributors(); |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
142 } |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
143 |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
144 public void removeContributor(Long userId){ |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
145 if(getContributorsList().contains(userId)){ |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
146 getContributorsList().remove(userId); |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
147 this.upgradeContributors(); |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
148 } |
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 public void upgradeContributors(){ |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
152 JSONArray array = new JSONArray(getContributorsList()); |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
153 this.contributors = array.toString(); |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
154 } |
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 |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
157 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
|
158 return userId; |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
159 } |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
160 |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
161 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
|
162 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
|
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 public String getContributors() { |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
166 return contributors; |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
167 } |
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 public void setContributors(String contributors) { |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
170 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
|
171 } |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
172 |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
173 |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
174 public String getNameEn() { |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
175 return nameEn; |
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 |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
178 |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
179 public void setNameEn(String nameEn) { |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
180 this.nameEn = nameEn; |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
181 } |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
182 |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
183 |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
184 public String getNameCh() { |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
185 return nameCh; |
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 |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
189 public void setNameCh(String nameCh) { |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
190 this.nameCh = nameCh; |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
191 } |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
192 |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
193 |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
194 public String getNamePinyin() { |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
195 return namePinyin; |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
196 } |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
197 |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
198 |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
199 public void setNamePinyin(String namePinyin) { |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
200 this.namePinyin = namePinyin; |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
201 } |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
202 |
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 public String getDescription() { |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
205 return description; |
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 |
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 |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
210 public void setDescription(String description) { |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
211 this.description = description; |
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 |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
214 |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
215 |
43
9dbbbfd474f4
new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
41
diff
changeset
|
216 public String getKeywords() { |
9dbbbfd474f4
new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
41
diff
changeset
|
217 return keywords; |
9dbbbfd474f4
new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
41
diff
changeset
|
218 } |
9dbbbfd474f4
new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
41
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:
41
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:
41
diff
changeset
|
221 public void setKeywords(String keywords) { |
9dbbbfd474f4
new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
41
diff
changeset
|
222 this.keywords = keywords; |
9dbbbfd474f4
new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
41
diff
changeset
|
223 } |
9dbbbfd474f4
new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
41
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:
41
diff
changeset
|
225 |
55
95bf4ac726e6
Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
48
diff
changeset
|
226 public String getTag() { |
95bf4ac726e6
Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
48
diff
changeset
|
227 return tag; |
95bf4ac726e6
Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
48
diff
changeset
|
228 } |
95bf4ac726e6
Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
48
diff
changeset
|
229 |
95bf4ac726e6
Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
48
diff
changeset
|
230 |
95bf4ac726e6
Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
48
diff
changeset
|
231 public void setTag(String tag) { |
95bf4ac726e6
Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
48
diff
changeset
|
232 this.tag = tag; |
95bf4ac726e6
Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
48
diff
changeset
|
233 } |
95bf4ac726e6
Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
48
diff
changeset
|
234 |
95bf4ac726e6
Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
48
diff
changeset
|
235 |
95bf4ac726e6
Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
48
diff
changeset
|
236 |
41
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
237 public void setContributorsList(List<Long> contributorsList) { |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
238 this.contributorsList = contributorsList; |
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 |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
241 |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
242 public void setTransientDataLoaded(boolean transientDataLoaded) { |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
243 this.transientDataLoaded = transientDataLoaded; |
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 |
48
13555aff1f88
new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
43
diff
changeset
|
246 |
13555aff1f88
new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
43
diff
changeset
|
247 |
13555aff1f88
new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
43
diff
changeset
|
248 public Integer getNumOfSections() { |
13555aff1f88
new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
43
diff
changeset
|
249 if (numOfSections == 0){ |
55
95bf4ac726e6
Topic synchronization with extraction-interface. new tables in LGService database
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
48
diff
changeset
|
250 // get number of sections in this topic from db table TopicSectionRelation with topicId=this.topicId |
48
13555aff1f88
new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
43
diff
changeset
|
251 Long topicId = this.getId(); |
13555aff1f88
new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
43
diff
changeset
|
252 |
13555aff1f88
new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
43
diff
changeset
|
253 this.setNumOfSections(DataProvider.getInstance().getNumberOfSectionInTopic(topicId)); |
13555aff1f88
new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
43
diff
changeset
|
254 |
13555aff1f88
new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
43
diff
changeset
|
255 } |
13555aff1f88
new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
43
diff
changeset
|
256 |
13555aff1f88
new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
43
diff
changeset
|
257 return numOfSections; |
13555aff1f88
new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
43
diff
changeset
|
258 } |
13555aff1f88
new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
43
diff
changeset
|
259 |
13555aff1f88
new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
43
diff
changeset
|
260 public void setNumOfSections(Integer numOfSections) { |
13555aff1f88
new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
43
diff
changeset
|
261 this.numOfSections = numOfSections; |
13555aff1f88
new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
43
diff
changeset
|
262 } |
13555aff1f88
new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
43
diff
changeset
|
263 |
13555aff1f88
new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
43
diff
changeset
|
264 |
13555aff1f88
new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
43
diff
changeset
|
265 |
13555aff1f88
new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
43
diff
changeset
|
266 |
41
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
267 public DuplexKey<Long, Long> getKey(){ |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
268 return new DuplexKey<Long, Long>(this.userId, this.id); |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
269 } |
43
9dbbbfd474f4
new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
41
diff
changeset
|
270 |
9dbbbfd474f4
new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
41
diff
changeset
|
271 public String info() { |
9dbbbfd474f4
new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
41
diff
changeset
|
272 return nameEn + "(" + nameCh + ", " + namePinyin + ")"; |
9dbbbfd474f4
new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
41
diff
changeset
|
273 } |
41
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
274 |
48
13555aff1f88
new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
43
diff
changeset
|
275 |
13555aff1f88
new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
43
diff
changeset
|
276 |
13555aff1f88
new: multiple full text searching. topics and tasks improvement.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
43
diff
changeset
|
277 |
41
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
278 @Override |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
279 public String toString(){ |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
280 return "LGTopic[nameEn=" + nameEn + ", nameCh=" + nameCh + ", namePinyin=" + namePinyin + "]"; |
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 |
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
283 |
43
9dbbbfd474f4
new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
41
diff
changeset
|
284 |
9dbbbfd474f4
new: 1.existing topic in search result. 2.difference-set of book for topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
41
diff
changeset
|
285 |
41
ba9515f22897
new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
286 } |