X-Git-Url: http://lists.indexdata.dk/cgi-bin?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fz3950%2Fzing%2Fcql%2FCQLTermNode.java;h=1f03a4ed9f426b54f3dc91d244f2835f906148d0;hb=791833362f2e87616d70ffc3f1ce6b0191ff7a0f;hp=924b6baa8de28820290612d44b06aa96be666a5e;hpb=0109aec019aeba5a9ef1e42cb08a796a3cb5fc88;p=cql-java-moved-to-github.git diff --git a/src/main/java/org/z3950/zing/cql/CQLTermNode.java b/src/main/java/org/z3950/zing/cql/CQLTermNode.java index 924b6ba..1f03a4e 100644 --- a/src/main/java/org/z3950/zing/cql/CQLTermNode.java +++ b/src/main/java/org/z3950/zing/cql/CQLTermNode.java @@ -1,8 +1,9 @@ // $Id: CQLTermNode.java,v 1.28 2007-07-03 13:41:24 mike Exp $ package org.z3950.zing.cql; +import java.util.ArrayList; +import java.util.List; import java.util.Properties; -import java.util.Vector; /** @@ -51,8 +52,8 @@ public class CQLTermNode extends CQLNode { return null; } - public String toXCQL(int level, Vector prefixes, - Vector sortkeys) { + public String toXCQL(int level, List prefixes, + List sortkeys) { return (indent(level) + "\n" + renderPrefixes(level+1, prefixes) + indent(level+1) + "" + xq(index) + "\n" + @@ -80,8 +81,8 @@ public class CQLTermNode extends CQLNode { // ### Interaction between this and its callers is not good as // regards truncation of the term and generation of truncation // attributes. Change the interface to fix this. - private Vector getAttrs(Properties config) throws PQFTranslationException { - Vector attrs = new Vector(); + private List getAttrs(Properties config) throws PQFTranslationException { + List attrs = new ArrayList(); // Do this first so that if any other truncation or // completeness attributes are generated, they "overwrite" @@ -118,7 +119,7 @@ public class CQLTermNode extends CQLNode { throw new UnknownRelationException(rel); attrs.add(attr); - Vector mods = relation.getModifiers(); + List mods = relation.getModifiers(); for (int i = 0; i < mods.size(); i++) { String type = mods.get(i).type; attr = config.getProperty("relationModifier." + type); @@ -164,7 +165,7 @@ public class CQLTermNode extends CQLNode { return "@set " + maybeQuote(term); } - Vector attrs = getAttrs(config); + List attrs = getAttrs(config); String attr, s = ""; for (int i = 0; i < attrs.size(); i++) { @@ -240,7 +241,7 @@ public class CQLTermNode extends CQLNode { offset = putTag(CONTEXT, 44, CONSTRUCTED, operand, offset); // AttributeList operand[offset++] = (byte)(0x80&0xff); // indefinite length - Vector attrs = getAttrs(config); + List attrs = getAttrs(config); for(i = 0; i < attrs.size(); i++) { attrList = (String) attrs.get(i); java.util.StringTokenizer st =