Package org.daisy.dotify.api.translator
Interface PrecedingText
- 
- All Known Subinterfaces:
 ResolvableText,Segment
- All Known Implementing Classes:
 AnchorSegment,Evaluate,ExternalReferenceSegment,IdentifierSegment,LeaderSegment,MarkerReferenceSegment,MarkerSegment,NewLineSegment,PageNumberReference,Style,TextSegment
public interface PrecedingTextProvides information about an already processed item. Note that what's provided through this interface is the input to the process.- See Also:
 ResolvableText
 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Optional<String>getLocale()Gets the locale for the text, if specified.Stringresolve()Resolves the item.booleanshouldHyphenate()Returns true if the text should be hyphenated.booleanshouldMarkCapitalLetters()Returns true if the text should mark capital letters. 
 - 
 
- 
- 
Method Detail
- 
resolve
String resolve()
Resolves the item. Once the value has been resolved, it cannot change between calls in the same context.- Returns:
 - the value, never null
 
 
- 
getLocale
Optional<String> getLocale()
Gets the locale for the text, if specified.
Note that this method returns the language that the text is written in. It does not imply association with a particular translator or braille code.
- Returns:
 - an optional containing the locale, never null
 
 
- 
shouldHyphenate
boolean shouldHyphenate()
Returns true if the text should be hyphenated.- Returns:
 - true if the text should be hyphenated, false otherwise
 
 
- 
shouldMarkCapitalLetters
boolean shouldMarkCapitalLetters()
Returns true if the text should mark capital letters.- Returns:
 - true if the capital letters should be marked, false otherwise
 
 
 - 
 
 -