org.z3950.zing.cql
Class ModifierSet

java.lang.Object
  extended by org.z3950.zing.cql.ModifierSet

public class ModifierSet
extends Object

Represents a base String and a set of Modifiers.

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 comparison value pairs, where type, comparison and value are all strings.


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

Constructor Detail

ModifierSet

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

Method Detail

getBase

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


addModifier

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


addModifier

public void addModifier(String type)
Adds a modifier of the specified type, but with no comparison and value, to a ModifierSet.


modifier

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


getModifiers

public List<Modifier> getModifiers()
Returns an array of the modifiers in a ModifierSet.

Returns:
An array of Modifiers.

toCQL

public String toCQL()

main

public static void main(String[] args)


Copyright © 2008-2014 Index Data. All Rights Reserved.