MCPcopy Create free account
hub / github.com/GateNLP/gate-core / compareAnnot

Method compareAnnot

src/test/java/gate/xml/TestXml.java:405–415  ·  view source on GitHub ↗

Thes if two annotatiosn are the same, except their features. @param origAnn @param reloadedAnnot

(Annotation origAnn, Annotation reloadedAnnot)

Source from the content-addressed store, hash-verified

403 * @param reloadedAnnot
404 */
405 private void compareAnnot(Annotation origAnn, Annotation reloadedAnnot) {
406 assertTrue("Found original and reloaded annot without the same ID!",
407 origAnn.getId().equals(reloadedAnnot.getId()));
408 assertTrue("Found original and reloaded annot without the same TYPE!\n"+
409 "Original was ["+origAnn.getType()+"] and reloaded was ["+reloadedAnnot.getType()+"].",
410 origAnn.getType().equals(reloadedAnnot.getType()));
411 assertTrue("Found original and reloaded annot without the same START offset!",
412 origAnn.getStartNode().getOffset().equals(reloadedAnnot.getStartNode().getOffset()));
413 assertTrue("Found original and reloaded annot without the same END offset!",
414 origAnn.getEndNode().getOffset().equals(reloadedAnnot.getEndNode().getOffset()));
415 }// End of compareAnnot()
416
417
418 private Map<Integer,Annotation> addAnnotSet2Map(AnnotationSet annotSet, Map<Integer,Annotation> id2AnnMap){

Calls 6

equalsMethod · 0.65
getIdMethod · 0.65
getTypeMethod · 0.65
getOffsetMethod · 0.65
getStartNodeMethod · 0.65
getEndNodeMethod · 0.65

Tested by

no test coverage detected