|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.mmm.util.component.base.AbstractComponent
net.sf.mmm.util.component.base.AbstractLoggableComponent
net.sf.mmm.util.text.base.AbstractHyphenatorBuilder
net.sf.mmm.util.text.base.HyphenatorBuilderImpl
@Singleton @Named public class HyphenatorBuilderImpl
The implementation of the HyphenatorBuilder
interface.
| Field Summary | |
|---|---|
static String |
HYPHENATION_XML_CONFIG_PREFIX
|
static String |
HYPHENATION_XML_CONFIG_SUFFIX
|
private static HyphenatorBuilder |
instance
|
private StaxUtil |
staxUtil
|
private StringHasher |
stringHasher
|
private StringUtil |
stringUtil
|
private static QName |
XML_ATR_HYPHEN
The XML attribute: . |
private static QName |
XML_TAG_EXCEPTION
The XML tag: . |
private static QName |
XML_TAG_EXCEPTION_LIST
The XML tag: . |
private static QName |
XML_TAG_HYPHENATION
The XML root tag: . |
private static QName |
XML_TAG_PATTERN
The XML tag: . |
private static QName |
XML_TAG_PATTERN_LIST
The XML tag: . |
| Constructor Summary | |
|---|---|
HyphenatorBuilderImpl()
The constructor. |
|
| Method Summary | |
|---|---|
protected Hyphenator |
createHyphenator(Locale locale,
DataResource resource)
This method creates a new Hyphenator instance from the
XML-configuration identified by the given DataResource. |
protected Hyphenator |
createHyphenator(String localeInfix)
This method creates a new Hyphenator. |
protected void |
doInitialize()
This method performs the actual initialization. |
static HyphenatorBuilder |
getInstance()
This method gets the singleton instance of this HyphenatorBuilderImpl. |
protected StaxUtil |
getStaxUtil()
|
protected StringHasher |
getStringHasher()
|
protected StringUtil |
getStringUtil()
|
private List<String> |
parseStringList(javax.xml.stream.XMLEventReader reader,
QName elementName)
This method parses a list of strings enclosed by elements with the given elementName until the current element ends. |
void |
setStaxUtil(StaxUtil staxUtil)
|
void |
setStringHasher(StringHasher stringHasher)
|
void |
setStringUtil(StringUtil stringUtil)
|
| Methods inherited from class net.sf.mmm.util.text.base.AbstractHyphenatorBuilder |
|---|
getHyphenator, getHyphenator, getResourceLocator, setResourceLocator |
| Methods inherited from class net.sf.mmm.util.component.base.AbstractLoggableComponent |
|---|
getLogger, setLogger |
| Methods inherited from class net.sf.mmm.util.component.base.AbstractComponent |
|---|
doInitialized, getInitializationState, initialize |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String HYPHENATION_XML_CONFIG_PREFIX
createHyphenator(String),
Constant Field Valuespublic static final String HYPHENATION_XML_CONFIG_SUFFIX
createHyphenator(String),
Constant Field Valuesprivate static final QName XML_TAG_HYPHENATION
private static final QName XML_ATR_HYPHEN
private static final QName XML_TAG_EXCEPTION_LIST
private static final QName XML_TAG_PATTERN_LIST
private static final QName XML_TAG_EXCEPTION
private static final QName XML_TAG_PATTERN
private static HyphenatorBuilder instance
getInstance()private StaxUtil staxUtil
getStaxUtil()private StringUtil stringUtil
getStringUtil()private StringHasher stringHasher
getStringHasher()| Constructor Detail |
|---|
public HyphenatorBuilderImpl()
| Method Detail |
|---|
protected void doInitialize()
initialization. It is
called when AbstractComponent.initialize() is invoked for the first time.super.AbstractComponent.doInitialize().
doInitialize in class AbstractHyphenatorBuilderpublic static HyphenatorBuilder getInstance()
HyphenatorBuilderImpl.getInstance() methods and
construct new instances via the container-framework of your choice (like
plexus, pico, springframework, etc.). To wire up the dependent components
everything is properly annotated using common-annotations (JSR-250). If
your container does NOT support this, you should consider using a better
one.
protected Hyphenator createHyphenator(String localeInfix)
Hyphenator.
createHyphenator in class AbstractHyphenatorBuilderlocaleInfix - is the
locale-infix of
the requested Hyphenator.
Hyphenator or null if no
hyphenation configuration is available for the given
localeInfix.AbstractHyphenatorBuilder.getHyphenator(Locale)
protected Hyphenator createHyphenator(Locale locale,
DataResource resource)
Hyphenator instance from the
XML-configuration identified by the given DataResource.
locale - is the locale.resource - is the DataResource with the XML-configuration.
Hyphenator instance.
private List<String> parseStringList(javax.xml.stream.XMLEventReader reader,
QName elementName)
throws javax.xml.stream.XMLStreamException
elementName until the current element ends. E.g. if you have
this XML:
<foo> <bar>text1</bar> <bar>text2</bar> <bar>text3</bar> </foo>And your XML-reader is pointing after the opening <foo> and you call this method, you will get a list with "text1", "text2", and "text3".
reader - is the XMLEventReader pointing after the StartElement
of the surrounding element.elementName - is the name of the element containing a single string.
javax.xml.stream.XMLStreamException - if caused by the reader.protected StaxUtil getStaxUtil()
@Inject public void setStaxUtil(StaxUtil staxUtil)
staxUtil - is the staxUtil to setprotected StringUtil getStringUtil()
@Inject public void setStringUtil(StringUtil stringUtil)
stringUtil - is the stringUtil to setprotected StringHasher getStringHasher()
public void setStringHasher(StringHasher stringHasher)
stringHasher - is the stringHasher to set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||