From: mike Date: Wed, 27 Jun 2007 17:02:01 +0000 (+0000) Subject: Simplify getModifiers. X-Git-Tag: v1.5~120 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=ad441f7588070233573d763992e71fe8dc867a4d;p=cql-java-moved-to-github.git Simplify getModifiers. --- diff --git a/src/org/z3950/zing/cql/CQLProxNode.java b/src/org/z3950/zing/cql/CQLProxNode.java index 9c7dff9..d0ac772 100644 --- a/src/org/z3950/zing/cql/CQLProxNode.java +++ b/src/org/z3950/zing/cql/CQLProxNode.java @@ -1,4 +1,4 @@ -// $Id: CQLProxNode.java,v 1.7 2002-12-05 17:14:52 mike Exp $ +// $Id: CQLProxNode.java,v 1.8 2007-06-27 17:02:01 mike Exp $ package org.z3950.zing.cql; import java.util.Vector; @@ -10,7 +10,7 @@ import java.util.Vector; * candidate records which are sufficiently close to each other, as * specified by a set of proximity parameters. * - * @version $Id: CQLProxNode.java,v 1.7 2002-12-05 17:14:52 mike Exp $ + * @version $Id: CQLProxNode.java,v 1.8 2007-06-27 17:02:01 mike Exp $ */ public class CQLProxNode extends CQLBooleanNode { ModifierSet ms; @@ -58,12 +58,9 @@ public class CQLProxNode extends CQLBooleanNode { * Returns an array of the modifiers associated with a proximity * node. * @return - * An array of modifiers, each represented by a two-element - * Vector, in which element 0 is the modifier type - * (e.g. distance or ordering) and element 1 is - * the associated value (e.g. 3 or unordered). + * An array of Modifier objects. */ - public Vector[] getModifiers() { + public Vector getModifiers() { return ms.getModifiers(); } diff --git a/src/org/z3950/zing/cql/CQLRelation.java b/src/org/z3950/zing/cql/CQLRelation.java index cb2dfb6..5907554 100644 --- a/src/org/z3950/zing/cql/CQLRelation.java +++ b/src/org/z3950/zing/cql/CQLRelation.java @@ -1,4 +1,4 @@ -// $Id: CQLRelation.java,v 1.11 2003-09-04 21:56:46 mike Exp $ +// $Id: CQLRelation.java,v 1.12 2007-06-27 17:03:17 mike Exp $ package org.z3950.zing.cql; import java.util.Vector; @@ -8,7 +8,7 @@ import java.lang.StringBuffer; /** * Represents a relation between a CQL qualifier and term. * - * @version $Id: CQLRelation.java,v 1.11 2003-09-04 21:56:46 mike Exp $ + * @version $Id: CQLRelation.java,v 1.12 2007-06-27 17:03:17 mike Exp $ */ public class CQLRelation extends CQLNode { ModifierSet ms; @@ -47,17 +47,10 @@ public class CQLRelation extends CQLNode { /** * Returns an array of the modifiers associated with a CQLRelation. * @return - * An array of zero or more Strings, each representing a - * modifier associated with the specified CQLRelation. + * An array of Modifier objects. */ - public String[] getModifiers() { - Vector[] v = ms.getModifiers(); - int n = v.length; - String[] s = new String[n]; - for (int i = 0; i < n; i++) { - s[i] = (String) v[i].get(1); - } - return s; + public Vector getModifiers() { + return ms.getModifiers(); } public String toXCQL(int level, Vector prefixes) {