org.writersforge.catalan.text.extractors
Class LineSplitter

java.lang.Object
  extended byorg.writersforge.catalan.text.extractors.LineSplitter
All Implemented Interfaces:
ITextExtractor

public class LineSplitter
extends java.lang.Object
implements ITextExtractor

Text splitter which divides a text document into an array of lines.

Author:
jsheets

Constructor Summary
LineSplitter(boolean keepNewlines)
          Creates a new instance of LineSplitter.
 
Method Summary
 java.lang.String[] extractText(java.lang.String text)
          Extracts fragments of text from the input text document.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LineSplitter

public LineSplitter(boolean keepNewlines)
Creates a new instance of LineSplitter.

Parameters:
keepNewlines - true to keep the newline characters at the end of each line
Method Detail

extractText

public java.lang.String[] extractText(java.lang.String text)
Extracts fragments of text from the input text document.

Specified by:
extractText in interface ITextExtractor
Parameters:
text - input text document
Returns:
extracted text fragments