-// $Id: CQLNode.java,v 1.26 2007-07-03 13:36:03 mike Exp $
package org.z3950.zing.cql;
import java.util.HashMap;
/**
* Represents a node in a CQL parse-tree.
*
- * @version $Id: CQLNode.java,v 1.26 2007-07-03 13:36:03 mike Exp $
*/
public abstract class CQLNode {
- CQLNode() {} // prevent javadoc from documenting this
+
+ public abstract void traverse(CQLNodeVisitor visitor);
/**
* Returns the name of the result-set to which this query is a
/**
* Translates a parse-tree into an XCQL document.
* <P>
- * @param level
- * The number of levels to indent the top element of the XCQL
- * document. This will typically be 0 when invoked by an
- * application; it takes higher values when this method is
- * invoked recursively for nodes further down the tree.
* @return
* A String containing an XCQL document equivalent to the
* parse-tree whose root is this node.
System.arraycopy(qry, 0, q, 0, offset);
return q;
}
+
+ @Override
+ public String toString() {
+ return toCQL();
+ }
}