From: mike Date: Wed, 27 Jun 2007 17:05:05 +0000 (+0000) Subject: Use new Modifier objects for PQF translation rather than the old X-Git-Tag: v1.5~119 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=2601903faaf2d25baba21063f6957b1abef672a4;p=cql-java-moved-to-github.git Use new Modifier objects for PQF translation rather than the old Vector hack. --- diff --git a/src/org/z3950/zing/cql/CQLTermNode.java b/src/org/z3950/zing/cql/CQLTermNode.java index 841c139..070955c 100644 --- a/src/org/z3950/zing/cql/CQLTermNode.java +++ b/src/org/z3950/zing/cql/CQLTermNode.java @@ -1,4 +1,4 @@ -// $Id: CQLTermNode.java,v 1.23 2007-06-06 12:22:01 mike Exp $ +// $Id: CQLTermNode.java,v 1.24 2007-06-27 17:05:05 mike Exp $ package org.z3950.zing.cql; import java.util.Properties; @@ -12,7 +12,7 @@ import java.util.Vector; * these must be provided - you can't have a qualifier without a * relation or vice versa. * - * @version $Id: CQLTermNode.java,v 1.23 2007-06-06 12:22:01 mike Exp $ + * @version $Id: CQLTermNode.java,v 1.24 2007-06-27 17:05:05 mike Exp $ */ public class CQLTermNode extends CQLNode { private String qualifier; @@ -109,11 +109,12 @@ public class CQLTermNode extends CQLNode { throw new UnknownRelationException(rel); attrs.add(attr); - String[] mods = relation.getModifiers(); - for (int i = 0; i < mods.length; i++) { - attr = config.getProperty("relationModifier." + mods[i]); + Vector mods = relation.getModifiers(); + for (int i = 0; i < mods.size(); i++) { + String type = mods.get(i).type; + attr = config.getProperty("relationModifier." + type); if (attr == null) - throw new UnknownRelationModifierException(mods[i]); + throw new UnknownRelationModifierException(type); attrs.add(attr); }