public class OSISFilter extends Object implements SourceFilter
The GNU Lesser General Public License for details.
Modifier and Type | Field and Description |
---|---|
private static Pattern |
CHAPTER_END
Pattern to find the end of a chapter.
|
private static Pattern |
DIV_END
Pattern to find the end of a div.
|
private static Pattern |
DIV_START
Pattern to find the start of a div.
|
private BlockingQueue<org.jdom2.input.SAXBuilder> |
saxBuilders |
private static Pattern |
SPEECH_END
Pattern to find the end of a speech.
|
private static Pattern |
SPEECH_START
Pattern to find the start of a speech.
|
Constructor and Description |
---|
OSISFilter() |
Modifier and Type | Method and Description |
---|---|
private org.jdom2.Element |
cleanTags(Book book,
Key key,
String plain) |
OSISFilter |
clone()
This needs to be declared here so that it is visible as a method on a
derived Filter.
|
private org.jdom2.Element |
parse(String plain)
If the string is invalid then we might want to have more than one crack
at parsing it
|
List<org.jdom2.Content> |
toOSIS(Book book,
Key key,
String plain)
Converter from plain (encoded) text to OSIS data
|
private BlockingQueue<org.jdom2.input.SAXBuilder> saxBuilders
private static final Pattern DIV_START
private static final Pattern DIV_END
private static final Pattern CHAPTER_END
private static final Pattern SPEECH_START
private static final Pattern SPEECH_END
public List<org.jdom2.Content> toOSIS(Book book, Key key, String plain)
SourceFilter
toOSIS
in interface SourceFilter
book
- the bookkey
- The key for the textplain
- The encoded textpublic OSISFilter clone()
SourceFilter
clone
in interface SourceFilter
clone
in class Object
private org.jdom2.Element parse(String plain) throws org.jdom2.JDOMException, IOException
org.jdom2.JDOMException
IOException