Add classes for visitor traversal
[cql-java-moved-to-github.git] / src / main / java / org / z3950 / zing / cql / CQLNode.java
index 8e24cf3..221da44 100644 (file)
@@ -12,6 +12,8 @@ import java.util.Properties;
  *
  */
 public abstract class CQLNode {
+  
+    public abstract void traverse(CQLNodeVisitor visitor);
 
     /**
      * Returns the name of the result-set to which this query is a
@@ -337,4 +339,9 @@ public abstract class CQLNode {
         System.arraycopy(qry, 0, q, 0, offset);
         return q;
     }
+    
+    @Override
+    public String toString() {
+        return toCQL();
+    }
 }