jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [29/34] jena git commit: JENA-1128: Use "effective op" from OpExt
Date Sat, 06 Feb 2016 15:51:18 GMT
JENA-1128: Use "effective op" from OpExt

OpSQL then calculates visible vars and OpMinus can find the
intersection of variables.

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

Branch: refs/heads/master
Commit: fac4c44f09c68578c10a7b2b883393221f87fdb1
Parents: fc44bd2
Author: Andy Seaborne <andy@apache.org>
Authored: Fri Feb 5 15:39:19 2016 +0000
Committer: Andy Seaborne <andy@apache.org>
Committed: Fri Feb 5 19:17:33 2016 +0000

----------------------------------------------------------------------
 .../main/java/org/apache/jena/sparql/algebra/OpVisitor.java    | 4 +++-
 .../java/org/apache/jena/sparql/algebra/OpVisitorBase.java     | 3 ++-
 .../java/org/apache/jena/sparql/algebra/OpVisitorByType.java   | 6 ++----
 3 files changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/fac4c44f/jena-arq/src/main/java/org/apache/jena/sparql/algebra/OpVisitor.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/OpVisitor.java b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/OpVisitor.java
index b84e53d..f947eca 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/OpVisitor.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/OpVisitor.java
@@ -56,7 +56,9 @@ public interface OpVisitor
     public void visit(OpSequence opSequence) ;
     public void visit(OpDisjunction opDisjunction) ;
 
-    public void visit(OpExt opExt) ;
+    public default void visit(OpExt opExt) {
+        opExt.effectiveOp().visit(this);
+    }
     
     // OpModifier
     public void visit(OpList opList) ;

http://git-wip-us.apache.org/repos/asf/jena/blob/fac4c44f/jena-arq/src/main/java/org/apache/jena/sparql/algebra/OpVisitorBase.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/OpVisitorBase.java b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/OpVisitorBase.java
index 99c223a..9834580 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/OpVisitorBase.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/OpVisitorBase.java
@@ -66,7 +66,8 @@ public class OpVisitorBase implements OpVisitor
 
     @Override public void visit(OpTable opTable)                {}
 
-    @Override public void visit(OpExt opExt)                    {}
+    // Has a default.
+    //@Override public void visit(OpExt opExt)                    {}
 
     @Override public void visit(OpNull opNull)                  {}
 

http://git-wip-us.apache.org/repos/asf/jena/blob/fac4c44f/jena-arq/src/main/java/org/apache/jena/sparql/algebra/OpVisitorByType.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/OpVisitorByType.java b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/OpVisitorByType.java
index 54a7c67..33fb1a3 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/OpVisitorByType.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/OpVisitorByType.java
@@ -29,12 +29,10 @@ public abstract class OpVisitorByType implements OpVisitor
     
     protected abstract void visit1(Op1 op) ;
     
-    // This may be needed - Filters can have a EXISTS/NOT EXISTS expression in them. 
-    //protected abstract void visitF(OpFilter op) ;
-    
     protected abstract void visit0(Op0 op) ;    
     
-    protected abstract void visitExt(OpExt op) ;    
+    protected void visitExt(OpExt op)
+    { op.effectiveOp().visit(this); }     
 
     protected abstract void visitFilter(OpFilter op) ;
     


Mime
View raw message