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