From: Mike Taylor Date: Tue, 25 May 2010 13:53:29 +0000 (+0200) Subject: Correct the set of word-relations recognised -- fixes #3435 X-Git-Tag: v1.5~11 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=67054ebf3e57c9570fab3d6e2c962f816487848e;p=cql-java-moved-to-github.git Correct the set of word-relations recognised -- fixes #3435 Add encloses and within for all versions Add adj for V1.2 only Restrict exact to V1.1 only Switch sense for scr, now recognised only in 1.1 and not 1.2 --- diff --git a/src/main/java/org/z3950/zing/cql/CQLParser.java b/src/main/java/org/z3950/zing/cql/CQLParser.java index 25b49d0..90e9f59 100644 --- a/src/main/java/org/z3950/zing/cql/CQLParser.java +++ b/src/main/java/org/z3950/zing/cql/CQLParser.java @@ -241,10 +241,13 @@ public class CQLParser { " (" + lexer.render() + ")"); if (lexer.ttype == lexer.TT_WORD && (lexer.sval.indexOf('.') >= 0 || - lexer.sval.equals("exact") || lexer.sval.equals("any") || lexer.sval.equals("all") || - (lexer.sval.equals("scr") && compat == V1POINT2))) + lexer.sval.equals("within") || + lexer.sval.equals("encloses") || + (lexer.sval.equals("exact") && compat != V1POINT2) || + (lexer.sval.equals("scr") && compat != V1POINT2) || + (lexer.sval.equals("adj") && compat == V1POINT2))) return true; return isSymbolicRelation();