Add back the last-in-field anchoring code.
[cql-java-moved-to-github.git] / src / org / z3950 / zing / cql / CQLOrNode.java
index 7dc253c..dde3368 100644 (file)
@@ -1,15 +1,17 @@
-// $Id: CQLOrNode.java,v 1.4 2002-10-31 22:22:01 mike Exp $
+// $Id: CQLOrNode.java,v 1.6 2002-12-05 17:14:52 mike Exp $
 
 package org.z3950.zing.cql;
 
 
 /**
  * Represents an OR node in a CQL parse-tree.
- * ##
  *
- * @version    $Id: CQLOrNode.java,v 1.4 2002-10-31 22:22:01 mike Exp $
+ * @version    $Id: CQLOrNode.java,v 1.6 2002-12-05 17:14:52 mike Exp $
  */
 public class CQLOrNode extends CQLBooleanNode {
+    /**
+     * Creates a new OR node with the specified left- and right-hand sides.
+     */
     public CQLOrNode(CQLNode left, CQLNode right) {
        this.left = left;
        this.right = right;
@@ -18,4 +20,13 @@ public class CQLOrNode extends CQLBooleanNode {
     String op() {
        return "or";
     }
+
+    byte[] opType1() {
+       byte[] op = new byte[5];
+       putTag(CONTEXT, 46, CONSTRUCTED, op, 0); // Operator
+       putLen(2, op, 2);
+       putTag(CONTEXT, 1, PRIMITIVE, op, 3); // or
+       putLen(0, op, 4);
+       return op;
+    }
 }