public SimilarImpl similar(String selectorName, String propertyName, StaticOperandImpl path) { return new SimilarImpl(selectorName, propertyName, path); }
@Override public boolean visit(SimilarImpl node) { node.setQuery(query); node.bindSelector(source); return super.visit(node); }
@Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append("similar("); builder.append(quote(selectorName)); if (propertyName != null) { builder.append(".").append(propertyName); } builder.append(", "); builder.append(getPathExpression()); builder.append(')'); return builder.toString(); }
/** * Calls accept on the static operand in the similar search constraint. */ @Override public boolean visit(SimilarImpl node) { node.getPathExpression().accept(this); return true; }
@Override public boolean evaluate() { // disable evaluation if a fulltext index is used, // and because we don't know how to process native // conditions if (!(selector.getIndex() instanceof FulltextQueryIndex)) { log.warn("No full-text index was found that can process the condition " + toString()); return false; } // verify the path is readable PropertyValue p = pathExpression.currentValue(); String path = p.getValue(Type.STRING); if (selector.getTree(path) == null) { return false; } if (propertyName != null) { if (selector.currentProperty(propertyName) == null) { // property not found return false; } } // we assume the index only returns the requested entries return true; }
@Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append("similar("); builder.append(quote(selectorName)); if (propertyName != null) { builder.append(".").append(propertyName); } builder.append(", "); builder.append(getPathExpression()); builder.append(')'); return builder.toString(); }
/** * Calls accept on the static operand in the similar search constraint. */ @Override public boolean visit(SimilarImpl node) { node.getPathExpression().accept(this); return true; }
@Override public boolean evaluate() { // disable evaluation if a fulltext index is used, // and because we don't know how to process native // conditions if (!(selector.getIndex() instanceof FulltextQueryIndex)) { log.warn("No full-text index was found that can process the condition " + toString()); return false; } // verify the path is readable PropertyValue p = pathExpression.currentValue(); String path = p.getValue(Type.STRING); if (selector.getTree(path) == null) { return false; } if (propertyName != null) { if (selector.currentProperty(propertyName) == null) { // property not found return false; } } // we assume the index only returns the requested entries return true; }
@Override public boolean visit(SimilarImpl node) { node.setQuery(query); node.bindSelector(source); return super.visit(node); }
@Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append("similar("); builder.append(quote(selectorName)); if (propertyName != null) { builder.append(".").append(propertyName); } builder.append(", "); builder.append(getPathExpression()); builder.append(')'); return builder.toString(); }
@Override public AstElement copyOf() { return new SimilarImpl(selectorName, propertyName, pathExpression); }
/** * Calls accept on the static operand in the similar search constraint. */ @Override public boolean visit(SimilarImpl node) { node.getPathExpression().accept(this); return true; }
@Override public boolean evaluate() { // disable evaluation if a fulltext index is used, // and because we don't know how to process native // conditions if (!(selector.getIndex() instanceof FulltextQueryIndex)) { log.warn("No full-text index was found that can process the condition " + toString()); return false; } // verify the path is readable PropertyValue p = pathExpression.currentValue(); String path = p.getValue(Type.STRING); if (selector.getTree(path) == null) { return false; } if (propertyName != null) { if (selector.currentProperty(propertyName) == null) { // property not found return false; } } // we assume the index only returns the requested entries return true; }
@Override public boolean visit(SimilarImpl node) { node.setQuery(query); node.bindSelector(source); return super.visit(node); }
@Override public AstElement copyOf() { return new SimilarImpl(selectorName, propertyName, pathExpression); }
@Override public AstElement copyOf() { return new SimilarImpl(selectorName, propertyName, pathExpression); }
public SimilarImpl similar(String selectorName, String propertyName, StaticOperandImpl path) { return new SimilarImpl(selectorName, propertyName, path); }
public SimilarImpl similar(String selectorName, String propertyName, StaticOperandImpl path) { return new SimilarImpl(selectorName, propertyName, path); }