1 10 11 package org.mmbase.applications.xmlimporter; 12 13 import java.util.*; 14 15 30 public class BasicMerger implements ObjectMerger { 31 32 37 public void init(HashMap params) { 38 } 39 40 49 public void mergeField(TmpObject tmpObj1, TmpObject tmpObj2, String name) {} 50 51 60 public void mergeRelations(TmpObject tmpObj1, TmpObject tmpObj2, 61 List relations1, List relations2) { 62 63 Iterator i = relations2.iterator(); 64 while (i.hasNext()) { 65 TmpObject relation = (TmpObject) i.next(); 66 if (tmpObj2.isSourceOf(relation)) { 67 relation.setSource(tmpObj1); 68 } 69 if (tmpObj2.isDestinationOf(relation)) { 70 relation.setDestination(tmpObj1); 71 } 72 } 73 } 74 75 86 public boolean areDuplicates(TmpObject relation1, TmpObject relation2) { 87 return true; 88 } 89 90 99 public boolean isAllowedToAdd(TmpObject tmpObj) { 100 return true; 101 } 102 103 } 104 | Popular Tags |