/******************************************************************************* * Copyright (c) 2004, 2007 IBM Corporation and Cambridge Semantics Incorporated. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * File: $Source: /cvsroot/slrp/glitter/com.ibm.adtech.glitter/src/com/ibm/adtech/glitter/query/QueryExecutor.java,v $ * Created by: Lee Feigenbaum (<a href="mailto:feigenbl@us.ibm.com">feigenbl@us.ibm.com</a>) * Created on: 10/23/06 * Revision: $Id: QueryExecutor.java 164 2007-07-31 14:11:09Z mroy $ * * Contributors: IBM Corporation - initial API and implementation * Cambridge Semantics Incorporated - Fork to Anzo *******************************************************************************/ package org.openanzo.glitter.query; import org.openanzo.glitter.EngineConfig; import org.openanzo.glitter.dataset.QueryDataset; import org.openanzo.glitter.exception.GlitterException; /** * A {@link QueryExecutor} implements the actual logic for orchestrating a {@link QueryController}, a {@link SolutionGenerator}, an {@link QueryDataset}, a * {@link QueryExecutionPlan}, and other components to produce a result set. * * @author lee <lee@cambridgesemantics.com> * */ public interface QueryExecutor { /** * Initialize the executor with information on the query. * * @param config * The engine configuration in effect. * @param controller * The query controller with information on the parsed and prepared query. * @param sg * The backend solution generator. * @param plan * The query execution plan. */ public abstract void initialize(EngineConfig config, QueryController controller, SolutionGenerator sg, QueryExecutionPlan plan); /** * Executes the query, returning a result set. * * @return A {@link SolutionSet} with the bindings from executing the query against an {@link RDFDataset}. * @throws GlitterException */ public abstract SolutionSet executeQuery() throws GlitterException; /** * Clients of an executor need to know whether the executor had a handle in putting together results, to know if reordering might be necessary. Executors * are considered trustworthy, while backends may not be. * * @return true if results were composed from pieces provided by a backend; false if all results were generated by the backend. */ public abstract boolean composedSolutions(); }