jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r1441804 - /jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/algebra/PropertyFunctionGenerator.java
Date Sat, 02 Feb 2013 20:19:51 GMT
Author: andy
Date: Sat Feb  2 20:19:51 2013
New Revision: 1441804

URL: http://svn.apache.org/viewvc?rev=1441804&view=rev
Log:
Extract getting a PropertyFunctionRegistry.
Add testing for PF's in quad patterns (currently commented out)

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

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/algebra/PropertyFunctionGenerator.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/algebra/PropertyFunctionGenerator.java?rev=1441804&r1=1441803&r2=1441804&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/algebra/PropertyFunctionGenerator.java
(original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/algebra/PropertyFunctionGenerator.java
Sat Feb  2 20:19:51 2013
@@ -42,19 +42,17 @@ import com.hp.hpl.jena.sparql.util.graph
 
 public class PropertyFunctionGenerator
 {
-    public static Op buildPropertyFunctions(OpBGP opBGP, Context context)
+    public static Op buildPropertyFunctions(PropertyFunctionRegistry registry, OpBGP opBGP,
Context context)
     {
         if ( opBGP.getPattern().isEmpty() )
             return opBGP ;
-        return compilePattern(opBGP.getPattern(), context) ;
+        return compilePattern(registry, opBGP.getPattern(), context) ;
     }
     
-    private static Op compilePattern(BasicPattern pattern, Context context)
+    private static Op compilePattern(PropertyFunctionRegistry registry, BasicPattern pattern,
Context context)
     {   
         // Split into triples and property functions.
 
-        PropertyFunctionRegistry registry = chooseRegistry(context) ;
-    
         // 1/ Find property functions.
         //    Property functions may involve other triples (for list arguments)
         //    (but leave the property function triple in-place as a marker)
@@ -195,15 +193,6 @@ public class PropertyFunctionGenerator
         OpBGP opBGP = new OpBGP(pattern) ;
         return OpSequence.create(op, opBGP) ;
     }
-
-    public static PropertyFunctionRegistry chooseRegistry(Context context)
-    {
-        PropertyFunctionRegistry registry = PropertyFunctionRegistry.get(context) ;
-        // Else global
-        if ( registry == null )
-            registry = PropertyFunctionRegistry.get() ;
-        return registry ;
-    }
     
     private static boolean isMagicProperty(PropertyFunctionRegistry registry, Triple pfTriple)
     {



Mime
View raw message