X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Forg%2Fz3950%2Fzing%2Fcql%2FCQLRelation.java;h=0d986747e4ea63546d9686080737809aa2936212;hb=fc82b225d39cc66cb85c2557db0c0d4a4c5a6e27;hp=f82b91e36196bed407d877e20c37d3e05e694a44;hpb=26e8603c0e0d457f31a2231cb660caed14263364;p=cql-java-moved-to-github.git diff --git a/src/org/z3950/zing/cql/CQLRelation.java b/src/org/z3950/zing/cql/CQLRelation.java index f82b91e..0d98674 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.4 2002-11-06 00:14:32 mike Exp $ +// $Id: CQLRelation.java,v 1.5 2002-11-06 20:13:45 mike Exp $ package org.z3950.zing.cql; import java.util.Vector; @@ -7,9 +7,8 @@ import java.lang.StringBuffer; /** * Represents a relation between a CQL qualifier and term. - * ## * - * @version $Id: CQLRelation.java,v 1.4 2002-11-06 00:14:32 mike Exp $ + * @version $Id: CQLRelation.java,v 1.5 2002-11-06 20:13:45 mike Exp $ */ public class CQLRelation extends CQLNode { ModifierSet ms; @@ -26,7 +25,15 @@ public class CQLRelation extends CQLNode { ms.addModifier(null, modifier); } - // ### should have a public method to retrieve all modifiers + 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 String toXCQL(int level) { return ms.toXCQL(level, "relation"); @@ -36,8 +43,7 @@ public class CQLRelation extends CQLNode { return ms.toCQL(); } - public String toPQF(Properties config) - throws UnknownQualifierException, UnknownRelationException { - throw Error("CQLRelation.toPQF() can never be called"); + public String toPQF(Properties config) throws PQFTranslationException { + throw new Error("CQLRelation.toPQF() can never be called"); } }