annotate src/main/java/de/mpiwg/itgroup/ismi/merge/PublicByAuthorBean.java @ 180:0d31c8be7c31

new MissingRelations feature and UI. including searchByRelations() with Filter in FullEntityRepositoryBean.
author Robert Casties <casties@mpiwg-berlin.mpg.de>
date Wed, 13 Jun 2018 14:57:13 +0200
parents ca83d67a2dc9
children 52aa06772336
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
153
3c83f42a8a39 first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
diff changeset
1 package de.mpiwg.itgroup.ismi.merge;
3c83f42a8a39 first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
diff changeset
2
3c83f42a8a39 first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
diff changeset
3 import java.io.Serializable;
169
0b5d02012299 more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 168
diff changeset
4 import java.util.ArrayList;
170
8604b368ec19 still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 169
diff changeset
5 import java.util.HashMap;
169
0b5d02012299 more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 168
diff changeset
6 import java.util.List;
170
8604b368ec19 still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 169
diff changeset
7 import java.util.Map;
177
af1018d06443 PublicByAuthor feature with new "Select by public and MAMS" works now!
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 176
diff changeset
8 import java.util.Map.Entry;
153
3c83f42a8a39 first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
diff changeset
9
3c83f42a8a39 first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
diff changeset
10 import javax.faces.event.ActionEvent;
3c83f42a8a39 first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
diff changeset
11
3c83f42a8a39 first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
diff changeset
12 import org.apache.log4j.Logger;
176
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
13 import org.mpi.openmind.repository.bo.Attribute;
169
0b5d02012299 more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 168
diff changeset
14 import org.mpi.openmind.repository.bo.Entity;
0b5d02012299 more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 168
diff changeset
15 import org.mpi.openmind.repository.bo.Relation;
153
3c83f42a8a39 first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
diff changeset
16
168
e9ab943ec528 new start for publicByAuthor using EntityRepositoryBean.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 165
diff changeset
17 import de.mpiwg.itgroup.ismi.browse.EntityRepositoryBean;
169
0b5d02012299 more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 168
diff changeset
18 import de.mpiwg.itgroup.ismi.browse.FullEntityRepositoryBean;
153
3c83f42a8a39 first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
diff changeset
19 import de.mpiwg.itgroup.ismi.entry.beans.AbstractISMIBean;
175
3d8b31508128 PublicByAuthor feature works now.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 173
diff changeset
20 import de.mpiwg.itgroup.ismi.entry.utils.PrivacityUtils;
153
3c83f42a8a39 first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
diff changeset
21
3c83f42a8a39 first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
diff changeset
22 public class PublicByAuthorBean extends AbstractISMIBean implements Serializable{
3c83f42a8a39 first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
diff changeset
23
3c83f42a8a39 first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
diff changeset
24 private static Logger logger = Logger.getLogger(PublicByAuthorBean.class);
3c83f42a8a39 first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
diff changeset
25
3c83f42a8a39 first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
diff changeset
26 private static final long serialVersionUID = 1L;
3c83f42a8a39 first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
diff changeset
27
176
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
28 protected String findAuthorName = "";
169
0b5d02012299 more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 168
diff changeset
29 protected Long selectedPersonId = 0l;
176
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
30 protected Integer maxMamsNr = 0;
169
0b5d02012299 more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 168
diff changeset
31
0b5d02012299 more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 168
diff changeset
32 protected Entity selectedPerson;
0b5d02012299 more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 168
diff changeset
33 protected List<Entity> selectedPersonTexts;
170
8604b368ec19 still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 169
diff changeset
34 protected List<String> selectedPersonSubjects;
8604b368ec19 still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 169
diff changeset
35 protected Map<String,List<Entity>> selectedPersonSubjectMap;
171
50b8103ec85c still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 170
diff changeset
36
176
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
37 protected List<String> subjectList;
171
50b8103ec85c still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 170
diff changeset
38 protected Map<String,List<String>> subjectParents;
176
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
39 protected Map<String,List<Entity>> subjectTexts;
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
40 protected Map<String,List<Entity>> subjectPublicTexts;
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
41 protected Map<String,List<Entity>> subjectPrivateTexts;
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
42 protected Map<String,Entity> subjectEntity;
169
0b5d02012299 more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 168
diff changeset
43
173
aa564b1b5e1f publicByAuthor feature ui for selecting texts ready.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 171
diff changeset
44 private FullEntityRepositoryBean browseBean;
153
3c83f42a8a39 first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
diff changeset
45
3c83f42a8a39 first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
diff changeset
46
3c83f42a8a39 first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
diff changeset
47 public PublicByAuthorBean(){
3c83f42a8a39 first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
diff changeset
48 //logger.info("AdvancedSearchBean");
180
0d31c8be7c31 new MissingRelations feature and UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 178
diff changeset
49 browseBean = new FullEntityRepositoryBean();
0d31c8be7c31 new MissingRelations feature and UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 178
diff changeset
50 browseBean.setObjectClass(PERSON);
0d31c8be7c31 new MissingRelations feature and UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 178
diff changeset
51
0d31c8be7c31 new MissingRelations feature and UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 178
diff changeset
52 selectedPersonTexts = new ArrayList<Entity>();
0d31c8be7c31 new MissingRelations feature and UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 178
diff changeset
53 selectedPersonSubjectMap = new HashMap<String,List<Entity>>();
153
3c83f42a8a39 first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
diff changeset
54 }
3c83f42a8a39 first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
diff changeset
55
178
ca83d67a2dc9 bugfix and nicer messages for PublicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 177
diff changeset
56 public synchronized void reset(){
176
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
57 logger.info("PublicByAuthorBean.reset()");
169
0b5d02012299 more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 168
diff changeset
58 browseBean = new FullEntityRepositoryBean();
171
50b8103ec85c still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 170
diff changeset
59 browseBean.setObjectClass(PERSON);
169
0b5d02012299 more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 168
diff changeset
60
0b5d02012299 more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 168
diff changeset
61 selectedPersonTexts = new ArrayList<Entity>();
170
8604b368ec19 still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 169
diff changeset
62 selectedPersonSubjectMap = new HashMap<String,List<Entity>>();
176
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
63
171
50b8103ec85c still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 170
diff changeset
64 makeSubjectTree();
177
af1018d06443 PublicByAuthor feature with new "Select by public and MAMS" works now!
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 176
diff changeset
65 updateSubjectTexts();
176
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
66 logger.info("PublicByAuthorBean.reset() Done.");
153
3c83f42a8a39 first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
diff changeset
67 }
3c83f42a8a39 first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
diff changeset
68
176
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
69 /**
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
70 * Creates the subjectParents Map with all subject names as keys and
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
71 * a List with their parents as values.
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
72 *
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
73 * Also creates the subjectList List of subject names.
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
74 */
171
50b8103ec85c still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 170
diff changeset
75 protected void makeSubjectTree() {
180
0d31c8be7c31 new MissingRelations feature and UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 178
diff changeset
76 logger.debug("Start makeSubjectTree...");
176
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
77 subjectList = new ArrayList<String>();
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
78 subjectEntity = new HashMap<String,Entity>();
171
50b8103ec85c still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 170
diff changeset
79 subjectParents = new HashMap<String,List<String>>();
176
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
80 /*
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
81 * get all subjects
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
82 */
171
50b8103ec85c still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 170
diff changeset
83 List<Entity> subjects = getWrapper().getEntitiesByDef(SUBJECT);
50b8103ec85c still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 170
diff changeset
84 for (Entity subject : subjects) {
50b8103ec85c still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 170
diff changeset
85 if (subject.isLightweight()) {
50b8103ec85c still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 170
diff changeset
86 subject = getWrapper().getEntityContent(subject);
50b8103ec85c still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 170
diff changeset
87 }
176
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
88 /*
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
89 * add subject
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
90 */
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
91 String subjectName = subject.getOwnValue();
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
92 subjectList.add(subjectName);
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
93 subjectEntity.put(subjectName, subject);
171
50b8103ec85c still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 170
diff changeset
94 ArrayList<String> parents = new ArrayList<String>();
50b8103ec85c still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 170
diff changeset
95 Entity parent = subject;
50b8103ec85c still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 170
diff changeset
96 int cnt = 0;
176
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
97 /*
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
98 * find subject's parents
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
99 */
171
50b8103ec85c still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 170
diff changeset
100 do {
50b8103ec85c still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 170
diff changeset
101 if (parent.isLightweight()) {
50b8103ec85c still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 170
diff changeset
102 parent = getWrapper().getEntityContent(parent);
50b8103ec85c still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 170
diff changeset
103 }
50b8103ec85c still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 170
diff changeset
104 List<Relation> parRels = parent.getSourceRelations(is_part_of, SUBJECT);
50b8103ec85c still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 170
diff changeset
105 if (!parRels.isEmpty()) {
50b8103ec85c still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 170
diff changeset
106 Long parentId = parRels.get(0).getTargetId();
50b8103ec85c still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 170
diff changeset
107 parent = getWrapper().getEntityById(parentId);
50b8103ec85c still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 170
diff changeset
108 parents.add(parent.getOwnValue());
50b8103ec85c still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 170
diff changeset
109 } else {
50b8103ec85c still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 170
diff changeset
110 break;
50b8103ec85c still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 170
diff changeset
111 }
50b8103ec85c still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 170
diff changeset
112 } while (++cnt < 5);
176
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
113 subjectParents.put(subjectName, parents);
171
50b8103ec85c still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 170
diff changeset
114 }
180
0d31c8be7c31 new MissingRelations feature and UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 178
diff changeset
115 logger.debug("Done makeSubjectTree.");
171
50b8103ec85c still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 170
diff changeset
116 }
177
af1018d06443 PublicByAuthor feature with new "Select by public and MAMS" works now!
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 176
diff changeset
117
af1018d06443 PublicByAuthor feature with new "Select by public and MAMS" works now!
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 176
diff changeset
118 /**
af1018d06443 PublicByAuthor feature with new "Select by public and MAMS" works now!
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 176
diff changeset
119 * update subjectTexts, subjectPublicTexts and subjectPrivateTexts.
af1018d06443 PublicByAuthor feature with new "Select by public and MAMS" works now!
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 176
diff changeset
120 *
af1018d06443 PublicByAuthor feature with new "Select by public and MAMS" works now!
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 176
diff changeset
121 */
af1018d06443 PublicByAuthor feature with new "Select by public and MAMS" works now!
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 176
diff changeset
122 private void updateSubjectTexts() {
180
0d31c8be7c31 new MissingRelations feature and UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 178
diff changeset
123 logger.debug("Start updateSubjectTexts...");
177
af1018d06443 PublicByAuthor feature with new "Select by public and MAMS" works now!
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 176
diff changeset
124 subjectTexts = new HashMap<String,List<Entity>>();
af1018d06443 PublicByAuthor feature with new "Select by public and MAMS" works now!
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 176
diff changeset
125 subjectPublicTexts = new HashMap<String,List<Entity>>();
af1018d06443 PublicByAuthor feature with new "Select by public and MAMS" works now!
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 176
diff changeset
126 subjectPrivateTexts = new HashMap<String,List<Entity>>();
af1018d06443 PublicByAuthor feature with new "Select by public and MAMS" works now!
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 176
diff changeset
127 for (Entry<String, Entity> subjectItem : subjectEntity.entrySet()) {
af1018d06443 PublicByAuthor feature with new "Select by public and MAMS" works now!
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 176
diff changeset
128 String subjectName = subjectItem.getKey();
af1018d06443 PublicByAuthor feature with new "Select by public and MAMS" works now!
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 176
diff changeset
129 Entity subject = subjectItem.getValue();
af1018d06443 PublicByAuthor feature with new "Select by public and MAMS" works now!
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 176
diff changeset
130 /*
af1018d06443 PublicByAuthor feature with new "Select by public and MAMS" works now!
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 176
diff changeset
131 * find subject's texts
af1018d06443 PublicByAuthor feature with new "Select by public and MAMS" works now!
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 176
diff changeset
132 */
af1018d06443 PublicByAuthor feature with new "Select by public and MAMS" works now!
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 176
diff changeset
133 ArrayList<Entity> textList = new ArrayList<Entity>();
af1018d06443 PublicByAuthor feature with new "Select by public and MAMS" works now!
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 176
diff changeset
134 ArrayList<Entity> pubTextList = new ArrayList<Entity>();
af1018d06443 PublicByAuthor feature with new "Select by public and MAMS" works now!
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 176
diff changeset
135 ArrayList<Entity> privTextList = new ArrayList<Entity>();
af1018d06443 PublicByAuthor feature with new "Select by public and MAMS" works now!
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 176
diff changeset
136 for (Relation textRel : subject.getTargetRelations(has_subject, TEXT)) {
af1018d06443 PublicByAuthor feature with new "Select by public and MAMS" works now!
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 176
diff changeset
137 Long textId = textRel.getSourceId();
af1018d06443 PublicByAuthor feature with new "Select by public and MAMS" works now!
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 176
diff changeset
138 Entity text = getWrapper().getEntityByIdWithContent(textId);
af1018d06443 PublicByAuthor feature with new "Select by public and MAMS" works now!
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 176
diff changeset
139 textList.add(text);
af1018d06443 PublicByAuthor feature with new "Select by public and MAMS" works now!
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 176
diff changeset
140 if (text.getIsPublic()) {
af1018d06443 PublicByAuthor feature with new "Select by public and MAMS" works now!
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 176
diff changeset
141 pubTextList.add(text);
af1018d06443 PublicByAuthor feature with new "Select by public and MAMS" works now!
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 176
diff changeset
142 } else {
af1018d06443 PublicByAuthor feature with new "Select by public and MAMS" works now!
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 176
diff changeset
143 privTextList.add(text);
af1018d06443 PublicByAuthor feature with new "Select by public and MAMS" works now!
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 176
diff changeset
144 }
af1018d06443 PublicByAuthor feature with new "Select by public and MAMS" works now!
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 176
diff changeset
145 }
af1018d06443 PublicByAuthor feature with new "Select by public and MAMS" works now!
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 176
diff changeset
146 subjectTexts.put(subjectName, textList);
af1018d06443 PublicByAuthor feature with new "Select by public and MAMS" works now!
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 176
diff changeset
147 subjectPublicTexts.put(subjectName, pubTextList);
af1018d06443 PublicByAuthor feature with new "Select by public and MAMS" works now!
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 176
diff changeset
148 subjectPrivateTexts.put(subjectName, privTextList);
af1018d06443 PublicByAuthor feature with new "Select by public and MAMS" works now!
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 176
diff changeset
149 }
180
0d31c8be7c31 new MissingRelations feature and UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 178
diff changeset
150 logger.debug("Done updateSubjectTexts...");
177
af1018d06443 PublicByAuthor feature with new "Select by public and MAMS" works now!
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 176
diff changeset
151 }
171
50b8103ec85c still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 170
diff changeset
152
176
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
153 public void actionReset() {
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
154 reset();
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
155 }
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
156
171
50b8103ec85c still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 170
diff changeset
157 public void listenerAuthorIdSearch(ActionEvent event) {
169
0b5d02012299 more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 168
diff changeset
158 setSelectedPersonById();
0b5d02012299 more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 168
diff changeset
159 }
153
3c83f42a8a39 first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
diff changeset
160
170
8604b368ec19 still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 169
diff changeset
161 protected void setSelectedPersonById() {
169
0b5d02012299 more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 168
diff changeset
162 Entity ent = getWrapper().getEntityById(selectedPersonId);
0b5d02012299 more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 168
diff changeset
163 if (ent != null) {
0b5d02012299 more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 168
diff changeset
164 ent = getWrapper().getEntityContent(ent);
0b5d02012299 more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 168
diff changeset
165 selectedPerson = ent;
0b5d02012299 more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 168
diff changeset
166 updateSelectedPerson();
0b5d02012299 more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 168
diff changeset
167 }
0b5d02012299 more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 168
diff changeset
168 }
0b5d02012299 more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 168
diff changeset
169
176
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
170 /**
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
171 * Updates the information in selectedPersonTexts, selectedPersonSubjects
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
172 * and selectedPersonSubjectMap.
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
173 */
169
0b5d02012299 more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 168
diff changeset
174 public void updateSelectedPerson() {
0b5d02012299 more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 168
diff changeset
175 // load all texts by this author
0b5d02012299 more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 168
diff changeset
176 selectedPersonTexts = new ArrayList<Entity>();
170
8604b368ec19 still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 169
diff changeset
177 selectedPersonSubjectMap = new HashMap<String,List<Entity>>();
169
0b5d02012299 more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 168
diff changeset
178 List<Relation> textRels = selectedPerson.getTargetRelations("was_created_by", "TEXT");
0b5d02012299 more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 168
diff changeset
179 for (Relation rel : textRels) {
0b5d02012299 more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 168
diff changeset
180 Long textID = rel.getSourceId();
170
8604b368ec19 still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 169
diff changeset
181 // get text
169
0b5d02012299 more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 168
diff changeset
182 Entity text = getWrapper().getEntityByIdWithContent(textID);
0b5d02012299 more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 168
diff changeset
183 selectedPersonTexts.add(text);
170
8604b368ec19 still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 169
diff changeset
184 // get subject
8604b368ec19 still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 169
diff changeset
185 List<Relation> subjectRels = text.getSourceRelations("has_subject", "SUBJECT");
8604b368ec19 still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 169
diff changeset
186 if (subjectRels.isEmpty()) {
8604b368ec19 still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 169
diff changeset
187 String subject = "NO SUBJECT";
8604b368ec19 still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 169
diff changeset
188 List<Entity> texts = selectedPersonSubjectMap.get(subject);
8604b368ec19 still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 169
diff changeset
189 if (texts == null) {
8604b368ec19 still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 169
diff changeset
190 texts = new ArrayList<Entity>();
8604b368ec19 still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 169
diff changeset
191 }
8604b368ec19 still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 169
diff changeset
192 // add text to list
8604b368ec19 still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 169
diff changeset
193 texts.add(text);
8604b368ec19 still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 169
diff changeset
194 // add list to subject map
8604b368ec19 still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 169
diff changeset
195 selectedPersonSubjectMap.put(subject, texts);
8604b368ec19 still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 169
diff changeset
196
8604b368ec19 still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 169
diff changeset
197 } else {
8604b368ec19 still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 169
diff changeset
198 for (Relation subjectRel : subjectRels) {
8604b368ec19 still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 169
diff changeset
199 Long subjectId = subjectRel.getTargetId();
8604b368ec19 still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 169
diff changeset
200 Entity subject = getWrapper().getEntityByIdWithContent(subjectId);
8604b368ec19 still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 169
diff changeset
201 List<Entity> texts = selectedPersonSubjectMap.get(subject.getOwnValue());
8604b368ec19 still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 169
diff changeset
202 if (texts == null) {
8604b368ec19 still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 169
diff changeset
203 texts = new ArrayList<Entity>();
8604b368ec19 still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 169
diff changeset
204 }
8604b368ec19 still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 169
diff changeset
205 // add text to list
8604b368ec19 still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 169
diff changeset
206 texts.add(text);
8604b368ec19 still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 169
diff changeset
207 // add list to subject map
8604b368ec19 still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 169
diff changeset
208 selectedPersonSubjectMap.put(subject.getOwnValue(), texts);
8604b368ec19 still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 169
diff changeset
209 }
8604b368ec19 still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 169
diff changeset
210 }
8604b368ec19 still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 169
diff changeset
211 }
8604b368ec19 still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 169
diff changeset
212 // update list of subjects
8604b368ec19 still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 169
diff changeset
213 selectedPersonSubjects = new ArrayList<String>();
8604b368ec19 still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 169
diff changeset
214 for (String sub : selectedPersonSubjectMap.keySet()) {
8604b368ec19 still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 169
diff changeset
215 selectedPersonSubjects.add(sub);
169
0b5d02012299 more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 168
diff changeset
216 }
153
3c83f42a8a39 first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
diff changeset
217 }
3c83f42a8a39 first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
diff changeset
218
3c83f42a8a39 first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
diff changeset
219
173
aa564b1b5e1f publicByAuthor feature ui for selecting texts ready.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 171
diff changeset
220 public void actionAllAuthors() {
aa564b1b5e1f publicByAuthor feature ui for selecting texts ready.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 171
diff changeset
221 browseBean.setObjectClass(PERSON);
aa564b1b5e1f publicByAuthor feature ui for selecting texts ready.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 171
diff changeset
222 browseBean.setSortAttributeName("mams_number");
aa564b1b5e1f publicByAuthor feature ui for selecting texts ready.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 171
diff changeset
223 browseBean.setSortAttributeNumerically(true);
aa564b1b5e1f publicByAuthor feature ui for selecting texts ready.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 171
diff changeset
224 try {
aa564b1b5e1f publicByAuthor feature ui for selecting texts ready.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 171
diff changeset
225 browseBean.sortByAttributes();
aa564b1b5e1f publicByAuthor feature ui for selecting texts ready.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 171
diff changeset
226 } catch (Exception e) {
aa564b1b5e1f publicByAuthor feature ui for selecting texts ready.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 171
diff changeset
227 logger.error(e);
aa564b1b5e1f publicByAuthor feature ui for selecting texts ready.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 171
diff changeset
228 }
153
3c83f42a8a39 first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
diff changeset
229 }
3c83f42a8a39 first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
diff changeset
230
175
3d8b31508128 PublicByAuthor feature works now.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 173
diff changeset
231 public String actionSelectPerson() {
3d8b31508128 PublicByAuthor feature works now.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 173
diff changeset
232 Entity entity = (Entity) getRequestBean("entity");
3d8b31508128 PublicByAuthor feature works now.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 173
diff changeset
233 selectedPersonId = entity.getId();
3d8b31508128 PublicByAuthor feature works now.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 173
diff changeset
234 setSelectedPersonById();
3d8b31508128 PublicByAuthor feature works now.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 173
diff changeset
235 // switch tab
176
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
236 getSessionBean().setSelectedPublicByAuthorTab("autsub");
175
3d8b31508128 PublicByAuthor feature works now.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 173
diff changeset
237 return null;
3d8b31508128 PublicByAuthor feature works now.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 173
diff changeset
238 }
3d8b31508128 PublicByAuthor feature works now.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 173
diff changeset
239
3d8b31508128 PublicByAuthor feature works now.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 173
diff changeset
240
176
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
241 /**
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
242 * Makes the selected text and its related objects public.
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
243 * Uses PrivacityUtils.setTextAndMorePrivacity().
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
244 * @return
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
245 */
175
3d8b31508128 PublicByAuthor feature works now.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 173
diff changeset
246 public String actionMakeTextAndRelatedPublic() {
3d8b31508128 PublicByAuthor feature works now.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 173
diff changeset
247 Entity text = (Entity) getRequestBean("text");
178
ca83d67a2dc9 bugfix and nicer messages for PublicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 177
diff changeset
248 logger.info("MAKE PUBLIC by text for text="+text.getOwnValue());
175
3d8b31508128 PublicByAuthor feature works now.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 173
diff changeset
249 List<String> textMsg = new ArrayList<String>();
3d8b31508128 PublicByAuthor feature works now.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 173
diff changeset
250 try {
3d8b31508128 PublicByAuthor feature works now.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 173
diff changeset
251 List<Entity> entities = PrivacityUtils.setTextAndMorePrivacity(text, true, textMsg, getWrapper());
3d8b31508128 PublicByAuthor feature works now.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 173
diff changeset
252 // save only public state
3d8b31508128 PublicByAuthor feature works now.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 173
diff changeset
253 getWrapper().saveEntityListAsNodeWithoutContent(entities, null);
3d8b31508128 PublicByAuthor feature works now.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 173
diff changeset
254 } catch (Exception e) {
3d8b31508128 PublicByAuthor feature works now.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 173
diff changeset
255 logger.error(e);
3d8b31508128 PublicByAuthor feature works now.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 173
diff changeset
256 }
3d8b31508128 PublicByAuthor feature works now.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 173
diff changeset
257 for (String msg : textMsg) {
3d8b31508128 PublicByAuthor feature works now.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 173
diff changeset
258 this.addGeneralMsg(msg);
3d8b31508128 PublicByAuthor feature works now.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 173
diff changeset
259 logger.debug(msg);
3d8b31508128 PublicByAuthor feature works now.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 173
diff changeset
260 }
178
ca83d67a2dc9 bugfix and nicer messages for PublicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 177
diff changeset
261 addGeneralMsg("The text \""+text.getOwnValue()+"\" was made public!");
175
3d8b31508128 PublicByAuthor feature works now.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 173
diff changeset
262 return null;
3d8b31508128 PublicByAuthor feature works now.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 173
diff changeset
263 }
3d8b31508128 PublicByAuthor feature works now.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 173
diff changeset
264
176
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
265 /**
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
266 * Makes the selected subject and its texts and related objects public.
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
267 * Uses PrivacityUtils.setTextAndMorePrivacity().
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
268 * @return
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
269 */
175
3d8b31508128 PublicByAuthor feature works now.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 173
diff changeset
270 public String actionMakePersonSubjectAndRelatedPublic() {
3d8b31508128 PublicByAuthor feature works now.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 173
diff changeset
271 String subject = (String) getRequestBean("subject");
178
ca83d67a2dc9 bugfix and nicer messages for PublicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 177
diff changeset
272 logger.info("MAKE PUBLIC by author and subject for author="+selectedPerson.getOwnValue()+" and subject="+subject);
ca83d67a2dc9 bugfix and nicer messages for PublicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 177
diff changeset
273 int pubCnt = 0;
175
3d8b31508128 PublicByAuthor feature works now.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 173
diff changeset
274 List<Entity> texts = selectedPersonSubjectMap.get(subject);
3d8b31508128 PublicByAuthor feature works now.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 173
diff changeset
275 for (Entity text : texts) {
3d8b31508128 PublicByAuthor feature works now.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 173
diff changeset
276 List<String> textMsg = new ArrayList<String>();
3d8b31508128 PublicByAuthor feature works now.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 173
diff changeset
277 try {
3d8b31508128 PublicByAuthor feature works now.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 173
diff changeset
278 List<Entity> entities = PrivacityUtils.setTextAndMorePrivacity(text, true, textMsg, getWrapper());
3d8b31508128 PublicByAuthor feature works now.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 173
diff changeset
279 // save only public state
3d8b31508128 PublicByAuthor feature works now.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 173
diff changeset
280 getWrapper().saveEntityListAsNodeWithoutContent(entities, null);
3d8b31508128 PublicByAuthor feature works now.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 173
diff changeset
281 } catch (Exception e) {
3d8b31508128 PublicByAuthor feature works now.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 173
diff changeset
282 logger.error(e);
3d8b31508128 PublicByAuthor feature works now.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 173
diff changeset
283 }
3d8b31508128 PublicByAuthor feature works now.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 173
diff changeset
284 for (String msg : textMsg) {
3d8b31508128 PublicByAuthor feature works now.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 173
diff changeset
285 this.addGeneralMsg(msg);
3d8b31508128 PublicByAuthor feature works now.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 173
diff changeset
286 logger.debug(msg);
3d8b31508128 PublicByAuthor feature works now.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 173
diff changeset
287 }
178
ca83d67a2dc9 bugfix and nicer messages for PublicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 177
diff changeset
288 pubCnt += 1;
175
3d8b31508128 PublicByAuthor feature works now.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 173
diff changeset
289 }
178
ca83d67a2dc9 bugfix and nicer messages for PublicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 177
diff changeset
290 addGeneralMsg(pubCnt+" texts with subject "+subject+" were made public!");
175
3d8b31508128 PublicByAuthor feature works now.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 173
diff changeset
291 return null;
3d8b31508128 PublicByAuthor feature works now.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 173
diff changeset
292 }
3d8b31508128 PublicByAuthor feature works now.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 173
diff changeset
293
176
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
294 /**
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
295 * Makes the selected subject and its texts and related objects public.
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
296 * Uses PrivacityUtils.setTextAndMorePrivacity().
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
297 * @return
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
298 */
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
299 public String actionMakeMamsSubjectAndRelatedPublic() {
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
300 String subject = (String) getRequestBean("subject");
178
ca83d67a2dc9 bugfix and nicer messages for PublicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 177
diff changeset
301 logger.info("MAKE PUBLIC by MAMS and subject for subject="+subject+" and maxMams="+maxMamsNr);
176
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
302 if (maxMamsNr < 1) {
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
303 addErrorMsg("MAMS number too small!");
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
304 return null;
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
305 }
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
306 /*
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
307 * go through all texts for the subject
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
308 */
177
af1018d06443 PublicByAuthor feature with new "Select by public and MAMS" works now!
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 176
diff changeset
309 int pubCnt = 0;
176
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
310 List<Entity> texts = subjectTexts.get(subject);
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
311 for (Entity text : texts) {
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
312 if (text.isLightweight()) {
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
313 text = getWrapper().getEntityContent(text);
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
314 }
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
315 /*
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
316 * check author's MAMS number
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
317 */
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
318 List<Relation> authorRels = text.getSourceRelations(rel_was_created_by, PERSON);
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
319 if (authorRels.isEmpty()) {
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
320 // skip text with no author
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
321 continue;
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
322 }
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
323 long authorId = authorRels.get(0).getTargetId();
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
324 Entity author = getWrapper().getEntityByIdWithContent(authorId);
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
325 try {
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
326 Attribute mamsAtt = author.getAttributeByName("mams_number");
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
327 int mamsNr = Integer.parseInt(mamsAtt.getValue());
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
328 if (mamsNr > maxMamsNr) {
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
329 // skip if MAMS number too big
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
330 continue;
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
331 }
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
332 } catch (Exception e) {
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
333 // attribute missing or wrong
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
334 continue;
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
335 }
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
336 /*
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
337 * make text and related objects public
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
338 */
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
339 List<String> textMsg = new ArrayList<String>();
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
340 try {
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
341 List<Entity> entities = PrivacityUtils.setTextAndMorePrivacity(text, true, textMsg, getWrapper());
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
342 // save only public state
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
343 getWrapper().saveEntityListAsNodeWithoutContent(entities, null);
177
af1018d06443 PublicByAuthor feature with new "Select by public and MAMS" works now!
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 176
diff changeset
344 pubCnt += 1;
176
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
345 } catch (Exception e) {
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
346 logger.error(e);
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
347 }
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
348 for (String msg : textMsg) {
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
349 this.addGeneralMsg(msg);
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
350 logger.debug(msg);
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
351 }
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
352 }
177
af1018d06443 PublicByAuthor feature with new "Select by public and MAMS" works now!
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 176
diff changeset
353 if (pubCnt == 0) {
af1018d06443 PublicByAuthor feature with new "Select by public and MAMS" works now!
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 176
diff changeset
354 addGeneralMsg("No text matched your criteria.");
af1018d06443 PublicByAuthor feature with new "Select by public and MAMS" works now!
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 176
diff changeset
355 } else {
af1018d06443 PublicByAuthor feature with new "Select by public and MAMS" works now!
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 176
diff changeset
356 addGeneralMsg(pubCnt+" texts with MAMS number < "+maxMamsNr+" were made public!");
af1018d06443 PublicByAuthor feature with new "Select by public and MAMS" works now!
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 176
diff changeset
357 }
af1018d06443 PublicByAuthor feature with new "Select by public and MAMS" works now!
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 176
diff changeset
358 updateSubjectTexts();
176
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
359 return null;
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
360 }
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
361
153
3c83f42a8a39 first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
diff changeset
362 /**
3c83f42a8a39 first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
diff changeset
363 * @return the findAuthorName
3c83f42a8a39 first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
diff changeset
364 */
3c83f42a8a39 first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
diff changeset
365 public String getFindAuthorName() {
3c83f42a8a39 first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
diff changeset
366 return findAuthorName;
3c83f42a8a39 first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
diff changeset
367 }
3c83f42a8a39 first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
diff changeset
368
3c83f42a8a39 first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
diff changeset
369 /**
3c83f42a8a39 first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
diff changeset
370 * @param findAuthorName the findAuthorName to set
3c83f42a8a39 first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
diff changeset
371 */
3c83f42a8a39 first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
diff changeset
372 public void setFindAuthorName(String findAuthorName) {
3c83f42a8a39 first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
diff changeset
373 this.findAuthorName = findAuthorName;
3c83f42a8a39 first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
diff changeset
374 }
3c83f42a8a39 first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
diff changeset
375
165
85fdcca37a0d working on public by author feature...
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 153
diff changeset
376 /**
168
e9ab943ec528 new start for publicByAuthor using EntityRepositoryBean.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 165
diff changeset
377 * @return the browseBean
165
85fdcca37a0d working on public by author feature...
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 153
diff changeset
378 */
168
e9ab943ec528 new start for publicByAuthor using EntityRepositoryBean.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 165
diff changeset
379 public EntityRepositoryBean getBrowseBean() {
e9ab943ec528 new start for publicByAuthor using EntityRepositoryBean.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 165
diff changeset
380 return browseBean;
165
85fdcca37a0d working on public by author feature...
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 153
diff changeset
381 }
85fdcca37a0d working on public by author feature...
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 153
diff changeset
382
169
0b5d02012299 more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 168
diff changeset
383 /**
0b5d02012299 more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 168
diff changeset
384 * @return the selectedPerson
0b5d02012299 more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 168
diff changeset
385 */
0b5d02012299 more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 168
diff changeset
386 public Entity getSelectedPerson() {
0b5d02012299 more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 168
diff changeset
387 return selectedPerson;
0b5d02012299 more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 168
diff changeset
388 }
0b5d02012299 more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 168
diff changeset
389
0b5d02012299 more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 168
diff changeset
390 /**
0b5d02012299 more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 168
diff changeset
391 * @return the selectedPersonTexts
0b5d02012299 more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 168
diff changeset
392 */
0b5d02012299 more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 168
diff changeset
393 public List<Entity> getSelectedPersonTexts() {
0b5d02012299 more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 168
diff changeset
394 return selectedPersonTexts;
0b5d02012299 more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 168
diff changeset
395 }
0b5d02012299 more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 168
diff changeset
396
0b5d02012299 more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 168
diff changeset
397 /**
0b5d02012299 more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 168
diff changeset
398 * @return the selectedPersonSubjects
0b5d02012299 more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 168
diff changeset
399 */
170
8604b368ec19 still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 169
diff changeset
400 public Map<String, List<Entity>> getSelectedPersonSubjectMap() {
8604b368ec19 still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 169
diff changeset
401 return selectedPersonSubjectMap;
169
0b5d02012299 more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 168
diff changeset
402 }
0b5d02012299 more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 168
diff changeset
403
0b5d02012299 more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 168
diff changeset
404 /**
0b5d02012299 more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 168
diff changeset
405 * @param selectedPersonId the selectedPersonId to set
0b5d02012299 more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 168
diff changeset
406 */
178
ca83d67a2dc9 bugfix and nicer messages for PublicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 177
diff changeset
407 public void setSelectedPersonId(long selectedPersonId) {
169
0b5d02012299 more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 168
diff changeset
408 this.selectedPersonId = selectedPersonId;
0b5d02012299 more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 168
diff changeset
409 }
0b5d02012299 more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 168
diff changeset
410
170
8604b368ec19 still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 169
diff changeset
411 /**
178
ca83d67a2dc9 bugfix and nicer messages for PublicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 177
diff changeset
412 * @return the selectedPersonId
ca83d67a2dc9 bugfix and nicer messages for PublicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 177
diff changeset
413 */
ca83d67a2dc9 bugfix and nicer messages for PublicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 177
diff changeset
414 public long getSelectedPersonId() {
ca83d67a2dc9 bugfix and nicer messages for PublicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 177
diff changeset
415 return selectedPersonId;
ca83d67a2dc9 bugfix and nicer messages for PublicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 177
diff changeset
416 }
ca83d67a2dc9 bugfix and nicer messages for PublicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 177
diff changeset
417
ca83d67a2dc9 bugfix and nicer messages for PublicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 177
diff changeset
418 /**
170
8604b368ec19 still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 169
diff changeset
419 * @return the selectedPersonSubjects
8604b368ec19 still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 169
diff changeset
420 */
8604b368ec19 still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 169
diff changeset
421 public List<String> getSelectedPersonSubjects() {
8604b368ec19 still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 169
diff changeset
422 return selectedPersonSubjects;
8604b368ec19 still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 169
diff changeset
423 }
176
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
424
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
425 /**
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
426 * @return the subjectParents
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
427 */
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
428 public Map<String, List<String>> getSubjectParents() {
180
0d31c8be7c31 new MissingRelations feature and UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 178
diff changeset
429 if (subjectParents == null) {
0d31c8be7c31 new MissingRelations feature and UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 178
diff changeset
430 makeSubjectTree();
0d31c8be7c31 new MissingRelations feature and UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 178
diff changeset
431 updateSubjectTexts();
0d31c8be7c31 new MissingRelations feature and UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 178
diff changeset
432 }
176
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
433 return subjectParents;
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
434 }
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
435
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
436 /**
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
437 * @return the subjectList
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
438 */
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
439 public List<String> getSubjectList() {
180
0d31c8be7c31 new MissingRelations feature and UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 178
diff changeset
440 if (subjectList == null) {
0d31c8be7c31 new MissingRelations feature and UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 178
diff changeset
441 makeSubjectTree();
0d31c8be7c31 new MissingRelations feature and UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 178
diff changeset
442 updateSubjectTexts();
0d31c8be7c31 new MissingRelations feature and UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 178
diff changeset
443 }
176
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
444 return subjectList;
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
445 }
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
446
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
447 /**
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
448 * @return the maxMamsNr
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
449 */
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
450 public Integer getMaxMamsNr() {
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
451 return maxMamsNr;
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
452 }
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
453
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
454 /**
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
455 * @param maxMamsNr the maxMamsNr to set
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
456 */
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
457 public void setMaxMamsNr(Integer maxMamsNr) {
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
458 this.maxMamsNr = maxMamsNr;
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
459 }
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
460
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
461 /**
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
462 * @return the subjectTexts
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
463 */
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
464 public Map<String, List<Entity>> getSubjectTexts() {
180
0d31c8be7c31 new MissingRelations feature and UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 178
diff changeset
465 if (subjectTexts == null) {
0d31c8be7c31 new MissingRelations feature and UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 178
diff changeset
466 makeSubjectTree();
0d31c8be7c31 new MissingRelations feature and UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 178
diff changeset
467 updateSubjectTexts();
0d31c8be7c31 new MissingRelations feature and UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 178
diff changeset
468 }
176
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
469 return subjectTexts;
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
470 }
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
471
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
472 /**
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
473 * @return the subjectPublicTexts
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
474 */
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
475 public Map<String, List<Entity>> getSubjectPublicTexts() {
180
0d31c8be7c31 new MissingRelations feature and UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 178
diff changeset
476 if (subjectPublicTexts == null) {
0d31c8be7c31 new MissingRelations feature and UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 178
diff changeset
477 makeSubjectTree();
0d31c8be7c31 new MissingRelations feature and UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 178
diff changeset
478 updateSubjectTexts();
0d31c8be7c31 new MissingRelations feature and UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 178
diff changeset
479 }
176
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
480 return subjectPublicTexts;
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
481 }
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
482
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
483 /**
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
484 * @return the subjectPrivateTexts
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
485 */
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
486 public Map<String, List<Entity>> getSubjectPrivateTexts() {
180
0d31c8be7c31 new MissingRelations feature and UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 178
diff changeset
487 if (subjectPrivateTexts == null) {
0d31c8be7c31 new MissingRelations feature and UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 178
diff changeset
488 makeSubjectTree();
0d31c8be7c31 new MissingRelations feature and UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 178
diff changeset
489 updateSubjectTexts();
0d31c8be7c31 new MissingRelations feature and UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 178
diff changeset
490 }
176
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
491 return subjectPrivateTexts;
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
492 }
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
493
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
494 /**
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
495 * @return the subjectEntity
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
496 */
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
497 public Map<String, Entity> getSubjectEntity() {
180
0d31c8be7c31 new MissingRelations feature and UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 178
diff changeset
498 if (subjectEntity == null) {
0d31c8be7c31 new MissingRelations feature and UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 178
diff changeset
499 makeSubjectTree();
0d31c8be7c31 new MissingRelations feature and UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 178
diff changeset
500 updateSubjectTexts();
0d31c8be7c31 new MissingRelations feature and UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 178
diff changeset
501 }
176
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
502 return subjectEntity;
c63d39034b60 PublicByAuthor feature with new "Select by public and MAMS" text-UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 175
diff changeset
503 }
170
8604b368ec19 still more work on publicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents: 169
diff changeset
504
153
3c83f42a8a39 first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
diff changeset
505 }