Verifies if the two maps hold annotations with the same ID. The only thing not checked are the features, as some of them could be lost in the serialization/deserialization process @param origAnnotMap A map by ID, containing the original annotations @param reloadedAnnMap A map by ID, containing the r
(Map<Integer,Annotation> origAnnotMap, Map<Integer,Annotation> reloadedAnnMap)
| 374 | * @param reloadedAnnMap A map by ID, containing the recreated annotations |
| 375 | */ |
| 376 | private void verifyIDConsistency(Map<Integer,Annotation> origAnnotMap, Map<Integer,Annotation> reloadedAnnMap) { |
| 377 | assertEquals("Found a different number of annot in both documents.", |
| 378 | origAnnotMap.keySet().size(), reloadedAnnMap.keySet().size()); |
| 379 | |
| 380 | // List orig = new ArrayList(origAnnotMap.keySet()); |
| 381 | // Collections.sort(orig); |
| 382 | // System.out.println("ORIG SET =" + orig); |
| 383 | // |
| 384 | // List rel = new ArrayList(reloadedAnnMap.keySet()); |
| 385 | // Collections.sort(rel); |
| 386 | // System.out.println("REL SET =" + rel); |
| 387 | // |
| 388 | |
| 389 | for (Iterator<Integer> it = origAnnotMap.keySet().iterator(); it.hasNext();){ |
| 390 | Integer id = it.next(); |
| 391 | Annotation origAnn = origAnnotMap.get(id); |
| 392 | Annotation reloadedAnnot = reloadedAnnMap.get(id); |
| 393 | |
| 394 | assertTrue("Annotation with ID="+ id +" was not found in the reloaded document.", reloadedAnnot != null); |
| 395 | compareAnnot(origAnn, reloadedAnnot); |
| 396 | |
| 397 | }// End for |
| 398 | }// End of verifyIDConsistency() |
| 399 | |
| 400 | /** |
| 401 | * Thes if two annotatiosn are the same, except their features. |
no test coverage detected