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