From dd545daeb753ceca71d3a469342e1313c14a1d0a Mon Sep 17 00:00:00 2001 From: maverickstuder Date: Tue, 3 Dec 2024 15:36:16 +0100 Subject: [PATCH] RED-10200: fix failing acceptance, function tests --- .../redaction/v1/server/model/document/DocumentTree.java | 6 +++--- .../src/test/resources/dictionaries/CBI_author.txt | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/redaction-service-v1/document/src/main/java/com/iqser/red/service/redaction/v1/server/model/document/DocumentTree.java b/redaction-service-v1/document/src/main/java/com/iqser/red/service/redaction/v1/server/model/document/DocumentTree.java index 8597b14d..aa541ef4 100644 --- a/redaction-service-v1/document/src/main/java/com/iqser/red/service/redaction/v1/server/model/document/DocumentTree.java +++ b/redaction-service-v1/document/src/main/java/com/iqser/red/service/redaction/v1/server/model/document/DocumentTree.java @@ -383,17 +383,17 @@ public class DocumentTree { for (TextEntity textEntity : entity.getDeepestFullyContainingNode().getEntities()) { if (entity.intersects(textEntity) && !entity.equals(textEntity) && !textEntity.getEntityType().equals(EntityType.TEMPORARY)) { if (textEntity.getTextRange().equals(entity.getTextRange())) { - textEntity.getRelations().computeIfAbsent(textEntity, k -> new HashSet<>()).add(new Equality(entity, textEntity)); + textEntity.getRelations().computeIfAbsent(entity, k -> new HashSet<>()).add(new Equality(entity, textEntity)); entity.getRelations().computeIfAbsent(textEntity, k -> new HashSet<>()).add(new Equality(textEntity, entity)); } else if (textEntity.containedBy(entity)) { - entity.getRelations().computeIfAbsent(textEntity, k -> new HashSet<>()).add(new Containment(entity, textEntity)); textEntity.getRelations().computeIfAbsent(entity, k -> new HashSet<>()).add(new Intersection(textEntity, entity)); + entity.getRelations().computeIfAbsent(textEntity, k -> new HashSet<>()).add(new Containment(entity, textEntity)); } else if (entity.containedBy(textEntity)) { textEntity.getRelations().computeIfAbsent(entity, k -> new HashSet<>()).add(new Containment(textEntity, entity)); entity.getRelations().computeIfAbsent(textEntity, k -> new HashSet<>()).add(new Intersection(entity, textEntity)); } else { - entity.getRelations().computeIfAbsent(textEntity, k -> new HashSet<>()).add(new Intersection(entity, textEntity)); textEntity.getRelations().computeIfAbsent(entity, k -> new HashSet<>()).add(new Intersection(textEntity, entity)); + entity.getRelations().computeIfAbsent(textEntity, k -> new HashSet<>()).add(new Intersection(entity, textEntity)); } } diff --git a/redaction-service-v1/redaction-service-server-v1/src/test/resources/dictionaries/CBI_author.txt b/redaction-service-v1/redaction-service-server-v1/src/test/resources/dictionaries/CBI_author.txt index 0c1622fc..fed8ecb3 100644 --- a/redaction-service-v1/redaction-service-server-v1/src/test/resources/dictionaries/CBI_author.txt +++ b/redaction-service-v1/redaction-service-server-v1/src/test/resources/dictionaries/CBI_author.txt @@ -8625,5 +8625,4 @@ Mustermann Lastname Bojangles Tambourine Man -Tournayre J.C. -Phillip \ No newline at end of file +Tournayre J.C. \ No newline at end of file