Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.crosswire.jsword.book.filter.osis
Class OSISFilter

    java.lang.Object
      org.crosswire.jsword.book.filter.osis.OSISFilter

All Implemented Interfaces:
  Cloneable, Filter

    public class OSISFilter

extends Object
implements Filter

Filter to convert an OSIS XML string to OSIS format.

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

Field Summary
`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 Summary
`OSISFilter()`

Method Summary
`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

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### saxBuilders

    private BlockingQueue<org.jdom2.input.SAXBuilder> saxBuilders

### DIV_START

    private static final Pattern DIV_START

  Pattern to find the start of a div. Used to convert to a milestoned version.

### DIV_END

    private static final Pattern DIV_END

  Pattern to find the end of a div. Used to convert to a milestoned version.

### CHAPTER_END

    private static final Pattern CHAPTER_END

  Pattern to find the end of a chapter. Used to convert to a milestoned version.

### SPEECH_START

    private static final Pattern SPEECH_START

  Pattern to find the start of a speech. Used to convert to a milestoned version.

### SPEECH_END

    private static final Pattern SPEECH_END

  Pattern to find the end of a speech. Used to convert to a milestoned version.

Constructor Detail

### OSISFilter

    public OSISFilter()

Method Detail

### toOSIS

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

  Description copied from interface: `Filter`
  Converter from plain (encoded) text to OSIS data

  Specified by:
    `toOSIS` in interface `Filter`
  Parameters:
    `book` - the book
    `key` - The key for the text
    `plain` - The encoded text
  Returns:
    a List of OSIS Elements

### clone

    public OSISFilter clone()

  Description copied from interface: `Filter`
  This needs to be declared here so that it is visible as a method on a derived Filter.

  Specified by:
    `clone` in interface `Filter`
  Overrides:
    `clone` in class `Object`
  Returns:
    A complete copy of ourselves

### cleanTags

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

### parse

    private org.jdom2.Element parse(String plain)
                             throws org.jdom2.JDOMException,
                                    IOException

  If the string is invalid then we might want to have more than one crack at parsing it

  Throws:
    `org.jdom2.JDOMException`
    `IOException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Copyright ¨ 2003-2015
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD