org.openrdf.sesame.sail.query
Class Like
java.lang.Object
org.openrdf.sesame.sail.query.Like
- All Implemented Interfaces:
- BooleanExpr
- public class Like
- extends Object
- implements BooleanExpr
Compares the string representation of an expression to a pattern.
Like
public Like(StringExpr expr,
StringConstant pattern,
boolean ignoreCase)
getVariables
public void getVariables(Collection variables)
- Description copied from interface:
BooleanExpr
- Gets all variables that are used in this BooleanExpr.
- Specified by:
getVariables in interface BooleanExpr
- Parameters:
variables - A Collection to add the Var objects to.
getStringExpr
public StringExpr getStringExpr()
getPattern
public String getPattern()
caseSensitive
public boolean caseSensitive()
isTrue
public boolean isTrue(RdfSource rdfSource)
throws BooleanExprEvaluationException,
SailQueryException
- Determines whether the two operands match according to the
like operator. The operator is defined as a string
comparison with the possible use of an asterisk (*) at the end
and/or the start of the second operand to indicate substring
matching.
- Specified by:
isTrue in interface BooleanExpr
- Parameters:
rdfSource - The RdfSource to evaluate the boolean expression against.
- Returns:
true if the operands match according to the
like operator, false otherwise.
- Throws:
BooleanExprEvaluationException - If the boolean expression could
not be evaluated, for example when comparing two incompatible operands.
When thrown, the result of the boolean expression is neither
true or false, but unknown.
SailQueryException
toString
public String toString()
Copyright © 2002-2006 Aduna BV, GNU LGPL License applies.