|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.eos.config.Configured
net.sf.eos.analyzer.TextBuilder
public abstract class TextBuilder
Implementation creates new text sequences from Token- or
CharSequence-lists. Use newInstance(Configuration) to
create a new instance.
| Nested Class Summary | |
|---|---|
static class |
TextBuilder.SpaceBuilder
Simple implementation concats all texts from the tokens delimited by space (ASCII 0x20). |
| Field Summary | |
|---|---|
static TextBuilder |
SPACE_BUILDER
Simple implementation concats all texts from the tokens delimited by space (ASCII 0x20). |
static String |
TEXT_BUILDER_IMPL_CONFIG_NAME
The configuration key name for the classname of the builder. |
| Constructor Summary | |
|---|---|
TextBuilder()
|
|
| Method Summary | |
|---|---|
abstract CharSequence |
buildText(CharSequence... seq)
Creates a new text from the given CharSequence. |
abstract CharSequence |
buildText(List<Token> tokens)
Creates a new text from the given token. |
abstract CharSequence |
buildText(Token... tokens)
Creates a new text from the given token. |
static TextBuilder |
newInstance(Configuration config)
Creates a new instance of a of the builder. |
| Methods inherited from class net.sf.eos.config.Configured |
|---|
configure, getConfiguration |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
@ConfigurationKey(type=CLASSNAME,
description="Instances are used to create a new text thru Token concationation.")
public static final String TEXT_BUILDER_IMPL_CONFIG_NAME
newInstance(Configuration),
Constant Field Valuespublic static final TextBuilder SPACE_BUILDER
| Constructor Detail |
|---|
public TextBuilder()
| Method Detail |
|---|
@FactoryMethod(key="net.sf.eos.analyzer.TextBuilder.impl",
implementation=TextBuilder.SpaceBuilder.class)
public static final TextBuilder newInstance(Configuration config)
throws EosException
Configuration contains a key
TEXT_BUILDER_IMPL_CONFIG_NAME a new instance of the
classname of the value will instantiate. The
SPACE_BUILDER will instantiate if there is no
value setted.
config - the configuration
EosException - if it is not possible to instantiate an instancepublic abstract CharSequence buildText(List<Token> tokens)
tokens - a list of token. If tokens is null
an exception will raise.
nullpublic abstract CharSequence buildText(Token... tokens)
tokens - a list of token If tokens is null
an exception will raise.
nullpublic abstract CharSequence buildText(CharSequence... seq)
CharSequence.
seq - a list of CharSequence If tokens is
null an exception will raise.
null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||