# HG changeset patch # User casties # Date 1482233180 -3600 # Node ID 2b77751e4021df113bcf399663efd0926b694d24 # Parent 363ff8844b23a0a8469a65f4beb28bd259198801# Parent 8e3f1f81acfb6c83c40d922e0a1898bbc04be233 Merge with 8e3f1f81acfb6c83c40d922e0a1898bbc04be233 diff -r 363ff8844b23 -r 2b77751e4021 src/main/java/de/mpiwg/itgroup/ismi/entry/beans/AbstractISMIBean.java --- a/src/main/java/de/mpiwg/itgroup/ismi/entry/beans/AbstractISMIBean.java Tue Dec 20 12:25:23 2016 +0100 +++ b/src/main/java/de/mpiwg/itgroup/ismi/entry/beans/AbstractISMIBean.java Tue Dec 20 12:26:20 2016 +0100 @@ -1071,8 +1071,8 @@ } /** - * Replace the given source relations on the given entity by the contents of the AliasListenerObject (type entClass) - * using the given relName and aliasRelName. + * Replace the given source relations on the given entity by the contents of the AliasListenerObject + * (type entClass) using the given relName and aliasRelName. * * ent - relName -> targetClass, * ent - aliasRelName -> ALIAS diff -r 363ff8844b23 -r 2b77751e4021 src/main/java/de/mpiwg/itgroup/ismi/event/beans/CopyEvent.java --- a/src/main/java/de/mpiwg/itgroup/ismi/event/beans/CopyEvent.java Tue Dec 20 12:25:23 2016 +0100 +++ b/src/main/java/de/mpiwg/itgroup/ismi/event/beans/CopyEvent.java Tue Dec 20 12:26:20 2016 +0100 @@ -106,23 +106,6 @@ this.witnessList = new ArrayList(); } - /* - public void listenerChangePersonCopyingText(ValueChangeEvent event) { - this.personCopyingText = changeListener(event, personCopyingText, PERSON, name_translit); - } - - public void listenerChangePersonCopiedFor(ValueChangeEvent event) { - this.personCopiedFor = changeListener(event, personCopiedFor, PERSON, name_translit); - } - - public void listenerChangePlace(ValueChangeEvent event) { - this.place = changeListener(event, place, PLACE, name); - } - - public void listenerChangeRepository(ValueChangeEvent event) { - this.repository = changeListener(event, repository, REPOSITORY, name); - }*/ - public void listenerSave(ActionEvent event) { this.save(); } @@ -150,9 +133,9 @@ replaceAliasSourceRelation(event, placeLo, PLACE, was_copied_in, was_copied_in_as); // EVENT -> is_a_copy_of -> WITNESS - if(witness.isLightweight()){ - this.witness = getWrapper().getEntityByIdWithContent(witness.getId()); - } + if (witness.isLightweight()) { + this.witness = getWrapper().getEntityByIdWithContent(witness.getId()); + } event.replaceSourceRelation(witness, WITNESS, is_a_copy_of); getWrapper().saveEntity(event, getSessionUserName()); diff -r 363ff8844b23 -r 2b77751e4021 src/main/java/de/mpiwg/itgroup/ismi/event/beans/StudyEvent.java --- a/src/main/java/de/mpiwg/itgroup/ismi/event/beans/StudyEvent.java Tue Dec 20 12:25:23 2016 +0100 +++ b/src/main/java/de/mpiwg/itgroup/ismi/event/beans/StudyEvent.java Tue Dec 20 12:26:20 2016 +0100 @@ -102,15 +102,15 @@ } @Override - public String save(){ + public String save() { super.save(); - if(!checkConsistency()){ + if (!checkConsistency()) { addGeneralMsg("Either the Witness, the Person or the Place is empty."); addGeneralMsg("The event could not be saved."); return null; } - try{ + try { getAttributes().put("date", this.date.toJSONString()); event = updateEntityAttributes(event); @@ -133,7 +133,7 @@ printSuccessSavingEntity(); - }catch (Exception e) { + } catch (Exception e) { addGeneralMsg(e.getMessage()); logger.error(e.getMessage(), e); } @@ -141,19 +141,6 @@ return null; } - /* - public void listenerChangePerson(ValueChangeEvent event) { - this.person = changeListener(event, person, PERSON, name_translit); - } - - public void listenerChangeAdvisor(ValueChangeEvent event) { - this.advisor = changeListener(event, advisor, PERSON, name_translit); - } - - public void listenerChangeRepository(ValueChangeEvent event) { - this.repository = changeListener(event, repository, REPOSITORY, name); - } - */ @Override public void reset() { super.reset(); diff -r 363ff8844b23 -r 2b77751e4021 src/main/java/de/mpiwg/itgroup/ismi/event/beans/TransferEvent.java --- a/src/main/java/de/mpiwg/itgroup/ismi/event/beans/TransferEvent.java Tue Dec 20 12:25:23 2016 +0100 +++ b/src/main/java/de/mpiwg/itgroup/ismi/event/beans/TransferEvent.java Tue Dec 20 12:26:20 2016 +0100 @@ -150,34 +150,34 @@ } @Override - public String save(){ + public String save() { super.save(); - if(!checkConsistency()){ + if (!checkConsistency()) { addGeneralMsg("Either the Witness, the Person or the Place is empty."); addGeneralMsg("The event could not be saved."); return null; } - try{ + try { getAttributes().put("date", this.date.toJSONString()); event = updateEntityAttributes(event); // EVENT -> was_studied_by -> WITNESS - if(witness.isLightweight()){ + if (witness.isLightweight()) { this.witness = getWrapper().getEntityByIdWithContent(witness.getId()); } event.replaceSourceRelation(witness, WITNESS, is_a_transfer_of); - // EVENT -> was_transferred_from -> PERSON/REPOSITORY + // EVENT -> was_transferred_from -> PERSON event.replaceSourceRelation(personFromLo.entity, PERSON, was_transferred_from); - // EVENT -> was_transferred_to -> PERSON/REPOSITORY + // EVENT -> was_transferred_to -> PERSON event.replaceSourceRelation(personToLo.entity, PERSON, was_transferred_to); - // EVENT -> has_original_location -> PLACE/REPOSITORY + // EVENT -> has_original_location -> PLACE event.replaceSourceRelation(placeOriginalLocationLo.entity, PLACE, has_original_location); - // EVENT -> has_new_location -> PLACE/REPOSITORY + // EVENT -> has_new_location -> PLACE event.replaceSourceRelation(placeNewLocationLo.entity, PLACE, has_new_location); // EVENT -> was_transferred_in -> PLACE @@ -187,7 +187,7 @@ printSuccessSavingEntity(); - }catch (Exception e) { + } catch (Exception e) { addGeneralMsg(e.getMessage()); logger.error(e.getMessage(), e); }