Mercurial > hg > ismi-richfaces
annotate src/main/java/de/mpiwg/itgroup/ismi/entry/beans/CurrentWitnessBean.java @ 121:6f0e9a333c15
misidentification of witness mostly works now.
author | casties |
---|---|
date | Mon, 09 Jan 2017 20:37:29 +0100 |
parents | 71638720fe2f |
children | fb3cb7d70f66 |
rev | line source |
---|---|
1 | 1 package de.mpiwg.itgroup.ismi.entry.beans; |
2 | |
3 import java.io.Serializable; | |
4 import java.util.ArrayList; | |
5 import java.util.List; | |
6 | |
7 import javax.faces.component.UIComponent; | |
8 import javax.faces.event.ActionEvent; | |
9 import javax.faces.event.ValueChangeEvent; | |
10 import javax.faces.model.SelectItem; | |
11 | |
12 import org.apache.commons.lang.StringUtils; | |
13 import org.apache.log4j.Logger; | |
14 import org.mpi.openmind.repository.bo.Attribute; | |
15 import org.mpi.openmind.repository.bo.Entity; | |
16 import org.mpi.openmind.repository.bo.Node; | |
17 import org.mpi.openmind.repository.bo.Relation; | |
18 import org.mpi.openmind.security.bo.User; | |
19 | |
111
22a18bfc66b0
new completion that uses ALIASes: AbstractListenerObject. was_copied_in in WITNESS form can use PLACE aliases now. some cleanup.
casties
parents:
1
diff
changeset
|
20 import de.mpiwg.itgroup.ismi.auxObjects.AliasListenerObject; |
1 | 21 import de.mpiwg.itgroup.ismi.auxObjects.ListenerObject; |
22 import de.mpiwg.itgroup.ismi.auxObjects.lo.WitnessAuthorLO; | |
23 import de.mpiwg.itgroup.ismi.auxObjects.lo.WitnessTextLO; | |
24 import de.mpiwg.itgroup.ismi.util.guiComponents.Calendar; | |
25 import de.mpiwg.itgroup.ismi.util.guiComponents.EntityList; | |
120 | 26 import de.mpiwg.itgroup.ismi.util.guiComponents.Misidentification; |
27 import de.mpiwg.itgroup.ismi.util.guiComponents.MisidentificationTable; | |
1 | 28 import de.mpiwg.itgroup.ismi.util.guiComponents.StatusImage; |
29 | |
30 public class CurrentWitnessBean extends CodexEditorTemplate implements Serializable{ | |
31 | |
32 private static final long serialVersionUID = -7645136722251494419L; | |
33 | |
34 private static Logger logger = Logger.getLogger(CurrentWitnessBean.class); | |
35 | |
36 private Boolean codicesOverviewRendered = false; | |
37 private List <CodexForList> codicesAll = new ArrayList<CodexForList>(); | |
38 | |
39 private List<SelectItem> titles_list = new ArrayList<SelectItem>(); | |
40 private Long selectedTitleId; | |
41 private Boolean selectTitleRendered = false; | |
42 private String selectPersonType; | |
43 | |
44 private List<SelectItem> persons_list = new ArrayList<SelectItem>(); | |
45 private Long selectedPersonId; | |
46 private Boolean selectPersonRendered = false; | |
47 private Boolean restrictedByRole = true; | |
48 | |
49 //private Entity witness; | |
50 | |
51 private ListenerObject titleLo = new WitnessTextLO(TEXT, full_title_translit, this); | |
52 | |
53 private String valueTitle = ""; | |
54 | |
55 // WITNESS -> has_title_written_as -> ALIAS | |
56 private String valueTextWritten = ""; | |
57 private List<SelectItem> suggestedTitlesWritten = new ArrayList<SelectItem>(); | |
58 private Long valueTitleSelectedId; | |
59 | |
60 // WITNESS -> has_authorWritten_as -> ALIAS | |
61 private String valueAuthorWritten = ""; | |
62 private List<SelectItem> suggestedAuthorsWritten = new ArrayList<SelectItem>(); | |
63 private Long valueAuthorSelectedId; | |
64 | |
65 // WITNESS -> is_exemplar_of -> TEXT -> was_created_by -> PERSON | |
66 private ListenerObject authorLo = new WitnessAuthorLO(PERSON, name_translit, this); | |
67 private String valueAuthor = ""; | |
68 | |
69 private boolean textUnknown = false; | |
70 private static String UNKNOWN = "UNKNOWN"; | |
71 | |
72 | |
73 // WITENSS -> was_copied_by -> PERSON | |
74 private ListenerObject copyistLo = new ListenerObject(PERSON, name_translit); | |
75 | |
76 // WITENSS -> was_copied_at -> PLACE | |
112
59f26a5ef2b3
AliasListenerObject adds aliases to ListenerObject. Change all forms to enable ALIAS for (historical) PLACE fields. Remove REPOSITORY from event forms.
casties
parents:
111
diff
changeset
|
77 private AliasListenerObject copyPlaceLo = new AliasListenerObject(PLACE, name, "is_alias_name_of"); |
1 | 78 |
79 // WITNESS -> xx -> PERSON | |
80 private ListenerObject patronageLo = new ListenerObject(PERSON, name_translit); | |
81 | |
82 //private List<SelectItem> citiesWithRepositories; | |
83 private boolean foundCodex; | |
84 | |
85 private boolean lockValueAuthor = false; | |
86 private boolean lockValueTitle = false; | |
87 | |
88 private boolean createCodexRendered = false; | |
89 private boolean renderShowAllCodexCandidates = false; | |
90 //private Entity witness_old; | |
91 | |
92 private String newIdentifier; | |
93 | |
94 //private IslamicCalendar islamicCalCopyDate; | |
95 private transient Calendar copyDate; | |
96 | |
97 private EntityList studiedByList; | |
98 private EntityList possibleExamplerOfList; | |
120 | 99 |
100 private MisidentificationTable misidentTable; | |
1 | 101 |
102 public CurrentWitnessBean() { | |
103 super(); | |
104 this.entity = new Entity(Node.TYPE_ABOX, WITNESS, false); | |
105 setDefObjectClass(WITNESS); | |
106 | |
107 registerChecker(copyistLo.statusImage, "Copyist not valid"); | |
108 registerChecker(copyPlaceLo.statusImage, "Copyist not valid"); | |
109 registerChecker(patronageLo.statusImage,"Patron not valid"); | |
110 | |
111 } | |
112 | |
113 @Override | |
114 public void reset(){ | |
115 super.reset(); | |
116 this.entity = new Entity(Node.TYPE_ABOX, WITNESS, false); | |
117 this.studiedByList = new EntityList(PERSON, "name_translit", "Studied by"); | |
118 this.possibleExamplerOfList = new EntityList(TEXT, "full_title_translit", "Possible titles"); | |
119 | |
120 this.codicesOverviewRendered = false; | |
121 this.codicesAll = new ArrayList<CodexForList>(); | |
122 | |
123 this.titles_list = new ArrayList<SelectItem>(); | |
124 this.selectedTitleId = null; | |
125 this.selectTitleRendered = false; | |
126 this.selectPersonType = ""; | |
127 | |
128 this.persons_list = new ArrayList<SelectItem>(); | |
129 this.selectedPersonId = null; | |
130 this.selectPersonRendered = false; | |
131 this.restrictedByRole = true; | |
132 | |
133 if(titleLo != null) | |
134 this.titleLo.reset(); | |
135 | |
136 this.valueTitle = ""; | |
137 | |
138 // WITNESS -> has_title_written_as -> ALIAS | |
139 this.valueTextWritten = ""; | |
140 this.suggestedTitlesWritten = new ArrayList<SelectItem>(); | |
141 this.valueTitleSelectedId = null; | |
142 | |
143 // WITNESS -> has_author_written_as -> ALIAS | |
144 this.valueAuthorWritten = ""; | |
145 this.suggestedAuthorsWritten = new ArrayList<SelectItem>(); | |
146 this.valueAuthorSelectedId = null; | |
147 | |
148 // WITNESS -> is_exemplar_of -> TEXT -> was_created_by -> PERSON | |
149 if(this.authorLo != null) | |
150 this.authorLo.reset(); | |
151 this.valueAuthor = ""; | |
152 | |
153 // WITENSS -> was_copied_by -> PERSON | |
154 if(copyistLo != null) | |
155 this.copyistLo.reset(); | |
156 | |
157 // WITENSS -> was_copied_in -> PLACE | |
158 if(this.copyPlaceLo != null) | |
159 this.copyPlaceLo.reset(); | |
160 | |
161 // WITNESS -> xx -> PERSON | |
162 if(patronageLo != null) | |
163 this.patronageLo.reset(); | |
164 | |
165 //this.citiesWithRepositories = null; | |
166 this.foundCodex = false; | |
167 | |
168 this.lockValueAuthor = true; | |
169 this.lockValueTitle = true; | |
170 | |
171 this.createCodexRendered = false; | |
172 this.renderShowAllCodexCandidates = false; | |
173 | |
174 this.newIdentifier = ""; | |
175 | |
176 //this.islamicCalCopyDate = new IslamicCalendar(); | |
177 this.copyDate = new Calendar(); | |
120 | 178 |
179 this.misidentTable = new MisidentificationTable(); | |
1 | 180 } |
181 | |
182 @Override | |
183 public String save() { | |
184 super.save(); | |
185 try { | |
186 | |
187 User user = getSessionUser(); | |
188 | |
189 if(!isCodexIdentifierSet(user.getEmail())){ | |
190 return "SAVE_ERROR"; | |
191 } | |
192 | |
193 if(!isWitnessConsistentBeforeSave()){ | |
194 return "SAVE_ERROR"; | |
195 } | |
196 | |
197 //checking if some LO is not OK. | |
198 CheckResults cr = getCheckResults(); | |
199 if (cr.hasErrors){ | |
200 getSessionBean().setErrorMessages(cr); | |
201 getSessionBean().setDisplayError(true); | |
202 this.setSelectedSaveAsNew(false); | |
203 return "SAVE_ERROR"; | |
204 } | |
205 | |
206 getAttributes().put("creation_date", this.copyDate.toJSONString()); | |
207 | |
208 this.entity = this.updateEntityAttributes(this.entity); | |
209 | |
210 // WITNESS -> is_part_of -> CODEX | |
211 this.entity.replaceSourceRelation(getCodexLo().entity, CODEX, is_part_of); | |
212 | |
213 // WITNESS -> is_exemplar_of -> TEXT -> was_created_by -> PERSON | |
214 //replaceSourceRelation(this.entity, this.author, PERSON, was_created_by); | |
215 | |
216 // WITENSS -> was_copied_by -> PERSON | |
217 this.entity.replaceSourceRelation(this.copyistLo.entity, PERSON, rel_was_copied_by); | |
218 | |
111
22a18bfc66b0
new completion that uses ALIASes: AbstractListenerObject. was_copied_in in WITNESS form can use PLACE aliases now. some cleanup.
casties
parents:
1
diff
changeset
|
219 // WITNESS -> was_copied_in -> PLACE |
112
59f26a5ef2b3
AliasListenerObject adds aliases to ListenerObject. Change all forms to enable ALIAS for (historical) PLACE fields. Remove REPOSITORY from event forms.
casties
parents:
111
diff
changeset
|
220 replaceAliasSourceRelation(this.entity, this.copyPlaceLo, PLACE, "was_copied_in", "was_copied_in_as"); |
1 | 221 |
222 //REFERENCE -> is_reference_of -> WITNESS | |
223 //this.entity = this.prepareReferencesToSave(this.entity); | |
224 this.prepareEndNoteRefs2Save(); | |
225 | |
226 //WITNESS -> was studied by manyToMany -> PERSON | |
227 this.entity.removeAllSourceRelationsByName(rel_was_studied_by); | |
228 for(Entity target : this.studiedByList.getEntities()){ | |
229 Entity target0 = getWrapper().getEntityByIdWithContent(target.getId()); | |
112
59f26a5ef2b3
AliasListenerObject adds aliases to ListenerObject. Change all forms to enable ALIAS for (historical) PLACE fields. Remove REPOSITORY from event forms.
casties
parents:
111
diff
changeset
|
230 new Relation(this.entity, target0, rel_was_studied_by); |
1 | 231 } |
232 | |
233 // WITNESS -> had_patron -> PERSON | |
234 this.entity.replaceSourceRelation(this.patronageLo.entity, PERSON, rel_had_patron); | |
235 | |
236 | |
120 | 237 /* |
121 | 238 * save misidentifications |
120 | 239 */ |
240 this.entity = this.misidentTable.saveMisidentifications(this.entity); | |
241 | |
1 | 242 // WITNESS -> is_exemplar_of -> TEXT |
243 this.entity.replaceSourceRelation(this.titleLo.entity, TEXT, is_exemplar_of); | |
244 | |
245 this.entity.removeAllSourceRelationsByName(is_possible_exemplar_of); | |
246 this.entity.removeAllSourceRelations(rel_has_title_written_as, ALIAS); | |
247 this.entity.removeAllSourceRelations(rel_has_author_written_as, ALIAS); | |
248 | |
249 if(textUnknown){ | |
250 for(Entity target : this.possibleExamplerOfList.getEntities()){ | |
251 Entity target0 = getWrapper().getEntityByIdWithContent(target.getId()); | |
112
59f26a5ef2b3
AliasListenerObject adds aliases to ListenerObject. Change all forms to enable ALIAS for (historical) PLACE fields. Remove REPOSITORY from event forms.
casties
parents:
111
diff
changeset
|
252 new Relation(this.entity, target0, is_possible_exemplar_of); |
1 | 253 } |
254 }else{ | |
255 this.saveIndirectedAliases(); | |
256 } | |
257 | |
258 // WITNESS -> is_part_of_codex | |
259 if(this.isSelectedSaveAsNew()){ | |
260 this.entity = getWrapper().saveEntityAsNew(this.entity, user.getEmail()); | |
261 }else{ | |
262 this.entity = getWrapper().saveEntity(this.entity, user.getEmail()); | |
263 } | |
264 this.setEntity(this.entity); | |
265 | |
266 logger.info("Entity saved - Time = " + (System.currentTimeMillis() - start) + ", " + entity); | |
267 this.printSuccessSavingEntity(); | |
268 | |
269 this.setSelectedSaveAsNew(false); | |
270 } catch (Exception e) { | |
271 logger.error(e.getMessage(), e); | |
272 this.printInternalError(e); | |
273 } | |
274 | |
275 saveEnd(); | |
276 return PAGE_EDITOR; | |
277 } | |
278 | |
279 private void saveIndirectedAliases() throws Exception{ | |
280 | |
281 User user = getSessionUser(); | |
282 | |
283 //WITNESS -> has_title_written_as -> ALIAS | |
284 if(StringUtils.isNotEmpty(valueTextWritten)){ | |
285 Entity alias = null; | |
286 if(this.suggestedTitlesWritten != null){ | |
287 for(SelectItem item : this.suggestedTitlesWritten){ | |
288 Long id = (Long)item.getValue(); | |
289 if(id != null){ | |
290 Entity candidate = getWrapper().getEntityById(id); | |
291 if(candidate != null && valueTextWritten.equals(candidate.getOwnValue())){ | |
292 alias = candidate; | |
293 break; | |
294 } | |
295 } | |
296 } | |
297 } | |
298 | |
299 if(alias == null){ | |
300 alias = new Entity(Node.TYPE_ABOX, ALIAS, false); | |
301 alias.addAttribute(new Attribute(ALIAS, "text", valueTextWritten)); | |
302 alias = getWrapper().saveEntity(alias, user.getEmail()); | |
120 | 303 new Relation(alias, this.titleLo.getEntity(), "is_alias_title_of"); |
1 | 304 alias = getWrapper().saveEntity(alias, user.getEmail()); |
305 } | |
306 if(alias.isLightweight()){ | |
307 alias = getWrapper().getEntityByIdWithContent(alias.getId()); | |
308 } | |
309 this.entity.replaceSourceRelation(alias, ALIAS, rel_has_title_written_as); | |
310 } | |
311 | |
312 | |
313 if(StringUtils.isNotEmpty(this.valueAuthorWritten)){ | |
314 Entity alias = null; | |
315 if(suggestedAuthorsWritten != null){ | |
316 for(SelectItem item : this.suggestedAuthorsWritten){ | |
317 Long id = (Long)item.getValue(); | |
318 if(id != null){ | |
319 Entity candidate = getWrapper().getEntityById(id); | |
320 if(candidate != null && valueAuthorWritten.equals(candidate.getOwnValue())){ | |
321 alias = candidate; | |
322 break; | |
323 } | |
324 } | |
325 } | |
326 } | |
327 | |
328 if(alias == null){ | |
329 alias = new Entity(Node.TYPE_ABOX, ALIAS, false); | |
330 alias.addAttribute(new Attribute(ALIAS, "text", valueAuthorWritten)); | |
331 alias = getWrapper().saveEntity(alias, user.getEmail()); | |
120 | 332 new Relation(alias, this.authorLo.getEntity(), "is_alias_name_of"); |
1 | 333 alias = getWrapper().saveEntity(alias, user.getEmail()); |
334 } | |
335 if(alias.isLightweight()){ | |
336 alias = getWrapper().getEntityByIdWithContent(alias.getId()); | |
337 } | |
338 this.entity.replaceSourceRelation(alias, ALIAS, rel_has_author_written_as); | |
339 } | |
340 } | |
341 | |
342 public String saveAsNewEntity() { | |
343 this.setSelectedSaveAsNew(true); | |
344 return save(); | |
345 } | |
346 | |
347 /* rich | |
348 public void patronageChangeListener(ValueChangeEvent event) { | |
349 //patronageLo = changeListener(event, patronageLo, PERSON, "name"); | |
350 patronageLo = changeValuePersonByRole(event, patronageLo, "Patron"); | |
351 | |
352 } | |
353 | |
354 public void copyistChangeListener(ValueChangeEvent event) { | |
355 copyistLo = changeValuePersonByRole(event, copyistLo, "Copyist"); | |
356 } | |
357 | |
358 public void copyPlacesChangeListener(ValueChangeEvent event) { | |
359 copyPlaceLo = changeListener(event, copyPlaceLo,"PLACE", "name"); | |
360 }*/ | |
361 | |
362 public void updateTitle(){ | |
363 | |
364 if(titleLo.entity != null && titleLo.entity.isPersistent()){ | |
365 | |
366 this.textUnknown = UNKNOWN.equals(titleLo.entity.getOwnValue()); | |
367 | |
368 List<Entity> targets = getWrapper().getTargetsForSourceRelation(titleLo.getEntity(), rel_was_created_by, PERSON, 1); | |
369 if(targets.size() > 0){ | |
111
22a18bfc66b0
new completion that uses ALIASes: AbstractListenerObject. was_copied_in in WITNESS form can use PLACE aliases now. some cleanup.
casties
parents:
1
diff
changeset
|
370 this.authorLo.setEntityAndAttribute(targets.get(0)); |
1 | 371 |
372 }else{ | |
373 this.authorLo.reset(); | |
374 /* rich | |
375 this.authorLo.setEntityAndAttribute(null, name_translit); | |
376 this.authorLo.statusImage.setStatus(StatusImage.STATUS_UNSET); | |
377 */ | |
378 | |
379 } | |
380 this.suggestedAuthorsWritten = getAuthorAliases(authorLo.entity); | |
381 this.suggestedTitlesWritten = getTitleAliases(titleLo.entity); | |
382 } | |
383 } | |
384 | |
385 public void updateAuthor(){ | |
386 | |
387 if(authorLo.getEntity() != null && authorLo.getEntity().isPersistent()){ | |
388 | |
389 this.titleLo.reset(); | |
390 | |
391 List <Entity> sources = getWrapper().getSourcesForTargetRelation(authorLo.getEntity(), rel_was_created_by, TEXT, -1); | |
392 | |
393 ArrayList<SelectItem> options = new ArrayList<SelectItem>(); | |
394 for (Entity title : sources){ | |
395 options.add(new SelectItem(title.getId(), title.getOwnValue() + " [" + title.getId() + "]")); | |
396 } | |
397 | |
398 titles_list = options; | |
399 this.suggestedAuthorsWritten = getAuthorAliases(authorLo.entity); | |
400 this.suggestedTitlesWritten = getTitleAliases(null); | |
401 } | |
402 } | |
403 | |
404 | |
405 private List<SelectItem> getTitleAliases(Entity title) { | |
406 List<SelectItem> items = new ArrayList<SelectItem>(); | |
407 this.valueTextWritten = null; | |
408 if(title != null && title.isPersistent()){ | |
409 items.add(new SelectItem(new Long(-1), "-- choose --")); | |
410 List<Entity> aliasTitleList = getWrapper().getSourcesForTargetRelation(title, is_alias_title_of, ALIAS, -1); | |
411 for(Entity alias : aliasTitleList){ | |
412 items.add(new SelectItem(alias.getId(), alias.getOwnValue())); | |
413 } | |
414 | |
415 List<Entity> primeAliasTitleList = getWrapper().getSourcesForTargetRelation(title, is_prime_alias_title_of, ALIAS, -1); | |
416 for(Entity alias : primeAliasTitleList){ | |
417 items.add(new SelectItem(alias.getId(), alias.getOwnValue())); | |
418 } | |
419 } | |
420 | |
421 return items; | |
422 } | |
423 private List<SelectItem> getAuthorAliases(Entity author) { | |
424 List<SelectItem> items = new ArrayList<SelectItem>(); | |
425 this.valueAuthorWritten = null; | |
426 if(author != null && author.isPersistent()){ | |
427 //items.add(new SelectItem(null, "-- choose --")); | |
428 List<Entity> aliasAuthorList = getWrapper().getSourcesForTargetRelation(author, is_alias_name_of, ALIAS, -1); | |
429 for(Entity alias : aliasAuthorList){ | |
430 items.add(new SelectItem(alias.getId(), alias.getOwnValue())); | |
431 } | |
432 | |
433 List<Entity> primeAliasAuthorList = getWrapper().getSourcesForTargetRelation(author, is_prime_alias_name_of, ALIAS, -1); | |
434 for(Entity alias : primeAliasAuthorList){ | |
435 items.add(new SelectItem(alias.getId(), alias.getOwnValue())); | |
436 } | |
437 } | |
438 return items; | |
439 | |
440 } | |
441 | |
442 @Override | |
443 public void setEntity(Entity witness) { | |
444 this.reset(); | |
445 this.entity = witness; | |
446 | |
447 if(this.entity.isPersistent()){ | |
448 if (witness.isLightweight()) { | |
449 witness = getWrapper().getEntityContent(witness); | |
450 } | |
451 | |
452 Attribute attCreationDate = this.entity.getAttributeByName("creation_date"); | |
453 if(attCreationDate != null && StringUtils.isNotEmpty(attCreationDate.getOwnValue())){ | |
454 this.copyDate = new Calendar(attCreationDate.getOwnValue()); | |
455 }else{ | |
456 this.copyDate = new Calendar(); | |
457 } | |
458 | |
459 // Loading attributes | |
460 this.loadAttributes(this.entity); | |
461 | |
462 // Loading the relations | |
463 // TODO loading target's relations | |
464 for (Relation rel : witness.getSourceRelations()) { | |
465 Entity target = null; | |
120 | 466 String relName = rel.getOwnValue(); |
467 if (relName.equals(is_exemplar_of)) { | |
1 | 468 // WITNESS -> is_exemplar_of -> TEXT |
469 target = getTargetRelation(rel); | |
111
22a18bfc66b0
new completion that uses ALIASes: AbstractListenerObject. was_copied_in in WITNESS form can use PLACE aliases now. some cleanup.
casties
parents:
1
diff
changeset
|
470 titleLo.setEntityAndAttribute(target); |
1 | 471 this.updateTitle(); |
120 | 472 } else if (relName.equals(is_possible_exemplar_of)) { |
1 | 473 // WITNESS -> is_possible_exemplar_of -> TEXT |
474 target = getTargetRelation(rel); | |
475 possibleExamplerOfList.add(target); | |
120 | 476 } else if (relName.equals(rel_was_studied_by)) { |
1 | 477 target = getTargetRelation(rel); |
478 studiedByList.add(target); | |
120 | 479 } else if (relName.equals(rel_was_copied_by)) { |
1 | 480 // WITENSS -> was_copied_by -> PERSON |
481 target = getTargetRelation(rel); | |
111
22a18bfc66b0
new completion that uses ALIASes: AbstractListenerObject. was_copied_in in WITNESS form can use PLACE aliases now. some cleanup.
casties
parents:
1
diff
changeset
|
482 copyistLo.setEntityAndAttribute(target); |
120 | 483 } else if (relName.equals("was_copied_in")) { |
1 | 484 // WITENSS -> was_copied_in -> PLACE |
485 target = getTargetRelation(rel); | |
111
22a18bfc66b0
new completion that uses ALIASes: AbstractListenerObject. was_copied_in in WITNESS form can use PLACE aliases now. some cleanup.
casties
parents:
1
diff
changeset
|
486 // don't use place if there is an alias |
112
59f26a5ef2b3
AliasListenerObject adds aliases to ListenerObject. Change all forms to enable ALIAS for (historical) PLACE fields. Remove REPOSITORY from event forms.
casties
parents:
111
diff
changeset
|
487 copyPlaceLo.setEntityAndAttributeIfEmpty(target); |
120 | 488 } else if (relName.equals("was_copied_in_as")) { |
111
22a18bfc66b0
new completion that uses ALIASes: AbstractListenerObject. was_copied_in in WITNESS form can use PLACE aliases now. some cleanup.
casties
parents:
1
diff
changeset
|
489 // WITENSS -> was_copied_in_as -> ALIAS |
22a18bfc66b0
new completion that uses ALIASes: AbstractListenerObject. was_copied_in in WITNESS form can use PLACE aliases now. some cleanup.
casties
parents:
1
diff
changeset
|
490 target = getTargetRelation(rel); |
22a18bfc66b0
new completion that uses ALIASes: AbstractListenerObject. was_copied_in in WITNESS form can use PLACE aliases now. some cleanup.
casties
parents:
1
diff
changeset
|
491 copyPlaceLo.setEntityAndAttribute(target); |
120 | 492 } else if (relName.equals(rel_had_patron)) { |
1 | 493 // WITNESS -> had_patron -> PERSON |
494 target = getTargetRelation(rel); | |
111
22a18bfc66b0
new completion that uses ALIASes: AbstractListenerObject. was_copied_in in WITNESS form can use PLACE aliases now. some cleanup.
casties
parents:
1
diff
changeset
|
495 patronageLo.setEntityAndAttributeName(target, name_translit); |
120 | 496 } else if (relName.equals(is_part_of)) { |
111
22a18bfc66b0
new completion that uses ALIASes: AbstractListenerObject. was_copied_in in WITNESS form can use PLACE aliases now. some cleanup.
casties
parents:
1
diff
changeset
|
497 // WITNESS -> is_part_of -> CODEX |
22a18bfc66b0
new completion that uses ALIASes: AbstractListenerObject. was_copied_in in WITNESS form can use PLACE aliases now. some cleanup.
casties
parents:
1
diff
changeset
|
498 if (rel.getTargetObjectClass().equals(CODEX)) { |
1 | 499 target = getTargetRelation(rel); |
500 this.setCodex(target); | |
501 } | |
120 | 502 } else if (relName.equals(Misidentification.HAS_MISIDENT)) { |
503 // WITNESS -> has_misidentification -> MISIDENTIFICATION | |
504 target = getTargetRelation(rel); | |
505 this.misidentTable.load(target); | |
506 | |
507 } else if (relName.equals(rel_has_author_written_as)) { | |
1 | 508 //TODO this relation is no in the definitions |
509 Entity target2 = getTargetRelation(rel); | |
510 Attribute alias = getTargetAttribute(target2, "alias"); | |
511 this.valueAuthorWritten = (alias != null) ? alias.getValue() : null; | |
512 | |
120 | 513 } else if (relName.equals(rel_has_title_written_as)) { |
1 | 514 //TODO this relation is no in the definitions |
515 target = getTargetRelation(rel); | |
516 //this.textWritten = target; | |
517 Attribute alias = getTargetAttribute(target, "alias"); | |
518 this.valueTextWritten = (alias != null) ? alias.getValue() : null; | |
519 } | |
520 } | |
521 | |
522 //this.loadReferences(this.entity); | |
523 this.loadEndNoteRefs(); | |
524 | |
525 this.setCurrentId(this.entity.getId().toString()); | |
526 this.checkConsistencyFromCountryToCodex(); | |
527 | |
528 this.displayUrl = generateDisplayUrl(authorLo.entity, titleLo.entity, witness, getAppBean().getRoot()); | |
529 } | |
530 } | |
531 | |
532 /** | |
533 * Loads the given codex without reset of the variables, which could cause problem in CurrentWitness Class | |
534 * @param codex | |
535 */ | |
536 public void setCodex(Entity codex){ | |
111
22a18bfc66b0
new completion that uses ALIASes: AbstractListenerObject. was_copied_in in WITNESS form can use PLACE aliases now. some cleanup.
casties
parents:
1
diff
changeset
|
537 this.getCodexLo().setEntityAndAttributeName(codex, "identifier"); |
1 | 538 |
539 if(this.getCodexLo().entity != null && this.getCodexLo().entity.isPersistent()){ | |
540 | |
541 List<Entity> list = getWrapper().getTargetsForSourceRelation(codex, is_part_of, COLLECTION, 1); | |
542 if(list.size() > 0){ | |
543 this.setCollection(list.get(0)); | |
544 } | |
545 } | |
546 } | |
547 | |
548 public String getValueAuthor() { | |
549 return valueAuthor; | |
550 } | |
551 | |
552 public void setValueAuthor(String valueAuthor) { | |
553 if(!lockValueAuthor) | |
554 this.valueAuthor = valueAuthor; | |
555 this.lockValueAuthor = false; | |
556 } | |
557 | |
558 public void setValueTitle(String valueTitle) { | |
559 if(!lockValueTitle) | |
560 this.valueTitle = valueTitle; | |
561 this.lockValueTitle = false; | |
562 } | |
563 | |
564 public String getValueTitle() { | |
565 return valueTitle; | |
566 } | |
567 | |
568 public List<SelectItem> getTitles_list() { | |
569 return titles_list; | |
570 } | |
571 | |
572 public void setTitles_list(List<SelectItem> titlesList) { | |
573 titles_list = titlesList; | |
574 } | |
575 | |
576 public void setFoundCodex(boolean foundCodex) { | |
577 this.foundCodex = foundCodex; | |
578 } | |
579 | |
580 public boolean isFoundCodex() { | |
581 return foundCodex; | |
582 } | |
583 | |
584 public void listenerCreateTitleAlias(ValueChangeEvent event) { | |
585 this.valueTextWritten = (String)event.getNewValue(); | |
586 } | |
587 | |
588 public void listenerChooseTitleAlias(ValueChangeEvent event) { | |
589 if (event.getNewValue() != null) { | |
590 Long aliasId = (Long) event.getNewValue(); | |
591 if(aliasId != null){ | |
592 if(aliasId.equals(-1)){ | |
593 this.valueTextWritten = null; | |
594 }else{ | |
595 Entity alias = getWrapper().getEntityByIdWithContent(aliasId); | |
596 if(alias != null){ | |
597 this.valueTextWritten = alias.getOwnValue(); | |
598 } | |
599 } | |
600 } | |
601 } | |
602 } | |
603 | |
604 public void listenerCreateAuthorAlias(ValueChangeEvent event) { | |
605 this.valueAuthorWritten = (String)event.getNewValue(); | |
606 } | |
607 | |
608 public void listenerChooseAuthorAlias(ValueChangeEvent event) { | |
609 if (event.getNewValue() != null) { | |
610 Long aliasId = (Long) event.getNewValue(); | |
611 if(aliasId != null){ | |
612 if(aliasId.equals(-1)){ | |
613 this.valueAuthorWritten = null; | |
614 }else{ | |
615 Entity alias = getWrapper().getEntityByIdWithContent(aliasId); | |
616 if(alias != null){ | |
617 this.valueAuthorWritten = alias.getOwnValue(); | |
618 } | |
619 } | |
620 } | |
621 } | |
622 } | |
623 | |
624 @Override | |
625 public void identifierChangedListener(ValueChangeEvent event) { | |
626 super.identifierChangedListener(event); | |
627 | |
628 if (StringUtils.isEmpty(getCodexLo().attribute.getValue())){ | |
629 renderShowAllCodexCandidates = false; | |
630 this.checkConsistencyFromCountryToCodex(); | |
631 return; | |
632 } | |
633 | |
634 List<Entity> entities = getWrapper().getEntitiesByAtt(CODEX, getCodexLo().getAttName(), getCodexLo().attribute.getValue(), 10000, false); | |
635 | |
636 if (entities.size()>1){ | |
637 if ((getCollectionLo().attribute==null || getCollectionLo().getAttribute().getValue().equals("")) && | |
638 (getRepositoryLo().getAttribute()==null || getRepositoryLo().getAttribute().getValue().equals(""))){ | |
639 showAllCodexCandidates(entities); | |
640 renderShowAllCodexCandidates = true; | |
641 } | |
642 else | |
643 //renderShowAllCodexCandidates = false; | |
644 renderShowAllCodexCandidates = true; // i want to keep the selection field now | |
645 } | |
646 else | |
647 //renderShowAllCodexCandidates = false; | |
648 renderShowAllCodexCandidates = true; //i want to keep the selection field now | |
649 } | |
650 | |
651 public void searchInCurrentRepository(ActionEvent event) { | |
652 | |
653 ValueChangeEvent ne = new ValueChangeEvent((UIComponent) event | |
654 .getComponent(), "", getCollectionLo().getAttribute().getOwnValue()); | |
655 identifierChangedListener(ne); | |
656 | |
657 } | |
658 | |
659 /* rich | |
660 public String insertAuthorAction() { | |
661 return "insert"; | |
662 | |
663 }*/ | |
664 | |
665 public String showOtherTextsByAuthorAction() { | |
666 if (authorLo.entity == null || !authorLo.entity.isPersistent()) | |
667 return ""; | |
668 | |
669 List<SelectItem> options = new ArrayList<SelectItem>(); | |
670 List<Entity> titles = getWrapper().getSourcesForTargetRelation(authorLo.entity, "was_created_by", TEXT, -1); | |
671 for (Entity title: titles){ | |
672 options.add( | |
673 new SelectItem(title.getId(), title.getOwnValue() + " [" + title.getId() + "]")); | |
674 } | |
675 titles_list = options; | |
676 setSelectTitleRendered(true); | |
677 return ""; | |
678 } | |
679 | |
680 /** | |
681 * Gebe moegliche andere Codices aus. Das ist notwendig, weil nach dem jetzigen Stand der Daten ein Codex | |
682 * mehrfach im Datensatz auftachen kann. | |
683 * @return | |
684 */ | |
685 public String showAllCodexCandidates(List<Entity> entities){ | |
686 if (entities != null) { | |
687 for (Entity entity : entities) { | |
688 CodexForList entForList = getCodexData(entity); | |
689 codicesAll.add(entForList); | |
690 } | |
691 } | |
692 setCodicesOverviewRendered(true); | |
693 return ""; | |
694 } | |
695 | |
696 public String showAllTextsAction() { | |
697 titles_list = new ArrayList<SelectItem>(); | |
698 titles_list = getAppBean().getAllTexts(); | |
699 this.selectTitleRendered = true; | |
700 return ""; | |
701 } | |
702 | |
703 public void listenerSelectTitle(ActionEvent event){ | |
704 if(this.selectedTitleId != null){ | |
705 Entity title = getWrapper().getEntityById(this.selectedTitleId); | |
706 if(title != null){ | |
111
22a18bfc66b0
new completion that uses ALIASes: AbstractListenerObject. was_copied_in in WITNESS form can use PLACE aliases now. some cleanup.
casties
parents:
1
diff
changeset
|
707 this.titleLo.setEntityAndAttribute(title); |
1 | 708 this.updateTitle(); |
709 setSelectTitleRendered(false); | |
710 } | |
711 } | |
712 } | |
713 | |
714 public void listenerCancelPpSelectTitle(ActionEvent event){ | |
119 | 715 //System.out.println("listenerCancelPpSelectTitle"); |
1 | 716 this.selectTitleRendered = false; |
717 } | |
718 | |
719 public void setSelectTitleRendered(Boolean selectTitleRendered) { | |
720 this.selectTitleRendered = selectTitleRendered; | |
721 } | |
722 | |
723 public Boolean getSelectTitleRendered() { | |
724 return selectTitleRendered; | |
725 } | |
726 | |
727 public List<SelectItem> getPersons_list() { | |
728 return persons_list; | |
729 } | |
730 | |
731 public void setPersons_list(List<SelectItem> personsList) { | |
732 persons_list = personsList; | |
733 } | |
734 | |
735 public Boolean getSelectPersonRendered() { | |
736 return selectPersonRendered; | |
737 } | |
738 | |
739 public void setSelectPersonRendered(Boolean selectPersonRendered) { | |
740 this.selectPersonRendered = selectPersonRendered; | |
741 } | |
742 | |
743 public Boolean getRestrictedByRole() { | |
744 return restrictedByRole; | |
745 } | |
746 | |
747 public void setRestrictedByRole(Boolean restrictedByRole) { | |
748 this.restrictedByRole = restrictedByRole; | |
749 } | |
750 | |
751 private void updatePersonList(){ | |
752 if (!this.restrictedByRole) | |
753 //persons_list = ((AllPersonsBean) this.getBean("AllPersons")) | |
754 // .getPersonsSelectItems(); | |
755 persons_list = getCache().getAllPersons(); | |
756 else { | |
757 //persons_list = ((AllPersonsBean) this.getBean("AllPersons")) | |
758 // .getPersonsSelectItemsByRole(this.selectPersonType); | |
759 persons_list = getCache().getPersonsByRole(selectPersonType); | |
760 } | |
761 } | |
762 | |
763 public String showAllCopyistsAction() { | |
764 this.setSelectPersonType("Copyist"); | |
765 this.updatePersonList(); | |
766 this.selectPersonRendered = true; | |
767 return ""; | |
768 } | |
769 | |
770 public String showAllPatronsAction() { | |
771 this.setSelectPersonType("Patron"); | |
772 this.updatePersonList(); | |
773 this.selectPersonRendered = true; | |
774 return ""; | |
775 } | |
776 | |
777 public String showAllAuthorsAction() { | |
778 this.setSelectPersonType("Author"); | |
779 this.updatePersonList(); | |
780 this.selectPersonRendered = true; | |
781 return ""; | |
782 } | |
783 | |
784 public void listenerCancelPpSelectAuthor(ActionEvent event){ | |
785 this.selectPersonRendered = false; | |
786 } | |
787 | |
788 public void listenerSelectPerson(ActionEvent event){ | |
789 String role = getSelectPersonType(); | |
790 if(this.selectedPersonId != null){ | |
791 Entity selectedPerson = getWrapper().getEntityByIdWithContent(selectedPersonId); | |
792 if(selectedPerson != null){ | |
793 if (role.equals("Copyist")) { | |
111
22a18bfc66b0
new completion that uses ALIASes: AbstractListenerObject. was_copied_in in WITNESS form can use PLACE aliases now. some cleanup.
casties
parents:
1
diff
changeset
|
794 copyistLo.setEntityAndAttribute(selectedPerson); |
1 | 795 } else if (role.equals("Patron")) { |
111
22a18bfc66b0
new completion that uses ALIASes: AbstractListenerObject. was_copied_in in WITNESS form can use PLACE aliases now. some cleanup.
casties
parents:
1
diff
changeset
|
796 patronageLo.setEntityAndAttribute(selectedPerson); |
1 | 797 } else if (role.equals("Author")) { |
111
22a18bfc66b0
new completion that uses ALIASes: AbstractListenerObject. was_copied_in in WITNESS form can use PLACE aliases now. some cleanup.
casties
parents:
1
diff
changeset
|
798 authorLo.setEntityAndAttribute(selectedPerson); |
1 | 799 this.updateAuthor(); |
800 } | |
801 setSelectPersonRendered(false); | |
802 } | |
803 } | |
804 } | |
805 | |
806 public void setSelectPersonType(String selectPersonType) { | |
807 this.selectPersonType = selectPersonType; | |
808 } | |
809 | |
810 public String getSelectPersonType() { | |
811 return selectPersonType; | |
812 } | |
813 | |
814 public void restrictedByRoleChange(ValueChangeEvent event) { | |
815 if (event.getNewValue().equals(event.getOldValue())) | |
816 return; | |
817 try{ | |
818 Boolean val = (Boolean) event.getNewValue(); | |
819 this.setRestrictedByRole(val); | |
820 this.updatePersonList(); | |
821 }catch(Exception ex){ | |
822 ex.printStackTrace(); | |
823 } | |
824 } | |
825 | |
826 public void listenerConvertCreationDate(ActionEvent event) { | |
827 /* | |
828 try{ | |
829 | |
830 String newDate = this.islamicCalCopyDate.islamic2Gregorian(); | |
831 String newJulianDate = this.islamicCalCopyDate.islamic2Julian(); | |
832 | |
833 getAttributes().put("creation_date_ce", newDate); | |
834 getAttributes().put("creation_date_julian", newJulianDate); | |
835 | |
836 }catch(Exception e){ | |
837 e.printStackTrace(); | |
838 addGeneralMsg("Error converting date!"); | |
839 addGeneralMsg("The islamic calendar begins on Friday, July 16th, 622 C.E. in the Julian calendar."); | |
840 addGeneralMsg("The date must be equals or bigger than yawm al-jum'a, 1.Muharram.1 (5.1.1.1)"); | |
841 } | |
842 */ | |
843 } | |
844 | |
845 | |
846 public void selectCodexFromOverviewAction(ActionEvent ae){ | |
847 /* rich | |
848 | |
849 HtmlCommandButton cp = (HtmlCommandButton)ae.getComponent(); | |
850 Long id = (Long) cp.getValue(); | |
851 //juc Entity ent = getOntology().getEntityById(id); | |
852 Entity ent = getWrapper().getEntityById(id); | |
853 this.getCodexLo().setEntityAndAttribute(ent, "identifier"); | |
854 //changeValueAttCodex(this.getCodexLo().getAttribute().getOwnValue()); | |
855 setCodicesOverviewRendered(false); | |
856 | |
857 */ | |
858 | |
859 | |
860 } | |
861 | |
862 public String closeCodicesOverview(){ | |
863 setCodicesOverviewRendered(false); | |
864 return "CLOSE"; | |
865 | |
866 } | |
867 | |
868 | |
869 private boolean isCodexIdentifierSet(String user){ | |
870 try { | |
871 | |
872 if(StatusImage.STATUS_OK.equals(getCodexLo().getStatus())){ | |
873 return true; | |
874 } | |
875 | |
876 String identifier = getNewIdentifier(); | |
877 | |
878 if(!StatusImage.STATUS_OK.equals(getCollectionLo().getStatus()) || | |
879 StringUtils.isEmpty(identifier)){ | |
880 //we can not save the witness | |
881 if(!StatusImage.STATUS_OK.equals(getCollectionLo().getStatus())){ | |
882 addErrorMsg("The Collection is not valid."); | |
883 } | |
884 if(StringUtils.isEmpty(identifier)){ | |
885 addErrorMsg("The Codex does not have an valid identifier."); | |
886 } | |
887 addErrorMsg("The Witness could not be saved."); | |
888 return false; | |
889 }else { | |
890 //two possibilities: | |
891 //1. there exist a codex with the same id | |
892 //2. there is no a codex with this id, it should be saved. | |
893 | |
894 if(StringUtils.isNotEmpty(identifier)){ | |
895 List<Entity> codexListOfCollection = | |
896 getWrapper().getSourcesForTargetRelation(getCollectionLo().getEntity(), | |
897 is_part_of, CODEX, -1); | |
898 for(Entity possibleCodex : codexListOfCollection){ | |
899 //juc Attribute att = getWrapper().getAttributeByName(possibleCodex, "identifier"); | |
900 Attribute att = getWrapper().getAttributeByName(possibleCodex.getId(), "identifier"); | |
901 if(att != null && identifier.equals(att.getValue())){ | |
111
22a18bfc66b0
new completion that uses ALIASes: AbstractListenerObject. was_copied_in in WITNESS form can use PLACE aliases now. some cleanup.
casties
parents:
1
diff
changeset
|
902 getCodexLo().setEntityAndAttributeName(possibleCodex, "identifier"); |
1 | 903 return true; |
904 } | |
905 } | |
906 } | |
907 } | |
908 | |
909 //if the Collection Status == OK && the Codex.identifier != null | |
910 Entity newCodex = new Entity(Node.TYPE_ABOX, CODEX, false); | |
911 newCodex.addAttribute(new Attribute("identifier", TEXT, identifier)); | |
912 getWrapper().saveEntity(newCodex, user); | |
913 Relation isPartOf = new Relation(newCodex, getCollectionLo().getEntity(), is_part_of); | |
914 getWrapper().saveRelationAsNode(isPartOf, user); | |
111
22a18bfc66b0
new completion that uses ALIASes: AbstractListenerObject. was_copied_in in WITNESS form can use PLACE aliases now. some cleanup.
casties
parents:
1
diff
changeset
|
915 getCodexLo().setEntityAndAttributeName(newCodex, "identifier"); |
1 | 916 |
917 } catch (Exception e) { | |
918 logger.error(e.getMessage(), e); | |
919 return false; | |
920 } | |
921 return true; | |
922 } | |
923 | |
924 public boolean isCreateCodexRendered() { | |
925 return createCodexRendered; | |
926 } | |
927 | |
928 public void setCreateCodexRendered(boolean createCodexRendered) { | |
929 this.createCodexRendered = createCodexRendered; | |
930 } | |
931 | |
932 @Override | |
933 public String loadCloneEntity(){ | |
934 this.setCodex(getCloneEntity()); | |
935 this.setRenderUnityCheckerDialog(false); | |
936 this.checkConsistencyFromCountryToCodex(); | |
937 return PAGE_EDITOR; | |
938 } | |
939 | |
940 public List<CodexForList> getCodicesAll() { | |
941 return codicesAll; | |
942 } | |
943 | |
944 public void setCodicesAll(List<CodexForList> codicesAll) { | |
945 this.codicesAll = codicesAll; | |
946 } | |
947 | |
948 public void setCodicesOverviewRendered(Boolean codicesOverviewRendered) { | |
949 this.codicesOverviewRendered = codicesOverviewRendered; | |
950 } | |
951 | |
952 public Boolean getCodicesOverviewRendered() { | |
953 return codicesOverviewRendered; | |
954 } | |
955 | |
956 /** | |
957 * Teste ob es Codices mit gleichem identifier gibt! | |
958 * @return | |
959 */ | |
960 public Boolean getRenderShowAllCodexCandidates(){ | |
961 return renderShowAllCodexCandidates; | |
962 } | |
963 | |
964 | |
965 | |
966 public List<SelectItem> getSuggestedTitlesWritten() { | |
967 return suggestedTitlesWritten; | |
968 } | |
969 | |
970 public void setSuggestedTitlesWritten(List<SelectItem> suggestedTitlesWritten) { | |
971 this.suggestedTitlesWritten = suggestedTitlesWritten; | |
972 } | |
973 | |
974 public List<SelectItem> getSuggestedAuthorsWritten() { | |
975 return suggestedAuthorsWritten; | |
976 } | |
977 | |
978 public void setSuggestedAuthorsWritten(List<SelectItem> suggestedAuthorsWritten) { | |
979 this.suggestedAuthorsWritten = suggestedAuthorsWritten; | |
980 } | |
981 | |
982 public void codexCodexChangeListener(ValueChangeEvent event) { | |
983 if (event.getNewValue() == null) { | |
984 return; | |
985 } | |
986 if (event.getNewValue().equals(event.getOldValue())) { | |
987 return; | |
988 } | |
989 this.getCodexLo().statusImage.setStatus(StatusImage.STATUS_UNSET); | |
990 this.getCodexLo().attribute.setValue(event.getNewValue().toString()); | |
991 } | |
992 public Long getValueTitleSelectedId() { | |
993 return valueTitleSelectedId; | |
994 } | |
995 | |
996 public void setValueTitleSelectedId(Long valueTitleSelectedId) { | |
997 this.valueTitleSelectedId = valueTitleSelectedId; | |
998 } | |
999 | |
1000 public ListenerObject getCopyistLo() { | |
1001 return copyistLo; | |
1002 } | |
1003 | |
1004 public void setCopyistLo(ListenerObject copyistLo) { | |
1005 this.copyistLo = copyistLo; | |
1006 } | |
1007 | |
1008 public ListenerObject getCopyPlaceLo() { | |
1009 return copyPlaceLo; | |
1010 } | |
1011 | |
112
59f26a5ef2b3
AliasListenerObject adds aliases to ListenerObject. Change all forms to enable ALIAS for (historical) PLACE fields. Remove REPOSITORY from event forms.
casties
parents:
111
diff
changeset
|
1012 public void setCopyPlaceLo(AliasListenerObject copyPlaceLo) { |
1 | 1013 this.copyPlaceLo = copyPlaceLo; |
1014 } | |
1015 | |
1016 public ListenerObject getPatronageLo() { | |
1017 return patronageLo; | |
1018 } | |
1019 | |
1020 public void setPatronageLo(ListenerObject patronageLo) { | |
1021 this.patronageLo = patronageLo; | |
1022 } | |
1023 | |
1024 public ListenerObject getTitleLo() { | |
1025 return titleLo; | |
1026 } | |
1027 | |
1028 public void setTitleLo(ListenerObject titleLo) { | |
1029 this.titleLo = titleLo; | |
1030 } | |
1031 | |
1032 public ListenerObject getAuthorLo() { | |
1033 return authorLo; | |
1034 } | |
1035 | |
1036 public String getNewIdentifier() { | |
1037 return newIdentifier; | |
1038 } | |
1039 | |
1040 public void setNewIdentifier(String newIdentifier) { | |
1041 this.newIdentifier = newIdentifier; | |
1042 } | |
1043 | |
1044 public EntityList getStudiedByList() { | |
1045 return studiedByList; | |
1046 } | |
1047 | |
1048 public Calendar getCopyDate() { | |
1049 return copyDate; | |
1050 } | |
1051 | |
1052 public void setCopyDate(Calendar copyDate) { | |
1053 this.copyDate = copyDate; | |
1054 } | |
1055 | |
1056 public void setStudiedByList(EntityList studiedByList) { | |
1057 this.studiedByList = studiedByList; | |
1058 } | |
1059 public Long getValueAuthorSelectedId() { | |
1060 return valueAuthorSelectedId; | |
1061 } | |
1062 | |
1063 public void setValueAuthorSelectedId(Long valueAuthorSelectedId) { | |
1064 this.valueAuthorSelectedId = valueAuthorSelectedId; | |
1065 } | |
1066 | |
1067 public String getValueTextWritten() { | |
1068 return valueTextWritten; | |
1069 } | |
1070 | |
1071 public void setValueTextWritten(String valueTextWritten) { | |
1072 //this.valueTextWritten = valueTextWritten; | |
1073 } | |
1074 | |
1075 public String getValueAuthorWritten() { | |
1076 return valueAuthorWritten; | |
1077 } | |
1078 | |
1079 public void setValueAuthorWritten(String valueAuthorWritten) { | |
1080 //this.valueAuthorWritten = valueAuthorWritten; | |
1081 } | |
1082 | |
1083 public void setAuthorLo(ListenerObject authorLo) { | |
1084 this.authorLo = authorLo; | |
1085 } | |
1086 | |
1087 public Long getSelectedTitleId() { | |
1088 return selectedTitleId; | |
1089 } | |
1090 | |
1091 public void setSelectedTitleId(Long selectedTitleId) { | |
1092 this.selectedTitleId = selectedTitleId; | |
1093 } | |
1094 public Long getSelectedPersonId() { | |
1095 return selectedPersonId; | |
1096 } | |
1097 | |
1098 public void setSelectedPersonId(Long selectedPersonId) { | |
1099 this.selectedPersonId = selectedPersonId; | |
1100 } | |
1101 | |
1102 public boolean isTextUnknown() { | |
1103 return textUnknown; | |
1104 } | |
1105 | |
1106 public void setTextUnknown(boolean textUnknown) { | |
1107 this.textUnknown = textUnknown; | |
1108 } | |
1109 | |
1110 public EntityList getPossibleExamplerOfList() { | |
1111 return possibleExamplerOfList; | |
1112 } | |
1113 | |
1114 public void setPossibleExamplerOfList(EntityList possibleExamplerOfList) { | |
1115 this.possibleExamplerOfList = possibleExamplerOfList; | |
1116 } | |
120 | 1117 |
1118 public MisidentificationTable getMisidentTable() { | |
1119 return misidentTable; | |
1120 } | |
1121 | |
1122 public void setMisidentTable(MisidentificationTable misidentTable) { | |
1123 this.misidentTable = misidentTable; | |
1124 } | |
1 | 1125 |
1126 } | |
1127 |