RED-9139: move document to its own module, add TableOfContents and TableOfContentsItem

* update LayoutEngine package
This commit is contained in:
Kilian Schuettler 2024-11-13 12:26:10 +01:00
parent 6de802b5a4
commit 3671d96c26

View File

@ -29,6 +29,7 @@ import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NonNull;
import lombok.experimental.FieldDefaults;
@Data
@ -37,25 +38,36 @@ import lombok.experimental.FieldDefaults;
@FieldDefaults(level = AccessLevel.PRIVATE)
public class AtomicTextBlock implements TextBlock {
@NonNull
Long id;
@NonNull
Integer numberOnPage;
@NonNull
Page page;
//string coordinates
@NonNull
TextRange textRange;
@NonNull
String searchText;
@NonNull
List<Integer> lineBreaks;
@NonNull
List<TextRange> italicTextRanges;
@NonNull
List<TextRange> boldTextRanges;
SoftReference<String> searchTextLowerCaseCache;
SoftReference<List<String>> wordsCache;
//position coordinates
@NonNull
List<Integer> stringIdxToPositionIdx;
@Getter
@NonNull
List<Rectangle2D> positions;
@NonNull
@EqualsAndHashCode.Exclude
SemanticNode parent;
@ -79,6 +91,8 @@ public class AtomicTextBlock implements TextBlock {
.stringIdxToPositionIdx(Collections.emptyList())
.positions(Collections.emptyList())
.parent(parent)
.boldTextRanges(Collections.emptyList())
.italicTextRanges(Collections.emptyList())
.build();
}