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