Commit f8bbfab7 authored by Markus Krug's avatar Markus Krug
Browse files

maps work as expected

parent a9354772
...@@ -296,12 +296,17 @@ public class GoldstandardAnalyzer extends AEditorSubordinateViewPart { ...@@ -296,12 +296,17 @@ public class GoldstandardAnalyzer extends AEditorSubordinateViewPart {
editor.removeAnnotations(toDelete); editor.removeAnnotations(toDelete);
for (AnnotationFS anno : toDelete) { // for (AnnotationFS anno : toDelete) {
editor.getCas().removeFsFromIndexes(anno); // editor.getCas().removeFsFromIndexes(anno);
} // }
} }
public void deleteAnnotations() { public void deleteAnnotations() {
//reset maps
this.fnMap.clear();
this.fpMap.clear();
this.tpMap.clear();
List<AnnotationFS> annoList = new ArrayList<>(); List<AnnotationFS> annoList = new ArrayList<>();
AnnotationIndex<AnnotationFS> annotationIndex = editor.getCas().getAnnotationIndex(tpType); AnnotationIndex<AnnotationFS> annotationIndex = editor.getCas().getAnnotationIndex(tpType);
...@@ -321,7 +326,11 @@ public class GoldstandardAnalyzer extends AEditorSubordinateViewPart { ...@@ -321,7 +326,11 @@ public class GoldstandardAnalyzer extends AEditorSubordinateViewPart {
while (iterator2.hasNext()) { while (iterator2.hasNext()) {
annoList.add((AnnotationFS) iterator2.next()); annoList.add((AnnotationFS) iterator2.next());
} }
deleteAnnotations(annoList.toArray(new AnnotationFS[0])); for (AnnotationFS a : annoList) {
editor.getCas().removeFsFromIndexes(a);
}
editor.updateWidget();
// deleteAnnotations(annoList.toArray(new AnnotationFS[0]));
} }
public void compareTypes() { public void compareTypes() {
...@@ -401,6 +410,7 @@ public class GoldstandardAnalyzer extends AEditorSubordinateViewPart { ...@@ -401,6 +410,7 @@ public class GoldstandardAnalyzer extends AEditorSubordinateViewPart {
} }
public void createMap() { public void createMap() {
this.m = new HashMap<>();
m.putAll(tpMap); m.putAll(tpMap);
m.putAll(fpMap); m.putAll(fpMap);
m.putAll(fnMap); m.putAll(fnMap);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment