public class TextPhraseWizard
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.util.HashSet<java.lang.String> |
EXCLUDE_TEXT_FRAGMENT_DEFAULT_SET
The default set of text fragments which cannot be part of a text phrase.
|
static int |
MAX_TEXT_ELEMENTS
The default maximum number of potential text phrases.
|
static int |
MAX_TEXT_LENGTH
The default maximum length of a text phrase.
|
static int |
MIN_TEXT_LENGTH
The default minimum length of a text phrase.
|
static java.lang.String |
PRINTABLE_DELIMITER_CHARS_DEFAULT
The default printable delimiter chars.
|
Constructor and Description |
---|
TextPhraseWizard(java.lang.String content)
Create a new instance.
|
Modifier and Type | Method and Description |
---|---|
TextPhraseWizardElement[] |
execute(int maxResultSize)
Execute the wizard.
|
java.lang.String |
getDelimiterChars()
Get the delimiter chars (control characters and printable characters).
|
void |
setExcludeTextFragments(java.util.ArrayList<java.lang.String> excludeTextFragmentsList)
Set a list of text fragments which cannot be part of a text phrase.
|
void |
setMaxTextElements(int maxTextElements)
Set the maximum number of potential text phrases.
|
void |
setMaxTextLength(int maxTextLength)
Set the maximum length of a text phrase.
|
void |
setMinTextLength(int minTextLength)
Set the minimum length of a text phrase.
|
void |
setPrintableDelimiterChars(java.lang.String delimiterChars)
Set the printable delimiter chars.
|
public static final java.util.HashSet<java.lang.String> EXCLUDE_TEXT_FRAGMENT_DEFAULT_SET
public static final java.lang.String PRINTABLE_DELIMITER_CHARS_DEFAULT
public static final int MIN_TEXT_LENGTH
public static final int MAX_TEXT_LENGTH
public static final int MAX_TEXT_ELEMENTS
public TextPhraseWizard(java.lang.String content)
content
- the content to processpublic java.lang.String getDelimiterChars()
public void setPrintableDelimiterChars(java.lang.String delimiterChars)
delimiterChars
- the printable delimiter charsPRINTABLE_DELIMITER_CHARS_DEFAULT
public void setExcludeTextFragments(java.util.ArrayList<java.lang.String> excludeTextFragmentsList)
excludeTextFragmentsList
- the list of text fragments which cannot be part of a text phraseEXCLUDE_TEXT_FRAGMENT_DEFAULT_SET
public void setMinTextLength(int minTextLength)
minTextLength
- the minimum length of a text phraseMIN_TEXT_LENGTH
public void setMaxTextLength(int maxTextLength)
maxTextLength
- the maximum length of a text phraseMAX_TEXT_LENGTH
public void setMaxTextElements(int maxTextElements)
maxTextElements
- the maximum number of potential text phrasespublic TextPhraseWizardElement[] execute(int maxResultSize)
maxResultSize
- the maximum number of returned text phrase elements, or -1 = unlimited = only limited by 'the maximum number of potential text phrases'