X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;f=src%2Forg%2Fz3950%2Fzing%2Fcql%2FCQLRelation.java;h=6f007bc41dcf5d93184d7a3d7769a7dba79f928f;hb=d437bf5b5983b0c7e3a43ab5e5cb5d6b1670896c;hp=0d986747e4ea63546d9686080737809aa2936212;hpb=fc82b225d39cc66cb85c2557db0c0d4a4c5a6e27;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 0d98674..6f007bc 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.5 2002-11-06 20:13:45 mike Exp $ +// $Id: CQLRelation.java,v 1.7 2002-11-20 01:15:15 mike Exp $ package org.z3950.zing.cql; import java.util.Vector; @@ -8,23 +8,47 @@ import java.lang.StringBuffer; /** * Represents a relation between a CQL qualifier and term. * - * @version $Id: CQLRelation.java,v 1.5 2002-11-06 20:13:45 mike Exp $ + * @version $Id: CQLRelation.java,v 1.7 2002-11-20 01:15:15 mike Exp $ */ public class CQLRelation extends CQLNode { ModifierSet ms; + /** + * Creates a new CQLRelation with the specified base relation. + * Typical base relations include the usual six ordering relations + * (<=, >, etc.), the text + * relations any, all and exact and the + * server-choice relation scr. + */ public CQLRelation(String base) { ms = new ModifierSet(base); } + /** + * Returns the base relation with which the CQLRelation was + * originally created. + */ public String getBase() { return ms.getBase(); } + /** + * Adds a new relation modifier to 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 modifier) { ms.addModifier(null, modifier); } + /** + * 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. + */ public String[] getModifiers() { Vector[] v = ms.getModifiers(); int n = v.length; @@ -35,7 +59,7 @@ public class CQLRelation extends CQLNode { return s; } - public String toXCQL(int level) { + public String toXCQL(int level, Vector prefixes) { return ms.toXCQL(level, "relation"); }