Class FullTextExpression

java.lang.Object
org.apache.jackrabbit.oak.spi.query.fulltext.FullTextExpression
Direct Known Subclasses:
FullTextAnd, FullTextContains, FullTextOr, FullTextTerm

public abstract class FullTextExpression extends Object
The base class for fulltext condition expression.
  • Field Details

    • PRECEDENCE_OR

      public static final int PRECEDENCE_OR
      The operator precedence for OR conditions.
      See Also:
    • PRECEDENCE_AND

      public static final int PRECEDENCE_AND
      The operator precedence for AND conditions.
      See Also:
    • PRECEDENCE_TERM

      public static final int PRECEDENCE_TERM
      The operator precedence for terms.
      See Also:
  • Constructor Details

    • FullTextExpression

      public FullTextExpression()
  • Method Details

    • getPrecedence

      public abstract int getPrecedence()
      Get the operator precedence.
      Returns:
      the precedence
    • evaluate

      public abstract boolean evaluate(String value)
      Evaluate whether the value matches the condition.
      Parameters:
      value - the value
      Returns:
      true if it matches
    • toString

      public abstract String toString()
      Get the string representation of the condition.
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • accept

      public abstract boolean accept(FullTextVisitor v)
      Let the expression call the applicable visit method of the visitor.
      Parameters:
      v - the visitor
      Returns:
      true if the visit method returned true
    • isNot

      public boolean isNot()
      Whether the current FullTextExpression is a NOT condition or not. Default is false
      Returns:
      true if the current condition represent a NOT, false otherwise.