package eu.dnetlib.dlms.jdbc.ast;

import java.sql.SQLException;

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

/**
 * Base class for XPath and XPathExpr.
 * 
 * @author lexis
 * 
 */
public abstract class XPathValue extends ASTNode {
	/**
	 * Evaluates this XPathValue in the given context using the given IXPathExecutor.
	 * 
	 * @param executor
	 *            IXPathExecutor to use for evaluation
	 * @param context
	 *            ExecutorContext that represents the current context of the evaluation
	 * @return a new ExecutorContext generated by the evaluation
	 * @throws SQLException
	 *             problems during evaluation
	 */
	public abstract ExecutorContext evaluate(IXPathExecutor executor, ExecutorContext context) throws SQLException;
}
