Pull request #66: RED-629: Each annotation is one entry in the RedactionLog

Merge in RED/redaction-service from RED-629 to master

* commit '936683f94dd089d47b267cadb606c42b9e8b5515':
  RED-629: Each annotation is one entry in the RedactionLog
This commit is contained in:
Dominique Eiflaender 2020-11-11 15:39:08 +01:00
commit 1792eb554e

View File

@ -105,11 +105,13 @@ public class AnnotationHighlightService {
continue;
}
RedactionLogEntry redactionLogEntry = createRedactionLogEntry(entity);
boolean requestedToRemove = false;
List<Comment> 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);
}
}
}