org.z3950.zing.cql
Class ModifierSet

java.lang.Object
  |
  +--org.z3950.zing.cql.ModifierSet

public class ModifierSet
extends java.lang.Object

Represents a base String and a set of modifier Strings.

This class is used as a workhorse delegate by both CQLRelation and CQLProxNode - two functionally very separate classes that happen to require similar data structures and functionality.

A ModifierSet consists of a ``base'' string together with a set of zero or more type=value pairs, where both type and value are strings. Types may be null, values may not.

Version:
$Id: ModifierSet.java,v 1.7 2002/11/20 17:56:22 mike Exp $

Constructor Summary
ModifierSet(java.lang.String base)
          Creates a new ModifierSet with the specified base.
 
Method Summary
 void addModifier(java.lang.String type, java.lang.String value)
          Adds a modifier of the specified type and value to a ModifierSet.
 java.lang.String getBase()
          Returns the base string with which the ModifierSet was created.
 java.util.Vector[] getModifiers()
          Returns an array of the modifiers in a ModifierSet.
static void main(java.lang.String[] args)
           
 java.lang.String modifier(java.lang.String type)
          Returns the value of the modifier in the specified ModifierSet that corresponds to the specified type.
 java.lang.String toCQL()
           
 java.lang.String toXCQL(int level, java.lang.String topLevelElement)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModifierSet

public ModifierSet(java.lang.String base)
Creates a new ModifierSet with the specified base.

Method Detail

getBase

public java.lang.String getBase()
Returns the base string with which the ModifierSet was created.


addModifier

public void addModifier(java.lang.String type,
                        java.lang.String value)
Adds a modifier of the specified type and value to a ModifierSet.


modifier

public java.lang.String modifier(java.lang.String type)
Returns the value of the modifier in the specified ModifierSet that corresponds to the specified type.


getModifiers

public java.util.Vector[] getModifiers()
Returns an array of the modifiers in a ModifierSet.

Returns:
An array of modifiers, each represented by a two-element Vector, in which element 0 is the modifier type and element 1 is the associated value.

toXCQL

public java.lang.String toXCQL(int level,
                               java.lang.String topLevelElement)

toCQL

public java.lang.String toCQL()

main

public static void main(java.lang.String[] args)