RED-6009: Document Tree Structure
* ignore wrong pmd vioaltions
This commit is contained in:
parent
0dc17d86bd
commit
926d507583
@ -55,6 +55,7 @@ public class TableNodeFactory {
|
||||
}
|
||||
|
||||
|
||||
@SuppressWarnings("PMD.UnusedPrivateMethod") // PMD actually flags this wrong
|
||||
private static void addTableToPage(Page page, SemanticNode parentNode, Table table) {
|
||||
|
||||
if (!page.getMainBody().contains(parentNode)) {
|
||||
|
||||
@ -67,6 +67,7 @@ public class DocumentTree {
|
||||
}
|
||||
|
||||
|
||||
@SuppressWarnings("PMD.UnusedPrivateMethod") // PMD actually flags this wrong
|
||||
private List<Integer> createNewChildEntryAndReturnIdImpl(List<Integer> parentId, NodeType nodeType, SemanticNode node) {
|
||||
|
||||
if (!entryExists(parentId)) {
|
||||
|
||||
@ -334,6 +334,7 @@ rule "22: Redact Emails by RegEx (vertebrate study)"
|
||||
entityCreationService.byRegex("\\b([A-Za-z0-9._%+\\-]+@[A-Za-z0-9.\\-]+\\.[A-Za-z\\-]{1,23}[A-Za-z])\\b", "PII", EntityType.ENTITY, 1, $section)
|
||||
.forEach(emailEntity -> {
|
||||
emailEntity.setRedaction(true);
|
||||
emailEntity.addEngine(Engine.RULE);
|
||||
emailEntity.setRedactionReason("Found by Email Regex");
|
||||
emailEntity.setLegalBasis("Article 39(e)(3) of Regulation (EC) No 178/2002");
|
||||
emailEntity.addMatchedRule(22);
|
||||
@ -358,6 +359,7 @@ rule "25: Redact Phone and Fax by RegEx (non vertebrate study)"
|
||||
entityCreationService.byRegexIgnoreCase("\\b(contact|telephone|phone|ph\\.|fax|tel|ter|mobile|fel|fer)[a-zA-Z\\s]{0,10}[:.\\s]{0,3}([\\+\\d\\(][\\s\\d\\(\\)\\-\\/\\.]{4,100}\\d)\\b", "PII", EntityType.ENTITY, 2, $section)
|
||||
.forEach(contactEntity -> {
|
||||
contactEntity.setRedaction(true);
|
||||
contactEntity.addEngine(Engine.RULE);
|
||||
contactEntity.setRedactionReason("Found by Email Regex");
|
||||
contactEntity.setLegalBasis("Article 39(e)(3) of Regulation (EC) No 178/2002");
|
||||
contactEntity.addMatchedRule(25);
|
||||
@ -382,6 +384,7 @@ rule "26: Redact Phone and Fax by RegEx (vertebrate study)"
|
||||
entityCreationService.byRegexIgnoreCase("\\b(contact|telephone|phone|ph\\.|fax|tel|ter|mobile|fel|fer)[a-zA-Z\\s]{0,10}[:.\\s]{0,3}([\\+\\d\\(][\\s\\d\\(\\)\\-\\/\\.]{4,100}\\d)\\b", "PII", EntityType.ENTITY, 2, $section)
|
||||
.forEach(contactEntity -> {
|
||||
contactEntity.setRedaction(true);
|
||||
contactEntity.addEngine(Engine.RULE);
|
||||
contactEntity.setRedactionReason("Found by Email Regex");
|
||||
contactEntity.setLegalBasis("Article 39(e)(2) of Regulation (EC) No 178/2002");
|
||||
contactEntity.addMatchedRule(26);
|
||||
@ -399,6 +402,7 @@ rule "27: Redact AUTHOR(S) (non vertebrate study)"
|
||||
.forEach(authorEntity -> {
|
||||
authorEntity.setRedaction(true);
|
||||
authorEntity.addMatchedRule(27);
|
||||
authorEntity.addEngine(Engine.RULE);
|
||||
authorEntity.setRedactionReason("AUTHOR(S) was found");
|
||||
authorEntity.setLegalBasis("Article 39(e)(3) of Regulation (EC) No 178/2002");
|
||||
insert(authorEntity);
|
||||
@ -414,6 +418,7 @@ rule "28: Redact AUTHOR(S) (vertebrate study)"
|
||||
.forEach(authorEntity -> {
|
||||
authorEntity.setRedaction(true);
|
||||
authorEntity.addMatchedRule(28);
|
||||
authorEntity.addEngine(Engine.RULE);
|
||||
authorEntity.setRedactionReason("AUTHOR(S) was found");
|
||||
authorEntity.setLegalBasis("Article 39(e)(2) of Regulation (EC) No 178/2002");
|
||||
insert(authorEntity);
|
||||
@ -430,6 +435,7 @@ rule "29: Redact AUTHOR(S) (non vertebrate study)"
|
||||
.forEach(authorEntity -> {
|
||||
authorEntity.setRedaction(true);
|
||||
authorEntity.addMatchedRule(29);
|
||||
authorEntity.addEngine(Engine.RULE);
|
||||
authorEntity.setRedactionReason("AUTHOR(S) was found");
|
||||
authorEntity.setLegalBasis("Article 39(e)(3) of Regulation (EC) No 178/2002");
|
||||
insert(authorEntity);
|
||||
@ -445,6 +451,7 @@ rule "30: Redact AUTHOR(S) (vertebrate study)"
|
||||
.forEach(authorEntity -> {
|
||||
authorEntity.setRedaction(true);
|
||||
authorEntity.addMatchedRule(30);
|
||||
authorEntity.addEngine(Engine.RULE);
|
||||
authorEntity.setRedactionReason("AUTHOR(S) was found");
|
||||
authorEntity.setLegalBasis("Article 39(e)(2) of Regulation (EC) No 178/2002");
|
||||
insert(authorEntity);
|
||||
@ -461,6 +468,7 @@ rule "31: Redact PERFORMING LABORATORY (Non vertebrate study)"
|
||||
.forEach(laboratoryEntity -> {
|
||||
laboratoryEntity.setRedaction(false);
|
||||
laboratoryEntity.addMatchedRule(31);
|
||||
laboratoryEntity.addEngine(Engine.RULE);
|
||||
laboratoryEntity.setRedactionReason("PERFORMING LABORATORY was found for non vertebrate study");
|
||||
dictionary.addLocalDictionaryEntry(laboratoryEntity);
|
||||
insert(laboratoryEntity);
|
||||
@ -477,6 +485,7 @@ rule "32: Redact PERFORMING LABORATORY (Vertebrate study)"
|
||||
.forEach(laboratoryEntity -> {
|
||||
laboratoryEntity.setRedaction(true);
|
||||
laboratoryEntity.addMatchedRule(32);
|
||||
laboratoryEntity.addEngine(Engine.RULE);
|
||||
laboratoryEntity.setRedactionReason("PERFORMING LABORATORY was found");
|
||||
laboratoryEntity.setLegalBasis("Article 39(e)(2) of Regulation (EC) No 178/2002");
|
||||
dictionary.addLocalDictionaryEntry(laboratoryEntity);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user