Class TextConditionConfig

All Implemented Interfaces:
Labelable

public class TextConditionConfig extends BaseConditionConfig

A condition based on a text pattern matching a document content (default), or matching specific field(s). When used on very large content, it is possible the pattern matching will be done in chunks, sometimes not achieving expected results.

See Also:
  • Constructor Details

    • TextConditionConfig

      public TextConditionConfig()
  • Method Details

    • getValueMatcher

      public TextMatcher getValueMatcher()
      Gets the text matcher for content or field values.
      Returns:
      text matcher
    • setValueMatcher

      public TextConditionConfig setValueMatcher(TextMatcher valueMatcher)
      Sets the text matcher for content or field values. Copies it.
      Parameters:
      valueMatcher - text matcher
      Returns:
      this instance
    • getFieldMatcher

      public TextMatcher getFieldMatcher()
      Gets the text matcher of field names.
      Returns:
      field matcher
    • setFieldMatcher

      public TextConditionConfig setFieldMatcher(TextMatcher fieldMatcher)
      Sets the text matcher of field names. Copies it.
      Parameters:
      fieldMatcher - text matcher
      Returns:
      this instance
    • getSourceCharset

      public Charset getSourceCharset()
      The presumed source character encoding. Usually ignored and presumed to be UTF-8 if the document has been parsed already.
      Returns:
      character encoding of the source to be transformed
    • getMaxReadSize

      public int getMaxReadSize()
      The maximum number of characters to read at once, used for filtering. Default is TextReader.DEFAULT_MAX_READ_SIZE.
      Returns:
      maximum read size
    • setSourceCharset

      public TextConditionConfig setSourceCharset(Charset sourceCharset)
      The presumed source character encoding. Usually ignored and presumed to be UTF-8 if the document has been parsed already.
      Parameters:
      sourceCharset - character encoding of the source to be transformed
      Returns:
      this.
    • setMaxReadSize

      public TextConditionConfig setMaxReadSize(int maxReadSize)
      The maximum number of characters to read at once, used for filtering. Default is TextReader.DEFAULT_MAX_READ_SIZE.
      Parameters:
      maxReadSize - maximum read size
      Returns:
      this.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class BaseLabelableConfig
    • canEqual

      protected boolean canEqual(Object other)
      Overrides:
      canEqual in class BaseLabelableConfig
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class BaseLabelableConfig
    • toString

      public String toString()
      Overrides:
      toString in class BaseLabelableConfig