use of org.janusgraph.core.attribute.TinkerPopTextWrappingPredicate in project janusgraph by JanusGraph.
the class JanusGraphPredicateUtils method convert.
public static List<Object> convert(final ConnectiveP<?> predicate, final ConnectiveJanusPredicate connectivePredicate) {
final List<Object> toReturn = new ArrayList<>();
for (final P<?> p : predicate.getPredicates()) {
if (p instanceof ConnectiveP) {
final ConnectiveJanusPredicate subPredicate = instanceConnectiveJanusPredicate(p);
toReturn.add(convert((ConnectiveP<?>) p, subPredicate));
connectivePredicate.add(subPredicate);
} else if (p.getBiPredicate() instanceof Text) {
Text text = (Text) p.getBiPredicate();
connectivePredicate.add(new TinkerPopTextWrappingPredicate(text));
toReturn.add(p.getValue());
} else {
connectivePredicate.add(JanusGraphPredicateUtils.convert(p.getBiPredicate()));
toReturn.add(p.getValue());
}
}
return toReturn;
}
Aggregations