org.crosswire.jsword.book.filter.thml

## Class THMLFilter

- java.lang.Object
- - org.crosswire.jsword.book.filter.thml.THMLFilter

- All Implemented Interfaces:
    Cloneable, SourceFilter

      public class THMLFilter
      extends Object
      implements SourceFilter

  Filter to convert THML to OSIS format.

  I used the THML ref page: http ://www.ccel.org/ThML/ThML1.04.htm to work out what the tags meant. LATER(joe): check nesting on these THML elements

  Author:
    Joe Walker
  See Also:
    `The GNU Lesser General Public License for details.`

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private Exception` | `error`
    `private String` | `errorMessage`
    `private String` | `finalInput`
    `private static org.slf4j.Logger` | `log` The log stream

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `THMLFilter()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `private org.jdom2.Element` | `cleanParse(Book book, Key key, String plain)`
    `private org.jdom2.Element` | `cleanTags(Book book, Key key, String plain)`
    `private org.jdom2.Element` | `cleanText(Book book, Key key, String plain)`
    `THMLFilter` | `clone()` This needs to be declared here so that it is visible as a method on a derived Filter.
    `private org.jdom2.Element` | `parse(Book book, Key key, String plain, String failMessage)`
    `List<org.jdom2.Content>` | `toOSIS(Book book, Key key, String plain)` Converter from plain (encoded) text to OSIS data

    - ### Methods inherited from class java.lang.Object

      `equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### errorMessage

          private String errorMessage

    - #### error

          private Exception error

    - #### finalInput

          private String finalInput

    - #### log

          private static final org.slf4j.Logger log

      The log stream

  - ### Constructor Detail

    - #### THMLFilter

          public THMLFilter()

  - ### Method Detail

    - #### toOSIS

          public List<org.jdom2.Content> toOSIS(Book book,
                                       Key key,
                                       String plain)

      Description copied from interface: `SourceFilter`
      Converter from plain (encoded) text to OSIS data
      Specified by:
        `toOSIS` in interface `SourceFilter`
      Parameters:
        `book` - the book
        `key` - The key for the text
        `plain` - The encoded text
      Returns:
        a List of OSIS Elements

    - #### clone

          public THMLFilter clone()

      Description copied from interface: `SourceFilter`
      This needs to be declared here so that it is visible as a method on a derived Filter.
      Specified by:
        `clone` in interface `SourceFilter`
      Overrides:
        `clone` in class `Object`
      Returns:
        A complete copy of ourselves

    - #### cleanParse

          private org.jdom2.Element cleanParse(Book book,
                                     Key key,
                                     String plain)

    - #### cleanText

          private org.jdom2.Element cleanText(Book book,
                                    Key key,
                                    String plain)

    - #### cleanTags

          private org.jdom2.Element cleanTags(Book book,
                                    Key key,
                                    String plain)

    - #### parse

          private org.jdom2.Element parse(Book book,
                                Key key,
                                String plain,
                                String failMessage)