Package org.daisy.dotify.api.text
Class Integer2TextFactoryMaker
- java.lang.Object
-
- org.daisy.dotify.api.text.Integer2TextFactoryMaker
-
- All Implemented Interfaces:
Integer2TextFactoryMakerService
public class Integer2TextFactoryMaker extends Object implements Integer2TextFactoryMakerService
Provides a integer2text factory maker. This is the entry point for creating integer2text instances.
-
-
Constructor Summary
Constructors Constructor Description Integer2TextFactoryMaker()
Creates a new integer to text factory maker.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addFactory(Integer2TextFactoryService factory)
Adds a factory (intended for use by the OSGi framework).Integer2TextFactory
getFactory(String target)
Gets a Integer2TextFactory that supports the specified locale.Collection<String>
listLocales()
Returns a list of supported locales as defined by IETF RFC 3066.static Integer2TextFactoryMaker
newInstance()
Creates a new Integer2TextFactoryMaker and populates it using the SPI (java service provider interface).Integer2Text
newInteger2Text(String target)
Creates a new integer2text.void
removeFactory(Integer2TextFactoryService factory)
Removes a factory (intended for use by the OSGi framework).
-
-
-
Method Detail
-
newInstance
public static Integer2TextFactoryMaker newInstance()
Creates a new Integer2TextFactoryMaker and populates it using the SPI (java service provider interface).
In an OSGi context, an instance should be retrieved using the service registry. It will be registered under the Integer2TextFactoryMakerService interface.
- Returns:
- returns a new Integer2TextFactoryMaker
-
addFactory
public void addFactory(Integer2TextFactoryService factory)
Adds a factory (intended for use by the OSGi framework).- Parameters:
factory
- the factory to add
-
removeFactory
public void removeFactory(Integer2TextFactoryService factory)
Removes a factory (intended for use by the OSGi framework).- Parameters:
factory
- the factory to remove
-
getFactory
public Integer2TextFactory getFactory(String target) throws Integer2TextConfigurationException
Description copied from interface:Integer2TextFactoryMakerService
Gets a Integer2TextFactory that supports the specified locale.- Specified by:
getFactory
in interfaceInteger2TextFactoryMakerService
- Parameters:
target
- the target locale- Returns:
- returns a integer2text factory for the specified locale
- Throws:
Integer2TextConfigurationException
- if the locale is not supported
-
newInteger2Text
public Integer2Text newInteger2Text(String target) throws Integer2TextConfigurationException
Description copied from interface:Integer2TextFactoryMakerService
Creates a new integer2text. This is a convenience method for getFactory(target).newInteger2Text(target). Using this method excludes the possibility of setting features of the integer2text factory.- Specified by:
newInteger2Text
in interfaceInteger2TextFactoryMakerService
- Parameters:
target
- the target locale- Returns:
- returns a new integer2text
- Throws:
Integer2TextConfigurationException
- if the locale is not supported
-
listLocales
public Collection<String> listLocales()
Description copied from interface:Integer2TextFactoryMakerService
Returns a list of supported locales as defined by IETF RFC 3066.- Specified by:
listLocales
in interfaceInteger2TextFactoryMakerService
- Returns:
- returns a list of locales
-
-