# HG changeset patch # User Robert Casties # Date 1501079606 -7200 # Node ID 29c4b64caad0466fcd7125ca739c3747b06dc304 # Parent a279d80fae420b828100df7f4ebf125b8c6cefd7 small cleanup; add mams_number field for PERSON. diff -r a279d80fae42 -r 29c4b64caad0 src/main/java/de/mpiwg/itgroup/ismi/entry/beans/CurrentPersonBean.java --- a/src/main/java/de/mpiwg/itgroup/ismi/entry/beans/CurrentPersonBean.java Tue Jul 11 18:24:08 2017 +0200 +++ b/src/main/java/de/mpiwg/itgroup/ismi/entry/beans/CurrentPersonBean.java Wed Jul 26 16:33:26 2017 +0200 @@ -292,33 +292,34 @@ // PERSON -> lived_in -> PLACE (manyToMany) this.entity.removeAllSourceRelationsByName(lived_in); this.entity.removeAllSourceRelationsByName(lived_in_as); - for(Entity place : this.livedInPlaces.getEntities()) { + for (Entity place : this.livedInPlaces.getEntities()) { Entity placeEnt = getWrapper().getEntityByIdWithContent(place.getId()); if (placeEnt.getObjectClass().equals(PLACE)) { - // PERSON -> lived_in -> PLACE - Relation livedIn = new Relation(this.entity, placeEnt, lived_in); - Calendar cal = livedInPlaces.getCalendar(place.getId()); - if(cal != null){ - livedIn.addAttribute(new Attribute("date", "date", cal.toJSONString())); - } + // PERSON -> lived_in -> PLACE + Relation livedIn = new Relation(this.entity, placeEnt, lived_in); + Calendar cal = livedInPlaces.getCalendar(place.getId()); + if (cal != null) { + livedIn.addAttribute(new Attribute("date", "date", cal.toJSONString())); + } } else if (placeEnt.getObjectClass().equals(ALIAS)) { - // PERSON -> lived_in_as -> ALIAS - Relation livedInAs = new Relation(this.entity, placeEnt, lived_in_as); - Calendar cal = livedInPlaces.getCalendar(place.getId()); - if (cal != null) { - livedInAs.addAttribute(new Attribute("date", "date", cal.toJSONString())); - } - // ALIAS -> is_alias_name_of -> PLACE - List places = getWrapper().getTargetsForSourceRelation(placeEnt, is_alias_name_of, PLACE, 1); - if (! places.isEmpty()) { - // PERSON -> lived_in -> PLACE - Entity realPlace = places.get(0); - Relation livedIn = new Relation(this.entity, realPlace, lived_in); - if (cal != null) { - livedIn.addAttribute(new Attribute("date", "date", cal.toJSONString())); - } - } - } + // PERSON -> lived_in_as -> ALIAS + Relation livedInAs = new Relation(this.entity, placeEnt, lived_in_as); + Calendar cal = livedInPlaces.getCalendar(place.getId()); + if (cal != null) { + livedInAs.addAttribute(new Attribute("date", "date", cal.toJSONString())); + } + // ALIAS -> is_alias_name_of -> PLACE + List places = getWrapper().getTargetsForSourceRelation(placeEnt, is_alias_name_of, PLACE, + 1); + if (!places.isEmpty()) { + // PERSON -> lived_in -> PLACE + Entity realPlace = places.get(0); + Relation livedIn = new Relation(this.entity, realPlace, lived_in); + if (cal != null) { + livedIn.addAttribute(new Attribute("date", "date", cal.toJSONString())); + } + } + } } // Person -> has_floruit_date -> FLORUIT DATE diff -r a279d80fae42 -r 29c4b64caad0 src/main/java/de/mpiwg/itgroup/ismi/entry/utils/PrivacityUtils.java --- a/src/main/java/de/mpiwg/itgroup/ismi/entry/utils/PrivacityUtils.java Tue Jul 11 18:24:08 2017 +0200 +++ b/src/main/java/de/mpiwg/itgroup/ismi/entry/utils/PrivacityUtils.java Wed Jul 26 16:33:26 2017 +0200 @@ -36,7 +36,7 @@ /** * Change public state of all entities related to the given entity. * - * Sets public state to entity's state if isPublic == null. + * Sets public state to given entity's state if isPublic == null. * * @param entity * @param isPublic diff -r a279d80fae42 -r 29c4b64caad0 src/main/webapp/entry/person.xhtml --- a/src/main/webapp/entry/person.xhtml Tue Jul 11 18:24:08 2017 +0200 +++ b/src/main/webapp/entry/person.xhtml Wed Jul 26 16:33:26 2017 +0200 @@ -137,6 +137,11 @@ value="#{CurrentPerson.attributes['authority_id']}" /> + + + +