2 package org.z3950.zing.cql;
4 import java.util.Properties;
7 * Represents a relation between a CQL index and term.
10 public class CQLRelation extends CQLNode {
14 * Creates a new CQLRelation with the specified base relation.
15 * Typical base relations include the usual six ordering relations
16 * (<TT><=</TT>, <TT>></TT>, <I>etc.</I>), the text
17 * relations <TT>any</TT>, <TT>all</TT> and <TT>exact</TT>, the
18 * old server-choice relation <TT>scr</TT> and profiled relations of
19 * the form <TT><I>prefix</I>.<I>name</I></TT>.
21 // ### Seems wrong: a modifier set should not have a base, a
23 public CQLRelation(String base) {
24 ms = new ModifierSet(base);
28 * Returns the base relation with which the CQLRelation was
31 public String getBase() {
36 * Returns an array of the modifiers associated with a CQLRelation.
38 * An array of Modifier objects.
40 public List<Modifier> getModifiers() {
41 return ms.getModifiers();
45 void toXCQLInternal(XCQLBuilder b, int level, List<CQLPrefix> prefixes,
46 List<ModifierSet> sortkeys) {
48 throw new Error("CQLRelation.toXCQL() called with sortkeys");
49 ms.toXCQLInternal(b, level, "relation", "value");
53 public String toCQL() {
58 public String toPQF(Properties config) throws PQFTranslationException {
59 throw new Error("CQLRelation.toPQF() can never be called");
63 public byte[] toType1BER(Properties config) {
64 throw new Error("CQLRelation.toType1BER() can never be called");