jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject jena git commit: Add javadoc for QueryEngineFactory.
Date Fri, 05 Jun 2015 15:13:40 GMT
Repository: jena
Updated Branches:
  refs/heads/master 8a7b7f81d -> c010002fe


Add javadoc for QueryEngineFactory.

This closes #75.


Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/c010002f
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/c010002f
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/c010002f

Branch: refs/heads/master
Commit: c010002fed2cc81fb9d3303acde1bbd6b3515594
Parents: 8a7b7f8
Author: Andy Seaborne <andy@apache.org>
Authored: Fri Jun 5 16:12:43 2015 +0100
Committer: Andy Seaborne <andy@apache.org>
Committed: Fri Jun 5 16:12:43 2015 +0100

----------------------------------------------------------------------
 .../jena/sparql/engine/QueryEngineFactory.java  | 84 ++++++++++++++++----
 1 file changed, 70 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/c010002f/jena-arq/src/main/java/org/apache/jena/sparql/engine/QueryEngineFactory.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/engine/QueryEngineFactory.java
b/jena-arq/src/main/java/org/apache/jena/sparql/engine/QueryEngineFactory.java
index 4e479a2..178d970 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/engine/QueryEngineFactory.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/engine/QueryEngineFactory.java
@@ -18,19 +18,75 @@
 
 package org.apache.jena.sparql.engine;
 
-import org.apache.jena.query.Query ;
-import org.apache.jena.sparql.algebra.Op ;
-import org.apache.jena.sparql.core.DatasetGraph ;
-import org.apache.jena.sparql.engine.binding.Binding ;
-import org.apache.jena.sparql.util.Context ;
+import org.apache.jena.query.Query;
+import org.apache.jena.sparql.algebra.Op;
+import org.apache.jena.sparql.core.DatasetGraph;
+import org.apache.jena.sparql.engine.binding.Binding;
+import org.apache.jena.sparql.util.Context;
 
-/** Additional QueryEngineFactory's 
- * can be dynamically added to the registry. */ 
-public interface QueryEngineFactory
-{
-    public boolean accept(Query query, DatasetGraph dataset, Context context) ;
-    public Plan create(Query query, DatasetGraph dataset, Binding inputBinding, Context context)
;
-    
-    public boolean accept(Op op, DatasetGraph dataset, Context context) ;
-    public Plan create(Op op, DatasetGraph dataset, Binding inputBinding, Context context)
;
+/**
+ * A {@code QueryEngineFactory} builds query {@link Plan}s via
+ * {@link #create(Query, DatasetGraph, Binding, Context)} or
+ * {@link #create(Op, DatasetGraph, Binding, Context)}. A {@link Plan} has a
+ * query iterator for the results of executing the {@link Op}, a SPARQL algebra
+ * expression with local extensions.
+ * <p>
+ *  * A {@code QueryEngineFactory} is registered with the
+ * {@link QueryEngineRegistry}.
+ * <p>
+ *  * When determining which factory to use, the querye execution process calls
+ * {@link #accept(Query, DatasetGraph, Context)} or
+ * {@link #accept(Op, DatasetGraph, Context)} to determine whether the
+ * particular type of query engine produced by this factory accepts the
+ * particular request. 
+ * <p>
+ * A QueryEngineFactory can be registered for use with
+ * {@link QueryEngineRegistry#addFactory(QueryEngineFactory)} and
+ * unregistered with
+ * {@link QueryEngineRegistry#removeFactory(QueryEngineFactory)}.
+ */
+public interface QueryEngineFactory {
+	/**
+	 * Detect appropriate requests for a particular query engine for a particular graph type.
+	 * 
+	 * @param query
+	 *            a {@link Query} to be executed
+	 * @param dataset
+	 *            the {@link DatasetGraph} over which the query is to be executed
+	 * @param context
+	 *            the {@link Context} in which the query is to be executed
+	 * @return whether the kind of query engine produced by this factory can handle this task
+	 */
+	public boolean accept(Query query, DatasetGraph dataset, Context context);
+
+	/**
+	 *  Call to create a {@link Plan} : the companion {@link #accept} wil have returned {@code
true}.
+	 * @param query
+	 * @param dataset
+	 * @param inputBinding
+	 * @param context
+	 */
+	public Plan create(Query query, DatasetGraph dataset, Binding inputBinding, Context context);
+
+	/**
+	 * Detect appropriate requests for a particular query engine for a particular graph type.
+	 * 
+	 * @param op
+	 *            an {@link Op} to be executed
+	 * @param dataset
+	 *            the {@link DatasetGraph} over which the operation is to be executed
+	 * @param context
+	 *            the {@link Context} in which the operation is to be executed
+	 * @return whether the kind of query engine produced by this factory can handle this task
+	 */
+	public boolean accept(Op op, DatasetGraph dataset, Context context);
+
+    /**
+     *  Call to create a {@link Plan} : the companion {@link #accept} wil have returned {@code
true}.
+     * @param op
+     * @param dataset
+     * @param inputBinding
+     * @param context
+     */
+	public Plan create(Op op, DatasetGraph dataset, Binding inputBinding, Context context);
 }


Mime
View raw message