Package org.daisy.dotify.api.translator
Interface BrailleTranslatorFactoryMakerService
-
- All Known Implementing Classes:
BrailleTranslatorFactoryMaker
public interface BrailleTranslatorFactoryMakerService
Provides an interface for a BrailleTranslatorFactoryMaker service. The purpose of this interface is to expose an implementation of a BrailleTranslatorFactoryMaker 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<TranslatorSpecification>
listSpecifications()
Returns a list of supported specifications.BrailleTranslatorFactory
newFactory(String locale, String grade)
Gets a factory for the given specification.BrailleTranslator
newTranslator(String locale, String grade)
Gets a translator for the given specificationboolean
supportsSpecification(String locale, String mode)
Returns true if the translator factory supports the given specification.
-
-
-
Method Detail
-
supportsSpecification
boolean supportsSpecification(String locale, String mode)
Returns true if the translator factory supports the given specification.- Parameters:
locale
- the translator localemode
- the translator grade, or null for uncontracted braille- Returns:
- returns true if the translator factory supports the specification
-
listSpecifications
Collection<TranslatorSpecification> listSpecifications()
Returns a list of supported specifications.- Returns:
- returns a list of specifications
-
newFactory
BrailleTranslatorFactory newFactory(String locale, String grade) throws TranslatorConfigurationException
Gets a factory for the given specification.- Parameters:
locale
- the locale for the factorygrade
- the grade for the factory- Returns:
- returns a braille translator factory
- Throws:
TranslatorConfigurationException
- if the specification is not supported
-
newTranslator
BrailleTranslator newTranslator(String locale, String grade) throws TranslatorConfigurationException
Gets a translator for the given specification- Parameters:
locale
- the locale for the translatorgrade
- the grade for the translator- Returns:
- returns a braille translator
- Throws:
TranslatorConfigurationException
- if the specification is not supported
-
-