Change obsolete collections, remove redundant imports
[cql-java-moved-to-github.git] / src / main / java / org / z3950 / zing / cql / CQLPrefixNode.java
index dd01d85..84fb9a7 100644 (file)
@@ -1,9 +1,9 @@
 // $Id: CQLPrefixNode.java,v 1.10 2007-07-03 16:40:11 mike Exp $
 
 package org.z3950.zing.cql;
-import java.lang.String;
+import java.util.ArrayList;
+import java.util.List;
 import java.util.Properties;
-import java.util.Vector;
 
 
 /**
@@ -15,13 +15,21 @@ public class CQLPrefixNode extends CQLNode {
     /**
      * The prefix definition that governs the subtree.
      */
-    public CQLPrefix prefix;
+    private CQLPrefix prefix;
+
+    public CQLPrefix getPrefix() {
+        return prefix;
+    }
 
     /**
      * The root of a parse-tree representing the part of the query
      * that is governed by this prefix definition.
      */ 
-    public CQLNode subtree;
+    private CQLNode subtree;
+
+    public CQLNode getSubtree() {
+      return subtree;
+    }
 
     /**
      * Creates a new CQLPrefixNode inducing a mapping from the
@@ -33,11 +41,11 @@ public class CQLPrefixNode extends CQLNode {
        this.subtree = subtree;
     }
 
-    public String toXCQL(int level, Vector<CQLPrefix> prefixes,
-                        Vector<ModifierSet> sortkeys) {
-       Vector<CQLPrefix> tmp = (prefixes == null ?
-                                new Vector<CQLPrefix>() :
-                                new Vector<CQLPrefix>(prefixes));
+    public String toXCQL(int level, List<CQLPrefix> prefixes,
+                        List<ModifierSet> sortkeys) {
+       List<CQLPrefix> tmp = (prefixes == null ?
+                                new ArrayList<CQLPrefix>() :
+                                new ArrayList<CQLPrefix>(prefixes));
        tmp.add(prefix);
        return subtree.toXCQL(level, tmp, sortkeys);
     }