jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [2/2] jena git commit: Add static function for better compatibility.
Date Tue, 30 Aug 2016 17:44:02 GMT
Add static function for better compatibility.

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

Branch: refs/heads/master
Commit: e3c6a0b638d251a80163eeaff9f060164cb74c71
Parents: fa8d3cb
Author: Andy Seaborne <andy@apache.org>
Authored: Tue Aug 30 18:01:51 2016 +0100
Committer: Andy Seaborne <andy@apache.org>
Committed: Tue Aug 30 18:01:51 2016 +0100

----------------------------------------------------------------------
 .../org/apache/jena/sparql/algebra/optimize/Optimize.java | 10 ++++++++++
 1 file changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/e3c6a0b6/jena-arq/src/main/java/org/apache/jena/sparql/algebra/optimize/Optimize.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/optimize/Optimize.java
b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/optimize/Optimize.java
index e34512c..9899357 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/optimize/Optimize.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/optimize/Optimize.java
@@ -20,6 +20,8 @@ package org.apache.jena.sparql.algebra.optimize;
 
 import org.apache.jena.sparql.ARQConstants ;
 import org.apache.jena.sparql.algebra.Op ;
+import org.apache.jena.sparql.algebra.Transform ;
+import org.apache.jena.sparql.algebra.Transformer ;
 import org.apache.jena.sparql.engine.ExecutionContext ;
 import org.apache.jena.sparql.util.Context ;
 
@@ -79,4 +81,12 @@ public class Optimize
     /** Get the global factory for making optimizers */ 
     public static RewriteFactory getFactory()
     { return factory ; }
+
+    /** Apply a {@link Transform} to an {@link Op} */
+    public static Op apply(Transform transform, Op op) {
+        Op op2 = Transformer.transformSkipService(transform, op) ;
+        if ( op2 != op )
+            return op2 ;
+        return op ;
+    }
 }


Mime
View raw message