Package org.daisy.dotify.translator
Class RegexMarkerDictionary
- java.lang.Object
-
- org.daisy.dotify.translator.RegexMarkerDictionary
-
- All Implemented Interfaces:
MarkerDictionary
public class RegexMarkerDictionary extends Object implements MarkerDictionary
Provides a regular expressions marker dictionary that provides returns markers based on regular expressions. Both a matching and a non-matching marker can be defined for for the same regular expression.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRegexMarkerDictionary.BuilderProvides a builder for creating RegexMarkerDictionary objects.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MarkergetMarkersFor(String str, TextAttribute attribute)Gets the markers that apply to the specified string.
-
-
-
Method Detail
-
getMarkersFor
public Marker getMarkersFor(String str, TextAttribute attribute) throws MarkerNotFoundException, MarkerNotCompatibleException
Description copied from interface:MarkerDictionaryGets the markers that apply to the specified string.- Specified by:
getMarkersForin interfaceMarkerDictionary- Parameters:
str- the string to find markers forattribute- the attributes for the string- Returns:
- returns markers that apply to the input
- Throws:
MarkerNotFoundException- if no markers apply to the supplied stringMarkerNotCompatibleException- if the markers cannot be applied to the attribute structure
-
-