jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r1394069 - in /jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena: query/ARQ.java sparql/core/assembler/AssemblerUtils.java sparql/core/assembler/DatasetAssemblerVocab.java sparql/core/assembler/DatasetNullAssembler.java
Date Thu, 04 Oct 2012 13:34:14 GMT
Author: andy
Date: Thu Oct  4 13:34:13 2012
New Revision: 1394069

URL: http://svn.apache.org/viewvc?rev=1394069&view=rev
Log:
Assembler support for GraphStoreNull.

Added:
    jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/core/assembler/DatasetNullAssembler.java
Modified:
    jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/query/ARQ.java
    jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/core/assembler/AssemblerUtils.java
    jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/core/assembler/DatasetAssemblerVocab.java

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/query/ARQ.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/query/ARQ.java?rev=1394069&r1=1394068&r2=1394069&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/query/ARQ.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/query/ARQ.java Thu Oct  4 13:34:13 2012
@@ -23,10 +23,8 @@ import org.slf4j.Logger ;
 import org.slf4j.LoggerFactory ;
 
 import com.hp.hpl.jena.Jena ;
-import com.hp.hpl.jena.assembler.assemblers.AssemblerGroup ;
 import com.hp.hpl.jena.sparql.ARQConstants ;
 import com.hp.hpl.jena.sparql.SystemARQ ;
-import com.hp.hpl.jena.sparql.core.assembler.AssemblerUtils ;
 import com.hp.hpl.jena.sparql.engine.main.StageBuilder ;
 import com.hp.hpl.jena.sparql.expr.nodevalue.XSDFuncOp ;
 import com.hp.hpl.jena.sparql.lib.Metadata ;
@@ -462,12 +460,6 @@ public class ARQ
     // Force a call
     static { init() ; }
     
-    /** Used by Jena assemblers for registration */ 
-    public static void whenRequiredByAssembler( AssemblerGroup g )
-    {
-        AssemblerUtils.register(g) ;
-    }
-
     private static Context defaultSettings()    
     {
         Context context = new Context() ;

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/core/assembler/AssemblerUtils.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/core/assembler/AssemblerUtils.java?rev=1394069&r1=1394068&r2=1394069&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/core/assembler/AssemblerUtils.java
(original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/core/assembler/AssemblerUtils.java
Thu Oct  4 13:34:13 2012
@@ -21,12 +21,7 @@ package com.hp.hpl.jena.sparql.core.asse
 import com.hp.hpl.jena.assembler.Assembler ;
 import com.hp.hpl.jena.assembler.JA ;
 import com.hp.hpl.jena.assembler.assemblers.AssemblerGroup ;
-import com.hp.hpl.jena.query.ARQ ;
-import com.hp.hpl.jena.query.QueryExecution ;
-import com.hp.hpl.jena.query.QueryExecutionFactory ;
-import com.hp.hpl.jena.query.QuerySolution ;
-import com.hp.hpl.jena.query.QuerySolutionMap ;
-import com.hp.hpl.jena.query.ResultSet ;
+import com.hp.hpl.jena.query.* ;
 import com.hp.hpl.jena.rdf.model.Model ;
 import com.hp.hpl.jena.rdf.model.Resource ;
 import com.hp.hpl.jena.rdf.model.ResourceFactory ;
@@ -59,14 +54,15 @@ public class AssemblerUtils
             return ;
         initialized = true ;
         // Wire in the extension assemblers (extensions relative to the Jena assembler framework)
-        register(Assembler.general) ;
+        registerWith(Assembler.general) ;
     }
     
-    static public void register(AssemblerGroup g)
+    static public void registerWith(AssemblerGroup g)
     {
         // Wire in the extension assemblers (extensions relative to the Jena assembler framework)
         g.implementWith(DatasetAssembler.getType(), new DatasetAssembler()) ;
         g.implementWith(GraphStoreAssembler.getType(), new GraphStoreAssembler()) ;
+        g.implementWith(DatasetNullAssembler.getType(), new DatasetNullAssembler()) ;
     }
     
     private static void assemblerClass(AssemblerGroup g, Resource r, Assembler a)

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/core/assembler/DatasetAssemblerVocab.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/core/assembler/DatasetAssemblerVocab.java?rev=1394069&r1=1394068&r2=1394069&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/core/assembler/DatasetAssemblerVocab.java
(original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/core/assembler/DatasetAssemblerVocab.java
Thu Oct  4 13:34:13 2012
@@ -30,6 +30,7 @@ public class DatasetAssemblerVocab
     
     public static final Resource tDataset            = ResourceFactory.createResource(NS+"RDFDataset")
;
     public static final Resource tGraphStore         = ResourceFactory.createResource(NS+"GraphStore")
;
+    public static final Resource tDatasetNull        = ResourceFactory.createResource(NS+"DatasetNull")
;
     public static final Property pDefaultGraph       = ResourceFactory.createProperty(NS,
"defaultGraph") ;
     public static final Property pNamedGraph         = ResourceFactory.createProperty(NS,
"namedGraph") ;
     

Added: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/core/assembler/DatasetNullAssembler.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/core/assembler/DatasetNullAssembler.java?rev=1394069&view=auto
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/core/assembler/DatasetNullAssembler.java
(added)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/core/assembler/DatasetNullAssembler.java
Thu Oct  4 13:34:13 2012
@@ -0,0 +1,37 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.hp.hpl.jena.sparql.core.assembler;
+
+import com.hp.hpl.jena.assembler.Assembler ;
+import com.hp.hpl.jena.assembler.Mode ;
+import com.hp.hpl.jena.assembler.assemblers.AssemblerBase ;
+import com.hp.hpl.jena.query.DatasetFactory ;
+import com.hp.hpl.jena.rdf.model.Resource ;
+import com.hp.hpl.jena.sparql.modify.GraphStoreNull ;
+
+public class DatasetNullAssembler extends AssemblerBase implements Assembler
+{
+    public static Resource getType() { return DatasetAssemblerVocab.tDatasetNull ; }
+    
+    @Override
+    public Object open(Assembler a, Resource root, Mode mode)
+    {
+        return DatasetFactory.create(new GraphStoreNull()) ;
+    }
+}



Mime
View raw message