@Test public void testMergeWithRelation() { UimaSupport support = new UimaSupport(PIPELINE, UimaSupportTest.class, history, monitor, false); Person p1 = new Person(jCas); p1.setBegin(0); p1.setEnd(0); p1.addToIndexes(); Person p2 = new Person(jCas); p2.setBegin(0); p2.setEnd(0); p2.addToIndexes(); Person p3 = new Person(jCas); p3.setBegin(1); p3.setEnd(1); p3.addToIndexes(); Relation r = new Relation(jCas); r.setBegin(0); r.setEnd(1); r.setSource(p2); r.setTarget(p3); r.addToIndexes(); support.mergeWithExisting(p1, p2); List<Person> people = new ArrayList<>(JCasUtil.select(jCas, Person.class)); List<Relation> relations = new ArrayList<>(JCasUtil.select(jCas, Relation.class)); assertEquals(2, people.size()); assertEquals(p1, people.get(0)); assertEquals(p3, people.get(1)); assertEquals(1, relations.size()); assertEquals(r, relations.get(0)); assertEquals(p1, relations.get(0).getSource()); assertEquals(p3, relations.get(0).getTarget()); }
public void mergeWithExisting(Annotation existingAnnotation, Annotation... annotations) { mergeWithExisting(existingAnnotation, Arrays.asList(annotations)); }
UimaSupport { public void mergeWithExisting(Annotation existingAnnotation, Annotation... annotations) { mergeWithExisting(existingAnnotation, Arrays.asList(annotations)); } }
UimaSupport { public void mergeWithExisting(Annotation existingAnnotation, Annotation... annotations) { mergeWithExisting(existingAnnotation, Arrays.asList(annotations)); } UimaSupport(
      String pipelineName,
      Class<?> clazz,
      BaleenHistory history,
      UimaMonitor monitor,
      boolean mergeDistinctEntities); }
UimaSupport { public void mergeWithExisting(Annotation existingAnnotation, Annotation... annotations) { mergeWithExisting(existingAnnotation, Arrays.asList(annotations)); } UimaSupport(
      String pipelineName,
      Class<?> clazz,
      BaleenHistory history,
      UimaMonitor monitor,
      boolean mergeDistinctEntities); String getPipelineName(); void add(Annotation... annotations); void add(Collection<? extends Annotation> annotations); void remove(Collection<? extends Annotation> annotations); void remove(Annotation... annotations); void mergeWithNew(Annotation newAnnotation, Annotation... annotations); void mergeWithNew(Annotation newAnnotation, Collection<? extends Annotation> annotations); void mergeWithExisting(Annotation existingAnnotation, Annotation... annotations); void mergeWithExisting(
      Annotation existingAnnotation, Collection<? extends Annotation> annotations); void mergeWithExistingNoCoref(
      Annotation existingAnnotation, Collection<? extends Annotation> annotations); void addToHistory(CAS cas, HistoryEvent event); void addToHistory(JCas jCas, HistoryEvent event); DocumentHistory getDocumentHistory(JCas jCas); static DocumentAnnotation getDocumentAnnotation(JCas jCas); Collection<Relation> getRelations(Entity e); }
UimaSupport { public void mergeWithExisting(Annotation existingAnnotation, Annotation... annotations) { mergeWithExisting(existingAnnotation, Arrays.asList(annotations)); } UimaSupport(
      String pipelineName,
      Class<?> clazz,
      BaleenHistory history,
      UimaMonitor monitor,
      boolean mergeDistinctEntities); String getPipelineName(); void add(Annotation... annotations); void add(Collection<? extends Annotation> annotations); void remove(Collection<? extends Annotation> annotations); void remove(Annotation... annotations); void mergeWithNew(Annotation newAnnotation, Annotation... annotations); void mergeWithNew(Annotation newAnnotation, Collection<? extends Annotation> annotations); void mergeWithExisting(Annotation existingAnnotation, Annotation... annotations); void mergeWithExisting(
      Annotation existingAnnotation, Collection<? extends Annotation> annotations); void mergeWithExistingNoCoref(
      Annotation existingAnnotation, Collection<? extends Annotation> annotations); void addToHistory(CAS cas, HistoryEvent event); void addToHistory(JCas jCas, HistoryEvent event); DocumentHistory getDocumentHistory(JCas jCas); static DocumentAnnotation getDocumentAnnotation(JCas jCas); Collection<Relation> getRelations(Entity e);  }