/** * Calls accept on the static operand in the fulltext search constraint. */ @Override public boolean visit(FullTextSearchImpl node) { node.getFullTextSearchExpression().accept(this); return true; }
/** * Calls accept on the static operand in the fulltext search constraint. */ @Override public boolean visit(FullTextSearchImpl node) { node.getFullTextSearchExpression().accept(this); return true; }
/** * Calls accept on the static operand in the fulltext search constraint. */ @Override public boolean visit(FullTextSearchImpl node) { node.getFullTextSearchExpression().accept(this); return true; }
@Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append("contains("); builder.append(quote(selectorName)); builder.append('.'); String pn = propertyName; if (pn == null) { pn = "*"; } if (relativePath != null) { pn = relativePath + "/" + pn; } builder.append(quote(pn)); builder.append(", "); builder.append(getFullTextSearchExpression()); builder.append(')'); return builder.toString(); }
@Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append("contains("); builder.append(quote(selectorName)); builder.append('.'); String pn = propertyName; if (pn == null) { pn = "*"; } if (relativePath != null) { pn = relativePath + "/" + pn; } builder.append(quote(pn)); builder.append(", "); builder.append(getFullTextSearchExpression()); builder.append(')'); return builder.toString(); }
@Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append("contains("); builder.append(quote(selectorName)); builder.append('.'); String pn = propertyName; if (pn == null) { pn = "*"; } if (relativePath != null) { pn = relativePath + "/" + pn; } builder.append(quote(pn)); builder.append(", "); builder.append(getFullTextSearchExpression()); builder.append(')'); return builder.toString(); }
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()) { tokens.addAll(extractFulltext(constraint)); } } if (c instanceof OrImpl) { for (ConstraintImpl constraint : ((OrImpl) c).getConstraints()) { tokens.addAll(extractFulltext(constraint)); } } return tokens; }
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()) { tokens.addAll(extractFulltext(constraint)); } } if (c instanceof OrImpl) { for (ConstraintImpl constraint : ((OrImpl) c).getConstraints()) { tokens.addAll(extractFulltext(constraint)); } } return tokens; }
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()) { tokens.addAll(extractFulltext(constraint)); } } if (c instanceof OrImpl) { for (ConstraintImpl constraint : ((OrImpl) c).getConstraints()) { tokens.addAll(extractFulltext(constraint)); } } return tokens; }