package com.knecon.fforesight.service.layoutparser.processor.model;

import java.awt.geom.Rectangle2D;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.iqser.red.service.persistence.service.v1.api.shared.model.redactionlog.Rectangle;
import com.knecon.fforesight.service.layoutparser.processor.model.image.ClassifiedImage;
import com.knecon.fforesight.service.layoutparser.processor.model.table.CleanRulings;
import com.knecon.fforesight.service.layoutparser.processor.model.text.StringFrequencyCounter;

import lombok.Data;
import lombok.NonNull;
import lombok.RequiredArgsConstructor;
import org.apache.pdfbox.pdmodel.documentinterchange.markedcontent.PDMarkedContent;

@Data
@RequiredArgsConstructor
public class ClassificationPage {

    @NonNull
    private List<AbstractPageBlock> textBlocks;

    private List<ClassifiedImage> images = new ArrayList<>();

    private Rectangle bodyTextFrame;

    private boolean landscape;
    private int rotation;

    private int pageNumber;

    private FloatFrequencyCounter textHeightCounter = new FloatFrequencyCounter();
    private FloatFrequencyCounter fontSizeCounter = new FloatFrequencyCounter();
    private StringFrequencyCounter fontCounter = new StringFrequencyCounter();
    private StringFrequencyCounter fontStyleCounter = new StringFrequencyCounter();

    private float pageWidth;
    private float pageHeight;

    CleanRulings cleanRulings;

    private Map<String, List<Rectangle2D>> markedContentBboxPerType = new HashMap<>();

}
