annotate src/main/java/de/mpiwg/itgroup/ismi/entry/beans/CurrentPersonBean.java @ 125:eee2e0ca4032

updated entry beans to use EditIntents.
author casties
date Tue, 31 Jan 2017 18:09:54 +0100
parents 28a0c2726466
children 29d40186dfd7
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
jurzua
parents:
diff changeset
1 package de.mpiwg.itgroup.ismi.entry.beans;
jurzua
parents:
diff changeset
2
jurzua
parents:
diff changeset
3 import java.io.Serializable;
jurzua
parents:
diff changeset
4 import java.util.HashMap;
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
5 import java.util.List;
1
jurzua
parents:
diff changeset
6 import java.util.Map;
jurzua
parents:
diff changeset
7
jurzua
parents:
diff changeset
8 import javax.faces.convert.Converter;
jurzua
parents:
diff changeset
9 import javax.faces.event.ActionEvent;
jurzua
parents:
diff changeset
10 import javax.faces.event.AjaxBehaviorEvent;
jurzua
parents:
diff changeset
11 import javax.faces.event.ValueChangeEvent;
jurzua
parents:
diff changeset
12
jurzua
parents:
diff changeset
13 import org.apache.log4j.Logger;
jurzua
parents:
diff changeset
14 import org.mpi.openmind.repository.bo.Attribute;
jurzua
parents:
diff changeset
15 import org.mpi.openmind.repository.bo.Entity;
jurzua
parents:
diff changeset
16 import org.mpi.openmind.repository.bo.Node;
jurzua
parents:
diff changeset
17 import org.mpi.openmind.repository.bo.Relation;
124
28a0c2726466 changed saveEntity() to use new EditIntent. Set up EditIntent for TEXT, PERSON, REFERENCE.
casties
parents: 119
diff changeset
18 import org.mpi.openmind.repository.services.utils.EditIntent;
1
jurzua
parents:
diff changeset
19 import org.mpi.openmind.repository.utils.RomanizationLoC;
jurzua
parents:
diff changeset
20 import org.mpi.openmind.repository.utils.TransliterationUtil;
jurzua
parents:
diff changeset
21
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
22 import de.mpiwg.itgroup.ismi.auxObjects.AliasListenerObject;
1
jurzua
parents:
diff changeset
23 /* rich
jurzua
parents:
diff changeset
24 import com.icesoft.faces.async.render.SessionRenderer;
jurzua
parents:
diff changeset
25 import com.icesoft.faces.component.ext.HtmlCommandButton;
jurzua
parents:
diff changeset
26 import com.icesoft.faces.component.ext.HtmlInputHidden;
jurzua
parents:
diff changeset
27 */
jurzua
parents:
diff changeset
28 import de.mpiwg.itgroup.ismi.auxObjects.ListenerObject;
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
29 import de.mpiwg.itgroup.ismi.util.guiComponents.AliasEntityList;
1
jurzua
parents:
diff changeset
30 import de.mpiwg.itgroup.ismi.util.guiComponents.Calendar;
jurzua
parents:
diff changeset
31 import de.mpiwg.itgroup.ismi.util.guiComponents.EntityList;
jurzua
parents:
diff changeset
32
jurzua
parents:
diff changeset
33 public class CurrentPersonBean extends AbstractISMIBean implements Serializable{
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
34 private static final long serialVersionUID = -3366510497089165294L;
1
jurzua
parents:
diff changeset
35
jurzua
parents:
diff changeset
36 private static Logger logger = Logger.getLogger(CurrentPersonBean.class);
jurzua
parents:
diff changeset
37
jurzua
parents:
diff changeset
38 //private Entity person;
jurzua
parents:
diff changeset
39 private String newAlias;
jurzua
parents:
diff changeset
40
jurzua
parents:
diff changeset
41 private String romanizedNameTranslit;
jurzua
parents:
diff changeset
42
jurzua
parents:
diff changeset
43 public static String birth_date = "birth_date";
jurzua
parents:
diff changeset
44 public static String death_date = "death_date";
jurzua
parents:
diff changeset
45
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
46 private AliasListenerObject birthPlaceLo = new AliasListenerObject(PLACE, name, "is_alias_name_of");
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
47 private AliasListenerObject deathPlaceLo = new AliasListenerObject(PLACE, name, "is_alias_name_of");
1
jurzua
parents:
diff changeset
48
jurzua
parents:
diff changeset
49 private String valueShortName;
jurzua
parents:
diff changeset
50 private Entity shortNameAlias; // is now an alias of type "prime"
jurzua
parents:
diff changeset
51
jurzua
parents:
diff changeset
52 private transient Calendar calBirthDate;
jurzua
parents:
diff changeset
53 private transient Calendar calDeathDate;
jurzua
parents:
diff changeset
54
jurzua
parents:
diff changeset
55 private Map<String, Boolean> deletedAliases = new HashMap<String, Boolean>();
jurzua
parents:
diff changeset
56
jurzua
parents:
diff changeset
57 private EntityList livedInPlaces;
jurzua
parents:
diff changeset
58 private EntityList aliasList;
jurzua
parents:
diff changeset
59 private EntityList roleList;
jurzua
parents:
diff changeset
60 private EntityList studentOfList;
jurzua
parents:
diff changeset
61 private EntityList floruitList;
124
28a0c2726466 changed saveEntity() to use new EditIntent. Set up EditIntent for TEXT, PERSON, REFERENCE.
casties
parents: 119
diff changeset
62
28a0c2726466 changed saveEntity() to use new EditIntent. Set up EditIntent for TEXT, PERSON, REFERENCE.
casties
parents: 119
diff changeset
63 /** intent to edit all attributes and relations in the form */
28a0c2726466 changed saveEntity() to use new EditIntent. Set up EditIntent for TEXT, PERSON, REFERENCE.
casties
parents: 119
diff changeset
64 public static EditIntent editPersonIntent = new EditIntent(
28a0c2726466 changed saveEntity() to use new EditIntent. Set up EditIntent for TEXT, PERSON, REFERENCE.
casties
parents: 119
diff changeset
65 PERSON,
28a0c2726466 changed saveEntity() to use new EditIntent. Set up EditIntent for TEXT, PERSON, REFERENCE.
casties
parents: 119
diff changeset
66 // attributes
28a0c2726466 changed saveEntity() to use new EditIntent. Set up EditIntent for TEXT, PERSON, REFERENCE.
casties
parents: 119
diff changeset
67 new String[]{"name", "name_translit", "birth_date", "birth_date_text", "death_date", "death_date_text",
28a0c2726466 changed saveEntity() to use new EditIntent. Set up EditIntent for TEXT, PERSON, REFERENCE.
casties
parents: 119
diff changeset
68 "url", "authority_id", "notes", "notes_old"},
28a0c2726466 changed saveEntity() to use new EditIntent. Set up EditIntent for TEXT, PERSON, REFERENCE.
casties
parents: 119
diff changeset
69 // source relations
28a0c2726466 changed saveEntity() to use new EditIntent. Set up EditIntent for TEXT, PERSON, REFERENCE.
casties
parents: 119
diff changeset
70 new String[]{"was_born_in", "was_born_in_as", "died_in", "died_in_as", "lived_in", "lived_in_as",
28a0c2726466 changed saveEntity() to use new EditIntent. Set up EditIntent for TEXT, PERSON, REFERENCE.
casties
parents: 119
diff changeset
71 "was_student_of", "has_floruit_date", "has_role"},
28a0c2726466 changed saveEntity() to use new EditIntent. Set up EditIntent for TEXT, PERSON, REFERENCE.
casties
parents: 119
diff changeset
72 // target relations
28a0c2726466 changed saveEntity() to use new EditIntent. Set up EditIntent for TEXT, PERSON, REFERENCE.
casties
parents: 119
diff changeset
73 new String[]{"is_prime_alias_name_of", "is_alias_name_of", "is_reference_of"});
28a0c2726466 changed saveEntity() to use new EditIntent. Set up EditIntent for TEXT, PERSON, REFERENCE.
casties
parents: 119
diff changeset
74
1
jurzua
parents:
diff changeset
75
jurzua
parents:
diff changeset
76 @Override
jurzua
parents:
diff changeset
77 public void reset(){
jurzua
parents:
diff changeset
78 super.reset();
jurzua
parents:
diff changeset
79 this.entity = new Entity(Node.TYPE_ABOX, PERSON, false);
jurzua
parents:
diff changeset
80
jurzua
parents:
diff changeset
81 this.newAlias = new String();
jurzua
parents:
diff changeset
82
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
83 this.livedInPlaces = new AliasEntityList(PLACE, name, "is_alias_name_of", true);
1
jurzua
parents:
diff changeset
84 this.aliasList = new EntityList(ALIAS, "alias", getWrapper(), getUserName());
jurzua
parents:
diff changeset
85 this.roleList = new EntityList(ROLE, "name", getWrapper(), getUserName());
jurzua
parents:
diff changeset
86 this.studentOfList = new EntityList(PERSON, "name_translit", "Student of");
jurzua
parents:
diff changeset
87 this.floruitList = new EntityList(FLORUIT_DATE, "date", getWrapper(), getUserName(), true);
jurzua
parents:
diff changeset
88
jurzua
parents:
diff changeset
89 this.valueShortName = "";
jurzua
parents:
diff changeset
90 this.shortNameAlias = null;
jurzua
parents:
diff changeset
91
jurzua
parents:
diff changeset
92 this.birthPlaceLo.reset();
jurzua
parents:
diff changeset
93
jurzua
parents:
diff changeset
94 this.deathPlaceLo.reset();
jurzua
parents:
diff changeset
95
jurzua
parents:
diff changeset
96 this.deletedAliases = new HashMap<String, Boolean>();
jurzua
parents:
diff changeset
97
jurzua
parents:
diff changeset
98 this.calBirthDate = new Calendar();
jurzua
parents:
diff changeset
99 this.calDeathDate = new Calendar();
jurzua
parents:
diff changeset
100
jurzua
parents:
diff changeset
101 }
jurzua
parents:
diff changeset
102
jurzua
parents:
diff changeset
103 public EntityList getRoleList() {
jurzua
parents:
diff changeset
104 return roleList;
jurzua
parents:
diff changeset
105 }
jurzua
parents:
diff changeset
106
jurzua
parents:
diff changeset
107 public void setRoleList(EntityList roleList) {
jurzua
parents:
diff changeset
108 this.roleList = roleList;
jurzua
parents:
diff changeset
109 }
jurzua
parents:
diff changeset
110
jurzua
parents:
diff changeset
111 public EntityList getAliasList() {
jurzua
parents:
diff changeset
112 return aliasList;
jurzua
parents:
diff changeset
113 }
jurzua
parents:
diff changeset
114
jurzua
parents:
diff changeset
115 public void setAliasList(EntityList aliasList) {
jurzua
parents:
diff changeset
116 this.aliasList = aliasList;
jurzua
parents:
diff changeset
117 }
jurzua
parents:
diff changeset
118
jurzua
parents:
diff changeset
119 public CurrentPersonBean() {
jurzua
parents:
diff changeset
120 this.reset();
jurzua
parents:
diff changeset
121 setDefObjectClass(PERSON);
jurzua
parents:
diff changeset
122 registerChecker(birthPlaceLo, "Birth place not valid!");
jurzua
parents:
diff changeset
123 registerChecker(deathPlaceLo, "Death place not valid!");
jurzua
parents:
diff changeset
124 }
jurzua
parents:
diff changeset
125
jurzua
parents:
diff changeset
126 /**
jurzua
parents:
diff changeset
127 *
jurzua
parents:
diff changeset
128 * @param event
jurzua
parents:
diff changeset
129 */
jurzua
parents:
diff changeset
130 public void shortNameChangeListener(ValueChangeEvent event) {
jurzua
parents:
diff changeset
131 try {
jurzua
parents:
diff changeset
132 if (event.getNewValue() == null) {
jurzua
parents:
diff changeset
133 return;
jurzua
parents:
diff changeset
134 }
jurzua
parents:
diff changeset
135 if (event.getNewValue().equals(event.getOldValue())) {
jurzua
parents:
diff changeset
136 return;
jurzua
parents:
diff changeset
137 }
jurzua
parents:
diff changeset
138
jurzua
parents:
diff changeset
139 String newShortName = (String) event.getNewValue();
jurzua
parents:
diff changeset
140
jurzua
parents:
diff changeset
141 if (shortNameAlias == null) {
jurzua
parents:
diff changeset
142 shortNameAlias = new Entity(org.mpi.openmind.repository.bo.Node.TYPE_ABOX, ALIAS, false);
jurzua
parents:
diff changeset
143
jurzua
parents:
diff changeset
144 }
jurzua
parents:
diff changeset
145
jurzua
parents:
diff changeset
146 Attribute attr = this.shortNameAlias.getAttributeByName(alias);
jurzua
parents:
diff changeset
147 if (attr == null) {
jurzua
parents:
diff changeset
148 this.shortNameAlias.addAttribute(new Attribute(alias, TEXT,
jurzua
parents:
diff changeset
149 newShortName));
jurzua
parents:
diff changeset
150 } else
jurzua
parents:
diff changeset
151 attr.setValue(newShortName);
jurzua
parents:
diff changeset
152
jurzua
parents:
diff changeset
153 } catch (Exception e) {
jurzua
parents:
diff changeset
154 e.printStackTrace();
jurzua
parents:
diff changeset
155 }
jurzua
parents:
diff changeset
156 }
jurzua
parents:
diff changeset
157
jurzua
parents:
diff changeset
158 public String translitNameAction() {
jurzua
parents:
diff changeset
159 String pn = getAttributes().get(name);
jurzua
parents:
diff changeset
160
jurzua
parents:
diff changeset
161 String translit = TransliterationUtil.getTransliteration(pn);
jurzua
parents:
diff changeset
162 this.getAttributes().put(name_translit, translit);
jurzua
parents:
diff changeset
163
jurzua
parents:
diff changeset
164 return PAGE_EDITOR;
jurzua
parents:
diff changeset
165 }
jurzua
parents:
diff changeset
166
jurzua
parents:
diff changeset
167 public Calendar getCalBirthDate() {
jurzua
parents:
diff changeset
168 return calBirthDate;
jurzua
parents:
diff changeset
169 }
jurzua
parents:
diff changeset
170
jurzua
parents:
diff changeset
171 public void setCalBirthDate(Calendar calBirthDate) {
jurzua
parents:
diff changeset
172 this.calBirthDate = calBirthDate;
jurzua
parents:
diff changeset
173 }
jurzua
parents:
diff changeset
174
jurzua
parents:
diff changeset
175 public Calendar getCalDeathDate() {
jurzua
parents:
diff changeset
176 return calDeathDate;
jurzua
parents:
diff changeset
177 }
jurzua
parents:
diff changeset
178
jurzua
parents:
diff changeset
179 public void setCalDeathDate(Calendar calDeathDate) {
jurzua
parents:
diff changeset
180 this.calDeathDate = calDeathDate;
jurzua
parents:
diff changeset
181 }
jurzua
parents:
diff changeset
182
jurzua
parents:
diff changeset
183 @Override
jurzua
parents:
diff changeset
184 public void setEntity(Entity person) {
jurzua
parents:
diff changeset
185 this.reset();
jurzua
parents:
diff changeset
186
jurzua
parents:
diff changeset
187 this.entity = person;
jurzua
parents:
diff changeset
188
jurzua
parents:
diff changeset
189 if(this.entity != null && this.entity.isPersistent()){
jurzua
parents:
diff changeset
190 if (this.entity.isLightweight()) {
jurzua
parents:
diff changeset
191 this.entity = this.getWrapper().getEntityContent(person);
jurzua
parents:
diff changeset
192 }
jurzua
parents:
diff changeset
193
jurzua
parents:
diff changeset
194 this.calDeathDate = updateCalendar(this.entity.getAttributeByName(death_date));
jurzua
parents:
diff changeset
195 this.calBirthDate = updateCalendar(this.entity.getAttributeByName(birth_date));
jurzua
parents:
diff changeset
196
jurzua
parents:
diff changeset
197 this.setCurrentId(this.entity.getId().toString());
jurzua
parents:
diff changeset
198 this.loadAttributes(this.entity);
jurzua
parents:
diff changeset
199
jurzua
parents:
diff changeset
200 for (Relation rel : this.entity.getSourceRelations()) {
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
201 String relName = rel.getOwnValue();
1
jurzua
parents:
diff changeset
202 Entity target = getWrapper().getEntityById(rel.getTargetId());
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
203 if (relName.equals("was_born_in")) {
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
204 this.birthPlaceLo.setEntityAndAttributeIfEmpty(target);
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
205 } else if (relName.equals("was_born_in_as")) {
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
206 this.birthPlaceLo.setEntityAndAttribute(target);
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
207 } else if (relName.equals("died_in")) {
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
208 this.deathPlaceLo.setEntityAndAttributeIfEmpty(target);
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
209 } else if (relName.equals("died_in_as")) {
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
210 this.deathPlaceLo.setEntityAndAttribute(target);
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
211 } else if (relName.equals(lived_in)) {
1
jurzua
parents:
diff changeset
212 this.livedInPlaces.add(target, rel.getAttributeByName("date"));
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
213 } else if (relName.equals(lived_in_as)) {
59f26a5ef2b3 AliasListenerObject adds aliases to ListenerObject. Change all forms to enable ALIAS for (historical) PLACE fields. Remove REPOSITORY from event forms.
casties
parents: 111
diff changeset
214 this.livedInPlaces.add(target, rel.getAttributeByName("date"));
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
215 } else if (relName.equals(was_student_of)) {
1
jurzua
parents:
diff changeset
216 this.studentOfList.add(target);
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
217 } else if (relName.equals(has_role)) {
1
jurzua
parents:
diff changeset
218 this.roleList.add(target);
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
219 } else if (relName.equals("has_floruit_date")) {
1
jurzua
parents:
diff changeset
220 Attribute calAtt = getWrapper().getAttributeByName(target.getId(), "date");
jurzua
parents:
diff changeset
221 this.floruitList.add(target, calAtt);
jurzua
parents:
diff changeset
222 }
jurzua
parents:
diff changeset
223 }
jurzua
parents:
diff changeset
224
jurzua
parents:
diff changeset
225 for (Relation rel : this.entity.getTargetRelations()) {
jurzua
parents:
diff changeset
226 if (rel.getOwnValue().equals("was_created_by") && rel.getSourceObjectClass().equals(TEXT)) {
jurzua
parents:
diff changeset
227 //Entity title = getWrapper().getEntityById(rel.getSourceId());
jurzua
parents:
diff changeset
228 } else if (rel.getOwnValue().equals("is_alias_name_of")) {
jurzua
parents:
diff changeset
229 Entity alias = getWrapper().getEntityById(rel.getSourceId());
jurzua
parents:
diff changeset
230 this.aliasList.add(alias);
jurzua
parents:
diff changeset
231 } else if (rel.getOwnValue().equals("is_prime_alias_name_of")) {
jurzua
parents:
diff changeset
232 Entity alias = getWrapper().getEntityByIdWithContent(rel.getSourceId());
jurzua
parents:
diff changeset
233 this.shortNameAlias = alias;
jurzua
parents:
diff changeset
234 this.valueShortName = alias.getAttributeByName("alias").getValue();
jurzua
parents:
diff changeset
235 }
jurzua
parents:
diff changeset
236 }
jurzua
parents:
diff changeset
237
jurzua
parents:
diff changeset
238 //this.loadReferences(this.entity);
jurzua
parents:
diff changeset
239 this.loadEndNoteRefs();
jurzua
parents:
diff changeset
240 this.displayUrl = generateDisplayUrl(person, null, null, getAppBean().getRoot());
jurzua
parents:
diff changeset
241
jurzua
parents:
diff changeset
242 }
jurzua
parents:
diff changeset
243 }
jurzua
parents:
diff changeset
244
jurzua
parents:
diff changeset
245 /**
jurzua
parents:
diff changeset
246 * Saves the current Person. TODO save the target's relations.
jurzua
parents:
diff changeset
247 *
jurzua
parents:
diff changeset
248 * @return
jurzua
parents:
diff changeset
249 */
jurzua
parents:
diff changeset
250 @Override
jurzua
parents:
diff changeset
251 public String save() {
jurzua
parents:
diff changeset
252 super.save();
jurzua
parents:
diff changeset
253 try {
jurzua
parents:
diff changeset
254
jurzua
parents:
diff changeset
255 long start = System.currentTimeMillis();
jurzua
parents:
diff changeset
256
jurzua
parents:
diff changeset
257 CheckResults cr = getCheckResults();
jurzua
parents:
diff changeset
258 if (cr.hasErrors){
jurzua
parents:
diff changeset
259 getSessionBean().setErrorMessages(cr);
jurzua
parents:
diff changeset
260 getSessionBean().setDisplayError(true);
jurzua
parents:
diff changeset
261 return "SAVE_ERROR";
jurzua
parents:
diff changeset
262 }
jurzua
parents:
diff changeset
263
jurzua
parents:
diff changeset
264 getAttributes().put(birth_date, this.calBirthDate.toJSONString());
jurzua
parents:
diff changeset
265 getAttributes().put(death_date, this.calDeathDate.toJSONString());
jurzua
parents:
diff changeset
266
jurzua
parents:
diff changeset
267 this.entity = updateEntityAttributes(this.entity);
jurzua
parents:
diff changeset
268
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
269 // PERSON -> was_born_in -> PLACE
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
270 replaceAliasSourceRelation(this.entity, birthPlaceLo, PLACE, "was_born_in", "was_born_in_as");
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
271
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
272 // PERSON -> was_died_in -> PLACE
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
273 replaceAliasSourceRelation(this.entity, deathPlaceLo, PLACE, "died_in", "died_in_as");
1
jurzua
parents:
diff changeset
274
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
275 // ALIAS -> is_prime_alias_name_of -> PERSON
1
jurzua
parents:
diff changeset
276 this.entity.removeAllTargetRelationsByName(is_prime_alias_name_of);
jurzua
parents:
diff changeset
277 if (shortNameAlias != null) {
jurzua
parents:
diff changeset
278 shortNameAlias.setObjectClass(ALIAS);
124
28a0c2726466 changed saveEntity() to use new EditIntent. Set up EditIntent for TEXT, PERSON, REFERENCE.
casties
parents: 119
diff changeset
279 shortNameAlias = getWrapper().saveEntity(shortNameAlias, getSessionUser().getEmail(), null);
107
99f9a55a4957 add alias to place entry form.
casties
parents: 1
diff changeset
280 new Relation(shortNameAlias, this.entity, is_alias_name_of);
1
jurzua
parents:
diff changeset
281 }
jurzua
parents:
diff changeset
282
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
283 // ALIAS -> is_alias_name_of -> PERSON
1
jurzua
parents:
diff changeset
284 this.entity.removeAllTargetRelationsByName(is_alias_name_of);
jurzua
parents:
diff changeset
285 for(Entity alias : this.aliasList.getEntities()){
jurzua
parents:
diff changeset
286 Entity alias0 = getWrapper().getEntityByIdWithContent(alias.getId());
107
99f9a55a4957 add alias to place entry form.
casties
parents: 1
diff changeset
287 new Relation(alias0, this.entity, is_alias_name_of);
1
jurzua
parents:
diff changeset
288 }
jurzua
parents:
diff changeset
289
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
290 // PERSON -> lived_in -> PLACE (manyToMany)
1
jurzua
parents:
diff changeset
291 this.entity.removeAllSourceRelationsByName(lived_in);
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
292 this.entity.removeAllSourceRelationsByName(lived_in_as);
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
293 for(Entity place : this.livedInPlaces.getEntities()) {
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
294 Entity placeEnt = getWrapper().getEntityByIdWithContent(place.getId());
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
295 if (placeEnt.getObjectClass().equals(PLACE)) {
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
296 // PERSON -> lived_in -> PLACE
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
297 Relation livedIn = new Relation(this.entity, placeEnt, lived_in);
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
298 Calendar cal = livedInPlaces.getCalendar(place.getId());
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
299 if(cal != null){
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
300 livedIn.addAttribute(new Attribute("date", "date", cal.toJSONString()));
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
301 }
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
302 } else if (placeEnt.getObjectClass().equals(ALIAS)) {
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
303 // PERSON -> lived_in_as -> ALIAS
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
304 Relation livedInAs = new Relation(this.entity, placeEnt, lived_in_as);
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
305 Calendar cal = livedInPlaces.getCalendar(place.getId());
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
306 if (cal != null) {
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
307 livedInAs.addAttribute(new Attribute("date", "date", cal.toJSONString()));
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
308 }
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
309 // ALIAS -> is_alias_name_of -> PLACE
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
310 List<Entity> places = getWrapper().getTargetsForSourceRelation(placeEnt, is_alias_name_of, PLACE, 1);
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
311 if (! places.isEmpty()) {
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
312 // PERSON -> lived_in -> PLACE
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
313 Entity realPlace = places.get(0);
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
314 Relation livedIn = new Relation(this.entity, realPlace, lived_in);
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
315 if (cal != null) {
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
316 livedIn.addAttribute(new Attribute("date", "date", cal.toJSONString()));
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
317 }
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
318 }
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
319 }
1
jurzua
parents:
diff changeset
320 }
jurzua
parents:
diff changeset
321
jurzua
parents:
diff changeset
322 // Person -> has_floruit_date -> FLORUIT DATE
jurzua
parents:
diff changeset
323 this.entity.removeAllSourceRelationsByName(has_floruit_date);
jurzua
parents:
diff changeset
324 for(Entity floruitDate : this.floruitList.getEntities()){
jurzua
parents:
diff changeset
325 Entity floruitDate0 = getWrapper().getEntityByIdWithContent(floruitDate.getId());
jurzua
parents:
diff changeset
326 Calendar cal = floruitList.getCalendar(floruitDate.getId());
jurzua
parents:
diff changeset
327
jurzua
parents:
diff changeset
328 if(floruitDate0.getAttributeByName("date") == null){
jurzua
parents:
diff changeset
329 floruitDate0.addAttribute(new Attribute("date", "date", cal.toJSONString()));
jurzua
parents:
diff changeset
330 }else{
jurzua
parents:
diff changeset
331 floruitDate0.getAttributeByName("date").setValue(cal.toJSONString());
jurzua
parents:
diff changeset
332 }
jurzua
parents:
diff changeset
333 getWrapper().saveAssertion(floruitDate0, getUserName());
107
99f9a55a4957 add alias to place entry form.
casties
parents: 1
diff changeset
334 new Relation(this.entity, floruitDate0, has_floruit_date);
1
jurzua
parents:
diff changeset
335 }
jurzua
parents:
diff changeset
336
jurzua
parents:
diff changeset
337 //PERSON -> student of manyToMany -> PERSON
jurzua
parents:
diff changeset
338 this.entity.removeAllSourceRelationsByName(was_student_of);
jurzua
parents:
diff changeset
339 for(Entity teacher : this.studentOfList.getEntities()){
jurzua
parents:
diff changeset
340 Entity teacher0 = getWrapper().getEntityByIdWithContent(teacher.getId());
107
99f9a55a4957 add alias to place entry form.
casties
parents: 1
diff changeset
341 new Relation(this.entity, teacher0, was_student_of);
1
jurzua
parents:
diff changeset
342 }
jurzua
parents:
diff changeset
343
jurzua
parents:
diff changeset
344 //PERSON -> has_role -> ROLE
jurzua
parents:
diff changeset
345 this.entity.removeAllSourceRelationsByName(has_role);
jurzua
parents:
diff changeset
346 for(Entity role : this.roleList.getEntities()){
jurzua
parents:
diff changeset
347 Entity role0 = getWrapper().getEntityByIdWithContent(role.getId());
107
99f9a55a4957 add alias to place entry form.
casties
parents: 1
diff changeset
348 new Relation(this.entity, role0, has_role);
1
jurzua
parents:
diff changeset
349 }
jurzua
parents:
diff changeset
350
jurzua
parents:
diff changeset
351 //REFERENCE -> is_reference_of -> THIS
jurzua
parents:
diff changeset
352 this.prepareEndNoteRefs2Save();
jurzua
parents:
diff changeset
353
124
28a0c2726466 changed saveEntity() to use new EditIntent. Set up EditIntent for TEXT, PERSON, REFERENCE.
casties
parents: 119
diff changeset
354 // save entity
28a0c2726466 changed saveEntity() to use new EditIntent. Set up EditIntent for TEXT, PERSON, REFERENCE.
casties
parents: 119
diff changeset
355 this.entity = getWrapper().saveEntity(this.entity, getSessionUser().getEmail(), editPersonIntent);
1
jurzua
parents:
diff changeset
356 this.setEntity(this.entity);
jurzua
parents:
diff changeset
357 this.getCache().setMapDirty(true);
jurzua
parents:
diff changeset
358 this.getAppBean().getBiographyBean().makeDirty();
jurzua
parents:
diff changeset
359
jurzua
parents:
diff changeset
360 logger.info("Entity saved - Time = " + (System.currentTimeMillis() - start) + ", " + entity);
jurzua
parents:
diff changeset
361 this.printSuccessSavingEntity();
jurzua
parents:
diff changeset
362
jurzua
parents:
diff changeset
363 } catch (Exception e) {
jurzua
parents:
diff changeset
364 logger.error(e.getMessage(), e);
jurzua
parents:
diff changeset
365 e.printStackTrace();
jurzua
parents:
diff changeset
366 this.printInternalError(e);
jurzua
parents:
diff changeset
367 }
jurzua
parents:
diff changeset
368 saveEnd();
jurzua
parents:
diff changeset
369 return PAGE_EDITOR;
jurzua
parents:
diff changeset
370 }
jurzua
parents:
diff changeset
371
jurzua
parents:
diff changeset
372 public void listenerEditCalendarForLivedInPlaces(ActionEvent event){
jurzua
parents:
diff changeset
373 Entity entity = (Entity)getRequestBean("item");
jurzua
parents:
diff changeset
374 if(entity != null){
jurzua
parents:
diff changeset
375 Calendar cal = this.livedInPlaces.getCalendar(entity.getId());
jurzua
parents:
diff changeset
376 getSessionBean().editCalendar(cal, livedInPlaces, entity.getId());
jurzua
parents:
diff changeset
377 }
jurzua
parents:
diff changeset
378 }
jurzua
parents:
diff changeset
379
jurzua
parents:
diff changeset
380 public void listenerEditCalendarForFloruitDate(ActionEvent event){
jurzua
parents:
diff changeset
381 Entity entity = (Entity)getRequestBean("item");
jurzua
parents:
diff changeset
382 if(entity != null){
jurzua
parents:
diff changeset
383 Calendar cal = this.floruitList.getCalendar(entity.getId());
jurzua
parents:
diff changeset
384 getSessionBean().editCalendar(cal, floruitList, entity.getId());
jurzua
parents:
diff changeset
385 }
jurzua
parents:
diff changeset
386 }
jurzua
parents:
diff changeset
387
jurzua
parents:
diff changeset
388 public void listenerRomanizeNameTranslit(AjaxBehaviorEvent event){
jurzua
parents:
diff changeset
389 if(getAttributes().get("name_translit") != null)
jurzua
parents:
diff changeset
390 this.romanizedNameTranslit = RomanizationLoC.convert(getAttributes().get("name_translit"));
jurzua
parents:
diff changeset
391 }
jurzua
parents:
diff changeset
392
jurzua
parents:
diff changeset
393 public Entity getShortName() {
jurzua
parents:
diff changeset
394 return shortNameAlias;
jurzua
parents:
diff changeset
395 }
jurzua
parents:
diff changeset
396
jurzua
parents:
diff changeset
397 public void setShortName(Entity shortName) {
jurzua
parents:
diff changeset
398 this.shortNameAlias = shortName;
jurzua
parents:
diff changeset
399 }
jurzua
parents:
diff changeset
400
jurzua
parents:
diff changeset
401 public String getValueShortName() {
jurzua
parents:
diff changeset
402 return valueShortName;
jurzua
parents:
diff changeset
403 }
jurzua
parents:
diff changeset
404
jurzua
parents:
diff changeset
405 public void setValueShortName(String valueShortName) {
jurzua
parents:
diff changeset
406 this.valueShortName = valueShortName;
jurzua
parents:
diff changeset
407 }
jurzua
parents:
diff changeset
408
jurzua
parents:
diff changeset
409 public void setToDate(Object x) {
119
4aa8c425685d less System.out.println.
casties
parents: 112
diff changeset
410 //System.out.println("hello");
1
jurzua
parents:
diff changeset
411 }
jurzua
parents:
diff changeset
412
jurzua
parents:
diff changeset
413 public Converter getToDate() {
jurzua
parents:
diff changeset
414 return new myDateTimeConverter();
jurzua
parents:
diff changeset
415
jurzua
parents:
diff changeset
416 }
jurzua
parents:
diff changeset
417
jurzua
parents:
diff changeset
418 public Map<String, Boolean> getDeletedAliases() {
jurzua
parents:
diff changeset
419 return deletedAliases;
jurzua
parents:
diff changeset
420 }
jurzua
parents:
diff changeset
421
jurzua
parents:
diff changeset
422 public void setDeletedAliases(Map<String, Boolean> deletedAliases) {
jurzua
parents:
diff changeset
423 this.deletedAliases = deletedAliases;
jurzua
parents:
diff changeset
424 }
jurzua
parents:
diff changeset
425
jurzua
parents:
diff changeset
426 public void setNewAlias(String newAlias) {
jurzua
parents:
diff changeset
427 this.newAlias = newAlias;
jurzua
parents:
diff changeset
428 }
jurzua
parents:
diff changeset
429
jurzua
parents:
diff changeset
430 public String getNewAlias() {
jurzua
parents:
diff changeset
431 return newAlias;
jurzua
parents:
diff changeset
432 }
jurzua
parents:
diff changeset
433
jurzua
parents:
diff changeset
434 public String editMe(){
jurzua
parents:
diff changeset
435 if(this.entity != null){
jurzua
parents:
diff changeset
436 getSessionBean().editEntity(this.entity);
jurzua
parents:
diff changeset
437 return "entry_edit_entity";
jurzua
parents:
diff changeset
438 }
jurzua
parents:
diff changeset
439 return "";
jurzua
parents:
diff changeset
440 }
jurzua
parents:
diff changeset
441
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
442 public void setBirthPlaceLo(AliasListenerObject birthPlaceLo) {
1
jurzua
parents:
diff changeset
443 this.birthPlaceLo = birthPlaceLo;
jurzua
parents:
diff changeset
444 }
jurzua
parents:
diff changeset
445
jurzua
parents:
diff changeset
446 public ListenerObject getBirthPlaceLo() {
jurzua
parents:
diff changeset
447 return birthPlaceLo;
jurzua
parents:
diff changeset
448 }
jurzua
parents:
diff changeset
449
jurzua
parents:
diff changeset
450 public ListenerObject getDeathPlaceLo() {
jurzua
parents:
diff changeset
451 return deathPlaceLo;
jurzua
parents:
diff changeset
452 }
jurzua
parents:
diff changeset
453
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
454 public void setDeathPlaceLo(AliasListenerObject deathPlaceLo) {
1
jurzua
parents:
diff changeset
455 this.deathPlaceLo = deathPlaceLo;
jurzua
parents:
diff changeset
456 }
jurzua
parents:
diff changeset
457
jurzua
parents:
diff changeset
458 public EntityList getLivedInPlaces() {
jurzua
parents:
diff changeset
459 return livedInPlaces;
jurzua
parents:
diff changeset
460 }
jurzua
parents:
diff changeset
461
jurzua
parents:
diff changeset
462 public void setLivedInPlaces(EntityList livedInPlaces) {
jurzua
parents:
diff changeset
463 this.livedInPlaces = livedInPlaces;
jurzua
parents:
diff changeset
464 }
jurzua
parents:
diff changeset
465
jurzua
parents:
diff changeset
466 public EntityList getStudentOfList() {
jurzua
parents:
diff changeset
467 return studentOfList;
jurzua
parents:
diff changeset
468 }
jurzua
parents:
diff changeset
469
jurzua
parents:
diff changeset
470
jurzua
parents:
diff changeset
471 public void setStudentOfList(EntityList studentOfList) {
jurzua
parents:
diff changeset
472 this.studentOfList = studentOfList;
jurzua
parents:
diff changeset
473 }
jurzua
parents:
diff changeset
474
jurzua
parents:
diff changeset
475 public EntityList getFloruitList() {
jurzua
parents:
diff changeset
476 return floruitList;
jurzua
parents:
diff changeset
477 }
jurzua
parents:
diff changeset
478
jurzua
parents:
diff changeset
479 public void setFloruitList(EntityList floruitList) {
jurzua
parents:
diff changeset
480 this.floruitList = floruitList;
jurzua
parents:
diff changeset
481 }
jurzua
parents:
diff changeset
482
jurzua
parents:
diff changeset
483 public String getRomanizedNameTranslit() {
jurzua
parents:
diff changeset
484 return romanizedNameTranslit;
jurzua
parents:
diff changeset
485 }
jurzua
parents:
diff changeset
486
jurzua
parents:
diff changeset
487 public void setRomanizedNameTranslit(String romanizedNameTranslit) {
jurzua
parents:
diff changeset
488 this.romanizedNameTranslit = romanizedNameTranslit;
jurzua
parents:
diff changeset
489 }
jurzua
parents:
diff changeset
490 }