RED-7074: Design Subsection section tree structure algorithm

* fix pmd and checkstyle
This commit is contained in:
maverickstuder 2024-05-15 16:46:15 +02:00
parent b50bfed69d
commit b08ed2037e
3 changed files with 9 additions and 5 deletions

View File

@ -72,7 +72,7 @@ public class TextPageBlock extends AbstractPageBlock {
}
public void calculateBBox() {
private void calculateBBox() {
if (sequences == null) {
this.bBox = new Rectangle2D.Double();
@ -83,6 +83,12 @@ public class TextPageBlock extends AbstractPageBlock {
}
public void recalculateBBox() {
calculateBBox();
}
public static TextPageBlock merge(List<TextPageBlock> textBlocksToMerge) {
if (textBlocksToMerge.isEmpty()) {

View File

@ -237,7 +237,7 @@ public class BlockificationPostprocessingService {
boolean modifiedBlockToSplit = false;
if (!wordSequenceResult.inSequence.isEmpty()) {
blockToSplit.setSequences(wordSequenceResult.inSequence);
blockToSplit.calculateBBox();
blockToSplit.recalculateBBox();
modifiedBlockToSplit = true;
}
@ -368,7 +368,7 @@ public class BlockificationPostprocessingService {
assert firstBlock != null;
firstBlock.setToDuplicate(false);
firstBlock.calculateBBox();
firstBlock.recalculateBBox();
classificationPage.getTextBlocks().removeAll(mergedBlocks);
}

View File

@ -5,8 +5,6 @@ import java.util.Locale;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import com.knecon.fforesight.service.layoutparser.processor.utils.MarkedContentUtils;
import org.springframework.stereotype.Service;
import com.knecon.fforesight.service.layoutparser.processor.model.AbstractPageBlock;