# HG changeset patch # User jurzua # Date 1424772571 0 # Node ID e07a1ae515b70adc17252cb8a60f1a838471a08c # Parent 54c1bb63a713b724dad8e0e876286192d3281ab0 diff -r 54c1bb63a713 -r e07a1ae515b7 src/main/java/de/mpiwg/itgroup/ismi/entry/beans/CurrentTextBean.java --- a/src/main/java/de/mpiwg/itgroup/ismi/entry/beans/CurrentTextBean.java Thu Oct 30 12:50:33 2014 +0000 +++ b/src/main/java/de/mpiwg/itgroup/ismi/entry/beans/CurrentTextBean.java Tue Feb 24 10:09:31 2015 +0000 @@ -232,8 +232,6 @@ this.creationDate = new Calendar(); } - - this.loadAttributes(this.entity);//, getDefinition(this.entity)); for (Relation rel : text.getSourceRelations()) { @@ -254,14 +252,6 @@ target = getTargetRelation(rel); this.authorLo.setEntityAndAttribute0(target); - /* - this.authorInfo = "ID = " + authorLo.getEntity().getId(); - Attribute attArabicName = getTargetAttribute(target, "name"); - if(attArabicName != null){ - this.authorInfo += ", Arabic Name = " + attArabicName.getOwnValue(); - this.textAuthorName = attArabicName.getValue(); - }*/ - if(this.authorLo.attribute != null){ this.textAuthorNameTranslit = this.authorLo.attribute.getValue(); } @@ -302,15 +292,8 @@ this.shortTitleAlias = alias; this.valueShortTitle = alias.getAttributeByName("alias").getValue(); } - } - /* - List idsNoFound = new ArrayList(); - for(TargetMisattribution misAtt : this.misattDataTable.getMisattList()){ - if(misAtt.getItem().getErrorLoading() != null){ - idsNoFound.add(misAtt.getItem().getPublication().getObjid()); - } - }*/ - //this.loadReferences(this.entity); + } + this.loadEndNoteRefs(); this.displayUrl = generateDisplayUrl(authorLo.entity, text, null, getAppBean().getRoot()); } @@ -524,129 +507,6 @@ this.setSelectPersonRendered(false); } - - /** - * Added by DW - * - * @param event - */ - /*jurzua - public void shortTitleChangeListener(ValueChangeEvent event) { - try { - if (event.getNewValue() == null) { - return; - } - if (event.getNewValue().equals(event.getOldValue())) { - return; - } - - String newShortName = (String) event.getNewValue(); - - if (shortTitleAlias == null) { - shortTitleAlias = new Entity(Node.TYPE_ABOX, "ALIAS", false); - } - - Attribute attr = this.shortTitleAlias.getAttributeByName("alias"); - if (attr == null) { - this.shortTitleAlias.addAttribute(new Attribute("alias", - TEXT, newShortName)); - } else - attr.setValue(newShortName); - - } catch (Exception e) { - e.printStackTrace(); - } - }*/ - /* - public void translationChangeListener(ValueChangeEvent event) { - translationLo = changeListener(event, translationLo, TEXT, "full_title_translit"); - - }*/ - - /* - public void commentaryChangedListener(ValueChangeEvent event) { - commentaryLo = changeListener(event, commentaryLo, TEXT, "full_title_translit"); - - }*/ - - /* - public void dedicatedPersonChangedListener(ValueChangeEvent event) { - dedicatedPersonLo = changeListener(event, dedicatedPersonLo, PERSON, "name_translit"); - } - */ - /* - public void valueChangeMethod4Author(ValueChangeEvent event) { - System.out.println("**** " + event.getNewValue()); - System.out.println(this.authorLo.entity); - System.out.println(); - - this.authorInfo = null; - authorLo = changeListener(event, authorLo, PERSON, "name_translit"); - if(authorLo != null && authorLo.entity != null && authorLo.entity.isPersistent()){ - this.authorInfo = "ID = " + authorLo.getEntity().getId(); - Attribute attArabicName = getTargetAttribute(authorLo.entity, "name_translit"); - if(attArabicName != null) - this.authorInfo += ", Arabic Name = " + attArabicName.getOwnValue(); - } - } - - - public void actionListenerNotSelectingAuthor(ActionEvent event){ - this.authorLo.suggestedItems = new ArrayList(); - this.authorLo.entity = null; - this.authorLo.attribute = null; - }*/ - - - /* - public void actionListenerSelectAuthor(ActionEvent event){ - System.out.println("actionListenerSelectAuthor"); - System.out.println(this.authorLo.entity); - System.out.println(); - - this.authorLo.suggestedItems = new ArrayList(); - SelectItem selectItem = (SelectItem) getRequestBean("item"); - if(selectItem != null){ - Attribute att = (Attribute)selectItem.getValue(); - - Entity ent = getWrapper().getEntityById(att.getSourceId()); - - if(ent != null){ - this.authorLo.setEntityAndAttribute(ent, "name_translit"); - - this.authorInfo = "ID = " + authorLo.getEntity().getId(); - Attribute attArabicName = getTargetAttribute(ent, "name"); - if(attArabicName != null){ - this.authorInfo += ", Arabic Name = " + attArabicName.getOwnValue(); - this.textAuthorName = attArabicName.getValue(); - } - - if(this.authorLo.attribute != null){ - this.textAuthorNameTranslit = this.authorLo.attribute.getValue(); - } - } - } - } - */ - - - /* - public void placeChangedListener(ValueChangeEvent event) { - placeLo = changeListener(event, placeLo, PLACE, "name"); - }*/ - - /* - @Override - public Entity getEntity() { - if (this.entity == null) { - this.entity = new Entity(); - this.entity.setObjectClass(TEXT); - this.entity.setLightweight(false); - this.loadAttributes(this.entity);//, getDefinition(this.entity)); - } - return this.entity; - } - */ public boolean mandatoryEntriesOK(){ boolean ok = true; if(this.authorLo.entity == null || !this.authorLo.entity.isPersistent()){ diff -r 54c1bb63a713 -r e07a1ae515b7 src/main/resources/hibernate.cfg.xml --- a/src/main/resources/hibernate.cfg.xml Thu Oct 30 12:50:33 2014 +0000 +++ b/src/main/resources/hibernate.cfg.xml Tue Feb 24 10:09:31 2015 +0000 @@ -22,7 +22,7 @@ jdbc:mysql://localhost/openmind?characterEncoding=UTF-8 UTF-8 root - admin + e1nste1n