| 416 | |
| 417 | |
| 418 | private Map<Integer,Annotation> addAnnotSet2Map(AnnotationSet annotSet, Map<Integer,Annotation> id2AnnMap){ |
| 419 | for (Iterator<Annotation> it = annotSet.iterator(); it.hasNext();){ |
| 420 | Annotation a = it.next(); |
| 421 | Integer id = a.getId(); |
| 422 | |
| 423 | assertTrue("Found two annotations(one with type = " + a.getType() + |
| 424 | ")with the same ID=" + id, !id2AnnMap.keySet().contains(id)); |
| 425 | |
| 426 | id2AnnMap.put(id, a); |
| 427 | }// End for |
| 428 | return id2AnnMap; |
| 429 | } |
| 430 | |
| 431 | /** |
| 432 | * Scans a target Doc for all Annotations and builds a map (from anot ID to annot) in the process |