Package org.daisy.dotify.api.hyphenator
Interface HyphenatorFactory
-
- All Known Implementing Classes:
CWHyphenatorFactory
,JHyphenatorFactory
,LatexHyphenatorFactory
public interface HyphenatorFactory
Provides a hyphenation factory interface. This interface is used to retreive a hyphenator instance.
-
-
Field Summary
Fields Modifier and Type Field Description static String
FEATURE_HYPHENATION_ACCURACY
Defines hyphenation accuracy on a scale from 1 to 5 (integer):
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Object
getFeature(String key)
Gets the value of a hyphenation feature.HyphenatorInterface
newHyphenator(String locale)
Returns a new hyphenator configured for the specified locale.void
setFeature(String key, Object value)
Sets the value of a hyphenation feature.
-
-
-
Field Detail
-
FEATURE_HYPHENATION_ACCURACY
static final String FEATURE_HYPHENATION_ACCURACY
Defines hyphenation accuracy on a scale from 1 to 5 (integer):
- 5 is high accuracy, low performance
- 3 is medium accuracy, medium performance
- 1 is low accuracy, high performance
Not all values must be implemented to support this feature. It is recommended, but not strictly required, that an implementation sends a log message when this feature is set to an unsupported value.
- See Also:
- Constant Field Values
-
-
Method Detail
-
newHyphenator
HyphenatorInterface newHyphenator(String locale) throws HyphenatorConfigurationException
Returns a new hyphenator configured for the specified locale.- Parameters:
locale
- a valid locale for the new hyphenator, as defined by IETF RFC 3066- Returns:
- returns a new hyphenator
- Throws:
HyphenatorConfigurationException
- if the locale is not supported
-
getFeature
Object getFeature(String key)
Gets the value of a hyphenation feature.- Parameters:
key
- the feature to get the value for- Returns:
- returns the value, or null if not set
-
setFeature
void setFeature(String key, Object value) throws HyphenatorConfigurationException
Sets the value of a hyphenation feature.- Parameters:
key
- the feature to set the value forvalue
- the value for the feature- Throws:
HyphenatorConfigurationException
- if the feature is not supported
-
-