Package org.daisy.dotify.api.translator
Interface BrailleTranslator
-
public interface BrailleTranslatorProvides an interface for braille translation and hyphenation for a particular locale. The locale is determined when the translator is instantiated by the factory.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetTranslatorMode()Gets the translator mode of this translator.BrailleTranslatorResulttranslate(Translatable specification)Translates a text into braille using the supplied specification.BrailleTranslatorResulttranslate(TranslatableWithContext specification)Translates a text into braille using the supplied specification.
-
-
-
Method Detail
-
translate
BrailleTranslatorResult translate(Translatable specification) throws TranslationException
Translates a text into braille using the supplied specification.- Parameters:
specification- the specification- Returns:
- a translator result
- Throws:
TranslationException- if the locale is not supported by the implementationIllegalArgumentException- if the sum of all attributes length is not equal to the length of the text
-
translate
BrailleTranslatorResult translate(TranslatableWithContext specification) throws TranslationException
Translates a text into braille using the supplied specification.- Parameters:
specification- the specification- Returns:
- a translator result
- Throws:
TranslationException- if the locale is not supported by the implementationIllegalArgumentException- if the sum of all attributes length is not equal to the length of the text
-
getTranslatorMode
String getTranslatorMode()
Gets the translator mode of this translator.- Returns:
- returns the translator mode
-
-