Pull request #206: RED-1908: Removed RedactionChangeLog added changes to RedactionLog
Merge in RED/redaction-service from RED-1908 to master * commit 'e8a4ef172c994ab8dd99f84f7a725e3dddfaca5f': RED-1908: Removed RedactionChangeLog added changes to RedactionLog
This commit is contained in:
commit
25264f1450
@ -0,0 +1,18 @@
|
|||||||
|
package com.iqser.red.service.redaction.v1.model;
|
||||||
|
|
||||||
|
import java.time.OffsetDateTime;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class Change {
|
||||||
|
|
||||||
|
private ChangeType type;
|
||||||
|
private OffsetDateTime dateTime;
|
||||||
|
}
|
||||||
@ -1,5 +1,5 @@
|
|||||||
package com.iqser.red.service.redaction.v1.model;
|
package com.iqser.red.service.redaction.v1.model;
|
||||||
|
|
||||||
public enum ChangeType {
|
public enum ChangeType {
|
||||||
ADDED, REMOVED
|
ADDED, REMOVED, CHANGED
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,22 +0,0 @@
|
|||||||
package com.iqser.red.service.redaction.v1.model;
|
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@AllArgsConstructor
|
|
||||||
@NoArgsConstructor
|
|
||||||
public class RedactionChangeLog {
|
|
||||||
|
|
||||||
private List<RedactionChangeLogEntry> redactionLogEntry = new ArrayList<>();
|
|
||||||
|
|
||||||
private long dictionaryVersion = -1;
|
|
||||||
private long dossierDictionaryVersion = -1;
|
|
||||||
private long rulesVersion = -1;
|
|
||||||
private long legalBasisVersion = -1;
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,49 +0,0 @@
|
|||||||
package com.iqser.red.service.redaction.v1.model;
|
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@Builder
|
|
||||||
@NoArgsConstructor
|
|
||||||
@AllArgsConstructor
|
|
||||||
public class RedactionChangeLogEntry {
|
|
||||||
|
|
||||||
private String id;
|
|
||||||
private String type;
|
|
||||||
private String value;
|
|
||||||
private String reason;
|
|
||||||
private int matchedRule;
|
|
||||||
private String legalBasis;
|
|
||||||
private boolean redacted;
|
|
||||||
private boolean isHint;
|
|
||||||
private boolean isRecommendation;
|
|
||||||
private String section;
|
|
||||||
private float[] color;
|
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
private List<Rectangle> positions = new ArrayList<>();
|
|
||||||
private int sectionNumber;
|
|
||||||
private boolean manual;
|
|
||||||
private Status status;
|
|
||||||
private ManualRedactionType manualRedactionType;
|
|
||||||
private boolean isDictionaryEntry;
|
|
||||||
|
|
||||||
private String textBefore;
|
|
||||||
private String textAfter;
|
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
private List<Comment> comments = new ArrayList<>();
|
|
||||||
|
|
||||||
private ChangeType changeType;
|
|
||||||
|
|
||||||
private boolean isDossierDictionaryEntry;
|
|
||||||
|
|
||||||
private boolean excluded;
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -0,0 +1,17 @@
|
|||||||
|
package com.iqser.red.service.redaction.v1.model;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class RedactionLogChanges {
|
||||||
|
|
||||||
|
private RedactionLog redactionLog;
|
||||||
|
private boolean hasChanges;
|
||||||
|
|
||||||
|
}
|
||||||
@ -58,4 +58,8 @@ public class RedactionLogEntry {
|
|||||||
private String recategorizationType;
|
private String recategorizationType;
|
||||||
private String legalBasisChangeValue;
|
private String legalBasisChangeValue;
|
||||||
|
|
||||||
|
@EqualsAndHashCode.Exclude
|
||||||
|
@Builder.Default
|
||||||
|
private List<Change> changes = new ArrayList<>();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,12 +1,10 @@
|
|||||||
package com.iqser.red.service.redaction.v1.server.redaction.service;
|
package com.iqser.red.service.redaction.v1.server.redaction.service;
|
||||||
|
|
||||||
import com.iqser.red.service.redaction.v1.model.AnalyzeResult;
|
import com.iqser.red.service.redaction.v1.model.AnalyzeResult;
|
||||||
import com.iqser.red.service.redaction.v1.model.RedactionChangeLog;
|
|
||||||
import com.iqser.red.service.redaction.v1.model.RedactionLog;
|
import com.iqser.red.service.redaction.v1.model.RedactionLog;
|
||||||
import com.iqser.red.service.redaction.v1.model.RedactionLogEntry;
|
|
||||||
|
|
||||||
import com.iqser.red.service.redaction.v1.server.settings.RedactionServiceSettings;
|
import com.iqser.red.service.redaction.v1.server.settings.RedactionServiceSettings;
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@ -17,7 +15,7 @@ public class AnalyzeResponseService {
|
|||||||
private final RedactionServiceSettings redactionServiceSettings;
|
private final RedactionServiceSettings redactionServiceSettings;
|
||||||
|
|
||||||
public AnalyzeResult createAnalyzeResponse(String dossierId, String fileId, long duration, int pageCount,
|
public AnalyzeResult createAnalyzeResponse(String dossierId, String fileId, long duration, int pageCount,
|
||||||
RedactionLog redactionLog, RedactionChangeLog redactionChangeLog) {
|
RedactionLog redactionLog, boolean hasUpdates) {
|
||||||
|
|
||||||
boolean hasHints = redactionLog.getRedactionLogEntry()
|
boolean hasHints = redactionLog.getRedactionLogEntry()
|
||||||
.stream()
|
.stream()
|
||||||
@ -41,12 +39,6 @@ public class AnalyzeResponseService {
|
|||||||
.filter(entry -> !entry.isExcluded())
|
.filter(entry -> !entry.isExcluded())
|
||||||
.anyMatch(entry -> entry.isHint() && entry.getType().equals("image") || entry.isImage());
|
.anyMatch(entry -> entry.isHint() && entry.getType().equals("image") || entry.isImage());
|
||||||
|
|
||||||
boolean hasUpdates = redactionChangeLog != null && redactionChangeLog.getRedactionLogEntry() != null && !redactionChangeLog
|
|
||||||
.getRedactionLogEntry()
|
|
||||||
.isEmpty() && redactionChangeLog.getRedactionLogEntry()
|
|
||||||
.stream()
|
|
||||||
.anyMatch(entry -> !entry.getType().equals("false_positive"));
|
|
||||||
|
|
||||||
return AnalyzeResult.builder()
|
return AnalyzeResult.builder()
|
||||||
.dossierId(dossierId)
|
.dossierId(dossierId)
|
||||||
.fileId(fileId)
|
.fileId(fileId)
|
||||||
|
|||||||
@ -78,9 +78,9 @@ public class ReanalyzeService {
|
|||||||
log.info("Analyzed with rules {} and dictionary {} for dossierTemplate: {}", classifiedDoc.getRulesVersion(), classifiedDoc
|
log.info("Analyzed with rules {} and dictionary {} for dossierTemplate: {}", classifiedDoc.getRulesVersion(), classifiedDoc
|
||||||
.getDictionaryVersion(), analyzeRequest.getDossierTemplateId());
|
.getDictionaryVersion(), analyzeRequest.getDossierTemplateId());
|
||||||
|
|
||||||
// first create changelog - this only happens when we migrate files analyzed via the old process and we don't want to loose changeLog data
|
var redactionLogChange = redactionChangeLogService.computeChanges(analyzeRequest.getDossierId(), analyzeRequest.getFileId(), redactionLog);
|
||||||
var changeLog = redactionChangeLogService.createAndStoreChangeLog(analyzeRequest.getDossierId(), analyzeRequest.getFileId(), redactionLog);
|
redactionLog = redactionLogChange.getRedactionLog();
|
||||||
// store redactionLog
|
|
||||||
redactionStorageService.storeObject(analyzeRequest.getDossierId(), analyzeRequest.getFileId(), FileType.REDACTION_LOG, redactionLog);
|
redactionStorageService.storeObject(analyzeRequest.getDossierId(), analyzeRequest.getFileId(), FileType.REDACTION_LOG, redactionLog);
|
||||||
redactionStorageService.storeObject(analyzeRequest.getDossierId(), analyzeRequest.getFileId(), FileType.TEXT, new Text(pageCount, classifiedDoc
|
redactionStorageService.storeObject(analyzeRequest.getDossierId(), analyzeRequest.getFileId(), FileType.TEXT, new Text(pageCount, classifiedDoc
|
||||||
.getSectionText()));
|
.getSectionText()));
|
||||||
@ -88,7 +88,7 @@ public class ReanalyzeService {
|
|||||||
.getSectionGrid());
|
.getSectionGrid());
|
||||||
|
|
||||||
long duration = System.currentTimeMillis() - startTime;
|
long duration = System.currentTimeMillis() - startTime;
|
||||||
return analyzeResponseService.createAnalyzeResponse(analyzeRequest.getDossierId(), analyzeRequest.getFileId(), duration, pageCount, redactionLog, changeLog);
|
return analyzeResponseService.createAnalyzeResponse(analyzeRequest.getDossierId(), analyzeRequest.getFileId(), duration, pageCount, redactionLog, redactionLogChange.isHasChanges());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -266,13 +266,13 @@ public class ReanalyzeService {
|
|||||||
|
|
||||||
excludeExcludedPages(redactionLog, analyzeRequest.getExcludedPages());
|
excludeExcludedPages(redactionLog, analyzeRequest.getExcludedPages());
|
||||||
|
|
||||||
var changeLog = redactionChangeLogService.createAndStoreChangeLog(analyzeRequest.getDossierId(), analyzeRequest.getFileId(), redactionLog);
|
var redactionLogChange = redactionChangeLogService.computeChanges(analyzeRequest.getDossierId(), analyzeRequest.getFileId(), redactionLog);
|
||||||
redactionStorageService.storeObject(analyzeRequest.getDossierId(), analyzeRequest.getFileId(), FileType.REDACTION_LOG, redactionLog);
|
redactionStorageService.storeObject(analyzeRequest.getDossierId(), analyzeRequest.getFileId(), FileType.REDACTION_LOG, redactionLogChange.getRedactionLog());
|
||||||
|
|
||||||
long duration = System.currentTimeMillis() - startTime;
|
long duration = System.currentTimeMillis() - startTime;
|
||||||
|
|
||||||
return analyzeResponseService.createAnalyzeResponse(analyzeRequest.getDossierId(), analyzeRequest.getFileId(), duration, text
|
return analyzeResponseService.createAnalyzeResponse(analyzeRequest.getDossierId(), analyzeRequest.getFileId(), duration, text
|
||||||
.getNumberOfPages(), redactionLog, changeLog);
|
.getNumberOfPages(), redactionLogChange.getRedactionLog(), redactionLogChange.isHasChanges());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,19 +1,25 @@
|
|||||||
package com.iqser.red.service.redaction.v1.server.redaction.service;
|
package com.iqser.red.service.redaction.v1.server.redaction.service;
|
||||||
|
|
||||||
import com.iqser.red.service.file.management.v1.api.model.FileType;
|
import java.time.OffsetDateTime;
|
||||||
import com.iqser.red.service.redaction.v1.model.ChangeType;
|
import java.util.ArrayList;
|
||||||
import com.iqser.red.service.redaction.v1.model.RedactionChangeLog;
|
import java.util.HashMap;
|
||||||
import com.iqser.red.service.redaction.v1.model.RedactionChangeLogEntry;
|
import java.util.HashSet;
|
||||||
import com.iqser.red.service.redaction.v1.model.RedactionLog;
|
import java.util.List;
|
||||||
import com.iqser.red.service.redaction.v1.model.RedactionLogEntry;
|
import java.util.Map;
|
||||||
import com.iqser.red.service.redaction.v1.server.storage.RedactionStorageService;
|
import java.util.Set;
|
||||||
import lombok.RequiredArgsConstructor;
|
import java.util.stream.Collectors;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import com.iqser.red.service.redaction.v1.model.Change;
|
||||||
import java.util.List;
|
import com.iqser.red.service.redaction.v1.model.ChangeType;
|
||||||
import java.util.stream.Collectors;
|
import com.iqser.red.service.redaction.v1.model.RedactionLog;
|
||||||
|
import com.iqser.red.service.redaction.v1.model.RedactionLogChanges;
|
||||||
|
import com.iqser.red.service.redaction.v1.model.RedactionLogEntry;
|
||||||
|
import com.iqser.red.service.redaction.v1.server.storage.RedactionStorageService;
|
||||||
|
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Service
|
@Service
|
||||||
@ -22,76 +28,77 @@ public class RedactionChangeLogService {
|
|||||||
|
|
||||||
private final RedactionStorageService redactionStorageService;
|
private final RedactionStorageService redactionStorageService;
|
||||||
|
|
||||||
public RedactionChangeLog createAndStoreChangeLog(String dossierId, String fileId, RedactionLog currentRedactionLog) {
|
|
||||||
|
|
||||||
try {
|
public RedactionLogChanges computeChanges(String dossierId, String fileId, RedactionLog currentRedactionLog) {
|
||||||
RedactionLog previousRedactionLog = redactionStorageService.getRedactionLog(dossierId, fileId);
|
|
||||||
var changeLog = createChangeLog(currentRedactionLog, previousRedactionLog);
|
|
||||||
redactionStorageService.storeObject(dossierId, fileId, FileType.REDACTION_CHANGELOG, changeLog);
|
|
||||||
return changeLog;
|
|
||||||
} catch (Exception e) {
|
|
||||||
log.debug("Previous redaction log not available");
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
private RedactionChangeLog createChangeLog(RedactionLog currentRedactionLog, RedactionLog previousRedactionLog) {
|
|
||||||
|
|
||||||
|
RedactionLog previousRedactionLog = redactionStorageService.getRedactionLog(dossierId, fileId);
|
||||||
|
|
||||||
if (previousRedactionLog == null) {
|
if (previousRedactionLog == null) {
|
||||||
return null;
|
currentRedactionLog.getRedactionLogEntry().forEach(entry -> {
|
||||||
|
entry.getChanges().add(new Change(ChangeType.ADDED, OffsetDateTime.now()));
|
||||||
|
});
|
||||||
|
return new RedactionLogChanges(currentRedactionLog, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
List<RedactionLogEntry> added = new ArrayList<>(currentRedactionLog.getRedactionLogEntry());
|
List<RedactionLogEntry> notRemovedPreviousEntries = previousRedactionLog.getRedactionLogEntry()
|
||||||
added.removeAll(previousRedactionLog.getRedactionLogEntry());
|
.stream()
|
||||||
|
.filter(entry -> !entry.getChanges()
|
||||||
|
.get(entry.getChanges().size() - 1)
|
||||||
|
.getType()
|
||||||
|
.equals(ChangeType.REMOVED))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
List<RedactionLogEntry> removed = new ArrayList<>(previousRedactionLog.getRedactionLogEntry());
|
Set<RedactionLogEntry> added = new HashSet<>(currentRedactionLog.getRedactionLogEntry());
|
||||||
|
added.removeAll(notRemovedPreviousEntries);
|
||||||
|
|
||||||
|
Set<RedactionLogEntry> removed = new HashSet<>(notRemovedPreviousEntries);
|
||||||
removed.removeAll(currentRedactionLog.getRedactionLogEntry());
|
removed.removeAll(currentRedactionLog.getRedactionLogEntry());
|
||||||
|
|
||||||
List<RedactionChangeLogEntry> changeLogEntries = added.stream()
|
Map<String, RedactionLogEntry> addedIds = new HashMap<>();
|
||||||
.map(entry -> convert(entry, ChangeType.ADDED))
|
added.forEach(entry -> {
|
||||||
.collect(Collectors.toList());
|
addedIds.put(entry.getId(), entry);
|
||||||
changeLogEntries.addAll(removed.stream()
|
});
|
||||||
.map(entry -> convert(entry, ChangeType.REMOVED))
|
|
||||||
.collect(Collectors.toList()));
|
|
||||||
|
|
||||||
return new RedactionChangeLog(changeLogEntries,
|
Set<String> removedIds = new HashSet<>();
|
||||||
currentRedactionLog.getDictionaryVersion(),
|
removed.forEach(entry -> {
|
||||||
currentRedactionLog.getDossierDictionaryVersion(),
|
removedIds.add(entry.getId());
|
||||||
currentRedactionLog.getRulesVersion(),
|
});
|
||||||
currentRedactionLog.getLegalBasisVersion());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
List<RedactionLogEntry> newRedactionLogEntries = previousRedactionLog.getRedactionLogEntry();
|
||||||
|
|
||||||
private RedactionChangeLogEntry convert(RedactionLogEntry entry, ChangeType changeType) {
|
List<RedactionLogEntry> toRemove = new ArrayList<>();
|
||||||
|
newRedactionLogEntries.forEach(entry -> {
|
||||||
|
if (removedIds.contains(entry.getId()) && addedIds.containsKey(entry.getId())) {
|
||||||
|
List<Change> changes = entry.getChanges();
|
||||||
|
changes.add(new Change(ChangeType.CHANGED, OffsetDateTime.now()));
|
||||||
|
var newEntry = addedIds.get(entry.getId());
|
||||||
|
newEntry.setChanges(changes);
|
||||||
|
addedIds.put(entry.getId(), newEntry);
|
||||||
|
toRemove.add(entry);
|
||||||
|
} else if (removedIds.contains(entry.getId())) {
|
||||||
|
entry.getChanges().add(new Change(ChangeType.REMOVED, OffsetDateTime.now()));
|
||||||
|
} else if (addedIds.containsKey(entry.getId())) {
|
||||||
|
List<Change> changes = entry.getChanges();
|
||||||
|
changes.add(new Change(ChangeType.ADDED, OffsetDateTime.now()));
|
||||||
|
var newEntry = addedIds.get(entry.getId());
|
||||||
|
newEntry.setChanges(changes);
|
||||||
|
addedIds.put(entry.getId(), newEntry);
|
||||||
|
toRemove.add(entry);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
return RedactionChangeLogEntry.builder()
|
newRedactionLogEntries.removeAll(toRemove);
|
||||||
.id(entry.getId())
|
|
||||||
.type(entry.getType())
|
addedIds.forEach((k, v) -> {
|
||||||
.value(entry.getValue())
|
if(v.getChanges().isEmpty()) {
|
||||||
.reason(entry.getReason())
|
v.getChanges().add(new Change(ChangeType.ADDED, OffsetDateTime.now()));
|
||||||
.matchedRule(entry.getMatchedRule())
|
}
|
||||||
.legalBasis(entry.getLegalBasis())
|
newRedactionLogEntries.add(v);
|
||||||
.redacted(entry.isRedacted())
|
});
|
||||||
.isHint(entry.isHint())
|
|
||||||
.isRecommendation(entry.isRecommendation())
|
currentRedactionLog.setRedactionLogEntry(newRedactionLogEntries);
|
||||||
.section(entry.getSection())
|
|
||||||
.color(entry.getColor())
|
return new RedactionLogChanges(currentRedactionLog, !addedIds.isEmpty() || !removedIds.isEmpty());
|
||||||
.positions(entry.getPositions())
|
|
||||||
.sectionNumber(entry.getSectionNumber())
|
|
||||||
.manual(entry.isManual())
|
|
||||||
.status(entry.getStatus())
|
|
||||||
.manualRedactionType(entry.getManualRedactionType())
|
|
||||||
.isDictionaryEntry(entry.isDictionaryEntry())
|
|
||||||
.textBefore(entry.getTextBefore())
|
|
||||||
.textAfter(entry.getTextAfter())
|
|
||||||
.comments(entry.getComments())
|
|
||||||
.changeType(changeType)
|
|
||||||
.isDossierDictionaryEntry(entry.isDossierDictionaryEntry())
|
|
||||||
.excluded(entry.isExcluded())
|
|
||||||
.build();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -714,10 +714,13 @@ public class RedactionIntegrationTest {
|
|||||||
reanlysisVersions.put("physical", 2L);
|
reanlysisVersions.put("physical", 2L);
|
||||||
|
|
||||||
deleted.add("David Chubb");
|
deleted.add("David Chubb");
|
||||||
|
deleted.add("mouse");
|
||||||
|
|
||||||
dictionary.get(FALSE_POSITIVE).add("David Chubb");
|
dictionary.get(FALSE_POSITIVE).add("David Chubb");
|
||||||
reanlysisVersions.put("David Chubb", 3L);
|
reanlysisVersions.put("David Chubb", 3L);
|
||||||
|
|
||||||
|
reanlysisVersions.put("mouse", 3L);
|
||||||
|
|
||||||
when(dictionaryClient.getVersion(TEST_DOSSIER_TEMPLATE_ID, DictionaryResource.GLOBAL_DOSSIER)).thenReturn(3L);
|
when(dictionaryClient.getVersion(TEST_DOSSIER_TEMPLATE_ID, DictionaryResource.GLOBAL_DOSSIER)).thenReturn(3L);
|
||||||
|
|
||||||
when(dictionaryClient.getDictionaryForType(VERTEBRATE, TEST_DOSSIER_TEMPLATE_ID, DictionaryResource.GLOBAL_DOSSIER))
|
when(dictionaryClient.getDictionaryForType(VERTEBRATE, TEST_DOSSIER_TEMPLATE_ID, DictionaryResource.GLOBAL_DOSSIER))
|
||||||
@ -754,6 +757,20 @@ public class RedactionIntegrationTest {
|
|||||||
fileOutputStream.write(annotateResponse.getDocument());
|
fileOutputStream.write(annotateResponse.getDocument());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
deleted.remove("mouse");
|
||||||
|
reanlysisVersions.put("mouse", 4L);
|
||||||
|
|
||||||
|
when(dictionaryClient.getVersion(TEST_DOSSIER_TEMPLATE_ID, DictionaryResource.GLOBAL_DOSSIER)).thenReturn(4L);
|
||||||
|
|
||||||
|
when(dictionaryClient.getDictionaryForType(VERTEBRATE, TEST_DOSSIER_TEMPLATE_ID, DictionaryResource.GLOBAL_DOSSIER))
|
||||||
|
.thenReturn(getDictionaryResponse(VERTEBRATE, false));
|
||||||
|
|
||||||
|
reanalyzeService.reanalyze(request);
|
||||||
|
|
||||||
|
redactionLog = redactionStorageService.getRedactionLog(TEST_DOSSIER_ID, TEST_FILE_ID);
|
||||||
|
|
||||||
|
System.out.println("hi");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user