RED-499: Changed prefix for redactions, fixed legalbasis problem
This commit is contained in:
parent
97257a9c08
commit
0015304eea
@ -31,7 +31,7 @@ public class Entity {
|
||||
private int sectionNumber;
|
||||
|
||||
|
||||
public Entity(String word, String type, boolean redaction, String redactionReason, List<EntityPositionSequence> positionSequences, String headline, int matchedRule, int sectionNumber) {
|
||||
public Entity(String word, String type, boolean redaction, String redactionReason, List<EntityPositionSequence> positionSequences, String headline, int matchedRule, int sectionNumber, String legalBasis) {
|
||||
|
||||
this.word = word;
|
||||
this.type = type;
|
||||
@ -41,6 +41,7 @@ public class Entity {
|
||||
this.headline = headline;
|
||||
this.matchedRule = matchedRule;
|
||||
this.sectionNumber = sectionNumber;
|
||||
this.legalBasis = legalBasis;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -117,7 +117,7 @@ public class EntityRedactionService {
|
||||
classifiedDoc.getEntities()
|
||||
.computeIfAbsent(entry.getKey(), (x) -> new ArrayList<>())
|
||||
.add(new Entity(entity.getWord(), entity.getType(), entity.isRedaction(), entity.getRedactionReason(), entry
|
||||
.getValue(), entity.getHeadline(), entity.getMatchedRule(), entity.getSectionNumber()));
|
||||
.getValue(), entity.getHeadline(), entity.getMatchedRule(), entity.getSectionNumber(), entity.getLegalBasis()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -169,7 +169,7 @@ public class AnnotationHighlightService {
|
||||
}
|
||||
|
||||
if (entity.isRedaction()) {
|
||||
return "redaction:" + entity.getType() + ":" + id;
|
||||
return "redaction:" + entity.getType() + ":automatic:" + id;
|
||||
}
|
||||
return "ignore:" + entity.getType() + ":" + id;
|
||||
}
|
||||
@ -235,7 +235,7 @@ public class AnnotationHighlightService {
|
||||
private String prefixId(ManualRedactionEntry manualRedactionEntry, String id) {
|
||||
|
||||
if (manualRedactionEntry.getStatus().equals(Status.APPROVED)) {
|
||||
return "redaction:" + manualRedactionEntry.getType() + ":" + id;
|
||||
return "redaction:" + manualRedactionEntry.getType() + ":manual:" + id;
|
||||
}
|
||||
|
||||
if (manualRedactionEntry.getStatus().equals(Status.REQUESTED)) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user