Class DocBookFilter

All Implemented Interfaces:
IFilter, Translator

@NullMarked public class DocBookFilter extends XMLFilter
Filter for DocBook files.
  • Constructor Details

    • DocBookFilter

      public DocBookFilter()
      Creates a new instance of DocBookFilter
  • Method Details

    • loadPlugins

      public static void loadPlugins()
      Register plugin into OmegaT.
    • unloadPlugins

      public static void unloadPlugins()
    • getFileFormatName

      public String getFileFormatName()
      Human-readable name of the File Format this filter supports.
      Specified by:
      getFileFormatName in interface IFilter
      Specified by:
      getFileFormatName in class AbstractFilter
      Returns:
      File format name
    • getHint

      public String getHint()
      Returns the hint displayed while the user edits the filter, and when she adds/edits the instance of this filter. The hint may be any string, preferably in a non-geek language.
      Specified by:
      getHint in interface IFilter
      Overrides:
      getHint in class AbstractFilter
      Returns:
      The hint for editing the filter in a non-geek language.
    • getDefaultInstances

      public Instance[] getDefaultInstances()
      The default list of filter instances that this filter class has. One filter class may have different filter instances, different by source file mask, encoding of the source file etc.

      Note that the user may change the instances freely.

      Specified by:
      getDefaultInstances in interface IFilter
      Specified by:
      getDefaultInstances in class AbstractFilter
      Returns:
      Default filter instances
    • isSourceEncodingVariable

      public boolean isSourceEncodingVariable()
      Either the encoding can be read, or it is UTF-8..
      Specified by:
      isSourceEncodingVariable in interface IFilter
      Overrides:
      isSourceEncodingVariable in class XMLFilter
      Returns:
      false
    • isTargetEncodingVariable

      public boolean isTargetEncodingVariable()
      Yes, DocBook may be written out in a variety of encodings.
      Specified by:
      isTargetEncodingVariable in interface IFilter
      Overrides:
      isTargetEncodingVariable in class XMLFilter
      Returns:
      true
    • isFileSupported

      public boolean isFileSupported(BufferedReader reader)
      Returns whether the file is supported by the filter, by checking DB4 (DTD) or DB5 (Namespace) constraints.
      Overrides:
      isFileSupported in class XMLFilter
      Returns:
      true or false