jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rve...@apache.org
Subject svn commit: r1458558 - /jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/query/QueryExecution.java
Date Tue, 19 Mar 2013 22:50:40 GMT
Author: rvesse
Date: Tue Mar 19 22:50:40 2013
New Revision: 1458558

URL: http://svn.apache.org/r1458558
Log:
Expand javadoc on execSelect(), execConstructTriples() and execDescribeTriples() to highlight
the fact that these methods typically return query plans rather than actually fully execute
the query.

Queries are only actually evaluated as a user iterates over the returned iterators.

Modified:
    jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/query/QueryExecution.java

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/query/QueryExecution.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/query/QueryExecution.java?rev=1458558&r1=1458557&r2=1458558&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/query/QueryExecution.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/query/QueryExecution.java Tue Mar 19
22:50:40 2013
@@ -68,7 +68,17 @@ public interface QueryExecution
      */ 
     public Query getQuery() ;
 
-    /** Execute a SELECT query */
+    /**
+     *  Execute a SELECT query 
+     *  <p>
+     *  <strong>Important:</strong> The name of this method is somewhat of a
misnomer in that 
+     *  depending on the underlying implementation this typically does not execute the
+     *  SELECT query but rather answers a wrapper over an internal data structure that can
be
+     *  used to answer the query.  In essence calling this method only returns a plan for
+     *  executing this query which only gets evaluated when you actually start iterating
+     *  over the results.
+     *  </p>
+     *  */
 	public ResultSet execSelect();
     
     /** Execute a CONSTRUCT query */
@@ -81,9 +91,18 @@ public interface QueryExecution
     
     /**
      * Execute a CONSTRUCT query, returning the results as an iterator of {@link Triple}.
+     * <p>
      * <b>Caution:</b> This method may return duplicate Triples.  This method
may be useful if you only
      * need the results for stream processing, as it can avoid having to place the results
in a Model.
-     * 
+     * </p>
+     * <p>
+     * <strong>Important:</strong> The name of this method is somewhat of a misnomer
in that 
+     * depending on the underlying implementation this typically does not execute the
+     * CONSTRUCT query but rather answers a wrapper over an internal data structure that
can be
+     * used to answer the query.  In essence calling this method only returns a plan for
+     * executing this query which only gets evaluated when you actually start iterating
+     * over the results.
+     * </p>
      * @return An iterator of Triple objects (possibly containing duplicates) generated
      * by applying the CONSTRUCT template of the query to the bindings in the WHERE clause.
      */
@@ -99,9 +118,18 @@ public interface QueryExecution
     
     /**
      * Execute a DESCRIBE query, returning the results as an iterator of {@link Triple}.
+     * <p>
      * <b>Caution:</b> This method may return duplicate Triples.  This method
may be useful if you only
      * need the results for stream processing, as it can avoid having to place the results
in a Model.
-     * 
+     * </p>
+     * <p>
+     * <strong>Important:</strong> The name of this method is somewhat of a misnomer
in that 
+     * depending on the underlying implementation this typically does not execute the
+     * DESCRIBE query but rather answers a wrapper over an internal data structure that can
be
+     * used to answer the query.  In essence calling this method only returns a plan for
+     * executing this query which only gets evaluated when you actually start iterating
+     * over the results.
+     * </p>
      * @return An iterator of Triple objects (possibly containing duplicates) generated as
the output of the DESCRIBE query.
      */
     public Iterator<Triple> execDescribeTriples();



Mime
View raw message