RSS-92: Fixed excludeHeadlines on tables

This commit is contained in:
deiflaender 2022-09-12 12:58:15 +02:00
parent ce15faf072
commit 58c3d15b78
2 changed files with 1 additions and 37 deletions

View File

@ -1072,7 +1072,7 @@ public class Section {
String[] values = new String[1];
if (start.isEmpty() && stop.isEmpty()) {
if (excludeHeadLine) {
if (excludeHeadLine && searchText.contains(headline)) {
values[0] = StringUtils.substringAfter(searchText, headline);
} else {
values[0] = searchText;

View File

@ -390,40 +390,4 @@ rule "101: Redact CAS numbers"
Section(hasTableHeader("Sample #"))
then
section.redactCell("Sample #", 8, "PII", true, "Redacted because row is a vertebrate study", "Reg (EC) No 1107/2009 Art. 63 (2g)");
end
rule "102: Extract title"
when
Section(sectionNumber <= 3 && !text.contains("AUTHOR"))
then
section.redactBetween("", "Final Report", "PII", 5, false, "Title found", "n-a");
section.redactBetween("", "FINAL REPORT", "PII", 5, false, "Title found", "n-a");
section.redactBetween("TITLE", "DATA REQUIREMENT", "PII", 5, false, "Title found", "n-a");
section.redactBetween("TITLE", "DATA REQUIREMENT", "PII", 5, false, "Title found", "n-a");
end
rule "102-1: Extract title"
when
Section(sectionNumber <= 3 && text.contains("SPL"))
then
section.redactBetween("Laboratories", "SPL", "PII", 5, false, "Title found", "n-a");
end
rule "30: Vehicle components"
when
Section(text.contains("vehicle"))
then
//section.redactLineAfter("Name:","vehicle",30,true,"Vehicle components found.","n-a");
section.redactLineAfterAcrossColumns("Name:","PII",30,false,"bla","n-a");
section.redactLineAfter("Vehicle:","vehicle",30,true,"Vehicle keyword found.","n-a");
section.redactLineAfter("The vehicle was","vehicle",30,true,"Vehicle section found.","n-a");
end