REd-106: rebase auf master

This commit is contained in:
cheng 2020-07-20 10:13:35 +02:00
parent 141e4b9371
commit 9c14f331fd
3 changed files with 4 additions and 4 deletions

View File

@ -27,7 +27,7 @@ public class DictionaryService {
private long dictionaryVersion = -1;
@Getter
private Map<String, Set<String>> dictionaryEntry = new HashMap<>();
private Map<String, Set<String>> dictionary = new HashMap<>();
@Getter
private Map<String, float[]> entryColors = new HashMap<>();
@ -48,7 +48,7 @@ public class DictionaryService {
return;
} else {
entryColors = typeResponse.getTypes().stream().collect(Collectors.toMap(TypeResult::getType, TypeResult::getColor));
dictionaryEntry = entryColors.keySet().stream().collect(Collectors.toMap(type -> type, s -> dictionaryClient.getDictionaryForType(s).getEntries().stream().collect(Collectors.toSet())));
dictionary = entryColors.keySet().stream().collect(Collectors.toMap(type -> type, s -> dictionaryClient.getDictionaryForType(s).getEntries().stream().collect(Collectors.toSet())));
}
} catch (FeignException e) {
log.warn("Got some unknown feignException", e);

View File

@ -104,7 +104,7 @@ public class EntityRedactionService {
String normalizedInputString = searchableText.toString();
Set<Entity> found = new HashSet<>();
for (Map.Entry<String, Set<String>> entry : dictionaryService.getDictionaryEntry().entrySet()) {
for (Map.Entry<String, Set<String>> entry : dictionaryService.getDictionary().entrySet()) {
for (String value : entry.getValue()) {
int startIndex;
int stopIndex = 0;

View File

@ -173,7 +173,7 @@ public class AnnotationHighlightService {
if (!entity.isRedaction()) {
return false;
}
return dictionaryService.getDictionaryEntry().keySet().contains(entity.getType());
return dictionaryService.getDictionary().keySet().contains(entity.getType());
}
private float[] getColor(Entity entity) {