Class Xliff2Filter

All Implemented Interfaces:
IFilter

public class Xliff2Filter extends AbstractXmlFilter
Filter for support Xliff 2.0 files as bilingual.
  • Constructor Details

    • Xliff2Filter

      public Xliff2Filter()
  • Method Details

    • loadPlugins

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

      public static void unloadPlugins()
    • getFileFormatName

      public String getFileFormatName()
      Description copied from class: AbstractFilter
      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
    • getDefaultInstances

      public Instance[] getDefaultInstances()
      Description copied from class: AbstractFilter
      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
    • isFileSupported

      public boolean isFileSupported(File inFile, Map<String,String> config, FilterContext context)
      Description copied from class: AbstractFilter
      Returns whether the file is supported by the filter, given the file and possible file's encoding ( null encoding means autodetect). Default implementation creates a reader and calls AbstractFilter.isFileSupported(BufferedReader). You should override only one of the two.

      For example, DocBook files have .xml extension, as possibly many other XML files, so the filter should check a DTD of the document.

      Specified by:
      isFileSupported in interface IFilter
      Overrides:
      isFileSupported in class AbstractFilter
      Parameters:
      inFile - Source file.
      config - filter's configuration options
      context - Filter context.
      Returns:
      Does the filter support the file.
    • isBilingual

      public boolean isBilingual()
      Description copied from interface: IFilter
      Indicates whether the filter is bilingual, and thus can be used as external TM (i.e. files can be added to the /tm/ folder of an OmegaT project). Bilingual filters will supply both source strings and translation strings to IParseCallback.addEntry().
      Returns:
      true if the filter is bilingual