Integrate Ralph's changes.
[cql-java-moved-to-github.git] / src / org / z3950 / zing / ralph / CQLNotNode.java
1 // $Id: CQLNotNode.java,v 1.1 2002-12-04 16:54:01 mike Exp $
2
3 package org.z3950.zing.cql;
4
5
6 /**
7  * Represents a NOT node in a CQL parse-tree.
8  *
9  * @version     $Id: CQLNotNode.java,v 1.1 2002-12-04 16:54:01 mike Exp $
10  */
11 public class CQLNotNode extends CQLBooleanNode {
12     /**
13      * Creates a new NOT node with the specified left- and right-hand sides.
14      */
15     public CQLNotNode(CQLNode left, CQLNode right) {
16         this.left = left;
17         this.right = right;
18     }
19
20     String op() {
21         return "not";
22     }
23     
24     byte[] opType1() {
25         byte[] op=new byte[5];
26         putTag(CONTEXT, 46, CONSTRUCTED, op, 0); // Operator
27         putLen(2, op, 2);
28         putTag(CONTEXT, 2, PRIMITIVE, op, 3); // and-not
29         putLen(0, op, 4);
30         return op;
31     }
32     
33 }