public class TextDocument
extends java.lang.Object
TextBlocks.| Constructor and Description |
|---|
TextDocument(java.util.List<TextBlock> textBlocks)
Creates a new
TextDocument with given TextBlocks, and no
title. |
TextDocument(java.lang.String title,
java.util.List<TextBlock> textBlocks)
Creates a new
TextDocument with given TextBlocks and
given title. |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
debugString()
Returns detailed debugging information about the contained
TextBlocks. |
java.lang.String |
getContent()
Returns the
TextDocument's content. |
java.lang.String |
getText(boolean includeContent,
boolean includeNonContent)
Returns the
TextDocument's content, non-content or both |
java.util.List<TextBlock> |
getTextBlocks()
Returns the
TextBlocks of this document. |
java.lang.String |
getTitle()
Returns the "main" title for this document, or
null if no
such title has ben set. |
void |
setTitle(java.lang.String title)
Updates the "main" title for this document.
|
public TextDocument(java.util.List<TextBlock> textBlocks)
TextDocument with given TextBlocks, and no
title.textBlocks - The text blocks of this document.public TextDocument(java.lang.String title,
java.util.List<TextBlock> textBlocks)
TextDocument with given TextBlocks and
given title.title - The "main" title for this text document.textBlocks - The text blocks of this document.public java.util.List<TextBlock> getTextBlocks()
TextBlocks of this document.TextBlocks, in sequential order of appearance.public java.lang.String getTitle()
null if no
such title has ben set.public void setTitle(java.lang.String title)
title - public java.lang.String getContent()
TextDocument's content.public java.lang.String getText(boolean includeContent,
boolean includeNonContent)
TextDocument's content, non-content or bothincludeContent - Whether to include TextBlocks marked as "content".includeNonContent - Whether to include TextBlocks marked as "non-content".public java.lang.String debugString()
TextBlocks.