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