package eu.dnetlib.dlms.jdbc.ast;

import java.sql.SQLException;

import eu.dnetlib.dlms.jdbc.ExecutorContext;
import eu.dnetlib.dlms.jdbc.server.IXPathExecutor;

/**
 * Abstract class for predicates.
 * 
 * @author alessia
 * 
 */
public abstract class Predicate extends ASTNode {
	/**
	 * Evaluates this predicate in the given context using the given IXPathExecutor.
	 * 
	 * @param executor
	 *            IXPathExecutor to use for the evaluation.
	 * @param context
	 *            ExecutorContext which is the current context for the evaluation
	 * @return a new ExecutorContext generated by the evaluation of this predicate
	 * @throws SQLException
	 *             problems during evaluation
	 */
	public abstract ExecutorContext evaluate(final IXPathExecutor executor, final ExecutorContext context) throws SQLException;

}
