org.z3950.zing.cql
Class CQLProxNode
java.lang.Object
|
+--org.z3950.zing.cql.CQLNode
|
+--org.z3950.zing.cql.CQLBooleanNode
|
+--org.z3950.zing.cql.CQLProxNode
- public class CQLProxNode
- extends CQLBooleanNode
Represents a proximity node in a CQL parse-tree.
The left- and right-hand-sides must be satisfied by parts of the
candidate records which are sufficiently close to each other, as
specified by a set of proximity parameters.
- Version:
- $Id: CQLProxNode.java,v 1.6 2002/11/20 17:56:22 mike Exp $
Constructor Summary |
CQLProxNode(CQLNode left)
Creates a new, incomplete, proximity node with the
specified left-hand side. |
Method Summary |
void |
addModifier(java.lang.String type,
java.lang.String value)
Adds a modifier of the specified type and
value to a proximity node. |
void |
addSecondSubterm(CQLNode right)
Sets the right-hand side of the proximity node whose
left-hand-side was specified at creation time. |
java.util.Vector[] |
getModifiers()
Returns an array of the modifiers associated with a proximity
node. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CQLProxNode
public CQLProxNode(CQLNode left)
- Creates a new, incomplete, proximity node with the
specified left-hand side. No right-hand side is specified at
this stage: that must be specified later, using the
addSecondSubterm() method. (That may seem odd, but
it's just easier to write the parser that way.)
Proximity paramaters may be added at any time, before or after
the right-hand-side sub-tree is added.
addSecondSubterm
public void addSecondSubterm(CQLNode right)
- Sets the right-hand side of the proximity node whose
left-hand-side was specified at creation time.
addModifier
public void addModifier(java.lang.String type,
java.lang.String value)
- Adds a modifier of the specified type and
value to a proximity node. Valid types are
relation, distance, unit and
ordering.
For information on the semantics of these paramaters, see
section 3.1 (Proximity) of
A Gentle Introduction to CQL.
getModifiers
public java.util.Vector[] getModifiers()
- Returns an array of the modifiers associated with a proximity
node.
- Returns:
- An array of modifiers, each represented by a two-element
Vector, in which element 0 is the modifier type
(e.g. distance or ordering) and element 1 is
the associated value (e.g. 3 or unordered).