RED-629: Each annotation is one entry in the RedactionLog

This commit is contained in:
deiflaender 2020-11-11 15:29:28 +01:00
parent d2161e1b3f
commit 936683f94d

View File

@ -105,11 +105,13 @@ public class AnnotationHighlightService {
continue; continue;
} }
RedactionLogEntry redactionLogEntry = createRedactionLogEntry(entity);
boolean requestedToRemove = false; boolean requestedToRemove = false;
List<Comment> comments = null; List<Comment> comments = null;
for (EntityPositionSequence entityPositionSequence : entity.getPositionSequences()) { for (EntityPositionSequence entityPositionSequence : entity.getPositionSequences()) {
RedactionLogEntry redactionLogEntry = createRedactionLogEntry(entity);
if (processedIds.contains(entityPositionSequence.getId())) { if (processedIds.contains(entityPositionSequence.getId())) {
// TODO refactor this outer loop jump as soon as we have the time. // TODO refactor this outer loop jump as soon as we have the time.
@ -159,7 +161,6 @@ public class AnnotationHighlightService {
} }
redactionLogEntry.setId(entityPositionSequence.getId()); redactionLogEntry.setId(entityPositionSequence.getId());
}
// FIXME ids should never be null. Figure out why this happens. // FIXME ids should never be null. Figure out why this happens.
if (redactionLogEntry.getId() != null) { if (redactionLogEntry.getId() != null) {
@ -167,6 +168,9 @@ public class AnnotationHighlightService {
} }
} }
}
} }