jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r1476197 - /jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/algebra/OpAsQuery.java
Date Fri, 26 Apr 2013 13:43:47 GMT
Author: andy
Date: Fri Apr 26 13:43:46 2013
New Revision: 1476197

URL: http://svn.apache.org/r1476197
Log:
Add comment about processing path expressions.

Modified:
    jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/algebra/OpAsQuery.java

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/algebra/OpAsQuery.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/algebra/OpAsQuery.java?rev=1476197&r1=1476196&r2=1476197&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/algebra/OpAsQuery.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/algebra/OpAsQuery.java Fri Apr
26 13:43:46 2013
@@ -177,6 +177,11 @@ public class OpAsQuery
             return head ;
         }
         
+        // There is one special case to consider:
+        // A path expression was expaned into a OpSequence during Algenra generation.
+        // The simple path expressions become an OpSequence that could be recombined
+        // into on ElementPathBlock 
+        
         @Override
         public void visit(OpSequence opSequence)
         {
@@ -188,14 +193,12 @@ public class OpAsQuery
                 g = currentGroup() ;
             }
             
-            Iterator<Op> iter = opSequence.iterator() ;
-            
-            for ( ; iter.hasNext() ; )
+            for ( Op op : opSequence.getElements() )
             {
-                Op op = iter.next() ;
                 Element e = asElement(op) ;
                 g.addElement(e) ;
             }
+            
             if ( nestGroup )
                 endSubGroup() ;
             return ;



Mime
View raw message