Class TextDocument
java.lang.Object
com.kohlschutter.boilerpipe.document.TextDocument
- All Implemented Interfaces:
Cloneable
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionTextDocument(String title, List<TextBlock> textBlocks) Creates a newTextDocumentwith givenTextBlocks and given title.TextDocument(List<TextBlock> textBlocks) Creates a newTextDocumentwith givenTextBlocks, and no title. -
Method Summary
Modifier and TypeMethodDescriptionclone()Returns detailed debugging information about the containedTextBlocks.Returns theTextDocument's content.getText(boolean includeContent, boolean includeNonContent) Returns theTextDocument's content, non-content or bothReturns theTextBlocks of this document.getTitle()Returns the "main" title for this document, ornullif no such title has ben set.voidUpdates the "main" title for this document.
-
Field Details
-
textBlocks
-
title
String title
-
-
Constructor Details
-
TextDocument
Creates a newTextDocumentwith givenTextBlocks, and no title.- Parameters:
textBlocks- The text blocks of this document.
-
TextDocument
Creates a newTextDocumentwith givenTextBlocks and given title.- Parameters:
title- The "main" title for this text document.textBlocks- The text blocks of this document.
-
-
Method Details
-
getTextBlocks
-
getTitle
Returns the "main" title for this document, ornullif no such title has ben set.- Returns:
- The "main" title.
-
setTitle
-
getContent
-
getText
Returns theTextDocument's content, non-content or both- Parameters:
includeContent- Whether to include TextBlocks marked as "content".includeNonContent- Whether to include TextBlocks marked as "non-content".- Returns:
- The text.
-
debugString
-
clone
-