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 java.lang.ObjectThe base class for fulltext condition expression.
-
-
Field Summary
Fields Modifier and Type Field Description static intPRECEDENCE_ANDThe operator precedence for AND conditions.static intPRECEDENCE_ORThe operator precedence for OR conditions.static intPRECEDENCE_TERMThe operator precedence for terms.
-
Constructor Summary
Constructors Constructor Description FullTextExpression()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract booleanaccept(FullTextVisitor v)Let the expression call the applicable visit method of the visitor.booleanequals(java.lang.Object other)abstract booleanevaluate(java.lang.String value)Evaluate whether the value matches the condition.abstract intgetPrecedence()Get the operator precedence.inthashCode()booleanisNot()Whether the currentFullTextExpressionis aNOTcondition or not.abstract java.lang.StringtoString()Get the string representation of the condition.
-
-
-
Field Detail
-
PRECEDENCE_OR
public static final int PRECEDENCE_OR
The operator precedence for OR conditions.- See Also:
- Constant Field Values
-
PRECEDENCE_AND
public static final int PRECEDENCE_AND
The operator precedence for AND conditions.- See Also:
- Constant Field Values
-
PRECEDENCE_TERM
public static final int PRECEDENCE_TERM
The operator precedence for terms.- See Also:
- Constant Field Values
-
-
Method Detail
-
getPrecedence
public abstract int getPrecedence()
Get the operator precedence.- Returns:
- the precedence
-
evaluate
public abstract boolean evaluate(java.lang.String value)
Evaluate whether the value matches the condition.- Parameters:
value- the value- Returns:
- true if it matches
-
toString
public abstract java.lang.String toString()
Get the string representation of the condition.- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.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 currentFullTextExpressionis aNOTcondition or not. Default is false- Returns:
- true if the current condition represent a NOT, false otherwise.
-
-