# HG changeset patch # User casties # Date 1483990649 -3600 # Node ID 6f0e9a333c15719bbd91992a954cd9afedaee9aa # Parent 71638720fe2fef458704ba0b4b64511e51faae77 misidentification of witness mostly works now. diff -r 71638720fe2f -r 6f0e9a333c15 src/main/java/de/mpiwg/itgroup/ismi/auxObjects/ListenerObject.java --- a/src/main/java/de/mpiwg/itgroup/ismi/auxObjects/ListenerObject.java Fri Jan 06 20:41:35 2017 +0100 +++ b/src/main/java/de/mpiwg/itgroup/ismi/auxObjects/ListenerObject.java Mon Jan 09 20:37:29 2017 +0100 @@ -32,6 +32,13 @@ this.attName = attName; } + public ListenerObject(List suggestedItemsNew, + Attribute attributeNew, Entity entityNew) { + suggestedItems = suggestedItemsNew; + attribute = attributeNew; + entity = entityNew; + } + /** * When the term is changed in the inputtext, * this method will be called to change the suggestion list. @@ -42,8 +49,12 @@ changeListener(event, classObj, attName); } - public void actionListenerSelect(ActionEvent event){ - + /** + * Called when an entry in the suggestion list is clicked. + * + * @param event + */ + public void actionListenerSelect(ActionEvent event){ this.suggestedItems = new ArrayList(); SelectItem selectItem = (SelectItem) getRequestBean("item"); if(selectItem != null){ @@ -89,13 +100,6 @@ return null; } - public ListenerObject(List suggestedItemsNew, - Attribute attributeNew, Entity entityNew) { - suggestedItems = suggestedItemsNew; - attribute = attributeNew; - entity = entityNew; - } - public List getSuggestedItems() { return suggestedItems; } diff -r 71638720fe2f -r 6f0e9a333c15 src/main/java/de/mpiwg/itgroup/ismi/entry/beans/CurrentWitnessBean.java --- a/src/main/java/de/mpiwg/itgroup/ismi/entry/beans/CurrentWitnessBean.java Fri Jan 06 20:41:35 2017 +0100 +++ b/src/main/java/de/mpiwg/itgroup/ismi/entry/beans/CurrentWitnessBean.java Mon Jan 09 20:37:29 2017 +0100 @@ -235,7 +235,7 @@ /* - * save misattributions + * save misidentifications */ this.entity = this.misidentTable.saveMisidentifications(this.entity); diff -r 71638720fe2f -r 6f0e9a333c15 src/main/java/de/mpiwg/itgroup/ismi/util/guiComponents/Misidentification.java --- a/src/main/java/de/mpiwg/itgroup/ismi/util/guiComponents/Misidentification.java Fri Jan 06 20:41:35 2017 +0100 +++ b/src/main/java/de/mpiwg/itgroup/ismi/util/guiComponents/Misidentification.java Mon Jan 09 20:37:29 2017 +0100 @@ -41,12 +41,12 @@ // set title if (!misident.containsAttribute(TITLE)) { - misident.addAttribute(new Attribute(title, "text", title)); + misident.addAttribute(new Attribute(TITLE, "arabic", title)); } else { misident.getAttributeByName(TITLE).setOwnValue(title); } if (!misident.containsAttribute(TITLE_TRANSLIT)) { - misident.addAttribute(new Attribute(title, "text", title_translit)); + misident.addAttribute(new Attribute(TITLE_TRANSLIT, "text", title_translit)); } else { misident.getAttributeByName(TITLE_TRANSLIT).setOwnValue(title_translit); } @@ -57,6 +57,9 @@ // set person relation to misidentification this.misident.removeAllSourceRelations(MISATTRIBUTED_TO, "PERSON"); + if (person.isLightweight()) { + person = ot.getEntityContent(person); + } new Relation(misident, person, MISATTRIBUTED_TO); // set reference relation to misidentification @@ -90,7 +93,8 @@ Misidentification obj = new Misidentification(ot, userName); if (misident.isLightweight()) { - obj.setMisident(ot.getEntityByIdWithContent(misident.getId())); + misident = ot.getEntityByIdWithContent(misident.getId()); + obj.setMisident(misident); } // load title diff -r 71638720fe2f -r 6f0e9a333c15 src/main/java/de/mpiwg/itgroup/ismi/util/guiComponents/MisidentificationTable.java --- a/src/main/java/de/mpiwg/itgroup/ismi/util/guiComponents/MisidentificationTable.java Fri Jan 06 20:41:35 2017 +0100 +++ b/src/main/java/de/mpiwg/itgroup/ismi/util/guiComponents/MisidentificationTable.java Mon Jan 09 20:37:29 2017 +0100 @@ -57,10 +57,12 @@ //@TODO } - public void listenerCreate(ActionEvent event){ - if(this.lo.entity != null & this.lo.entity.isPersistent()){ + public void listenerCreate(ActionEvent event) { + Entity ent = this.lo.entity; + if(ent != null & ent.isPersistent()){ // FIXME: where to get title? - this.create(null, null, this.lo.entity); + + this.create(null, null, ent); } } diff -r 71638720fe2f -r 6f0e9a333c15 src/main/resources/own-value.cfg.xml --- a/src/main/resources/own-value.cfg.xml Fri Jan 06 20:41:35 2017 +0100 +++ b/src/main/resources/own-value.cfg.xml Mon Jan 09 20:37:29 2017 +0100 @@ -59,6 +59,27 @@ + + + + + + + + + + + + + + + + + + + + + @@ -326,6 +347,12 @@ + + + + + + diff -r 71638720fe2f -r 6f0e9a333c15 src/main/webapp/entry/components/misidentification.xhtml --- a/src/main/webapp/entry/components/misidentification.xhtml Fri Jan 06 20:41:35 2017 +0100 +++ b/src/main/webapp/entry/components/misidentification.xhtml Mon Jan 09 20:37:29 2017 +0100 @@ -23,7 +23,7 @@ style="opacity: 0.1; width: 500px; height: 350px; left: 5px; top: 5px; bottom: -5px;">
-
EndNote Reference
+
Misidentification
- + + + + + + + + + + - + @@ -73,7 +85,7 @@ + value="#{item.obj.title}" /> @@ -81,7 +93,7 @@ + value="#{item.obj.title_translit}" /> @@ -128,9 +140,10 @@ render="misidentArea"/> - + + -