package com.knecon.fforesight.service.layoutparser.internal.api.data.redaction;

import java.io.Serializable;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.FieldDefaults;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@FieldDefaults(level = AccessLevel.PRIVATE)
@Schema(description = "Object containing text information of a specific text block. A document is split into multiple text blocks, which are supposed to be read in order. Every text block can only occur on a single page.")
public class DocumentTextData implements Serializable {

    @Schema(description = "Identifier of the text block.")
    Long id;
    @Schema(description = "The page the text block occurs on.")
    Long page;
    @Schema(description = "The text the text block.")
    String searchText;
    @Schema(description = "Each text block is assigned a number on a page, starting from 0.")
    int numberOnPage;
    @Schema(description = "The text blocks are ordered, this number represents the start of the text block as a string offset.")
    int start;
    @Schema(description = "The text blocks are ordered, this number represents the end of the text block as a string offset.")
    int end;
    @Schema(description = "The line breaks in the text of this semantic node in string offsets. They are exclusive end. At the end of each semantic node there is an implicit linebreak.", example = "[5, 10]")
    int[] lineBreaks;

}
