public interface TitanPredicate
extends com.tinkerpop.blueprints.Predicate
Predicate interface. Contains some custom methods that Titan needs for
query answering and evaluation.
This class contains a subclass used to convert Blueprint's Predicate to the corresponding Titan predicates.| Modifier and Type | Interface and Description |
|---|---|
static class |
TitanPredicate.Converter |
| Modifier and Type | Method and Description |
|---|---|
boolean |
evaluate(Object value,
Object condition) |
boolean |
hasNegation()
Whether this predicate has a predicate that is semantically its negation.
|
boolean |
isQNF()
Returns true if this predicate is in query normal form.
|
boolean |
isValidCondition(Object condition)
Whether the given condition is a valid condition for this predicate.
|
boolean |
isValidValueType(Class<?> clazz)
Whether the given class is a valid data type for a value to which this predicate may be applied.
|
TitanPredicate |
negate()
Returns the negation of this predicate if it exists, otherwise an exception is thrown.
|
boolean isValidCondition(Object condition)
Cmp.GREATER_THAN would require that the condition is comparable and not null.condition - boolean isValidValueType(Class<?> clazz)
Cmp.GREATER_THAN can only be applied to Comparable values.clazz - boolean hasNegation()
Cmp.EQUAL and Cmp.NOT_EQUAL are negatives of each other.TitanPredicate negate()
hasNegation() first.boolean isQNF()
Copyright © 2012–2014. All rights reserved.