diff --git a/redaction-report-service-v1/redaction-report-service-api-v1/pom.xml b/redaction-report-service-v1/redaction-report-service-api-v1/pom.xml
index 5c5075d..2dbe65c 100644
--- a/redaction-report-service-v1/redaction-report-service-api-v1/pom.xml
+++ b/redaction-report-service-v1/redaction-report-service-api-v1/pom.xml
@@ -17,7 +17,7 @@
com.iqser.red.service
redaction-service-api-v1
- 1.3.3
+ 1.4.7
diff --git a/redaction-report-service-v1/redaction-report-service-server-v1/pom.xml b/redaction-report-service-v1/redaction-report-service-server-v1/pom.xml
index e67d37a..a889c66 100644
--- a/redaction-report-service-v1/redaction-report-service-server-v1/pom.xml
+++ b/redaction-report-service-v1/redaction-report-service-server-v1/pom.xml
@@ -19,6 +19,11 @@
redaction-report-service-api-v1
${project.version}
+
+ com.iqser.red.service
+ configuration-service-api-v1
+ 1.3.0
+
org.apache.poi
poi
diff --git a/redaction-report-service-v1/redaction-report-service-server-v1/src/main/java/com/iqser/red/service/redaction/report/v1/server/Application.java b/redaction-report-service-v1/redaction-report-service-server-v1/src/main/java/com/iqser/red/service/redaction/report/v1/server/Application.java
index 85b8175..c626006 100644
--- a/redaction-report-service-v1/redaction-report-service-server-v1/src/main/java/com/iqser/red/service/redaction/report/v1/server/Application.java
+++ b/redaction-report-service-v1/redaction-report-service-server-v1/src/main/java/com/iqser/red/service/redaction/report/v1/server/Application.java
@@ -10,13 +10,14 @@ import org.springframework.context.annotation.Import;
import org.springframework.scheduling.annotation.EnableAsync;
import com.iqser.red.commons.spring.DefaultWebMvcConfiguration;
+import com.iqser.red.service.redaction.report.v1.server.client.LegalBasisMappingClient;
import com.iqser.red.service.redaction.report.v1.server.settings.RedactionReportSettings;
@EnableAsync
@EnableConfigurationProperties(RedactionReportSettings.class)
@SpringBootApplication(exclude = {SecurityAutoConfiguration.class, ManagementWebSecurityAutoConfiguration.class})
@Import(DefaultWebMvcConfiguration.class)
-@EnableFeignClients // TODO specify basePackageClasses
+@EnableFeignClients(basePackageClasses = {LegalBasisMappingClient.class})
public class Application {
/**
diff --git a/redaction-report-service-v1/redaction-report-service-server-v1/src/main/java/com/iqser/red/service/redaction/report/v1/server/client/LegalBasisMappingClient.java b/redaction-report-service-v1/redaction-report-service-server-v1/src/main/java/com/iqser/red/service/redaction/report/v1/server/client/LegalBasisMappingClient.java
new file mode 100644
index 0000000..eebd915
--- /dev/null
+++ b/redaction-report-service-v1/redaction-report-service-server-v1/src/main/java/com/iqser/red/service/redaction/report/v1/server/client/LegalBasisMappingClient.java
@@ -0,0 +1,10 @@
+package com.iqser.red.service.redaction.report.v1.server.client;
+
+import org.springframework.cloud.openfeign.FeignClient;
+
+import com.iqser.red.service.configuration.v1.api.resource.LegalBasisMappingResource;
+import com.iqser.red.service.configuration.v1.api.resource.RulesResource;
+
+@FeignClient(name = "LegalBasisMappingResource", url = "http://" + RulesResource.SERVICE_NAME + ":8080")
+public interface LegalBasisMappingClient extends LegalBasisMappingResource {
+}
\ No newline at end of file
diff --git a/redaction-report-service-v1/redaction-report-service-server-v1/src/main/java/com/iqser/red/service/redaction/report/v1/server/service/ReportGenerationService.java b/redaction-report-service-v1/redaction-report-service-server-v1/src/main/java/com/iqser/red/service/redaction/report/v1/server/service/ReportGenerationService.java
index 2daba72..e53402d 100644
--- a/redaction-report-service-v1/redaction-report-service-server-v1/src/main/java/com/iqser/red/service/redaction/report/v1/server/service/ReportGenerationService.java
+++ b/redaction-report-service-v1/redaction-report-service-server-v1/src/main/java/com/iqser/red/service/redaction/report/v1/server/service/ReportGenerationService.java
@@ -4,30 +4,41 @@ import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.util.List;
+import java.util.Map;
import java.util.stream.Collectors;
import javax.annotation.PostConstruct;
import org.apache.poi.xwpf.usermodel.XWPFDocument;
+import org.apache.poi.xwpf.usermodel.XWPFParagraph;
+import org.apache.poi.xwpf.usermodel.XWPFRun;
import org.apache.poi.xwpf.usermodel.XWPFTable;
+import org.apache.poi.xwpf.usermodel.XWPFTableCell;
import org.apache.poi.xwpf.usermodel.XWPFTableRow;
import org.springframework.stereotype.Service;
+import com.iqser.red.service.configuration.v1.api.model.LegalBasisMapping;
import com.iqser.red.service.redaction.report.v1.api.model.MultiFileRedactionLog;
+import com.iqser.red.service.redaction.report.v1.server.client.LegalBasisMappingClient;
import com.iqser.red.service.redaction.report.v1.server.utils.ResourceLoader;
+import com.iqser.red.service.redaction.v1.model.ManualRedactionType;
import com.iqser.red.service.redaction.v1.model.Rectangle;
import com.iqser.red.service.redaction.v1.model.Status;
+import lombok.RequiredArgsConstructor;
+
@Service
+@RequiredArgsConstructor
public class ReportGenerationService {
+ private final LegalBasisMappingClient legalBasisMappingClient;
private byte[] template;
@PostConstruct
public void init() {
- template = ResourceLoader.load("templates/Appendix A2.docx");
+ template = ResourceLoader.load("templates/EFSA Template 1.docx");
}
@@ -35,7 +46,8 @@ public class ReportGenerationService {
try (ByteArrayInputStream is = new ByteArrayInputStream(template)) {
XWPFDocument doc = new XWPFDocument(is);
- addTableRows(doc, multiFileRedactionLog);
+ LegalBasisMapping legalBasisMapping = legalBasisMappingClient.getLegalBasisMapping();
+ addTableRows(doc, multiFileRedactionLog, legalBasisMapping.getReasonByLegalBasis());
return toByteArray(doc);
} catch (IOException e) {
throw new RuntimeException(e);
@@ -43,17 +55,34 @@ public class ReportGenerationService {
}
- private void addTableRows(XWPFDocument doc, MultiFileRedactionLog multiFileRedactionLog) {
+ private void addTableRows(XWPFDocument doc, MultiFileRedactionLog multiFileRedactionLog,
+ Map reasonByLegalBasis) {
- XWPFTable table = doc.getTables().get(1);
+ XWPFTable table = doc.getTables().get(0);
multiFileRedactionLog.getRedactionLogs().forEach(fileRedactionLog -> {
- fileRedactionLog.getRedactionLogEntry().forEach(redactionLogEntry -> {
- if (redactionLogEntry.isRedacted()) {
- if (redactionLogEntry.isManual() && !redactionLogEntry.getStatus().equals(Status.APPROVED)) {
+
+ XWPFTableRow singelColumnRow = table.createRow();
+ singelColumnRow.getCell(3).getCTTc().newCursor().removeXml();
+ singelColumnRow.getCell(2).getCTTc().newCursor().removeXml();
+ singelColumnRow.getCell(1).getCTTc().newCursor().removeXml();
+ setText(singelColumnRow.getCell(0), fileRedactionLog.getFilename());
+
+ fileRedactionLog.getRedactionLogEntry().forEach(entry -> {
+
+ if (entry.isRedacted()) {
+
+ if (entry.isManual() && entry.getManualRedactionType()
+ .equals(ManualRedactionType.ADD) && !entry.getStatus().equals(Status.APPROVED)) {
return;
}
- List pages = redactionLogEntry.getPositions()
+
+ if (entry.isManual() && entry.getManualRedactionType()
+ .equals(ManualRedactionType.REMOVE) && entry.getStatus().equals(Status.APPROVED)) {
+ return;
+ }
+
+ List pages = entry.getPositions()
.stream()
.map(Rectangle::getPage)
.distinct()
@@ -61,10 +90,10 @@ public class ReportGenerationService {
.collect(Collectors.toList());
pages.forEach(page -> {
XWPFTableRow row = table.createRow();
- row.getCell(0).setText(fileRedactionLog.getFilename());
- row.getCell(1).setText(String.valueOf(page));
- row.getCell(2).setText(redactionLogEntry.getSection());
- row.getCell(3).setText(redactionLogEntry.getReason() + "; " + redactionLogEntry.getLegalBasis());
+ setText(row.getCell(0), String.valueOf(page));
+ setText(row.getCell(1), entry.getSection());
+ setText(row.getCell(2), entry.getLegalBasis());
+ setText(row.getCell(3), reasonByLegalBasis.get(entry.getLegalBasis()));
});
}
});
@@ -73,6 +102,17 @@ public class ReportGenerationService {
}
+ private void setText(XWPFTableCell cell, String value) {
+
+ cell.setVerticalAlignment(XWPFTableCell.XWPFVertAlign.CENTER);
+ cell.removeParagraph(0);
+ XWPFParagraph addParagraph = cell.addParagraph();
+ XWPFRun run = addParagraph.createRun();
+ run.setFontSize(10);
+ run.setText(value);
+ }
+
+
private byte[] toByteArray(XWPFDocument doc) throws IOException {
try (ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream()) {
diff --git a/redaction-report-service-v1/redaction-report-service-server-v1/src/main/resources/templates/Appendix A2.docx b/redaction-report-service-v1/redaction-report-service-server-v1/src/main/resources/templates/Appendix A2.docx
deleted file mode 100644
index 5e485b3..0000000
Binary files a/redaction-report-service-v1/redaction-report-service-server-v1/src/main/resources/templates/Appendix A2.docx and /dev/null differ
diff --git a/redaction-report-service-v1/redaction-report-service-server-v1/src/main/resources/templates/EFSA Template 1.docx b/redaction-report-service-v1/redaction-report-service-server-v1/src/main/resources/templates/EFSA Template 1.docx
new file mode 100644
index 0000000..e05d404
Binary files /dev/null and b/redaction-report-service-v1/redaction-report-service-server-v1/src/main/resources/templates/EFSA Template 1.docx differ
diff --git a/redaction-report-service-v1/redaction-report-service-server-v1/src/test/java/com/iqser/red/service/redaction/report/v1/server/RedactionReportIntegrationTest.java b/redaction-report-service-v1/redaction-report-service-server-v1/src/test/java/com/iqser/red/service/redaction/report/v1/server/RedactionReportIntegrationTest.java
index d80da64..bb09d15 100644
--- a/redaction-report-service-v1/redaction-report-service-server-v1/src/test/java/com/iqser/red/service/redaction/report/v1/server/RedactionReportIntegrationTest.java
+++ b/redaction-report-service-v1/redaction-report-service-server-v1/src/test/java/com/iqser/red/service/redaction/report/v1/server/RedactionReportIntegrationTest.java
@@ -1,5 +1,6 @@
package com.iqser.red.service.redaction.report.v1.server;
+import static org.mockito.Mockito.when;
import static org.springframework.boot.test.context.SpringBootTest.WebEnvironment.DEFINED_PORT;
import java.io.FileOutputStream;
@@ -10,12 +11,15 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.core.io.ClassPathResource;
import org.springframework.test.context.junit4.SpringRunner;
import com.fasterxml.jackson.databind.ObjectMapper;
+import com.iqser.red.service.configuration.v1.api.model.LegalBasisMapping;
import com.iqser.red.service.redaction.report.v1.api.model.MultiFileRedactionLog;
import com.iqser.red.service.redaction.report.v1.api.model.ReportResult;
+import com.iqser.red.service.redaction.report.v1.server.client.LegalBasisMappingClient;
import com.iqser.red.service.redaction.report.v1.server.controller.RedactionReportController;
import com.iqser.red.service.redaction.v1.model.RedactionLog;
@@ -29,11 +33,20 @@ public class RedactionReportIntegrationTest {
@Autowired
private RedactionReportController redactionReportController;
+ @MockBean
+ private LegalBasisMappingClient legalBasisMappingClient;
+
@Test
public void testReportGeneration() throws IOException {
- ClassPathResource redactionLogResource = new ClassPathResource("files/RedactionLogManual.txt");
+ ClassPathResource legalBasisMappingResource = new ClassPathResource("files/LegalBasisMapping.json");
+
+ LegalBasisMapping legalBasisMapping = objectMapper.readValue(legalBasisMappingResource.getInputStream(), LegalBasisMapping.class);
+
+ when(legalBasisMappingClient.getLegalBasisMapping()).thenReturn(legalBasisMapping);
+
+ ClassPathResource redactionLogResource = new ClassPathResource("files/RedactedLog.txt");
RedactionLog redactionLog = objectMapper.readValue(redactionLogResource.getInputStream(), RedactionLog.class);
diff --git a/redaction-report-service-v1/redaction-report-service-server-v1/src/test/resources/files/LegalBasisMapping.json b/redaction-report-service-v1/redaction-report-service-server-v1/src/test/resources/files/LegalBasisMapping.json
new file mode 100644
index 0000000..6d389cf
--- /dev/null
+++ b/redaction-report-service-v1/redaction-report-service-server-v1/src/test/resources/files/LegalBasisMapping.json
@@ -0,0 +1 @@
+{"reasonByLegalBasis":{"Reg (EC) No 1107/2009 Art. 63 (2d)":"methods of analysis for impurities in the active substance as manufactured except for methods for impurities that are considered to be toxicologically, ecotoxicologically or environmentally relevant","Reg (EC) No 1107/2009 Art. 63 (2c)":"results of production batches of the active substance including impurities","Reg (EC) No 1107/2009 Art. 63 (2b)":"the specification of impurity of the active substance except for the impurities that are considered to be toxicologically, ecotoxicologically or environmentally relevant","Reg (EC) No 1107/2009 Art. 63 (2a)":"the method of manufacture","Reg (EC) No 1107/2009 Art. 63 (2g)":"names and addresses of persons involved in testing on vertebrate animals","Reg (EC) No 1107/2009 Art. 63 (2f)":"information on the complete composition of a plant protection product","Reg (EC) No 1107/2009 Art. 63 (2e)":"links between a producer or importer and the applicant or the authorisation holder"}}
\ No newline at end of file
diff --git a/redaction-report-service-v1/redaction-report-service-server-v1/src/test/resources/files/RedactedLog.txt b/redaction-report-service-v1/redaction-report-service-server-v1/src/test/resources/files/RedactedLog.txt
new file mode 100644
index 0000000..bdc9b4c
--- /dev/null
+++ b/redaction-report-service-v1/redaction-report-service-server-v1/src/test/resources/files/RedactedLog.txt
@@ -0,0 +1 @@
+{"redactionLogEntry":[{"id":"ba922aabe15e334569dc06b212b3a15b","type":"address","value":"regina.dorn@syngenta.com","reason":"Applicant information was found","matchedRule":6,"legalBasis":"Reg (EC) No 1107/2009 Art. 63 (2g)","redacted":true,"section":"B.1 Identity","color":[0.0,1.0,1.0],"positions":[{"topLeft":{"x":147.86,"y":517.43},"width":122.451065,"height":11.017679,"page":4}],"sectionNumber":13,"manual":false,"status":null,"manualRedactionType":null,"hint":false},{"id":"b841bb2734863a14e95cb15efdf98172","type":"address","value":"+41 (61) 323 6358","reason":"Applicant information was found","matchedRule":6,"legalBasis":"Reg (EC) No 1107/2009 Art. 63 (2g)","redacted":true,"section":"B.1 Identity","color":[0.0,1.0,1.0],"positions":[{"topLeft":{"x":147.86,"y":542.75},"width":83.41362,"height":11.017679,"page":4}],"sectionNumber":13,"manual":false,"status":null,"manualRedactionType":null,"hint":false},{"id":"d39269482f83c64453153826d8de0a5f","type":"address","value":"Patrick Gardinal","reason":"Producer was found","matchedRule":7,"legalBasis":"Reg (EC) No 1107/2009 Art. 63 (2g)","redacted":true,"section":"B.1.1.2 Producer of the plant protection product","color":[0.0,1.0,1.0],"positions":[{"topLeft":{"x":148.94,"y":404.39},"width":73.40033,"height":11.017679,"page":4}],"sectionNumber":14,"manual":false,"status":null,"manualRedactionType":null,"hint":false},{"id":"9ddda875972c0fbcda02ae551cd0d07a","type":"address","value":"+41 (0) 61 323 60 51","reason":"Producer was found","matchedRule":7,"legalBasis":"Reg (EC) No 1107/2009 Art. 63 (2g)","redacted":true,"section":"B.1.1.2 Producer of the plant protection product","color":[0.0,1.0,1.0],"positions":[{"topLeft":{"x":148.94,"y":328.53},"width":94.33217,"height":11.017679,"page":4}],"sectionNumber":14,"manual":false,"status":null,"manualRedactionType":null,"hint":false},{"id":"9e289c70c17cb2b3bf7c96b070d44533","type":"address","value":"patrick.gardinal@syngenta.com","reason":"Producer was found","matchedRule":7,"legalBasis":"Reg (EC) No 1107/2009 Art. 63 (2g)","redacted":true,"section":"B.1.1.2 Producer of the plant protection product","color":[0.0,1.0,1.0],"positions":[{"topLeft":{"x":148.94,"y":303.21002},"width":141.26324,"height":11.017679,"page":4}],"sectionNumber":14,"manual":false,"status":null,"manualRedactionType":null,"hint":false},{"id":"10a4893ec30e268c951b8026e0dc3e11","type":"address","value":"Syngenta Crop Protection AG","reason":"Applicant information was found","matchedRule":6,"legalBasis":"Reg (EC) No 1107/2009 Art. 63 (2g)","redacted":true,"section":"B.1 Identity","color":[0.0,1.0,1.0],"positions":[{"topLeft":{"x":147.86,"y":631.34},"width":133.3113,"height":11.017679,"page":4}],"sectionNumber":13,"manual":false,"status":null,"manualRedactionType":null,"hint":false},{"id":"86b754bc4e70f45038b465a66c0e927b","type":"address","value":"Regina Dorn","reason":"Applicant information was found","matchedRule":6,"legalBasis":"Reg (EC) No 1107/2009 Art. 63 (2g)","redacted":true,"section":"B.1 Identity","color":[0.0,1.0,1.0],"positions":[{"topLeft":{"x":147.86,"y":555.47},"width":57.624176,"height":11.017679,"page":4}],"sectionNumber":13,"manual":false,"status":null,"manualRedactionType":null,"hint":false},{"id":"fd367ab592da09165d1bcd52cfddaf68","type":"address","value":"Syngenta Crop Protection AG","reason":"Producer was found","matchedRule":7,"legalBasis":"Reg (EC) No 1107/2009 Art. 63 (2g)","redacted":true,"section":"B.1.1.2 Producer of the plant protection product","color":[0.0,1.0,1.0],"positions":[{"topLeft":{"x":148.94,"y":455.03},"width":133.34088,"height":11.017679,"page":4}],"sectionNumber":14,"manual":false,"status":null,"manualRedactionType":null,"hint":false},{"id":"3ae8841f1e9a6e022af1880aaa2853ef","type":"address","value":"Syngenta Crop Protection AG","reason":"Producer was found","matchedRule":7,"legalBasis":"Reg (EC) No 1107/2009 Art. 63 (2g)","redacted":true,"section":"B.1.1.2 Producer of the plant protection product","color":[0.0,1.0,1.0],"positions":[{"topLeft":{"x":148.94,"y":391.77},"width":133.23718,"height":11.017679,"page":4}],"sectionNumber":14,"manual":false,"status":null,"manualRedactionType":null,"hint":false},{"id":"027e744e97c8c1cecb974023f8792055","type":"address","value":"+41 (61) 323 6155","reason":"Applicant information was found","matchedRule":6,"legalBasis":"Reg (EC) No 1107/2009 Art. 63 (2g)","redacted":true,"section":"B.1 Identity","color":[0.0,1.0,1.0],"positions":[{"topLeft":{"x":147.86,"y":530.15},"width":83.41362,"height":11.017679,"page":4}],"sectionNumber":13,"manual":false,"status":null,"manualRedactionType":null,"hint":false},{"id":"a022f9ecad5b06f9da7bc2ebdcc97c17","type":"address","value":"+41 (0) 61 323 61 55","reason":"Producer was found","matchedRule":7,"legalBasis":"Reg (EC) No 1107/2009 Art. 63 (2g)","redacted":true,"section":"B.1.1.2 Producer of the plant protection product","color":[0.0,1.0,1.0],"positions":[{"topLeft":{"x":148.94,"y":315.81},"width":94.33217,"height":11.017679,"page":4}],"sectionNumber":14,"manual":false,"status":null,"manualRedactionType":null,"hint":false}],"dictionaryVersion":0,"rulesVersion":0,"filename":null}
\ No newline at end of file
diff --git a/redaction-report-service-v1/redaction-report-service-server-v1/src/test/resources/files/RedactionLog.txt b/redaction-report-service-v1/redaction-report-service-server-v1/src/test/resources/files/RedactionLog.txt
deleted file mode 100644
index 38abcc4..0000000
--- a/redaction-report-service-v1/redaction-report-service-server-v1/src/test/resources/files/RedactionLog.txt
+++ /dev/null
@@ -1 +0,0 @@
-{"redactionLogEntry":[{"id":"3080535605f06a5a397c4a9a5e501e9e","type":"address","value":"Regina Dorn","reason":"Applicant information was found","redacted":true,"section":"1.2.1 Name and address of applicant(s) for approval of the active substance","color":[0.0,1.0,1.0],"positions":[{"topLeft":{"x":147.86,"y":226.28998},"width":32.17697,"height":11.017679,"page":1},{"topLeft":{"x":181.79697,"y":226.28998},"width":23.68721,"height":11.017679,"page":1}],"sectionNumber":3,"manual":false,"hint":false},{"id":"b54d906a78a3988c54c67f188acab849","type":"address","value":"Schwarzwaldallee 215 P.O. Box CH-4002 Basel Switzerland","reason":"Applicant information was found","redacted":true,"section":"1.2.1 Name and address of applicant(s) for approval of the active substance","color":[0.0,1.0,1.0],"positions":[{"topLeft":{"x":147.86,"y":289.52997},"width":81.095245,"height":11.017679,"page":1},{"topLeft":{"x":230.73732,"y":289.52997},"width":17.438568,"height":11.017679,"page":1},{"topLeft":{"x":147.86,"y":276.93},"width":20.562881,"height":11.017679,"page":1},{"topLeft":{"x":170.18288,"y":276.93},"width":19.359528,"height":11.017679,"page":1},{"topLeft":{"x":147.86,"y":264.21002},"width":41.950012,"height":11.017679,"page":1},{"topLeft":{"x":191.57,"y":264.21002},"width":25.519852,"height":11.017679,"page":1},{"topLeft":{"x":147.86,"y":251.60999},"width":53.649796,"height":11.017679,"page":1}],"sectionNumber":3,"manual":false,"hint":false},{"id":"7b4ff6e32a8bdaa7de5dcdeb13ff8edd","type":"address","value":"regina.dorn@syngenta.com","reason":"Applicant information was found","redacted":true,"section":"1.2.1 Name and address of applicant(s) for approval of the active substance","color":[0.0,1.0,1.0],"positions":[{"topLeft":{"x":147.86,"y":188.34003},"width":122.451065,"height":11.017679,"page":1}],"sectionNumber":3,"manual":false,"hint":false},{"id":"c357d6781fb4bb7e7020a67dbc63763c","type":"address","value":"Syngenta Crop Protection AG","reason":"Applicant information was found","redacted":true,"section":"1.2.1 Name and address of applicant(s) for approval of the active substance","color":[0.0,1.0,1.0],"positions":[{"topLeft":{"x":147.86,"y":302.25},"width":41.88115,"height":11.017679,"page":1},{"topLeft":{"x":191.50114,"y":302.25},"width":23.080002,"height":11.017679,"page":1},{"topLeft":{"x":216.34114,"y":302.25},"width":46.23088,"height":11.017679,"page":1},{"topLeft":{"x":264.2106,"y":302.25},"width":16.886566,"height":11.017679,"page":1}],"sectionNumber":3,"manual":false,"hint":false},{"id":"946a2cc404d6568d34b1ca9a4c688ec9","type":"address","value":"+41 (61) 323 6358","reason":"Applicant information was found","redacted":true,"section":"1.2.1 Name and address of applicant(s) for approval of the active substance","color":[0.0,1.0,1.0],"positions":[{"topLeft":{"x":147.86,"y":213.65997},"width":18.266571,"height":11.017679,"page":1},{"topLeft":{"x":167.88657,"y":213.65997},"width":19.315353,"height":11.017679,"page":1},{"topLeft":{"x":188.99504,"y":213.65997},"width":17.438568,"height":11.017679,"page":1},{"topLeft":{"x":208.1936,"y":213.65997},"width":23.080017,"height":11.017679,"page":1}],"sectionNumber":3,"manual":false,"hint":false},{"id":"687171974a4fc3aa0f43ec2118256590","type":"address","value":"+41 (61) 323 6155","reason":"Applicant information was found","redacted":true,"section":"1.2.1 Name and address of applicant(s) for approval of the active substance","color":[0.0,1.0,1.0],"positions":[{"topLeft":{"x":147.86,"y":200.94},"width":18.266571,"height":11.017679,"page":1},{"topLeft":{"x":167.88657,"y":200.94},"width":19.315353,"height":11.017679,"page":1},{"topLeft":{"x":188.99504,"y":200.94},"width":17.438568,"height":11.017679,"page":1},{"topLeft":{"x":208.1936,"y":200.94},"width":23.080017,"height":11.017679,"page":1}],"sectionNumber":3,"manual":false,"hint":false}]}
\ No newline at end of file
diff --git a/redaction-report-service-v1/redaction-report-service-server-v1/src/test/resources/files/RedactionLogManual.txt b/redaction-report-service-v1/redaction-report-service-server-v1/src/test/resources/files/RedactionLogManual.txt
deleted file mode 100644
index f39b958..0000000
--- a/redaction-report-service-v1/redaction-report-service-server-v1/src/test/resources/files/RedactionLogManual.txt
+++ /dev/null
@@ -1,429 +0,0 @@
-{
- "redactionLogEntry": [
- {
- "id": "e5be0f1d941bbb92a068e198648d06c4",
- "type": "name",
- "value": "Robinson N.",
- "reason": "Not redacted because row is not a vertebrate study",
- "legalBasis": "Reg (EC) No 1107/2009 Art. 63 (2g)",
- "redacted": false,
- "section": "Table in: ",
- "color": [
- 0.8,
- 0.8,
- 0.8
- ],
- "positions": [
- {
- "topLeft": {
- "x": 142.04396,
- "y": 241.282
- },
- "width": 7.648056,
- "height": 42.43087,
- "page": 1
- }
- ],
- "sectionNumber": 3,
- "manual": false,
- "status": null,
- "hint": false
- },
- {
- "id": "0295bbdff66926ebb57b03641bba7ba8",
- "type": "address",
- "value": "Syngenta Crop Protection AG, Basel, Switzerland",
- "reason": "Not redacted because row is not a vertebrate study",
- "legalBasis": "Reg (EC) No 1107/2009 Art. 63 (2g)",
- "redacted": false,
- "section": "Table in: ",
- "color": [
- 0.8,
- 0.8,
- 0.8
- ],
- "positions": [
- {
- "topLeft": {
- "x": 289.44595,
- "y": 327.567
- },
- "width": 7.648041,
- "height": 82.51475,
- "page": 1
- },
- {
- "topLeft": {
- "x": 298.67056,
- "y": 327.567
- },
- "width": 7.648041,
- "height": 75.32377,
- "page": 1
- }
- ],
- "sectionNumber": 4,
- "manual": false,
- "status": null,
- "hint": false
- },
- {
- "id": "1bd556e9b3dd82987f9775b19bb26fa4",
- "type": "address",
- "value": "RCC Ltd., Itingen, Switzerland",
- "reason": "Not redacted because row is not a vertebrate study",
- "legalBasis": "Reg (EC) No 1107/2009 Art. 63 (2g)",
- "redacted": false,
- "section": "Table in: ",
- "color": [
- 0.8,
- 0.8,
- 0.8
- ],
- "positions": [
- {
- "topLeft": {
- "x": 307.89517,
- "y": 327.567
- },
- "width": 7.648041,
- "height": 61.670967,
- "page": 1
- },
- {
- "topLeft": {
- "x": 316.99985,
- "y": 327.567
- },
- "width": 7.648041,
- "height": 38.104286,
- "page": 1
- }
- ],
- "sectionNumber": 4,
- "manual": false,
- "status": null,
- "hint": false
- },
- {
- "id": "e4eb6f849b60753c59897d1da21f3d83",
- "type": "hint_only",
- "value": "N",
- "reason": null,
- "legalBasis": "Reg (EC) No 1107/2009 Art. 63 (2g)",
- "redacted": false,
- "section": "Table in: ",
- "color": [
- 0,
- 0.9882353,
- 0.69411767
- ],
- "positions": [
- {
- "topLeft": {
- "x": 145.03896,
- "y": 448.34
- },
- "width": 7.648056,
- "height": 4.000008,
- "page": 1
- }
- ],
- "sectionNumber": 3,
- "manual": false,
- "status": null,
- "hint": true
- },
- {
- "id": "76dcc148fca080479fb3856d6e404813",
- "type": "address",
- "value": "Syngenta Crop Protection AG, Basel, Switzerland",
- "reason": "Not redacted because row is not a vertebrate study",
- "legalBasis": "Reg (EC) No 1107/2009 Art. 63 (2g)",
- "redacted": false,
- "section": "Table in: ",
- "color": [
- 0.8,
- 0.8,
- 0.8
- ],
- "positions": [
- {
- "topLeft": {
- "x": 169.62755,
- "y": 327.567
- },
- "width": 7.648056,
- "height": 82.51475,
- "page": 1
- },
- {
- "topLeft": {
- "x": 178.73225,
- "y": 327.567
- },
- "width": 7.648056,
- "height": 75.32377,
- "page": 1
- }
- ],
- "sectionNumber": 3,
- "manual": false,
- "status": null,
- "hint": false
- },
- {
- "id": "109c034945053697a8c3ff5449d4dbd5",
- "type": "name",
- "value": "Wolf S.",
- "reason": "Not redacted because row is not a vertebrate study",
- "legalBasis": "Reg (EC) No 1107/2009 Art. 63 (2g)",
- "redacted": false,
- "section": "Table in: ",
- "color": [
- 0.8,
- 0.8,
- 0.8
- ],
- "positions": [
- {
- "topLeft": {
- "x": 261.87195,
- "y": 241.282
- },
- "width": 7.648041,
- "height": 26.739037,
- "page": 1
- }
- ],
- "sectionNumber": 4,
- "manual": false,
- "status": null,
- "hint": false
- },
- {
- "id": "8d4060e4761dfccfdaa6310d6e9c3407",
- "type": "hint_only",
- "value": "N",
- "reason": null,
- "legalBasis": "Reg (EC) No 1107/2009 Art. 63 (2g)",
- "redacted": false,
- "section": "Table in: ",
- "color": [
- 0,
- 0.9882353,
- 0.69411767
- ],
- "positions": [
- {
- "topLeft": {
- "x": 264.88797,
- "y": 448.34
- },
- "width": 7.648041,
- "height": 4.000008,
- "page": 1
- }
- ],
- "sectionNumber": 4,
- "manual": false,
- "status": null,
- "hint": true
- },
- {
- "id": "6b1338e3a108d3993c6da186f57ea019",
- "type": "vertebrate",
- "value": "rats",
- "reason": null,
- "legalBasis": "Reg (EC) No 1107/2009 Art. 63 (2g)",
- "redacted": false,
- "section": "Table in: ",
- "color": [
- 0,
- 1,
- 0
- ],
- "positions": [
- {
- "topLeft": {
- "x": 381.84018,
- "y": 377.10638
- },
- "width": 7.648041,
- "height": 12.379707,
- "page": 1
- }
- ],
- "sectionNumber": 5,
- "manual": false,
- "status": null,
- "hint": true
- },
- {
- "id": "258d1236aa4ff9de4260a9d4284efdc5",
- "type": "name",
- "value": "Casey, H.W.",
- "reason": "Redacted because Section contains Vertebrate",
- "legalBasis": "Reg (EC) No 1107/2009 Art. 63 (2g)",
- "redacted": true,
- "section": "Table in: ",
- "color": [
- 1,
- 1,
- 0
- ],
- "positions": [
- {
- "topLeft": {
- "x": 421.61328,
- "y": 241.282
- },
- "width": 7.648041,
- "height": 42.66442,
- "page": 1
- }
- ],
- "sectionNumber": 5,
- "manual": false,
- "status": null,
- "hint": false
- },
- {
- "id": "0836727c3508a0b2ea271da69c04cc2f",
- "type": "address",
- "value": "Toxigenics, Inc., Decatur, IL 62526, USA",
- "reason": "Redacted because Section contains Vertebrate",
- "legalBasis": "Reg (EC) No 1107/2009 Art. 63 (2g)",
- "redacted": true,
- "section": "Table in: ",
- "color": [
- 0,
- 1,
- 1
- ],
- "positions": [
- {
- "topLeft": {
- "x": 400.16907,
- "y": 327.567
- },
- "width": 7.648041,
- "height": 91.46436,
- "page": 1
- },
- {
- "topLeft": {
- "x": 409.39368,
- "y": 327.567
- },
- "width": 7.648041,
- "height": 38.232735,
- "page": 1
- }
- ],
- "sectionNumber": 5,
- "manual": false,
- "status": null,
- "hint": false
- },
- {
- "id": "0372ec83feed162bdd478b201027bc25",
- "type": "name",
- "value": "Salamon, C.M.",
- "reason": "Redacted because Section contains Vertebrate",
- "legalBasis": "Reg (EC) No 1107/2009 Art. 63 (2g)",
- "redacted": true,
- "section": "Table in: ",
- "color": [
- 1,
- 1,
- 0
- ],
- "positions": [
- {
- "topLeft": {
- "x": 394.0594,
- "y": 241.282
- },
- "width": 7.648041,
- "height": 32.012077,
- "page": 1
- },
- {
- "topLeft": {
- "x": 403.16406,
- "y": 241.282
- },
- "width": 7.648041,
- "height": 18.487892,
- "page": 1
- }
- ],
- "sectionNumber": 5,
- "manual": false,
- "status": null,
- "hint": false
- },
- {
- "id": "8734c14e72b7750de7637627ed5d572c",
- "type": "name",
- "value": "Smith, S.H.",
- "reason": "Redacted because Section contains Vertebrate",
- "legalBasis": "Reg (EC) No 1107/2009 Art. 63 (2g)",
- "redacted": true,
- "section": "Table in: ",
- "color": [
- 1,
- 1,
- 0
- ],
- "positions": [
- {
- "topLeft": {
- "x": 412.38867,
- "y": 241.282
- },
- "width": 7.648041,
- "height": 39.300346,
- "page": 1
- }
- ],
- "sectionNumber": 5,
- "manual": false,
- "status": null,
- "hint": false
- },
- {
- "id": "2f4459be7301d8689a0f405399e55d69",
- "type": "name",
- "value": null,
- "reason": "Manual Redaction",
- "legalBasis": "Reg (EC) No 1107/2009 Art. 63 (2g)",
- "redacted": true,
- "section": null,
- "color": [
- 1,
- 1,
- 0
- ],
- "positions": [
- {
- "topLeft": {
- "x": 375.61096,
- "y": 241.282
- },
- "width": 7.648041,
- "height": 43.72262,
- "page": 1
- }
- ],
- "sectionNumber": 0,
- "manual": true,
- "status": "APPROVED",
- "hint": false
- }
- ],
- "dictionaryVersion": 9,
- "rulesVersion": 2,
- "filename": "Single Table.pdf"
-}
\ No newline at end of file