private static Set<String> extractFulltext(ConstraintImpl c) {
Set<String> tokens = new HashSet<String>();
// TODO instanceof should not be used,
// as it will break without us noticing if we extend the AST
if (c instanceof FullTextSearchImpl) {
FullTextSearchImpl f = (FullTextSearchImpl) c;
if (f.getFullTextSearchExpression() instanceof LiteralImpl) {
LiteralImpl l = (LiteralImpl) f.getFullTextSearchExpression();
tokens.add(l.getLiteralValue().getValue(Type.STRING));
}
}
if (c instanceof AndImpl) {
for (ConstraintImpl constraint : ((AndImpl) c).getConstraints()) {