Mercurial > hg > ismi-richfaces
annotate src/main/java/de/mpiwg/itgroup/ismi/entry/beans/CurrentCodexBean.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 | 502ae5b1a07d |
children |
rev | line source |
---|---|
1 | 1 package de.mpiwg.itgroup.ismi.entry.beans; |
2 | |
3 import java.io.Serializable; | |
4 | |
5 import java.util.ArrayList; | |
6 import java.util.List; | |
7 | |
8 import javax.faces.event.ActionEvent; | |
9 import javax.faces.model.SelectItem; | |
10 | |
11 import org.apache.commons.lang.StringUtils; | |
12 import org.apache.log4j.Logger; | |
13 import org.mpi.openmind.repository.bo.Attribute; | |
14 import org.mpi.openmind.repository.bo.Entity; | |
15 import org.mpi.openmind.repository.bo.Node; | |
16 import org.mpi.openmind.repository.bo.Relation; | |
125 | 17 import org.mpi.openmind.repository.services.utils.EditIntent; |
1 | 18 |
19 import de.mpiwg.itgroup.ismi.util.guiComponents.Calendar; | |
20 import de.mpiwg.itgroup.ismi.util.guiComponents.EntityList; | |
21 | |
22 /** | |
23 * @author jurzua | |
24 * | |
25 */ | |
26 public class CurrentCodexBean extends CodexEditorTemplate implements Serializable{ | |
27 private static final long serialVersionUID = -4242977362183330958L; | |
28 | |
29 private static Logger logger = Logger.getLogger(CurrentCodexBean.class); | |
30 | |
31 //private Entity codex; | |
32 | |
33 private List<Entity> witnessInCurrentCodex; | |
34 private boolean showWitnessInCurrentCodex; | |
161
8049becb05ca
New ALIAS is_alias_identifier_of CODEX/WITNESS for diverse catalog numbers.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
136
diff
changeset
|
35 |
8049becb05ca
New ALIAS is_alias_identifier_of CODEX/WITNESS for diverse catalog numbers.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
136
diff
changeset
|
36 private EntityList aliasIdList; |
1 | 37 private EntityList ownedByPeople; |
38 private EntityList readByPeople; | |
39 | |
40 private List<SelectItem> suggestedBindingList = new ArrayList<SelectItem>(); | |
41 | |
42 private CodexEditorTemplate referencedCodexTemplate; | |
43 private Boolean isAlias; | |
44 | |
125 | 45 /** intent to edit all attributes and relations in the form */ |
46 public static EditIntent editCodexIntent = new EditIntent( | |
47 AbstractISMIBean.CODEX, | |
48 // attributes | |
49 new String[]{"identifier", "is_alias", "public", "url_digitized_codex", "mpiwg_id", "indexmeta_folder", | |
50 "number_of_folios", "dimensions", "binding", "distinguishing_features", "notes", "notes_old", | |
51 "notes_on_ownership"}, | |
52 // source relations | |
53 new String[]{"is_part_of", "is_alias_of", "owned_by", "read_by"}, | |
54 // target relations | |
161
8049becb05ca
New ALIAS is_alias_identifier_of CODEX/WITNESS for diverse catalog numbers.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
136
diff
changeset
|
55 new String[]{"is_alias_of", "is_reference_of", is_alias_identifier_of}); |
125 | 56 |
1 | 57 |
58 public CurrentCodexBean() { | |
59 this.entity = new Entity(Node.TYPE_ABOX, CODEX, false); | |
60 setDefObjectClass(CODEX); | |
61 registerChecker(getCityLo(), "city is not valid"); | |
62 registerChecker(getCountryLo(), "country is not valid"); | |
63 registerChecker(getRepositoryLo(), "repository is not valid"); | |
64 registerChecker(getCollectionLo(), "collection is not valid"); | |
65 | |
66 this.refreshBindingList(); | |
67 } | |
68 | |
69 @Override | |
70 public void reset(){ | |
71 super.reset(); | |
72 this.entity = new Entity(Node.TYPE_ABOX, CODEX, false); | |
73 | |
161
8049becb05ca
New ALIAS is_alias_identifier_of CODEX/WITNESS for diverse catalog numbers.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
136
diff
changeset
|
74 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:
136
diff
changeset
|
75 |
1 | 76 this.ownedByPeople = new EntityList(PERSON, "name_translit", true); |
77 this.readByPeople = new EntityList(PERSON, "name_translit", true); | |
78 | |
79 this.witnessInCurrentCodex = new ArrayList<Entity>(); | |
80 this.showWitnessInCurrentCodex = false; | |
81 this.isAlias = false; | |
82 this.referencedCodexTemplate = new CodexEditorTemplate(); | |
83 this.refreshBindingList(); | |
84 } | |
85 | |
86 public void listenerRefreshBindingList(ActionEvent event){ | |
87 this.refreshBindingList(); | |
88 } | |
89 | |
90 public void listenerEditCalendarOwnedBy(ActionEvent event){ | |
91 Entity entity = (Entity)getRequestBean("item"); | |
92 if(entity != null){ | |
93 Calendar cal = this.ownedByPeople.getCalendar(entity.getId()); | |
94 getSessionBean().editCalendar(cal, ownedByPeople, entity.getId()); | |
95 } | |
96 } | |
97 | |
98 public void listenerEditCalendarReadBy(ActionEvent event){ | |
99 Entity entity = (Entity)getRequestBean("item"); | |
100 if(entity != null){ | |
101 Calendar cal = this.readByPeople.getCalendar(entity.getId()); | |
102 getSessionBean().editCalendar(cal, readByPeople, entity.getId()); | |
103 } | |
104 } | |
105 | |
106 private void refreshBindingList(){ | |
107 this.suggestedBindingList = new ArrayList<SelectItem>(); | |
108 suggestedBindingList.add(new SelectItem("", "--choose--")); | |
109 Attribute binding = getWrapper().getDefAttributeByOwnValue(this.entity.getObjectClass(), "binding"); | |
110 if(binding != null){ | |
111 for(String s : binding.getPossibleValuesList()){ | |
112 this.suggestedBindingList.add(new SelectItem(s)); | |
113 } | |
114 } | |
115 } | |
116 | |
117 public String createCollectionAction() { | |
118 getSessionBean().setSelectedTab(SessionBean.COLLECTION_TAB); | |
119 return "edit"; | |
120 } | |
121 | |
122 @Override | |
123 public void setEntity(Entity codex) { | |
124 this.reset(); | |
125 this.entity = codex; | |
126 logger.info("Set Codex " + this.entity); | |
127 try { | |
128 if(this.entity != null && this.entity.isPersistent()){ | |
129 if(this.entity.isLightweight()){ | |
130 this.entity = getWrapper().getEntityContent(this.entity); | |
131 } | |
132 | |
133 this.loadAttributes(this.entity); | |
134 | |
135 Attribute isAliasAtt = getWrapper().getAttributeByName(this.entity.getId(), "is_alias"); | |
136 if(isAlias != null){ | |
137 try{ | |
138 this.isAlias = new Boolean(isAliasAtt.getOwnValue()); | |
139 }catch(Exception ex){ | |
140 this.isAlias = false; | |
141 } | |
142 }else{ | |
143 this.isAlias = false; | |
144 } | |
145 | |
161
8049becb05ca
New ALIAS is_alias_identifier_of CODEX/WITNESS for diverse catalog numbers.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
136
diff
changeset
|
146 for(Relation rel : getWrapper().getTargetRelations(codex, 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:
136
diff
changeset
|
147 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:
136
diff
changeset
|
148 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:
136
diff
changeset
|
149 } |
8049becb05ca
New ALIAS is_alias_identifier_of CODEX/WITNESS for diverse catalog numbers.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
136
diff
changeset
|
150 |
1 | 151 for(Relation rel : getWrapper().getSourceRelations(codex, owned_by, PERSON, -1)) { |
152 this.ownedByPeople.add(getWrapper().getEntityById(rel.getTargetId()), rel.getAttributeByName("date")); | |
153 } | |
154 | |
155 for(Relation rel : getWrapper().getSourceRelations(codex, "read_by", PERSON, -1)) { | |
156 this.readByPeople.add(getWrapper().getEntityById(rel.getTargetId()), rel.getAttributeByName("date")); | |
157 } | |
158 | |
159 for (Entity target : getWrapper() | |
160 .getTargetsForSourceRelation(codex, is_part_of, COLLECTION, 1)) { | |
161 String ct = target.getObjectClass(); | |
162 | |
163 if (ct.equals(COLLECTION)) { | |
164 this.setCollection(target); | |
165 } | |
166 } | |
167 | |
168 List<Entity> list = getWrapper().getTargetsForSourceRelation(codex, "is_alias_of", CODEX, 1); | |
169 if(!list.isEmpty()){ | |
170 this.setReferencedCodex(list.get(0)); | |
171 //this.referencedCodexTemplate.setCodexLo(codexLo); | |
172 //this.referencedCodexLO.setEntityAndAttribute(list.get(0), "identifier"); | |
173 } | |
174 | |
175 | |
176 //this.loadReferences(this.entity); | |
177 this.loadEndNoteRefs(); | |
178 | |
179 this.setCurrentId(this.entity.getId().toString()); | |
180 this.checkConsistencyFromCountryToCodex(); | |
181 } | |
182 } catch (Exception e) { | |
183 logger.info(e.getMessage(), e); | |
184 printInternalError(e); | |
185 } | |
186 } | |
187 | |
188 public void setReferencedCodex(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:
91
diff
changeset
|
189 this.referencedCodexTemplate.getCodexLo().setEntityAndAttributeName(codex, "identifier"); |
1 | 190 |
191 if(this.referencedCodexTemplate.getCodexLo().entity != null && | |
192 this.referencedCodexTemplate.getCodexLo().entity.isPersistent()){ | |
193 | |
194 List<Entity> list = getWrapper().getTargetsForSourceRelation(codex, is_part_of, COLLECTION, 1); | |
195 if(list.size() > 0){ | |
196 this.referencedCodexTemplate.setCollection(list.get(0)); | |
197 } | |
198 } | |
199 } | |
200 | |
201 @Override | |
202 public String save() { | |
203 super.save(); | |
204 try { | |
205 CheckResults cr = getCheckResults(); | |
206 if (cr.hasErrors) { | |
207 getSessionBean().setErrorMessages(cr); | |
208 getSessionBean().setDisplayError(true); | |
209 this.setSelectedSaveAsNew(false); | |
210 return PAGE_EDITOR; | |
211 } | |
212 | |
213 if (this.entity == null) { | |
214 this.entity = new Entity(); | |
215 this.entity.setObjectClass("CODEX"); | |
216 } | |
217 | |
218 this.entity = this.updateEntityAttributes(this.entity); | |
219 | |
220 if(this.entity.getAttributeByName("is_alias") != null){ | |
221 this.entity.getAttributeByName("is_alias").setOwnValue(this.isAlias.toString()); | |
222 }else{ | |
223 this.entity.addAttribute(new Attribute("is_alias", "boolean", this.isAlias.toString())); | |
224 } | |
225 | |
226 if(this.isAlias){ | |
227 if(referencedCodexTemplate.getCodexLo().entity != null){ | |
228 // CODEX -> is_part_of -> CODEX | |
134
25bfcc9d757c
effort to re-use more relations when saving entities.
casties
parents:
125
diff
changeset
|
229 this.entity.replaceUniqueSourceRelation(referencedCodexTemplate.getCodexLo().entity, CODEX, "is_alias_of"); |
1 | 230 }else{ |
231 this.entity.removeAllSourceRelations("is_alias_of", CODEX); | |
232 } | |
233 } | |
234 | |
235 //checking is the identifier is unique for the selected collecion | |
236 String identifier = (this.entity.getAttributeByName("identifier") != null) ? this.entity.getAttributeByName("identifier").getValue() : ""; | |
237 if(StringUtils.isNotEmpty(identifier)){ | |
238 if(!checkUnityCodex(identifier, (isSelectedSaveAsNew()) ? null : this.entity.getId(), this.getCollectionLo().entity)){ | |
239 this.renderUnityCheckerDialog(); | |
240 this.setSelectedSaveAsNew(false); | |
241 return PAGE_EDITOR; | |
242 } | |
243 }else{ | |
244 this.addErrorMsg("This entity has not been saved, because its identifier was empty."); | |
245 this.addErrorMsg("You must enter an identifier."); | |
246 return PAGE_EDITOR; | |
247 } | |
248 | |
249 if(!isCodexConsistentBeforeSave()){ | |
250 return PAGE_EDITOR; | |
251 } | |
252 | |
134
25bfcc9d757c
effort to re-use more relations when saving entities.
casties
parents:
125
diff
changeset
|
253 this.entity.replaceUniqueSourceRelation(this.getCollectionLo().entity, COLLECTION, is_part_of); |
1 | 254 |
161
8049becb05ca
New ALIAS is_alias_identifier_of CODEX/WITNESS for diverse catalog numbers.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
136
diff
changeset
|
255 // 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:
136
diff
changeset
|
256 replaceMultipleTargetRelations(entity, aliasIdList.getEntities(), ALIAS, is_alias_identifier_of); |
8049becb05ca
New ALIAS is_alias_identifier_of CODEX/WITNESS for diverse catalog numbers.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
136
diff
changeset
|
257 |
134
25bfcc9d757c
effort to re-use more relations when saving entities.
casties
parents:
125
diff
changeset
|
258 // CODEX -> owned_by -> PERSON |
25bfcc9d757c
effort to re-use more relations when saving entities.
casties
parents:
125
diff
changeset
|
259 replaceMultipleSourceRelations(entity, ownedByPeople.getEntities(), PERSON, owned_by); |
161
8049becb05ca
New ALIAS is_alias_identifier_of CODEX/WITNESS for diverse catalog numbers.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
136
diff
changeset
|
260 |
134
25bfcc9d757c
effort to re-use more relations when saving entities.
casties
parents:
125
diff
changeset
|
261 // CODEX -> read_by -> PERSON |
25bfcc9d757c
effort to re-use more relations when saving entities.
casties
parents:
125
diff
changeset
|
262 replaceMultipleSourceRelations(entity, readByPeople.getEntities(), PERSON, "read_by"); |
1 | 263 |
134
25bfcc9d757c
effort to re-use more relations when saving entities.
casties
parents:
125
diff
changeset
|
264 /* TODO: currently ignoring date on relations |
161
8049becb05ca
New ALIAS is_alias_identifier_of CODEX/WITNESS for diverse catalog numbers.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
136
diff
changeset
|
265 // CODEX -> owner_by (manyToMany) -> PERSON |
8049becb05ca
New ALIAS is_alias_identifier_of CODEX/WITNESS for diverse catalog numbers.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
136
diff
changeset
|
266 this.entity.removeAllSourceRelationsByName(owned_by); |
8049becb05ca
New ALIAS is_alias_identifier_of CODEX/WITNESS for diverse catalog numbers.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
136
diff
changeset
|
267 |
8049becb05ca
New ALIAS is_alias_identifier_of CODEX/WITNESS for diverse catalog numbers.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
136
diff
changeset
|
268 // CODEX -> read_by (manyToMany) -> PERSON |
8049becb05ca
New ALIAS is_alias_identifier_of CODEX/WITNESS for diverse catalog numbers.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
136
diff
changeset
|
269 this.entity.removeAllSourceRelationsByName("read_by"); |
8049becb05ca
New ALIAS is_alias_identifier_of CODEX/WITNESS for diverse catalog numbers.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
136
diff
changeset
|
270 |
134
25bfcc9d757c
effort to re-use more relations when saving entities.
casties
parents:
125
diff
changeset
|
271 for (Entity owner : this.ownedByPeople.getEntities()) { |
25bfcc9d757c
effort to re-use more relations when saving entities.
casties
parents:
125
diff
changeset
|
272 if (owner.isLightweight()) { |
25bfcc9d757c
effort to re-use more relations when saving entities.
casties
parents:
125
diff
changeset
|
273 owner = getWrapper().getEntityByIdWithContent(owner.getId()); |
25bfcc9d757c
effort to re-use more relations when saving entities.
casties
parents:
125
diff
changeset
|
274 } |
25bfcc9d757c
effort to re-use more relations when saving entities.
casties
parents:
125
diff
changeset
|
275 Relation ownerBy = new Relation(this.entity, owner, owned_by); |
25bfcc9d757c
effort to re-use more relations when saving entities.
casties
parents:
125
diff
changeset
|
276 Calendar cal = ownedByPeople.getCalendar(owner.getId()); |
25bfcc9d757c
effort to re-use more relations when saving entities.
casties
parents:
125
diff
changeset
|
277 if (cal != null) { |
25bfcc9d757c
effort to re-use more relations when saving entities.
casties
parents:
125
diff
changeset
|
278 ownerBy.addAttribute(new Attribute("date", "date", cal.toJSONString())); |
1 | 279 } |
134
25bfcc9d757c
effort to re-use more relations when saving entities.
casties
parents:
125
diff
changeset
|
280 } |
25bfcc9d757c
effort to re-use more relations when saving entities.
casties
parents:
125
diff
changeset
|
281 for (Entity reader : this.readByPeople.getEntities()) { |
25bfcc9d757c
effort to re-use more relations when saving entities.
casties
parents:
125
diff
changeset
|
282 Relation readBy = new Relation(this.entity, reader, "read_by"); |
25bfcc9d757c
effort to re-use more relations when saving entities.
casties
parents:
125
diff
changeset
|
283 Calendar cal = readByPeople.getCalendar(reader.getId()); |
25bfcc9d757c
effort to re-use more relations when saving entities.
casties
parents:
125
diff
changeset
|
284 if (cal != null) { |
25bfcc9d757c
effort to re-use more relations when saving entities.
casties
parents:
125
diff
changeset
|
285 readBy.addAttribute(new Attribute("date", "date", cal.toJSONString())); |
1 | 286 } |
134
25bfcc9d757c
effort to re-use more relations when saving entities.
casties
parents:
125
diff
changeset
|
287 } |
25bfcc9d757c
effort to re-use more relations when saving entities.
casties
parents:
125
diff
changeset
|
288 */ |
125 | 289 |
161
8049becb05ca
New ALIAS is_alias_identifier_of CODEX/WITNESS for diverse catalog numbers.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
136
diff
changeset
|
290 //REFERENCE -> is_reference_of -> THIS |
8049becb05ca
New ALIAS is_alias_identifier_of CODEX/WITNESS for diverse catalog numbers.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
136
diff
changeset
|
291 //this.entity = this.prepareReferencesToSave(this.entity); |
8049becb05ca
New ALIAS is_alias_identifier_of CODEX/WITNESS for diverse catalog numbers.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
136
diff
changeset
|
292 this.saveReferences(); |
8049becb05ca
New ALIAS is_alias_identifier_of CODEX/WITNESS for diverse catalog numbers.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
136
diff
changeset
|
293 |
8049becb05ca
New ALIAS is_alias_identifier_of CODEX/WITNESS for diverse catalog numbers.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
136
diff
changeset
|
294 |
134
25bfcc9d757c
effort to re-use more relations when saving entities.
casties
parents:
125
diff
changeset
|
295 // save this entity |
25bfcc9d757c
effort to re-use more relations when saving entities.
casties
parents:
125
diff
changeset
|
296 this.entity = getWrapper().saveEntity(this.entity, getSessionUser().getEmail(), editCodexIntent); |
25bfcc9d757c
effort to re-use more relations when saving entities.
casties
parents:
125
diff
changeset
|
297 |
25bfcc9d757c
effort to re-use more relations when saving entities.
casties
parents:
125
diff
changeset
|
298 // update own value of related objects (codex name in many names) |
91 | 299 this.updateRelatedOW(this.entity, getSessionUser().getEmail()); |
134
25bfcc9d757c
effort to re-use more relations when saving entities.
casties
parents:
125
diff
changeset
|
300 |
1 | 301 getSessionBean().setEditFormCurrentEntId(this.entity.getId()); |
302 | |
303 logger.info("Entity saved - Time = " + (System.currentTimeMillis() - start) + ", " + entity); | |
304 this.printSuccessSavingEntity(); | |
305 | |
306 this.setSelectedSaveAsNew(false); | |
307 | |
308 } catch (Exception e) { | |
309 logger.error(e.getMessage(), e); | |
310 e.printStackTrace(); | |
311 this.printInternalError(e); | |
312 } | |
313 | |
314 saveEnd(); | |
315 return PAGE_EDITOR; | |
316 } | |
317 | |
318 public String saveAsNewEntity() { | |
319 this.setSelectedSaveAsNew(true); | |
320 return save(); | |
321 } | |
322 | |
323 public void setLWCodex(Entity codex) { | |
324 this.entity = codex; | |
325 } | |
326 | |
327 public void actionShowWitnessDialog(ActionEvent event){ | |
328 if(this.witnessInCurrentCodex.size() == 0 && this.entity.isPersistent()){ | |
329 this.witnessInCurrentCodex = | |
330 getWrapper().getSourcesForTargetRelation(this.entity, "is_part_of", "WITNESS", 50); | |
331 } | |
332 this.setShowWitnessInCurrentCodex(true); | |
333 } | |
334 | |
335 public void actionCloseWitnessDialog(ActionEvent event){ | |
336 this.setShowWitnessInCurrentCodex(false); | |
337 } | |
338 | |
339 public void actionEditThisWitness(ActionEvent event){ | |
340 this.setShowWitnessInCurrentCodex(false); | |
341 Entity currentWitness = (Entity)getRequestBean("witness"); | |
342 if(currentWitness != null && currentWitness.isPersistent()){ | |
343 getSessionBean().editEntity(currentWitness); | |
344 } | |
345 } | |
346 | |
347 public List<Entity> getWitnessInCurrentCodex() { | |
348 return witnessInCurrentCodex; | |
349 } | |
350 | |
351 public void setWitnessInCurrentCodex(List<Entity> witnessInCurrentCodex) { | |
352 this.witnessInCurrentCodex = witnessInCurrentCodex; | |
353 } | |
354 | |
355 public boolean isShowWitnessInCurrentCodex() { | |
356 if(this.entity == null || !this.entity.isPersistent()){ | |
357 return false; | |
358 } | |
359 return showWitnessInCurrentCodex; | |
360 } | |
361 | |
362 public void setShowWitnessInCurrentCodex(boolean showWitnessInCurrentCodex) { | |
363 this.showWitnessInCurrentCodex = showWitnessInCurrentCodex; | |
364 } | |
365 | |
366 public void actionEditThisCollection(ActionEvent event){ | |
367 if(this.getCollectionLo().entity != null && getCollectionLo().entity.isPersistent()){ | |
368 getSessionBean().editEntity(this.getCollectionLo().entity); | |
369 } | |
370 } | |
371 | |
161
8049becb05ca
New ALIAS is_alias_identifier_of CODEX/WITNESS for diverse catalog numbers.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
136
diff
changeset
|
372 /** |
8049becb05ca
New ALIAS is_alias_identifier_of CODEX/WITNESS for diverse catalog numbers.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
136
diff
changeset
|
373 * @return the aliasIdList |
8049becb05ca
New ALIAS is_alias_identifier_of CODEX/WITNESS for diverse catalog numbers.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
136
diff
changeset
|
374 */ |
8049becb05ca
New ALIAS is_alias_identifier_of CODEX/WITNESS for diverse catalog numbers.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
136
diff
changeset
|
375 public EntityList getAliasIdList() { |
8049becb05ca
New ALIAS is_alias_identifier_of CODEX/WITNESS for diverse catalog numbers.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
136
diff
changeset
|
376 return aliasIdList; |
8049becb05ca
New ALIAS is_alias_identifier_of CODEX/WITNESS for diverse catalog numbers.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
136
diff
changeset
|
377 } |
8049becb05ca
New ALIAS is_alias_identifier_of CODEX/WITNESS for diverse catalog numbers.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
136
diff
changeset
|
378 |
8049becb05ca
New ALIAS is_alias_identifier_of CODEX/WITNESS for diverse catalog numbers.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
136
diff
changeset
|
379 /** |
8049becb05ca
New ALIAS is_alias_identifier_of CODEX/WITNESS for diverse catalog numbers.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
136
diff
changeset
|
380 * @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:
136
diff
changeset
|
381 */ |
8049becb05ca
New ALIAS is_alias_identifier_of CODEX/WITNESS for diverse catalog numbers.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
136
diff
changeset
|
382 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:
136
diff
changeset
|
383 this.aliasIdList = aliasIdList; |
8049becb05ca
New ALIAS is_alias_identifier_of CODEX/WITNESS for diverse catalog numbers.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
136
diff
changeset
|
384 } |
8049becb05ca
New ALIAS is_alias_identifier_of CODEX/WITNESS for diverse catalog numbers.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
136
diff
changeset
|
385 |
8049becb05ca
New ALIAS is_alias_identifier_of CODEX/WITNESS for diverse catalog numbers.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
136
diff
changeset
|
386 public EntityList getOwnedByPeople() { |
1 | 387 return ownedByPeople; |
388 } | |
389 | |
390 public void setOwnedByPeople(EntityList ownedByPeople) { | |
391 this.ownedByPeople = ownedByPeople; | |
392 } | |
393 | |
394 public List<SelectItem> getSuggestedBindingList() { | |
395 return suggestedBindingList; | |
396 } | |
397 | |
398 public void setSuggestedBindingList(List<SelectItem> suggestedBindingList) { | |
399 this.suggestedBindingList = suggestedBindingList; | |
400 } | |
401 | |
402 public CodexEditorTemplate getReferencedCodexTemplate() { | |
403 return referencedCodexTemplate; | |
404 } | |
405 | |
406 public void setReferencedCodexTemplate( | |
407 CodexEditorTemplate referencedCodexTemplate) { | |
408 this.referencedCodexTemplate = referencedCodexTemplate; | |
409 } | |
410 | |
411 public Boolean getIsAlias() { | |
412 return isAlias; | |
413 } | |
414 | |
415 public void setIsAlias(Boolean isAlias) { | |
416 this.isAlias = isAlias; | |
417 } | |
418 | |
419 public EntityList getReadByPeople() { | |
420 return readByPeople; | |
421 } | |
422 | |
423 public void setReadByPeople(EntityList readByPeople) { | |
424 this.readByPeople = readByPeople; | |
425 } | |
426 | |
427 } |