@Test public final void testMergeObject() { SimpleMerger merger = new SimpleMerger(SimpleEditorMap.L3); BioPAXFactory factory = BioPAXLevel.L3.getDefaultFactory(); Model model = factory.createModel(); Xref ref = factory.create(UnificationXref.class, "9606"); ref.setDb("Taxonomy"); ref.setId("9606"); BioSource bs = factory.create(BioSource.class, "Human"); bs.addXref(ref); merger.merge(model, ref); assertEquals(1, model.getObjects().size()); merger.merge(model, bs); assertEquals(2, model.getObjects().size()); model = factory.createModel(); merger.merge(model, bs); assertEquals(2, model.getObjects().size()); }
public void merge(Model target, Model... sources) { for (Model source : sources) if (source != null) merge(target, source.getObjects()); }
SimpleMerger { public void merge(Model target, Model... sources) { for (Model source : sources) if (source != null) merge(target, source.getObjects()); } }
SimpleMerger { public void merge(Model target, Model... sources) { for (Model source : sources) if (source != null) merge(target, source.getObjects()); } SimpleMerger(EditorMap map);  SimpleMerger(EditorMap map, Filter<BioPAXElement> mergePropOf); }
SimpleMerger { public void merge(Model target, Model... sources) { for (Model source : sources) if (source != null) merge(target, source.getObjects()); } SimpleMerger(EditorMap map);  SimpleMerger(EditorMap map, Filter<BioPAXElement> mergePropOf); void merge(Model target, Model... sources); void merge(Model target, Collection<? extends BioPAXElement> elements); void merge(Model target, BioPAXElement source); }
SimpleMerger { public void merge(Model target, Model... sources) { for (Model source : sources) if (source != null) merge(target, source.getObjects()); } SimpleMerger(EditorMap map);  SimpleMerger(EditorMap map, Filter<BioPAXElement> mergePropOf); void merge(Model target, Model... sources); void merge(Model target, Collection<? extends BioPAXElement> elements); void merge(Model target, BioPAXElement source);  }