From 936683f94dd089d47b267cadb606c42b9e8b5515 Mon Sep 17 00:00:00 2001 From: deiflaender Date: Wed, 11 Nov 2020 15:29:28 +0100 Subject: [PATCH] RED-629: Each annotation is one entry in the RedactionLog --- .../service/AnnotationHighlightService.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/redaction-service-v1/redaction-service-server-v1/src/main/java/com/iqser/red/service/redaction/v1/server/visualization/service/AnnotationHighlightService.java b/redaction-service-v1/redaction-service-server-v1/src/main/java/com/iqser/red/service/redaction/v1/server/visualization/service/AnnotationHighlightService.java index 072bc8bb..60757e68 100644 --- a/redaction-service-v1/redaction-service-server-v1/src/main/java/com/iqser/red/service/redaction/v1/server/visualization/service/AnnotationHighlightService.java +++ b/redaction-service-v1/redaction-service-server-v1/src/main/java/com/iqser/red/service/redaction/v1/server/visualization/service/AnnotationHighlightService.java @@ -105,11 +105,13 @@ public class AnnotationHighlightService { continue; } - RedactionLogEntry redactionLogEntry = createRedactionLogEntry(entity); + boolean requestedToRemove = false; List comments = null; for (EntityPositionSequence entityPositionSequence : entity.getPositionSequences()) { + + RedactionLogEntry redactionLogEntry = createRedactionLogEntry(entity); if (processedIds.contains(entityPositionSequence.getId())) { // TODO refactor this outer loop jump as soon as we have the time. @@ -159,12 +161,14 @@ public class AnnotationHighlightService { } redactionLogEntry.setId(entityPositionSequence.getId()); + + // FIXME ids should never be null. Figure out why this happens. + if (redactionLogEntry.getId() != null) { + classifiedDoc.getRedactionLogEntities().add(redactionLogEntry); + } } - // FIXME ids should never be null. Figure out why this happens. - if (redactionLogEntry.getId() != null) { - classifiedDoc.getRedactionLogEntities().add(redactionLogEntry); - } + } }