org.ceryle.wiki.plugin.tag
Class TagManagerImpl.HasTagModifier
java.lang.Object
org.ceryle.wiki.plugin.query.operators.Operator
org.ceryle.wiki.plugin.query.operators.IsModifier
org.ceryle.wiki.plugin.tag.TagManagerImpl.HasTagModifier
- All Implemented Interfaces:
- Modifier
- Enclosing class:
- TagManagerImpl
public class TagManagerImpl.HasTagModifier
- extends IsModifier
- implements Modifier
A substitution for the IS Operator as a component of a query
expression. Rather than match on wiki page name, this matches
on whether the page contains a matching tag, using methods
from the TagManager.
- Author:
- Murray Altheim
| Methods inherited from class org.ceryle.wiki.plugin.query.operators.IsModifier |
isInfix |
TagManagerImpl.HasTagModifier
public TagManagerImpl.HasTagModifier(TagManager tagManager)
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.
- Overrides:
evaluateOperator in class IsModifier
- 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.
This extends the method in IsModifier by returning a match on
tag rather than page name if the TagManager is available.
- Specified by:
applyModifier in interface Modifier- Overrides:
applyModifier in class IsModifier
- See Also:
IsModifier.permitRegex,
Modifier.applyModifier(ReferenceInfoProvider, String, String)
The Ceryle Project. Copyright ©2001-2007 Murray Altheim, All Rights Reserved. See LICENSE included with distribution.