Change obsolete collections, remove redundant imports
[cql-java-moved-to-github.git] / src / main / java / org / z3950 / zing / cql / CQLParser.java
index 90e9f59..0503977 100644 (file)
@@ -2,11 +2,12 @@
 
 package org.z3950.zing.cql;
 import java.io.IOException;
-import java.util.Vector;
 import java.util.Properties;
 import java.io.InputStream;
 import java.io.FileInputStream;
 import java.io.FileNotFoundException;
+import java.util.ArrayList;
+import java.util.List;
 
 
 /**
@@ -19,9 +20,9 @@ import java.io.FileNotFoundException;
 public class CQLParser {
     private CQLLexer lexer;
     private int compat;        // When false, implement CQL 1.2
-    public static int V1POINT1 = 12368;
-    public static int V1POINT2 = 12369;
-    public static int V1POINT1SORT = 12370;
+    public static final int V1POINT1 = 12368;
+    public static final int V1POINT2 = 12369;
+    public static final int V1POINT1SORT = 12370;
 
     static private boolean DEBUG = false;
     static private boolean LEXDEBUG = false;
@@ -206,7 +207,7 @@ public class CQLParser {
            relation = new CQLRelation(relstr);
            match(lexer.ttype);
            ModifierSet ms = gatherModifiers(relstr);
-           relation.setModifiers(ms);
+           relation.ms = ms;
            debug("index='" + index + ", " +
                  "relation='" + relation.toCQL() + "'");
        }
@@ -245,7 +246,7 @@ public class CQLParser {
              lexer.sval.equals("all") ||
              lexer.sval.equals("within") ||
              lexer.sval.equals("encloses") ||
-             (lexer.sval.equals("exact") && compat != V1POINT2) ||
+             lexer.sval.equals("exact") ||
              (lexer.sval.equals("scr") && compat != V1POINT2) ||
              (lexer.sval.equals("adj") && compat == V1POINT2)))
           return true;
@@ -369,7 +370,7 @@ public class CQLParser {
        char mode = 'x';        // x=XCQL, c=CQL, p=PQF
        String pfile = null;
 
-       Vector<String> argv = new Vector<String>();
+       List<String> argv = new ArrayList<String>();
        for (int i = 0; i < args.length; i++) {
            argv.add(args[i]);
        }