From 50e137575d59ade35860795d89a5431dcc628322 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kilian=20Sch=C3=BCttler?= Date: Mon, 25 Mar 2024 14:13:44 +0100 Subject: [PATCH] RED-8610: Dictionary remove on dossier level should be displayed as skipped --- .../redaction/v1/server/model/document/entity/MatchedRule.java | 3 ++- .../redaction/v1/server/service/DictionarySearchService.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/redaction-service-v1/redaction-service-server-v1/src/main/java/com/iqser/red/service/redaction/v1/server/model/document/entity/MatchedRule.java b/redaction-service-v1/redaction-service-server-v1/src/main/java/com/iqser/red/service/redaction/v1/server/model/document/entity/MatchedRule.java index 2e049685..658ee543 100644 --- a/redaction-service-v1/redaction-service-server-v1/src/main/java/com/iqser/red/service/redaction/v1/server/model/document/entity/MatchedRule.java +++ b/redaction-service-v1/redaction-service-server-v1/src/main/java/com/iqser/red/service/redaction/v1/server/model/document/entity/MatchedRule.java @@ -25,7 +25,8 @@ public final class MatchedRule implements Comparable { public static final RuleType FINAL_TYPE = RuleType.fromString("FINAL"); public static final RuleType ELIMINATION_RULE_TYPE = RuleType.fromString("X"); public static final RuleType IMPORTED_TYPE = RuleType.fromString("IMP"); - private static final List RULE_TYPE_PRIORITIES = List.of(FINAL_TYPE, ELIMINATION_RULE_TYPE, IMPORTED_TYPE); + public static final RuleType DICTIONARY_TYPE = RuleType.fromString("DICT"); + private static final List RULE_TYPE_PRIORITIES = List.of(FINAL_TYPE, ELIMINATION_RULE_TYPE, IMPORTED_TYPE, DICTIONARY_TYPE); RuleIdentifier ruleIdentifier; @Builder.Default diff --git a/redaction-service-v1/redaction-service-server-v1/src/main/java/com/iqser/red/service/redaction/v1/server/service/DictionarySearchService.java b/redaction-service-v1/redaction-service-server-v1/src/main/java/com/iqser/red/service/redaction/v1/server/service/DictionarySearchService.java index 661afdf7..e40ecbb5 100644 --- a/redaction-service-v1/redaction-service-server-v1/src/main/java/com/iqser/red/service/redaction/v1/server/service/DictionarySearchService.java +++ b/redaction-service-v1/redaction-service-server-v1/src/main/java/com/iqser/red/service/redaction/v1/server/service/DictionarySearchService.java @@ -56,7 +56,7 @@ public class DictionarySearchService { SemanticNode node, boolean isDossierDictionaryEntry) { - Set engines = Set.of(Engine.DICTIONARY); + Set engines = isDossierDictionaryEntry ? Set.of(Engine.DICTIONARY, Engine.DOSSIER_DICTIONARY) : Set.of(Engine.DICTIONARY); EntityCreationService entityCreationService = new EntityCreationService(entityEnrichmentService); searchImplementation.getBoundaries(node.getTextBlock(), node.getTextRange()) .stream()