1
|
1 package de.mpiwg.itgroup.ismi.entry.beans;
|
|
2
|
|
3 import java.io.Serializable;
|
|
4 import java.util.ArrayList;
|
|
5 import java.util.HashMap;
|
|
6 import java.util.List;
|
|
7 import java.util.Map;
|
|
8
|
|
9 import javax.faces.event.ActionEvent;
|
|
10 import javax.faces.event.AjaxBehaviorEvent;
|
|
11 import javax.faces.event.ValueChangeEvent;
|
|
12 import javax.faces.model.SelectItem;
|
|
13
|
|
14 import org.apache.commons.lang.StringUtils;
|
|
15 import org.apache.log4j.Logger;
|
|
16 import org.mpi.openmind.repository.bo.Attribute;
|
|
17 import org.mpi.openmind.repository.bo.Entity;
|
|
18 import org.mpi.openmind.repository.bo.Node;
|
|
19 import org.mpi.openmind.repository.bo.Relation;
|
|
20 import org.mpi.openmind.repository.utils.NormalizerUtils;
|
|
21 import org.mpi.openmind.repository.utils.RomanizationLoC;
|
|
22 import org.mpi.openmind.repository.utils.TransliterationUtil;
|
|
23 import org.mpi.openmind.security.bo.User;
|
|
24
|
|
25 import de.mpiwg.itgroup.ismi.auxObjects.ListenerObject;
|
|
26 import de.mpiwg.itgroup.ismi.util.guiComponents.Calendar;
|
|
27 import de.mpiwg.itgroup.ismi.util.guiComponents.EndNoteMisattribution;
|
|
28 import de.mpiwg.itgroup.ismi.util.guiComponents.EndNoteMisattributionTable;
|
|
29 import de.mpiwg.itgroup.ismi.util.guiComponents.EntityList;
|
|
30
|
|
31 public class CurrentTextBean extends AbstractISMIBean implements Serializable{
|
|
32 private static final long serialVersionUID = 1017399812886455381L;
|
|
33
|
|
34 private static Logger logger = Logger.getLogger(CurrentTextBean.class);
|
|
35
|
|
36 private String valueShortTitle;
|
|
37 private Entity shortTitleAlias; // is now an alias of type "prime"
|
|
38 private String romanizedTitle;
|
|
39 private String romanizedPrimaAlias;
|
|
40
|
|
41 private String valueTranslitTitle;
|
|
42 private Entity translitTitleAlias; // is now an alias of type "prime"
|
|
43
|
|
44 private ListenerObject authorLo = new ListenerObject(PERSON, "name_translit");
|
|
45 //private String authorInfo;
|
|
46
|
|
47 private ListenerObject placeLo = new ListenerObject(PLACE, "name");
|
|
48
|
|
49 private ListenerObject dedicatedPersonLo = new ListenerObject(PERSON, "name_translit");
|
|
50
|
|
51 private ListenerObject commentaryLo = new ListenerObject(TEXT, "full_title_translit");
|
|
52
|
|
53 private ListenerObject translationLo = new ListenerObject(TEXT, "full_title_translit");
|
|
54
|
|
55 private ListenerObject versionLo = new ListenerObject(TEXT, "full_title_translit");
|
|
56
|
|
57 private static String PERSON_TYPE_CREATED_BY = "created_by";
|
|
58 private static String PERSON_TYPE_DEDICATED_TO = "dedicated_to";
|
|
59 private String personType;
|
|
60
|
|
61 private Attribute attTitleAlias = new Attribute();
|
|
62 private Map<Long, Boolean> deletedTitleAliases = new HashMap<Long, Boolean>();
|
|
63 private String newTitleAlias;
|
|
64
|
|
65 private Attribute attIncipitAlias = new Attribute();
|
|
66 private Map<Long, Boolean> deletedIncipitAliases = new HashMap<Long, Boolean>();
|
|
67 private String newIncipitAlias;
|
|
68
|
|
69 private Attribute attExplicitAlias = new Attribute();
|
|
70 private Map<Long, Boolean> deletedExplicitAliases = new HashMap<Long, Boolean>();
|
|
71 private String newExplicitAlias;
|
|
72
|
|
73 private Long idSubject;
|
|
74 private Entity subject;
|
|
75
|
|
76 public static String main_subject = "main_subject";
|
|
77 public static String sub_subject = "sub_subject";
|
|
78 public static String type = "type";
|
|
79 public static String NO_SUBJECT = "NO_SUBJECT";
|
|
80
|
|
81 private boolean searchTextDialogRendered = false;
|
|
82 private String stringTitle;
|
|
83 private String stringAuthor;
|
|
84 private List<SelectItem> textsFound = new ArrayList<SelectItem>();
|
|
85
|
|
86 private Long idTextSelected;
|
|
87
|
|
88 private String COMMENTARY_CALLER = "Commentary";
|
|
89 private String TRANSLATION_CALLER = "Translation";
|
|
90 private String VERSION_CALLER = "Version";
|
|
91
|
|
92 private String searchCaller;
|
|
93
|
|
94 private transient Calendar creationDate;
|
|
95
|
|
96 private String textAuthorName;
|
|
97 private String textAuthorNameTranslit;
|
|
98
|
|
99 private Boolean selectPersonRendered = false;
|
|
100 private List<SelectItem> personList = new ArrayList<SelectItem>();
|
|
101 private Long selectedPersonId;
|
|
102 private boolean restrictedByRole = false;
|
|
103
|
|
104 private EntityList aliasList;
|
|
105 private EntityList incipitAliasList;
|
|
106 private EntityList explicitAliasList;
|
|
107
|
|
108 //private MisattributionDataTable misattDataTable;
|
|
109 private transient EndNoteMisattributionTable misattTable;
|
|
110
|
|
111 public CurrentTextBean() {
|
|
112 this.reset();
|
|
113 }
|
|
114
|
|
115 @Override
|
|
116 public void reset(){
|
|
117 super.reset();
|
|
118 this.entity = new Entity(Node.TYPE_ABOX, TEXT, false);
|
|
119 setDefObjectClass(TEXT);
|
|
120
|
|
121 this.aliasList = new EntityList(ALIAS, "alias", getWrapper(), getUserName());
|
|
122 this.incipitAliasList = new EntityList(ALIAS, "alias", getWrapper(), getUserName());
|
|
123 this.explicitAliasList = new EntityList(ALIAS, "alias", getWrapper(), getUserName());
|
|
124 //this.misattDataTable = new MisattributionDataTable(PERSON, "name_translit");
|
|
125 this.misattTable = new EndNoteMisattributionTable();
|
|
126
|
|
127 this.selectPersonRendered = false;
|
|
128 this.selectedPersonId = null;
|
|
129 this.personList = new ArrayList<SelectItem>();
|
|
130 this.restrictedByRole = false;
|
|
131
|
|
132 this.textAuthorName = new String();
|
|
133 this.textAuthorNameTranslit = new String();
|
|
134
|
|
135 this.valueShortTitle = null;
|
|
136 this.shortTitleAlias = null; // is now an alias of type "prime"
|
|
137
|
|
138 this.valueTranslitTitle = null;
|
|
139 this.translitTitleAlias = null; // is now an alias of type "prime"
|
|
140
|
|
141 //this.authorLo = new ListenerObject();
|
|
142 this.authorLo.reset();
|
|
143 //this.authorInfo = null;
|
|
144
|
|
145 //this.placeLo = new ListenerObject();
|
|
146 this.placeLo.reset();
|
|
147
|
|
148 this.dedicatedPersonLo.reset();
|
|
149
|
|
150 this.commentaryLo.reset();
|
|
151
|
|
152 this.translationLo.reset();
|
|
153
|
|
154 this.versionLo.reset();
|
|
155
|
|
156 this.attTitleAlias = new Attribute();
|
|
157 this.deletedTitleAliases = new HashMap<Long, Boolean>();
|
|
158 this.newTitleAlias = null;
|
|
159
|
|
160 this.attIncipitAlias = new Attribute();
|
|
161 this.deletedIncipitAliases = new HashMap<Long, Boolean>();
|
|
162 this.newIncipitAlias = null;
|
|
163
|
|
164 this.attExplicitAlias = new Attribute();
|
|
165 this.deletedExplicitAliases = new HashMap<Long, Boolean>();
|
|
166 this.newExplicitAlias = null;
|
|
167
|
|
168 this.idSubject = null;
|
|
169 this.subject = null;
|
|
170
|
|
171 this.creationDate = new Calendar();
|
|
172
|
|
173
|
|
174 registerChecker(authorLo, "Creator is not valid!");
|
|
175 registerChecker(placeLo, "Place is not valid!");
|
|
176 registerChecker(dedicatedPersonLo, "Place is not valid!");
|
|
177 registerChecker(commentaryLo, "Commentary is not valid!");
|
|
178 registerChecker(translationLo, "Translation is not valid!");
|
|
179 registerChecker(versionLo, "Version is not valid!");
|
|
180
|
|
181 //getPopup().setRendered(false);
|
|
182 }
|
|
183
|
|
184 public List<SelectItem> getPersonList() {
|
|
185 return personList;
|
|
186 }
|
|
187
|
|
188 public void setPersonList(List<SelectItem> personList) {
|
|
189 this.personList = personList;
|
|
190 }
|
|
191
|
|
192 public Boolean getSelectPersonRendered() {
|
|
193 return selectPersonRendered;
|
|
194 }
|
|
195
|
|
196 public void setSelectPersonRendered(Boolean selectPersonRendered) {
|
|
197 this.selectPersonRendered = selectPersonRendered;
|
|
198 }
|
|
199
|
|
200 /**
|
|
201 * Source's Relations # TEXT is_commentary_on TEXT # TEXT is_translation_of
|
|
202 * TEXT # TEXT is_version_of TEXT # TEXT was_created_by PERSON # TEXT
|
|
203 * was_created_in PLACE # TEXT was_dedicated_to PERSON # TEXT has_subject
|
|
204 * SUBJECT
|
|
205 *
|
|
206 * Target's Relations # ALIAS is_alias_title_of TEXT # ALIAS
|
|
207 * is_alias_incipit_of TEXT
|
|
208 *
|
|
209 * @param text
|
|
210 */
|
|
211 @Override
|
|
212 public void setEntity(Entity text) {
|
|
213 this.reset();
|
|
214 this.entity = text;
|
|
215 if(this.entity.isPersistent()){
|
|
216 setCurrentId(this.entity.getId().toString());
|
|
217 if (text.isLightweight()) {
|
|
218 this.entity = getWrapper().getEntityContent(this.entity);
|
|
219 this.entity.setLightweight(false);
|
|
220 }
|
|
221
|
|
222 Attribute attCreationDate = this.entity.getAttributeByName("creation_date");
|
|
223 if(attCreationDate != null && StringUtils.isNotEmpty(attCreationDate.getOwnValue())){
|
|
224 this.creationDate = new Calendar(attCreationDate.getOwnValue());
|
|
225 }else{
|
|
226 this.creationDate = new Calendar();
|
|
227 }
|
|
228
|
|
229 this.loadAttributes(this.entity);//, getDefinition(this.entity));
|
|
230
|
|
231 for (Relation rel : text.getSourceRelations()) {
|
|
232 Entity target = null;
|
|
233 if( rel.getOwnValue().equals(has_subject)){
|
|
234 this.subject = getTargetRelation(rel);
|
|
235 this.idSubject = subject.getId();
|
|
236 } else if (rel.getOwnValue().equals("is_commentary_on")) {
|
|
237 target = getTargetRelation(rel);
|
|
238 this.commentaryLo.setEntityAndAttribute0(target);
|
|
239 } else if (rel.getOwnValue().equals("is_translation_of")) {
|
|
240 target = getTargetRelation(rel);
|
|
241 this.translationLo.setEntityAndAttribute0(target);
|
|
242 } else if (rel.getOwnValue().equals("is_version_of")) {
|
|
243 target = getTargetRelation(rel);
|
|
244 this.versionLo.setEntityAndAttribute0(target);
|
|
245 } else if (rel.getOwnValue().equals("was_created_by")) {
|
|
246 target = getTargetRelation(rel);
|
|
247 this.authorLo.setEntityAndAttribute0(target);
|
|
248
|
|
249 if(this.authorLo.attribute != null){
|
|
250 this.textAuthorNameTranslit = this.authorLo.attribute.getValue();
|
|
251 }
|
|
252
|
|
253 } else if (rel.getOwnValue().equals("was_dedicated_to")) {
|
|
254 target = getTargetRelation(rel);
|
|
255 this.dedicatedPersonLo.setEntityAndAttribute0(target);
|
|
256
|
|
257 } else if (rel.getOwnValue().equals("was_created_in")) {
|
|
258 target = getTargetRelation(rel);
|
|
259 //rich this.placeLo.setEntityAndAttribute(target, "name");
|
|
260 this.placeLo.setEntityAndAttribute0(target);
|
|
261 //} else if (rel.getOwnValue().equals(misattributed_to)) {
|
|
262 } else if (rel.getOwnValue().equals("has_author_misattribution")) {
|
|
263 target = getTargetRelation(rel);
|
|
264 //String refId = (rel.getAttributeByName("reference_id") != null) ? rel.getAttributeByName("reference_id").getValue() : null;
|
|
265 //String notes = (rel.getAttributeByName("notes") != null) ? rel.getAttributeByName("notes").getValue() : null;
|
|
266 //target=person
|
|
267 //this.misattDataTable.add(target, refId, notes);
|
|
268 //this.misattTable.add(target, ref, rel);
|
|
269 this.misattTable.load(target);
|
|
270 }
|
|
271
|
|
272 }
|
|
273 for (Relation rel : text.getTargetRelations()) {
|
|
274
|
|
275 if (rel.getOwnValue().equals("is_alias_title_of")) {
|
|
276 Entity alias = getWrapper().getEntityByIdWithContent(rel.getSourceId());
|
|
277 this.aliasList.add(alias);
|
|
278 } else if (rel.getOwnValue().equals("is_alias_incipit_of")) {
|
|
279 Entity alias = getWrapper().getEntityByIdWithContent(rel.getSourceId());
|
|
280 this.incipitAliasList.add(alias);
|
|
281 } else if (rel.getOwnValue().equals("is_alias_explicit_of")) {
|
|
282 Entity alias = getWrapper().getEntityByIdWithContent(rel.getSourceId());
|
|
283 this.explicitAliasList.add(alias);
|
|
284 } else if (rel.getOwnValue().equals("is_prime_alias_title_of")) {
|
|
285 Entity alias = getWrapper().getEntityByIdWithContent(rel.getSourceId());
|
|
286 this.shortTitleAlias = alias;
|
|
287 this.valueShortTitle = alias.getAttributeByName("alias").getValue();
|
|
288 }
|
9
|
289 }
|
|
290
|
1
|
291 this.loadEndNoteRefs();
|
|
292 this.displayUrl = generateDisplayUrl(authorLo.entity, text, null, getAppBean().getRoot());
|
|
293 }
|
|
294 }
|
|
295
|
|
296 /**
|
|
297 * Added by DW it is no used anymore
|
|
298 *
|
|
299 * @param event
|
|
300 */
|
|
301 public void translitTitleChangeListener(ValueChangeEvent event) {
|
|
302 try {
|
|
303 if (event.getNewValue() == null) {
|
|
304 return;
|
|
305 }
|
|
306 if (event.getNewValue().equals(event.getOldValue())) {
|
|
307 return;
|
|
308 }
|
|
309
|
|
310 String newName = (String) event.getNewValue();
|
|
311
|
|
312 if (translitTitleAlias == null) {
|
|
313 translitTitleAlias = new Entity(Node.TYPE_ABOX, "ALIAS", false);
|
|
314 }
|
|
315
|
|
316 Attribute attr = this.translitTitleAlias
|
|
317 .getAttributeByName("alias");
|
|
318 if (attr == null) {
|
|
319 this.translitTitleAlias.addAttribute(new Attribute("alias",
|
|
320 TEXT, newName));
|
|
321 } else
|
|
322 attr.setValue(newName);
|
|
323
|
|
324 } catch (Exception e) {
|
|
325 e.printStackTrace();
|
|
326 }
|
|
327 }
|
|
328
|
|
329 public String translitTitleAction() {
|
|
330 String pn = getAttributes().get("full_title");
|
|
331
|
|
332 String translit = TransliterationUtil.getTransliteration(pn);
|
|
333 getAttributes().put("full_title_translit", translit);
|
|
334
|
|
335 return "translit";
|
|
336
|
|
337 }
|
|
338
|
|
339 public void showSearchTextCommentaryDialog(ActionEvent event) {
|
|
340 this.setSearchTextDialogRendered(true);
|
|
341 this.searchCaller = COMMENTARY_CALLER;
|
|
342 }
|
|
343
|
|
344 public void showSearchTextTranslationDialog(ActionEvent event) {
|
|
345 this.setSearchTextDialogRendered(true);
|
|
346 this.searchCaller = TRANSLATION_CALLER;
|
|
347 }
|
|
348
|
|
349 public void showSearchTextVersionDialog(ActionEvent event) {
|
|
350 this.setSearchTextDialogRendered(true);
|
|
351 this.searchCaller = VERSION_CALLER;
|
|
352 }
|
|
353
|
|
354 public void closeSearchTextDialog(ActionEvent event) {
|
|
355 this.setSearchTextDialogRendered(false);
|
|
356 }
|
|
357
|
|
358 public void resetSearchText(ActionEvent event) {
|
|
359 this.textsFound = new ArrayList<SelectItem>();
|
|
360 this.stringAuthor = "";
|
|
361 this.stringTitle = "";
|
|
362 }
|
|
363
|
|
364 public void takeVersion(ActionEvent event) {
|
|
365 if(this.idTextSelected != null){
|
|
366 Entity ent = getWrapper().getEntityById(idTextSelected);
|
|
367 if(ent != null){
|
|
368 if (VERSION_CALLER.equals(this.searchCaller)) {
|
|
369 this.versionLo.setEntityAndAttribute0(ent);
|
|
370
|
|
371 } else if (COMMENTARY_CALLER.equals(this.searchCaller)) {
|
|
372 this.commentaryLo.setEntityAndAttribute0(ent);
|
|
373
|
|
374 } else if (TRANSLATION_CALLER.equals(this.searchCaller)) {
|
|
375 this.translationLo.setEntityAndAttribute0(ent);
|
|
376 }
|
|
377 this.searchTextDialogRendered = false;
|
|
378 }
|
|
379 }
|
|
380 }
|
|
381
|
|
382 public String getStringTitle() {
|
|
383 return stringTitle;
|
|
384 }
|
|
385
|
|
386 public void setStringTitle(String stringTitle) {
|
|
387 this.stringTitle = stringTitle;
|
|
388 }
|
|
389
|
|
390 public String getStringAuthor() {
|
|
391 return stringAuthor;
|
|
392 }
|
|
393
|
|
394 public void setStringAuthor(String stringAuthor) {
|
|
395 this.stringAuthor = stringAuthor;
|
|
396 }
|
|
397
|
|
398 public void searchText(ActionEvent event) {
|
|
399 this.textsFound = new ArrayList<SelectItem>();
|
|
400
|
|
401 if(StringUtils.isNotEmpty(stringTitle)){
|
|
402 if (StringUtils.isNotEmpty(this.stringAuthor)) {
|
|
403 String termAuthor = NormalizerUtils.normalize(stringAuthor);
|
|
404 for(Entity title : getWrapper().getEntitiesByAtt(TEXT, "full_title_translit", stringTitle, -1, true)){
|
|
405 for(Entity author :
|
|
406 getWrapper().getTargetsForSourceRelation(title, "was_created_by", PERSON, -1)){
|
|
407 String authorOW = (StringUtils.isNotEmpty(author.getNormalizedOwnValue())) ? author.getNormalizedOwnValue() : "";
|
|
408 if(authorOW.contains(termAuthor)){
|
|
409 this.textsFound.add(
|
|
410 new SelectItem(title.getId(), "Title [" + title.getId() + "]: " + title.getOwnValue()
|
|
411 + " - Author: " + author.getOwnValue()));
|
|
412 }
|
|
413 }
|
|
414 }
|
|
415 }else{
|
|
416 for(Entity title : getWrapper().getEntitiesByAtt(TEXT, "full_title_translit", stringTitle, -1, true)){
|
|
417 this.textsFound.add(
|
|
418 new SelectItem(title.getId(), "Title: " + title.getOwnValue()));
|
|
419 }
|
|
420 }
|
|
421 }else if (StringUtils.isNotEmpty(this.stringAuthor)) {
|
|
422 String termAuthor = NormalizerUtils.normalize(stringAuthor);
|
|
423 for(Entity author : getCache().getPersonListByRole("Author")){
|
|
424 String authorOW = (StringUtils.isNotEmpty(author.getNormalizedOwnValue())) ? author.getNormalizedOwnValue() : "";
|
|
425 if(authorOW.contains(termAuthor)){
|
|
426 for(Entity title :
|
|
427 getWrapper().getSourcesForTargetRelation(author, "was_created_by", TEXT, -1)){
|
|
428 this.textsFound.add(
|
|
429 new SelectItem(title.getId(), "Author[" + author.getId() + "]: " + author.getOwnValue()
|
|
430 + " - Title: " + title.getOwnValue()));
|
|
431 }
|
|
432 }
|
|
433 }
|
|
434 }
|
|
435 }
|
|
436
|
|
437 public void restrictedByRoleChange(ValueChangeEvent event) {
|
|
438 if (event.getNewValue().equals(event.getOldValue()))
|
|
439 return;
|
|
440 Boolean val = (Boolean) event.getNewValue();
|
|
441 this.setRestrictedByRole(val);
|
|
442 this.updatePersonList();
|
|
443 }
|
|
444
|
|
445 public void listenerRomanizeTitleTranslit(AjaxBehaviorEvent event){
|
|
446 if(getAttributes().get("full_title_translit") != null)
|
|
447 this.romanizedTitle = RomanizationLoC.convert(getAttributes().get("full_title_translit"));
|
|
448 }
|
|
449
|
|
450 public void listenerRomanizePrimaAlias(AjaxBehaviorEvent event){
|
|
451 if(valueShortTitle != null){
|
|
452 this.romanizedPrimaAlias = RomanizationLoC.convert(valueShortTitle);
|
|
453 }
|
|
454 }
|
|
455
|
|
456 public void listenerShowAllAuthors(ActionEvent event) {
|
|
457 this.setPersonType(PERSON_TYPE_CREATED_BY);
|
|
458 this.updatePersonList();
|
|
459 }
|
|
460
|
|
461 public void listenerShowAllDedicatedToPersons(ActionEvent event) {
|
|
462 this.setPersonType(PERSON_TYPE_DEDICATED_TO);
|
|
463 this.updatePersonList();
|
|
464 }
|
|
465
|
|
466 private void updatePersonList(){
|
|
467 if (!restrictedByRole)
|
|
468 this.personList = getCache().getAllPersons();
|
|
469 else {
|
|
470 this.personList = getCache().getPersonsByRole("Author");
|
|
471 }
|
|
472 this.selectPersonRendered = true;
|
|
473 }
|
|
474
|
|
475 public void listenerPersonCancel(ActionEvent event) {
|
|
476 this.selectPersonRendered = false;
|
|
477 }
|
|
478
|
|
479 public void listenerSelectPerson(ActionEvent event){
|
|
480 if(this.selectedPersonId != null){
|
|
481 Entity selectedPerson = getWrapper().getEntityById(selectedPersonId);
|
|
482 if(selectedPerson != null){
|
|
483 if(this.personType.equals(PERSON_TYPE_CREATED_BY)){
|
|
484 this.authorLo.setEntityAndAttribute0(selectedPerson);
|
|
485 this.authorLo.entityInfo = "ID = " + authorLo.getEntity().getId();
|
|
486
|
|
487 Attribute attArabicName = getTargetAttribute(selectedPerson, "name");
|
|
488 if(attArabicName != null){
|
|
489 this.authorLo.entityInfo += ", Arabic Name = " + attArabicName.getOwnValue();
|
|
490 this.textAuthorName = attArabicName.getValue();
|
|
491 }
|
|
492
|
|
493 if(this.authorLo.attribute != null){
|
|
494 this.textAuthorNameTranslit = this.authorLo.attribute.getValue();
|
|
495 }
|
|
496 }else if(this.personType.equals(PERSON_TYPE_DEDICATED_TO)){
|
|
497 this.dedicatedPersonLo.setEntityAndAttribute0(selectedPerson);
|
|
498 }
|
|
499 }
|
|
500 }
|
|
501 this.setSelectPersonRendered(false);
|
|
502 }
|
|
503
|
|
504 public boolean mandatoryEntriesOK(){
|
|
505 boolean ok = true;
|
|
506 if(this.authorLo.entity == null || !this.authorLo.entity.isPersistent()){
|
|
507 addGeneralMsg("<Created by> is a mandatory entry. If you do not know the author of this text, you should select the person <ANONYMOUS>.");
|
|
508 ok = false;
|
|
509 }
|
|
510 return ok;
|
|
511 }
|
|
512
|
|
513 @Override
|
|
514 public String save() {
|
|
515 super.save();
|
|
516 try {
|
|
517
|
|
518 if(!mandatoryEntriesOK()){
|
|
519 addGeneralMsg("The entity could not be saved.");
|
|
520 return PAGE_EDITOR;
|
|
521 }
|
|
522
|
|
523 User user = getSessionUser();
|
|
524
|
|
525 CheckResults cr = getCheckResults();
|
|
526 if (cr.hasErrors) {
|
|
527 getSessionBean().setErrorMessages(cr);
|
|
528 getSessionBean().setDisplayError(true);
|
|
529 return PAGE_EDITOR;
|
|
530 }
|
|
531
|
|
532
|
|
533
|
|
534 getAttributes().put("creation_date", this.creationDate.toJSONString());
|
|
535
|
|
536 this.entity = updateEntityAttributes(this.entity);
|
|
537
|
|
538 this.entity.replaceSourceRelation(commentaryLo.entity, TEXT, "is_commentary_on");
|
|
539
|
|
540 this.entity.replaceSourceRelation(translationLo.entity, TEXT, "is_translation_of");
|
|
541
|
|
542 this.entity.replaceSourceRelation(versionLo.entity, TEXT, "is_version_of");
|
|
543
|
|
544 this.entity.replaceSourceRelation(authorLo.entity, PERSON, "was_created_by");
|
|
545
|
|
546 this.entity.replaceSourceRelation(dedicatedPersonLo.entity, PERSON, "was_dedicated_to");
|
|
547
|
|
548 this.entity.replaceSourceRelation(placeLo.entity, PLACE, "was_created_in");
|
|
549
|
|
550 this.entity.removeAllSourceRelations(has_subject, SUBJECT);
|
|
551 if(getIdSubject() != null){
|
|
552 this.subject = getWrapper().getEntityByIdWithContent(getIdSubject());
|
|
553 this.entity.replaceSourceRelation(subject, SUBJECT, has_subject);
|
|
554 }
|
|
555
|
|
556
|
|
557 //is_prime_alias_title_of
|
|
558 if(!StringUtils.isEmpty(valueShortTitle)){
|
|
559 this.entity.removeAllTargetRelations("is_prime_alias_title_of", ALIAS);
|
|
560
|
|
561 if(this.shortTitleAlias == null){
|
|
562 //1)create alias, 2) update value of alias3) save alias, and 4) add to this text.
|
|
563 shortTitleAlias = new Entity(Node.TYPE_ABOX, ALIAS, false);
|
|
564 shortTitleAlias.addAttribute(new Attribute("alias", "text", this.valueShortTitle));
|
|
565 getWrapper().saveEntity(shortTitleAlias, getUserName());
|
|
566 }else{
|
|
567 //1) update value, 2) re-save alias
|
|
568 this.shortTitleAlias.getAttributeByName("alias").setOwnValue(this.valueShortTitle);
|
|
569 this.shortTitleAlias.removeAllSourceRelations("is_prime_alias_title_of", TEXT);
|
|
570 getWrapper().saveEntity(shortTitleAlias, getUserName());
|
|
571 }
|
|
572 Relation aliasRel = new Relation(shortTitleAlias, this.entity, "is_prime_alias_title_of");
|
|
573 }
|
|
574
|
|
575 /*
|
|
576 if (this.shortTitleAlias == null
|
|
577 || (shortTitleAlias.getAttributeByName("alias") != null && StringUtils
|
|
578 .isEmpty(shortTitleAlias
|
|
579 .getAttributeByName("alias").getOwnValue()))) {
|
|
580 this.entity.removeAllTargetRelations("is_prime_alias_title_of",
|
|
581 ALIAS);
|
|
582 } else if (this.shortTitleAlias != null) {
|
|
583 shortTitleAlias = getWrapper().saveEntity(shortTitleAlias, user.getEmail());
|
|
584 this.entity.setAsUniqueTargetRelation("is_prime_alias_title_of",
|
|
585 this.shortTitleAlias);
|
|
586 }
|
|
587 */
|
|
588
|
|
589 //ALIAS -> is_alias_title_of -> TEXT
|
|
590 this.entity.removeAllTargetRelationsByName("is_alias_title_of");
|
|
591 for(Entity alias : this.aliasList.getEntities()){
|
|
592 Entity alias0 = getWrapper().getEntityByIdWithContent(alias.getId());
|
|
593 Relation aliasRel = new Relation(alias0, this.entity, "is_alias_title_of");
|
|
594 }
|
|
595
|
|
596 //saveAliases2(incipitAliases, deletedIncipitAliases,
|
|
597 // "is_alias_incipit_of");
|
|
598 //deletedIncipitAliases = refreshAliasMap(incipitAliases, deletedIncipitAliases);
|
|
599 this.entity.removeAllTargetRelationsByName("is_alias_incipit_of");
|
|
600 for(Entity alias : this.incipitAliasList.getEntities()){
|
|
601 Entity alias0 = getWrapper().getEntityByIdWithContent(alias.getId());
|
|
602 Relation aliasRel = new Relation(alias0, this.entity, "is_alias_incipit_of");
|
|
603 }
|
|
604
|
|
605 /*
|
|
606 saveAliases2(explicitAliases, deletedExplicitAliases,
|
|
607 "is_alias_explicit_of");
|
|
608 deletedExplicitAliases = refreshAliasMap(explicitAliases, deletedExplicitAliases);
|
|
609 */
|
|
610 this.entity.removeAllTargetRelationsByName("is_alias_explicit_of");
|
|
611 for(Entity alias : this.explicitAliasList.getEntities()){
|
|
612 Entity alias0 = getWrapper().getEntityByIdWithContent(alias.getId());
|
|
613 Relation aliasRel = new Relation(alias0, this.entity, "is_alias_explicit_of");
|
|
614 }
|
|
615
|
|
616 //String lastAction = "";
|
|
617
|
|
618 //REFERENCE -> is_reference_of -> THIS
|
|
619 //this.entity = this.prepareReferencesToSave(this.entity);
|
|
620 this.prepareEndNoteRefs2Save();
|
|
621
|
|
622 this.entity.removeAllSourceRelations(EndNoteMisattribution.HAS_AUTHOR_MISATT, EndNoteMisattribution.MISATT);
|
|
623
|
|
624 this.entity = getWrapper().saveEntity(this.entity, user.getEmail());
|
|
625 this.getAppBean().setAllTextsAsDirty();
|
|
626 getAppBean().getSimpleSearchCache().setMapDirty(true);
|
|
627
|
|
628 this.entity = this.misattTable.saveMisattributions(this.entity);
|
|
629
|
|
630 this.setEntity(this.entity);
|
|
631 //lastAction = "save text";
|
|
632
|
|
633
|
|
634 this.generateSecundaryOW(this.entity, getSessionUser().getEmail());
|
|
635
|
|
636 logger.info("Entity saved - Time = " + (System.currentTimeMillis() - start) + ", " + entity);
|
|
637 this.printSuccessSavingEntity();
|
|
638
|
|
639 //setActionInfo(lastAction);
|
|
640
|
|
641
|
|
642 } catch (Exception e) {
|
|
643 logger.error(e.getMessage(), e);
|
|
644 e.printStackTrace();
|
|
645 this.printInternalError(e);
|
|
646 }
|
|
647 saveEnd();
|
|
648 return PAGE_EDITOR;
|
|
649 }
|
|
650
|
|
651 public EntityList getIncipitAliasList() {
|
|
652 return incipitAliasList;
|
|
653 }
|
|
654
|
|
655 public void setIncipitAliasList(EntityList incipitAliasList) {
|
|
656 this.incipitAliasList = incipitAliasList;
|
|
657 }
|
|
658
|
|
659 /**
|
|
660 * This method saves the text as new entity, and its related alias and
|
|
661 * witness.
|
|
662 *
|
|
663 * @return
|
|
664 */
|
|
665 public String saveAsNewEntity() {
|
|
666
|
|
667 try {
|
|
668 User user = getSessionUser();
|
|
669
|
|
670 CheckResults cr = getCheckResults();
|
|
671 if (cr.hasErrors) {
|
|
672 getSessionBean().setErrorMessages(cr);
|
|
673 getSessionBean().setDisplayError(true);
|
|
674 return "SAVE_ERROR";
|
|
675 }
|
|
676
|
|
677
|
|
678 this.entity = updateEntityAttributes(this.entity);
|
|
679 //text.setOwnValue(createOwnValue());
|
|
680
|
|
681 //text.removeSourceRelation("is_commentary_of", commentaryLo.entity);
|
|
682 //replaceSourceRelation(text, commentaryLo.entity, TEXT, "is_commentary_on");
|
|
683 this.entity.replaceSourceRelation(commentaryLo.entity, TEXT, "is_commentary_on");
|
|
684
|
|
685 //text.removeSourceRelation("is_translation_of", translationLo.entity);
|
|
686 //replaceSourceRelation(text, translationLo.entity, TEXT, "is_translation_of");
|
|
687 this.entity.replaceSourceRelation(translationLo.entity, TEXT, "is_translation_of");
|
|
688
|
|
689 //text.removeSourceRelation("is_version_of", versionLo.entity);
|
|
690 //replaceSourceRelation(text, versionLo.entity, TEXT, "is_version_of");
|
|
691 this.entity.replaceSourceRelation(versionLo.entity, TEXT, "is_version_of");
|
|
692
|
|
693 //text.removeSourceRelation("was_created_by", authorLo.entity);
|
|
694 //replaceSourceRelation(text, authorLo.entity, PERSON, "was_created_by");
|
|
695 this.entity.replaceSourceRelation(authorLo.entity, PERSON, "was_created_by");
|
|
696
|
|
697 //text.removeSourceRelation("was_dedicated_to", dedicatedPersonLo.entity);
|
|
698 //replaceSourceRelation(text, dedicatedPersonLo.entity, PERSON,
|
|
699 // "was_dedicated_to");
|
|
700 this.entity.replaceSourceRelation(dedicatedPersonLo.entity, PERSON, "was_dedicated_to");
|
|
701
|
|
702 //text.removeSourceRelation("was_created_in", placeLo.entity);
|
|
703 //replaceSourceRelation(text, placeLo.entity, PLACE, "was_created_in");
|
|
704 this.entity.replaceSourceRelation(placeLo.entity, PLACE, "was_created_in");
|
|
705
|
|
706 //String lastAction = "";
|
|
707
|
|
708 // removing transiently the target relation,
|
|
709 // because they should not be saved as new
|
|
710 this.entity.removeAllTargetRelations("is_exemplar_of", "WITNESS");
|
|
711 this.entity.removeAllTargetRelations("is_prime_alias_title_of", "ALIAS");
|
|
712 this.entity.removeAllTargetRelations("is_alias_title_of", "ALIAS");
|
|
713 this.entity.removeAllTargetRelations("is_alias_incipit_of", "ALIAS");
|
|
714 this.entity.removeAllTargetRelations("is_alias_explicit_of", "ALIAS");
|
|
715
|
|
716
|
|
717 this.entity = getWrapper().saveEntityAsNew(this.entity, user.getEmail());
|
|
718 //((AllTextsBean) this.getSessionBean("AllTexts")).setAllTextsAsDirty();
|
|
719 this.getAppBean().setAllTextsAsDirty();
|
|
720 getAppBean().getSimpleSearchCache().setMapDirty(true);
|
|
721
|
|
722 //lastAction = "save text as new entity";
|
|
723 getSessionBean().setEditFormCurrentEntId(this.entity.getId());
|
|
724
|
|
725 logger.info("The entity was saved successfully!!!" + this.entity);
|
|
726 //this.saveAsNew = false;
|
|
727
|
|
728 //setActionInfo(lastAction);
|
|
729
|
|
730
|
|
731 } catch (Exception e) {
|
|
732 logger.error(e.getMessage(), e);
|
|
733 e.printStackTrace();
|
|
734 this.printInternalError(e);
|
|
735 }
|
|
736 return PAGE_EDITOR;
|
|
737 }
|
|
738
|
|
739 /**
|
|
740 * Refresh aliasMap: delete the tuples, which are ticked to be deleted.
|
|
741 *
|
|
742 * @param map
|
|
743 * @return
|
|
744 */
|
|
745 private Map<Long, Boolean> refreshAliasMap(List<Entity> list, Map<Long, Boolean> aliasesMap){
|
|
746 for(Long id : aliasesMap.keySet()){
|
|
747 if(aliasesMap.get(id)){
|
|
748 aliasesMap.remove(id);
|
|
749 Entity alias = getEntityById(list, id);
|
|
750 if(alias != null){
|
|
751 list.remove(alias);
|
|
752 }
|
|
753 }
|
|
754 }
|
|
755 return aliasesMap;
|
|
756 }
|
|
757
|
|
758 public Attribute getAttTitleAlias() {
|
|
759 return attTitleAlias;
|
|
760 }
|
|
761
|
|
762 public void setAttTitleAlias(Attribute attTitleAlias) {
|
|
763 this.attTitleAlias = attTitleAlias;
|
|
764 }
|
|
765
|
|
766 public Attribute getAttIncipitAlias() {
|
|
767 return attIncipitAlias;
|
|
768 }
|
|
769
|
|
770 public void setAttIncipitAlias(Attribute attIncipitAlias) {
|
|
771 this.attIncipitAlias = attIncipitAlias;
|
|
772 }
|
|
773
|
|
774 public Attribute getAttExplicitAlias() {
|
|
775 return attExplicitAlias;
|
|
776 }
|
|
777
|
|
778 public void setAttExplicitAlias(Attribute attExplicitAlias) {
|
|
779 this.attExplicitAlias = attExplicitAlias;
|
|
780 }
|
|
781
|
|
782 public String getValueShortTitle() {
|
|
783 return valueShortTitle;
|
|
784 }
|
|
785
|
|
786 public void setValueShortTitle(String valueShortTitle) {
|
|
787 this.valueShortTitle = valueShortTitle;
|
|
788 }
|
|
789
|
|
790 public Entity getShortTitleAlias() {
|
|
791 return shortTitleAlias;
|
|
792 }
|
|
793
|
|
794 public void setShortTitleAlias(Entity shortTitleAlias) {
|
|
795 this.shortTitleAlias = shortTitleAlias;
|
|
796 }
|
|
797
|
|
798 public String getValueTranslitTitle() {
|
|
799 return valueTranslitTitle;
|
|
800 }
|
|
801
|
|
802 public void setValueTranslitTitle(String valueTranslitTitle) {
|
|
803 this.valueTranslitTitle = valueTranslitTitle;
|
|
804 }
|
|
805
|
|
806 public Entity getTranslitTitleAlias() {
|
|
807 return translitTitleAlias;
|
|
808 }
|
|
809
|
|
810 public void setTranslitTitleAlias(Entity translitTitleAlias) {
|
|
811 this.translitTitleAlias = translitTitleAlias;
|
|
812 }
|
|
813
|
|
814 public void setNewTitleAlias(String newAlias) {
|
|
815 this.newTitleAlias = newAlias;
|
|
816 }
|
|
817
|
|
818 public String getNewTitleAlias() {
|
|
819 return newTitleAlias;
|
|
820 }
|
|
821
|
|
822 /**
|
|
823 * <p>This method saves transiently the aliases as new Entities, which are not marked to be deleted
|
|
824 * in aliasesMap.</p>
|
|
825 *
|
|
826 * @param aliases list of aliases showing in the interface.
|
|
827 * @param aliasesMap map id - boolean, which indicates if the alias[id] should be deleted(true).
|
|
828 * @param aliasRelationName name of the relation which links this text whith the given alias list.
|
|
829 * @param user
|
|
830 */
|
|
831 /*
|
|
832 private void saveAliasesAsNew(List<Entity> aliases,
|
|
833 Map<Long, Boolean> aliasesMap, String aliasRelationName, String user) {
|
|
834
|
|
835 //first step: save the alias, if it is ticked as 'no delete'
|
|
836 for(Long aliasId : aliasesMap.keySet()){
|
|
837 if(!aliasesMap.get(aliasId)){
|
|
838 Entity alias = getEntityById(aliases, new Long(aliasId));
|
|
839 if(alias != null){
|
|
840 alias.removeAllSourceRelations(aliasRelationName, TEXT);
|
|
841 Relation rel = new Relation(alias, this.entity, aliasRelationName);
|
|
842 getWrapper().saveEntityAsNew(alias, user);
|
|
843 }
|
|
844 }
|
|
845 }
|
|
846 }*/
|
|
847
|
|
848 /**
|
|
849 * <p>This method removes transiently the aliases, which are marked to be deleted
|
|
850 * and insert to the text the alias, which are not yet contained.</p>
|
|
851 *
|
|
852 * @param aliases list of aliases showing in the interface.
|
|
853 * @param aliasesMap map id - boolean, which indicates if the alias[id] should be deleted(true).
|
|
854 * @param aliasRelationName name of the relation which links this text whith the given alias list.
|
|
855 */
|
|
856 /*
|
|
857 private void saveAliases2(List<Entity> aliases,
|
|
858 Map<Long, Boolean> aliasesMap, String aliasRelationName) {
|
|
859
|
|
860 List<Relation> aliasRelList = this.entity.getTargetRelations(aliasRelationName, "ALIAS");
|
|
861
|
|
862 //first step: delete aliases, which are ticked to be deleted and are contained by the current text
|
|
863 for(Relation aliasRel : aliasRelList){
|
|
864 //if the alias Map does not contain the 'relation source' or it is marked to be deleted,
|
|
865 //the relation should be removed from the text
|
|
866 if(!aliasesMap.containsKey(aliasRel.getSourceId()) || aliasesMap.get(aliasRel.getSourceId())){
|
|
867 text.removeTargetRelation(aliasRel);
|
|
868 }
|
|
869 }
|
|
870
|
|
871 //second step: insert alias (as relation) to the text,
|
|
872 //if the alias is not contained by the text
|
|
873 for(Long aliasId : aliasesMap.keySet()){
|
|
874 if(!aliasesMap.get(aliasId)){
|
|
875 if(!text.containsTargetRelation(aliasRelationName, new Long(aliasId))){
|
|
876 Entity alias = getEntityById(aliases, new Long(aliasId));
|
|
877 if(alias != null){
|
|
878 Relation rel = new Relation(alias, this.entity, aliasRelationName);
|
|
879 }
|
|
880 }
|
|
881 }
|
|
882 }
|
|
883 }*/
|
|
884
|
|
885 /**
|
|
886 * TODO move this method to some util's package
|
|
887 * @return
|
|
888 */
|
|
889 private Entity getEntityById(List<Entity> list, Long id){
|
|
890 for(Entity e : list){
|
|
891 if(e.getId().compareTo(id) == 0){
|
|
892 return e;
|
|
893 }
|
|
894 }
|
|
895 return null;
|
|
896 }
|
|
897
|
|
898 public Map<Long, Boolean> getDeletedIncipitAliases() {
|
|
899 return deletedIncipitAliases;
|
|
900 }
|
|
901
|
|
902 public void setDeletedIncipitAliases(
|
|
903 Map<Long, Boolean> deletedIncipitAliases) {
|
|
904 this.deletedIncipitAliases = deletedIncipitAliases;
|
|
905 }
|
|
906
|
|
907 public Map<Long, Boolean> getDeletedExplicitAliases() {
|
|
908 return deletedExplicitAliases;
|
|
909 }
|
|
910
|
|
911 public void setDeletedExplicitAliases(
|
|
912 Map<Long, Boolean> deletedExplicitAliases) {
|
|
913 this.deletedExplicitAliases = deletedExplicitAliases;
|
|
914 }
|
|
915
|
|
916 public String getNewIncipitAlias() {
|
|
917 return newIncipitAlias;
|
|
918 }
|
|
919
|
|
920 public void setNewIncipitAlias(String newIncipitAlias) {
|
|
921 this.newIncipitAlias = newIncipitAlias;
|
|
922 }
|
|
923
|
|
924 public String getNewExplicitAlias() {
|
|
925 return newExplicitAlias;
|
|
926 }
|
|
927
|
|
928 public void setNewExplicitAlias(String newExplicitAlias) {
|
|
929 this.newExplicitAlias = newExplicitAlias;
|
|
930 }
|
|
931
|
|
932 public Map<Long, Boolean> getDeletedTitleAliases() {
|
|
933 return deletedTitleAliases;
|
|
934 }
|
|
935
|
|
936 public void setDeletedTitleAliases(Map<Long, Boolean> deletedTitleAliases) {
|
|
937 this.deletedTitleAliases = deletedTitleAliases;
|
|
938 }
|
|
939
|
|
940 public boolean isSearchTextDialogRendered() {
|
|
941 return searchTextDialogRendered;
|
|
942 }
|
|
943
|
|
944 public void setSearchTextDialogRendered(boolean searchTextDialogRendered) {
|
|
945 this.searchTextDialogRendered = searchTextDialogRendered;
|
|
946 }
|
|
947
|
|
948 public void setTextsFound(List<SelectItem> textsFound) {
|
|
949 this.textsFound = textsFound;
|
|
950 }
|
|
951
|
|
952 public List<SelectItem> getTextsFound() {
|
|
953 return textsFound;
|
|
954 }
|
|
955
|
|
956 public Long getIdTextSelected() {
|
|
957 return idTextSelected;
|
|
958 }
|
|
959
|
|
960 public void setIdTextSelected(Long idTextSelected) {
|
|
961 this.idTextSelected = idTextSelected;
|
|
962 }
|
|
963
|
|
964 public String getSearchCaller() {
|
|
965 return searchCaller;
|
|
966 }
|
|
967
|
|
968 public void setSearchCaller(String searchCaller) {
|
|
969 this.searchCaller = searchCaller;
|
|
970 }
|
|
971 public ListenerObject getAuthorLo() {
|
|
972 return authorLo;
|
|
973 }
|
|
974
|
|
975 public void setAuthorLo(ListenerObject authorLo) {
|
|
976 this.authorLo = authorLo;
|
|
977 }
|
|
978
|
|
979 public ListenerObject getPlaceLo() {
|
|
980 return placeLo;
|
|
981 }
|
|
982
|
|
983 public void setPlaceLo(ListenerObject placeLo) {
|
|
984 this.placeLo = placeLo;
|
|
985 }
|
|
986
|
|
987 public ListenerObject getDedicatedPersonLo() {
|
|
988 return dedicatedPersonLo;
|
|
989 }
|
|
990
|
|
991 public void setDedicatedPersonLo(ListenerObject dedicatedPersonLo) {
|
|
992 this.dedicatedPersonLo = dedicatedPersonLo;
|
|
993 }
|
|
994
|
|
995 public ListenerObject getCommentaryLo() {
|
|
996 return commentaryLo;
|
|
997 }
|
|
998
|
|
999 public void setCommentaryLo(ListenerObject commentaryLo) {
|
|
1000 this.commentaryLo = commentaryLo;
|
|
1001 }
|
|
1002
|
|
1003 public ListenerObject getTranslationLo() {
|
|
1004 return translationLo;
|
|
1005 }
|
|
1006
|
|
1007 public void setTranslationLo(ListenerObject translationLo) {
|
|
1008 this.translationLo = translationLo;
|
|
1009 }
|
|
1010
|
|
1011 public ListenerObject getVersionLo() {
|
|
1012 return versionLo;
|
|
1013 }
|
|
1014
|
|
1015 public void setVersionLo(ListenerObject versionLo) {
|
|
1016 this.versionLo = versionLo;
|
|
1017 }
|
|
1018
|
|
1019 public Long getIdSubject() {
|
|
1020 return idSubject;
|
|
1021 }
|
|
1022
|
|
1023 public void setIdSubject(Long idSubject) {
|
|
1024 this.idSubject = idSubject;
|
|
1025 }
|
|
1026
|
|
1027 public Entity getSubject() {
|
|
1028 return subject;
|
|
1029 }
|
|
1030
|
|
1031 public void setSubject(Entity subject) {
|
|
1032 this.subject = subject;
|
|
1033 }
|
|
1034
|
|
1035 public String getTextAuthorName() {
|
|
1036 return textAuthorName;
|
|
1037 }
|
|
1038
|
|
1039 public Calendar getCreationDate() {
|
|
1040 return creationDate;
|
|
1041 }
|
|
1042
|
|
1043 public void setCreationDate(Calendar creationDate) {
|
|
1044 this.creationDate = creationDate;
|
|
1045 }
|
|
1046
|
|
1047 public void setTextAuthorName(String textAuthorName) {
|
|
1048 this.textAuthorName = textAuthorName;
|
|
1049 }
|
|
1050
|
|
1051 public String getTextAuthorNameTranslit() {
|
|
1052 return textAuthorNameTranslit;
|
|
1053 }
|
|
1054
|
|
1055 public void setTextAuthorNameTranslit(String textAuthorNameTranslit) {
|
|
1056 this.textAuthorNameTranslit = textAuthorNameTranslit;
|
|
1057 }
|
|
1058
|
|
1059 public boolean isRestrictedByRole() {
|
|
1060 return restrictedByRole;
|
|
1061 }
|
|
1062
|
|
1063 public void setRestrictedByRole(boolean restrictedByRole) {
|
|
1064 this.restrictedByRole = restrictedByRole;
|
|
1065 }
|
|
1066
|
|
1067
|
|
1068 public String getPersonType() {
|
|
1069 return personType;
|
|
1070 }
|
|
1071
|
|
1072 public void setPersonType(String personType) {
|
|
1073 this.personType = personType;
|
|
1074 }
|
|
1075
|
|
1076 public EntityList getAliasList() {
|
|
1077 return aliasList;
|
|
1078 }
|
|
1079
|
|
1080 public void setAliasList(EntityList aliasList) {
|
|
1081 this.aliasList = aliasList;
|
|
1082 }
|
|
1083
|
|
1084 public EntityList getExplicitAliasList() {
|
|
1085 return explicitAliasList;
|
|
1086 }
|
|
1087
|
|
1088 public void setExplicitAliasList(EntityList explicitAliasList) {
|
|
1089 this.explicitAliasList = explicitAliasList;
|
|
1090 }
|
|
1091
|
|
1092 public Long getSelectedPersonId() {
|
|
1093 return selectedPersonId;
|
|
1094 }
|
|
1095
|
|
1096 public void setSelectedPersonId(Long selectedPersonId) {
|
|
1097 this.selectedPersonId = selectedPersonId;
|
|
1098 }
|
|
1099
|
|
1100 public EndNoteMisattributionTable getMisattTable() {
|
|
1101 return misattTable;
|
|
1102 }
|
|
1103
|
|
1104 public void setMisattTable(EndNoteMisattributionTable misattTable) {
|
|
1105 this.misattTable = misattTable;
|
|
1106 }
|
|
1107
|
|
1108 public String getRomanizedTitle() {
|
|
1109 return romanizedTitle;
|
|
1110 }
|
|
1111
|
|
1112 public void setRomanizedTitle(String romanizedTitle) {
|
|
1113 this.romanizedTitle = romanizedTitle;
|
|
1114 }
|
|
1115
|
|
1116 public String getRomanizedPrimaAlias() {
|
|
1117 return romanizedPrimaAlias;
|
|
1118 }
|
|
1119
|
|
1120 public void setRomanizedPrimaAlias(String romanizedPrimaAlias) {
|
|
1121 this.romanizedPrimaAlias = romanizedPrimaAlias;
|
|
1122 }
|
|
1123 }
|