org.ceryle.wiki.plugin.query.operators
Class IsModifier
java.lang.Object
org.ceryle.wiki.plugin.query.operators.Operator
org.ceryle.wiki.plugin.query.operators.IsModifier
- All Implemented Interfaces:
- Modifier
- Direct Known Subclasses:
- TagManagerImpl.HasTagModifier
public class IsModifier
- extends Operator
- implements Modifier
The IS Operator, a component of a query expression.
- Author:
- Murray Altheim (added regex matching), John Volkar (john.volkar at gmail.com)
|
Field Summary |
static boolean |
permitRegex
When true, permits Java-style regular expression matching (as supported
directly by String.matches(String) on the page name. |
permitRegex
public static boolean permitRegex
- When true, permits Java-style regular expression matching (as supported
directly by
String.matches(String) on the page name.
The default is true.
IsModifier
public IsModifier()
isInfix
public boolean isInfix()
- Overrides:
isInfix in class Operator
evaluateOperator
public boolean evaluateOperator(Operand left,
Operand right,
Modifier modifier,
ReferenceInfoProvider refInfoProvider,
String pageName)
throws QueryException
- The left operand is expected to be Operand.NULL, evaluate the right
using this as the modifier.
- Specified by:
evaluateOperator in class Operator
- Throws:
QueryException- See Also:
Operator.evaluateOperator(Operand, Operand, Modifier, ReferenceInfoProvider, String)
applyModifier
public boolean applyModifier(ReferenceInfoProvider refInfoProvider,
String candidateName,
String termName)
- Evaluates to true if candidateName IS termName.
If regular expressions are permitted then the candidateName
is evaluated against a regular expression match. If the regex
pattern is invalid, returns the default behaviour of a direct,
case-insensitive match.
- Specified by:
applyModifier in interface Modifier
- See Also:
permitRegex,
Modifier.applyModifier(ReferenceInfoProvider, String, String)
The Ceryle Project. Copyright ©2001-2007 Murray Altheim, All Rights Reserved. See LICENSE included with distribution.