changeset 86:017f8ff46e50

more merging references.
author casties
date Wed, 05 Oct 2016 15:36:46 +0200
parents fd7beb701724
children 545e47659e1f
files src/main/java/de/mpiwg/itgroup/ismi/merge/ReferenceMerge.java
diffstat 1 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/main/java/de/mpiwg/itgroup/ismi/merge/ReferenceMerge.java	Fri Sep 30 14:30:33 2016 +0200
+++ b/src/main/java/de/mpiwg/itgroup/ismi/merge/ReferenceMerge.java	Wed Oct 05 15:36:46 2016 +0200
@@ -81,6 +81,7 @@
                 this.firstBibId = att.getOwnValue();
                 
                 if(this.secondEntityMap != null && ! this.secondEntityMap.isEmpty()){
+                    // continue merge
                     this.deployDifferences();
                 }
 			}
@@ -106,7 +107,8 @@
                 Attribute att = secondEntityMap.get(ent);
                 this.secondBibId = att.getOwnValue();
 
-                if(! this.firstEntityMap.isEmpty()){
+                if(this.firstEntityMap != null && ! this.firstEntityMap.isEmpty()){
+                    // continue merge
                     this.deployDifferences();
                 }
             }
@@ -150,8 +152,10 @@
                 if (ent.isLightweight()) {
                     ent = getWrapper().getEntityContent(ent);
                 }
-                attLabels.add(ent.getId().toString());
-                
+                String id = ent.getId().toString();
+                attLabels.add(id);
+                firstAttMap.put(id, firstEntity.getAttributeByName("endnote-id").getValue());
+                secondAttMap.put(id, ent.getAttributeByName("endnote-id").getValue());
             }
             
             /*