From af923f9b50aecdbf896af612e733817f96c4388a Mon Sep 17 00:00:00 2001 From: mike Date: Fri, 29 Jun 2007 10:23:02 +0000 Subject: [PATCH] Remove addModifier() methods with setModifiers(). Client code should directly build a ModifierSet, then set it. --- src/org/z3950/zing/cql/CQLRelation.java | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/org/z3950/zing/cql/CQLRelation.java b/src/org/z3950/zing/cql/CQLRelation.java index 894a8c2..c34f67b 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.16 2007-06-28 00:23:43 mike Exp $ +// $Id: CQLRelation.java,v 1.17 2007-06-29 10:23:02 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 index and term. * - * @version $Id: CQLRelation.java,v 1.16 2007-06-28 00:23:43 mike Exp $ + * @version $Id: CQLRelation.java,v 1.17 2007-06-29 10:23:02 mike Exp $ */ public class CQLRelation extends CQLNode { ModifierSet ms; @@ -21,6 +21,8 @@ public class CQLRelation extends CQLNode { * server-choice relation scr and profiled relations of * the form prefix.name. */ + // ### Seems wrong: a modifier set should not have a base, a + // relation should public CQLRelation(String base) { ms = new ModifierSet(base); } @@ -34,21 +36,14 @@ public class CQLRelation extends CQLNode { } /** - * Adds a new relation modifier to the specified CQLRelation. + * Sets the modifiers of the specified CQLRelation. * Typical relation modifiers include relevant, * fuzzy, stem and phonetic. On the * whole, these modifiers have a meaningful interpretation only * for the text relations. */ - public void addModifier(String type) { - ms.addModifier(type, null, null); - } - - /** - * Adds a new complex relation modifier to the specified CQLRelation. - */ - public void addModifier(String type, String comparison, String value) { - ms.addModifier(type, comparison, value); + public void setModifiers(ModifierSet ms) { + this.ms = ms; } /** -- 1.7.10.4