org.crosswire.jsword.book

## Class DataPolice

- java.lang.Object
- - org.crosswire.jsword.book.DataPolice

-     public final class DataPolice
      extends Object

  When we can't convert some source data then the user doesn't really care and just wants it to work, but it would be good to have some way to get the problems fixed, so as a start point we report them through this class.
  Author:
    Joe Walker
  See Also:
    `The GNU Lesser General Public License for details.`

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private static org.slf4j.Logger` | `LOGGER` The log stream
    `private static boolean` | `reporting` Whether to report problems or not.

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `private` | `DataPolice()` Prevent instantiation

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static boolean` | `isReporting()`
    `static void` | `report(Book book, Key key, String message)` Report a message against the current book and key.
    `static void` | `setReporting(boolean reporting)`

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

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

- - ### Field Detail

    - #### reporting

          private static boolean reporting

      Whether to report problems or not. By default, reporting is off.

    - #### LOGGER

          private static final org.slf4j.Logger LOGGER

      The log stream

  - ### Constructor Detail

    - #### DataPolice

          private DataPolice()

      Prevent instantiation

  - ### Method Detail

    - #### report

          public static void report(Book book,
                    Key key,
                    String message)

      Report a message against the current book and key.
      Parameters:
        `book` - the book against which to report
        `key` - the key against which to report
        `message` - the police report.

    - #### isReporting

          public static boolean isReporting()

      Returns:
        Returns whether to report found problems.

    - #### setReporting

          public static void setReporting(boolean reporting)

      Parameters:
        `reporting` - Turn on reporting of found problems