Mercurial > hg > ismi-richfaces
comparison src/main/java/de/mpiwg/itgroup/ismi/entry/beans/CurrentWitnessBean.java @ 161:8049becb05ca
New ALIAS is_alias_identifier_of CODEX/WITNESS for diverse catalog numbers.
author | Robert Casties <casties@mpiwg-berlin.mpg.de> |
---|---|
date | Thu, 19 Apr 2018 20:35:12 +0200 |
parents | 1c09041f1182 |
children | c9347929be25 |
comparison
equal
deleted
inserted
replaced
160:1882f1c9974b | 161:8049becb05ca |
---|---|
88 | 88 |
89 private boolean createCodexRendered = false; | 89 private boolean createCodexRendered = false; |
90 private boolean renderShowAllCodexCandidates = false; | 90 private boolean renderShowAllCodexCandidates = false; |
91 //private Entity witness_old; | 91 //private Entity witness_old; |
92 | 92 |
93 private EntityList aliasIdList; | |
93 private String newIdentifier; | 94 private String newIdentifier; |
94 | 95 |
95 //private IslamicCalendar islamicCalCopyDate; | 96 //private IslamicCalendar islamicCalCopyDate; |
96 private transient Calendar copyDate; | 97 private transient Calendar copyDate; |
97 | 98 |
112 // source relations | 113 // source relations |
113 new String[] {"is_exemplar_of", "is_part_of", "has_author_misidentification", "was_copied_by", | 114 new String[] {"is_exemplar_of", "is_part_of", "has_author_misidentification", "was_copied_by", |
114 "was_copied_in", "was_copied_in_as", "had_patron", "was_studied_by", | 115 "was_copied_in", "was_copied_in_as", "had_patron", "was_studied_by", |
115 "has_author_written_as", "has_title_written_as"}, | 116 "has_author_written_as", "has_title_written_as"}, |
116 // target relations | 117 // target relations |
117 new String[] {"is_reference_of"}); | 118 new String[] {"is_reference_of", is_alias_identifier_of}); |
118 | 119 |
119 public CurrentWitnessBean() { | 120 public CurrentWitnessBean() { |
120 super(); | 121 super(); |
121 this.entity = new Entity(Node.TYPE_ABOX, WITNESS, false); | 122 this.entity = new Entity(Node.TYPE_ABOX, WITNESS, false); |
122 setDefObjectClass(WITNESS); | 123 setDefObjectClass(WITNESS); |
186 this.lockValueTitle = true; | 187 this.lockValueTitle = true; |
187 | 188 |
188 this.createCodexRendered = false; | 189 this.createCodexRendered = false; |
189 this.renderShowAllCodexCandidates = false; | 190 this.renderShowAllCodexCandidates = false; |
190 | 191 |
191 this.newIdentifier = ""; | 192 this.aliasIdList = new EntityList(ALIAS, "alias", getWrapper(), getUserName()); |
193 | |
194 this.newIdentifier = ""; | |
192 | 195 |
193 //this.islamicCalCopyDate = new IslamicCalendar(); | 196 //this.islamicCalCopyDate = new IslamicCalendar(); |
194 this.copyDate = new Calendar(); | 197 this.copyDate = new Calendar(); |
195 | 198 |
196 this.misidentTable = new MisidentificationTable(); | 199 this.misidentTable = new MisidentificationTable(); |
243 replaceMultipleSourceRelations(entity, studiedByList.getEntities(), PERSON, rel_was_studied_by); | 246 replaceMultipleSourceRelations(entity, studiedByList.getEntities(), PERSON, rel_was_studied_by); |
244 | 247 |
245 // WITNESS -> had_patron -> PERSON | 248 // WITNESS -> had_patron -> PERSON |
246 this.entity.replaceUniqueSourceRelation(this.patronageLo.entity, PERSON, rel_had_patron); | 249 this.entity.replaceUniqueSourceRelation(this.patronageLo.entity, PERSON, rel_had_patron); |
247 | 250 |
251 // ALIAS -> is_identifier_of -> CODEX | |
252 replaceMultipleTargetRelations(entity, aliasIdList.getEntities(), ALIAS, is_alias_identifier_of); | |
248 | 253 |
249 /* | 254 /* |
250 * save misidentifications | 255 * save misidentifications |
251 */ | 256 */ |
252 this.entity = this.misidentTable.saveMisidentifications(this.entity); | 257 this.entity = this.misidentTable.saveMisidentifications(this.entity); |
526 Attribute alias = getTargetAttribute(target, "alias"); | 531 Attribute alias = getTargetAttribute(target, "alias"); |
527 this.valueTextWritten = (alias != null) ? alias.getValue() : null; | 532 this.valueTextWritten = (alias != null) ? alias.getValue() : null; |
528 } | 533 } |
529 } | 534 } |
530 | 535 |
531 //this.loadReferences(this.entity); | 536 // ALIAS is_alias_identifier_of WITNESS |
537 for(Relation rel : getWrapper().getTargetRelations(witness, is_alias_identifier_of, ALIAS, -1)) { | |
538 Entity alias = getWrapper().getEntityById(rel.getSourceId()); | |
539 this.aliasIdList.add(alias); | |
540 } | |
541 | |
542 //this.loadReferences(this.entity); | |
532 this.loadEndNoteRefs(); | 543 this.loadEndNoteRefs(); |
533 | 544 |
534 this.setCurrentId(this.entity.getId().toString()); | 545 this.setCurrentId(this.entity.getId().toString()); |
535 this.checkConsistencyFromCountryToCodex(); | 546 this.checkConsistencyFromCountryToCodex(); |
536 | 547 |
1129 } | 1140 } |
1130 | 1141 |
1131 public void setMisidentTable(MisidentificationTable misidentTable) { | 1142 public void setMisidentTable(MisidentificationTable misidentTable) { |
1132 this.misidentTable = misidentTable; | 1143 this.misidentTable = misidentTable; |
1133 } | 1144 } |
1145 | |
1146 /** | |
1147 * @return the aliasIdList | |
1148 */ | |
1149 public EntityList getAliasIdList() { | |
1150 return aliasIdList; | |
1151 } | |
1152 | |
1153 /** | |
1154 * @param aliasIdList the aliasIdList to set | |
1155 */ | |
1156 public void setAliasIdList(EntityList aliasIdList) { | |
1157 this.aliasIdList = aliasIdList; | |
1158 } | |
1134 | 1159 |
1135 } | 1160 } |
1136 | 1161 |