X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Forg%2Fz3950%2Fzing%2Fcql%2FCQLAndNode.java;h=dc452db3c27abe962ae30f0d45d3885879f9f275;hb=af9fc1ccd0a8d9048d0b469a72b11bead020b719;hp=1f5157fde0a0669193e6533e3a448a460dfed173;hpb=df372083094087da8590a526e0222c81c9ae7fc0;p=cql-java-moved-to-github.git diff --git a/src/org/z3950/zing/cql/CQLAndNode.java b/src/org/z3950/zing/cql/CQLAndNode.java index 1f5157f..dc452db 100644 --- a/src/org/z3950/zing/cql/CQLAndNode.java +++ b/src/org/z3950/zing/cql/CQLAndNode.java @@ -1,4 +1,4 @@ -// $Id: CQLAndNode.java,v 1.5 2002-11-06 00:05:58 mike Exp $ +// $Id: CQLAndNode.java,v 1.9 2007-06-29 12:48:21 mike Exp $ package org.z3950.zing.cql; @@ -6,18 +6,24 @@ package org.z3950.zing.cql; /** * Represents an AND node in a CQL parse-tree. * - * @version $Id: CQLAndNode.java,v 1.5 2002-11-06 00:05:58 mike Exp $ + * @version $Id: CQLAndNode.java,v 1.9 2007-06-29 12:48:21 mike Exp $ */ public class CQLAndNode extends CQLBooleanNode { /** - * Creates a new AND node with the specified left- and right-hand sides. + * Creates a new AND node with the specified left- and right-hand + * sides and modifiers. */ - public CQLAndNode(CQLNode left, CQLNode right) { - this.left = left; - this.right = right; + public CQLAndNode(CQLNode left, CQLNode right, ModifierSet ms) { + super(left, right, ms); } - String op() { - return "and"; + // ### Too much code duplication here with OR and NOT + byte[] opType1() { + byte[] op = new byte[5]; + putTag(CONTEXT, 46, CONSTRUCTED, op, 0); // Operator + putLen(2, op, 2); + putTag(CONTEXT, 0, PRIMITIVE, op, 3); // and + putLen(0, op, 4); + return op; } }