Class Instance

java.lang.Object
org.omegat.filters2.Instance
All Implemented Interfaces:
Serializable

public class Instance extends Object implements Serializable
Represents an instance of a filter configuration with attributes such as source filename mask, source encoding, target encoding, and target filename pattern. This class is used to define how files are handled during a filtering process. It supports several constructors allowing different levels of initialization.
See Also:
  • Constructor Details

    • Instance

      public Instance(String sourceFilenameMask, @Nullable String sourceEncoding, @Nullable String targetEncoding, String targetFilenamePattern)
      Creates a new instance of FilterInstance.

      Value null for source and target encoding means that the filter selects encodings automatically.

      Output (target) filename pattern cannot be null.

    • Instance

      public Instance(String sourceFilenameMask, @Nullable String sourceEncoding, @Nullable String targetEncoding)
      Creates a new Filter Instance with source file mask and two encodings specified, and having a default target filename pattern.

      Value null for source and target encoding means that the filter selects encodings automatically.

      The default output filename pattern is "${filename}", which means that the name of the translated file should be the same as the name of the input file.

    • Instance

      public Instance(String sourceFilenameMask, String sourceEncoding)
      Creates a new Filter Instance with source file mask and source encoding specified, and having a default target encoding and target filename pattern.

      Value null (default value) for source encoding means that the filter selects encoding of the source file automatically.

      Default value for target encoding is null, meaning that the filter selects encoding of the target file automatically.

      The default output filename pattern is "${filename}", which means that the name of the translated file should be the same as the name of the input file.

    • Instance

      public Instance(String sourceFilenameMask)
      Creates a new Filter Instance with only source file mask specified, and default values for everything else.

      Default value for source and target encoding is null, meaning that the filter selects encodings automatically.

      The default output filename pattern is "${filename}", which means that the name of the translated file should be the same as the name of the input file.

    • Instance

      public Instance()
      Creates a new Filter Instance, uninitialized. Is here to support JavaBeans specification, don't use it in filters.
  • Method Details

    • getSourceFilenameMask

      public String getSourceFilenameMask()
    • setSourceFilenameMask

      public void setSourceFilenameMask(String sourceFilenameMask)
    • getSourceEncodingHuman

      public String getSourceEncodingHuman()
    • getSourceEncoding

      public @Nullable String getSourceEncoding()
    • setSourceEncoding

      public void setSourceEncoding(@Nullable String sourceEncoding)
    • getTargetEncodingHuman

      public String getTargetEncodingHuman()
    • getTargetEncoding

      public @Nullable String getTargetEncoding()
    • setTargetEncoding

      public void setTargetEncoding(@Nullable String targetEncoding)
    • getTargetFilenamePattern

      public String getTargetFilenamePattern()
    • setTargetFilenamePattern

      public void setTargetFilenamePattern(String targetFilenamePattern)