Package org.daisy.dotify.api.hyphenator
Interface HyphenatorFactoryMakerService
-
- All Known Implementing Classes:
HyphenatorFactoryMaker
public interface HyphenatorFactoryMakerService
Provides an interface for a HyphenatorFactoryMaker service. The purpose of this interface is to expose an implementation of a HyphenatorFactoryMaker as an OSGi service.
To comply with this interface, an implementation must be thread safe and address both the possibility that only a single instance is created and used throughout and that new instances are created as desired.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Collection<String>
listLocales()
Returns a list of supported locales as defined by IETF RFC 3066.HyphenatorFactory
newFactory(String target)
Gets a HyphenatorFactory that supports the specified localeHyphenatorInterface
newHyphenator(String target)
Creates a new hyphenator.
-
-
-
Method Detail
-
newFactory
HyphenatorFactory newFactory(String target) throws HyphenatorConfigurationException
Gets a HyphenatorFactory that supports the specified locale- Parameters:
target
- the target locale- Returns:
- returns a hyphenator factory for the specified locale
- Throws:
HyphenatorConfigurationException
- if the locale is not supported
-
newHyphenator
HyphenatorInterface newHyphenator(String target) throws HyphenatorConfigurationException
Creates a new hyphenator. This is a convenience method for getFactory(target).newHyphenator(target). Using this method excludes the possibility of setting features of the hyphenator factory.- Parameters:
target
- the target locale- Returns:
- returns a new hyphenator
- Throws:
HyphenatorConfigurationException
- if the locale is not supported
-
listLocales
Collection<String> listLocales()
Returns a list of supported locales as defined by IETF RFC 3066.- Returns:
- returns a list of locales
-
-