/**
 * Copyright 2008-2009 DRIVER PROJECT (ICM UW)
 * Original author: Marek Horst
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
// $Id: CQLAndNode.java 5239 2008-03-17 09:00:00Z icmdriver $

package org.z3950.zing.cql;

/**
 * Represents an AND node in a CQL parse-tree.
 *
 * @version	$Id: CQLAndNode.java 5239 2008-03-17 09:00:00Z icmdriver $
 */
public class CQLAndNode extends CQLBooleanNode {
    /**
     * Creates a new AND node with the specified left- and right-hand
     * sides and modifiers.
     */
    public CQLAndNode(CQLNode left, CQLNode right, ModifierSet ms) {
	super(left, right, ms);
    }

    // ### 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;
    }
}
