clari-section-chunk: change structure object from paragraph/headline to sections

* filter headers/footers
This commit is contained in:
Kilian Schuettler 2024-06-26 12:28:53 +02:00
parent b216f02e15
commit 80e701a0fd

View File

@ -28,7 +28,11 @@ public class TaasDocumentDataMapper {
AtomicInteger structureObjectNumber = new AtomicInteger();
List<StructureObject> structureObjects = document.streamAllSubNodes()
.filter(node -> !node.getType().equals(NodeType.TABLE_CELL))
.filter(node -> !node.getType().equals(NodeType.SECTION))
.filter(node -> !node.getType().equals(NodeType.SUPER_SECTION))
.filter(node -> !node.getType().equals(NodeType.HEADER))
.filter(node -> !node.getType().equals(NodeType.FOOTER))
.filter(node -> !node.getType().equals(NodeType.HEADLINE))
.filter(node -> !node.getType().equals(NodeType.PARAGRAPH))
.map(node -> {
if (node.getType().equals(NodeType.TABLE)) {
return TaasDocumentDataMapper.fromTableWithTableData((Table) node, structureObjectNumber.getAndIncrement());