You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by os...@apache.org on 2016/05/17 13:28:52 UTC

[3/5] jena git commit: JENA-1181: AssemblerUtils.registerModel

JENA-1181: AssemblerUtils.registerModel


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

Branch: refs/heads/master
Commit: fe0c4e2f39996f651768bdd3462e6c62935682fc
Parents: b89f0ea
Author: Andy Seaborne <an...@apache.org>
Authored: Sun May 15 21:18:24 2016 +0100
Committer: Andrew Dolby <an...@gmail.com>
Committed: Mon May 16 21:33:41 2016 -0400

----------------------------------------------------------------------
 .../org/apache/jena/sparql/core/assembler/AssemblerUtils.java | 7 ++++++-
 jena-cmds/pom.xml                                             | 3 +--
 .../src/main/java/org/apache/jena/tdb/assembler/VocabTDB.java | 2 +-
 jena-tdb/testing/Assembler/tdb-dataset-embed.ttl              | 4 ----
 jena-tdb/testing/Assembler/tdb-dataset.ttl                    | 2 --
 jena-tdb/testing/Assembler/tdb-graph-embed.ttl                | 4 ----
 jena-tdb/testing/Assembler/tdb-graph-ref-dataset.ttl          | 2 --
 jena-tdb/testing/Assembler/tdb-graph.ttl                      | 2 --
 jena-tdb/testing/Assembler/tdb-named-graph-1.ttl              | 2 --
 jena-tdb/testing/Assembler/tdb-named-graph-2.ttl              | 2 --
 10 files changed, 8 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/fe0c4e2f/jena-arq/src/main/java/org/apache/jena/sparql/core/assembler/AssemblerUtils.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/core/assembler/AssemblerUtils.java b/jena-arq/src/main/java/org/apache/jena/sparql/core/assembler/AssemblerUtils.java
index 39c29ba..bb504ab 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/core/assembler/AssemblerUtils.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/core/assembler/AssemblerUtils.java
@@ -68,11 +68,16 @@ public class AssemblerUtils
         register(ConstAssembler.general(), r, a, DatasetAssembler.getType()) ;
     }
 
+    /** Register an assembler that creates a dataset */
+    static public void registerModel(Resource r, Assembler a) {
+        register(ConstAssembler.general(), r, a, JA.Model) ;
+    }
+
     /** Register an addition assembler */  
     static public void register(AssemblerGroup g, Resource r, Assembler a, Resource superType) {
         registerAssembler(g, r, a) ;
         if ( superType != null && ! superType.equals(r) ) 
-            modelExtras.add(r, RDFS.subClassOf, DatasetAssembler.getType()) ;
+            modelExtras.add(r, RDFS.subClassOf, superType) ;
     }
     
     /** register */ 

http://git-wip-us.apache.org/repos/asf/jena/blob/fe0c4e2f/jena-cmds/pom.xml
----------------------------------------------------------------------
diff --git a/jena-cmds/pom.xml b/jena-cmds/pom.xml
index 6b4a08e..f46ff2e 100644
--- a/jena-cmds/pom.xml
+++ b/jena-cmds/pom.xml
@@ -87,9 +87,8 @@
       <groupId>log4j</groupId>
       <artifactId>log4j</artifactId>
     </dependency> 
-    
-    <!-- Testing -->
 
+    <!-- Testing -->
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-arq</artifactId>

http://git-wip-us.apache.org/repos/asf/jena/blob/fe0c4e2f/jena-tdb/src/main/java/org/apache/jena/tdb/assembler/VocabTDB.java
----------------------------------------------------------------------
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/assembler/VocabTDB.java b/jena-tdb/src/main/java/org/apache/jena/tdb/assembler/VocabTDB.java
index a9c9272..861d984 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/assembler/VocabTDB.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/assembler/VocabTDB.java
@@ -71,6 +71,6 @@ public class VocabTDB
             return;
         initialized = true;
         AssemblerUtils.registerDataset(tDatasetTDB, new DatasetAssemblerTDB());
-        AssemblerUtils.register(ConstAssembler.general(), tGraphTDB, new TDBGraphAssembler(), JA.Model);
+        AssemblerUtils.registerModel(tGraphTDB, new TDBGraphAssembler());
     }
 }

http://git-wip-us.apache.org/repos/asf/jena/blob/fe0c4e2f/jena-tdb/testing/Assembler/tdb-dataset-embed.ttl
----------------------------------------------------------------------
diff --git a/jena-tdb/testing/Assembler/tdb-dataset-embed.ttl b/jena-tdb/testing/Assembler/tdb-dataset-embed.ttl
index d74e71c..81a9ff5 100644
--- a/jena-tdb/testing/Assembler/tdb-dataset-embed.ttl
+++ b/jena-tdb/testing/Assembler/tdb-dataset-embed.ttl
@@ -18,10 +18,6 @@
 @prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
 @prefix ja:      <http://jena.hpl.hp.com/2005/11/Assembler#> .
 
-[] ja:loadClass "org.apache.jena.tdb.TDB" .
-tdb:DatasetTDB  rdfs:subClassOf  ja:RDFDataset .
-## tdb:GraphTDB    rdfs:subClassOf  ja:Model .
-
 <#dataset> rdf:type      tdb:DatasetTDB ;
     tdb:location "--mem--" ;
     .

http://git-wip-us.apache.org/repos/asf/jena/blob/fe0c4e2f/jena-tdb/testing/Assembler/tdb-dataset.ttl
----------------------------------------------------------------------
diff --git a/jena-tdb/testing/Assembler/tdb-dataset.ttl b/jena-tdb/testing/Assembler/tdb-dataset.ttl
index 027f040..173416b 100644
--- a/jena-tdb/testing/Assembler/tdb-dataset.ttl
+++ b/jena-tdb/testing/Assembler/tdb-dataset.ttl
@@ -17,8 +17,6 @@
 @prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
 @prefix ja:      <http://jena.hpl.hp.com/2005/11/Assembler#> .
 
-[] ja:loadClass "org.apache.jena.tdb.TDB" .
-
 <#dataset> rdf:type      tdb:DatasetTDB ;
     # Do at least one the long way.
     tdb:location "target/tdb-testing/DB" ;

http://git-wip-us.apache.org/repos/asf/jena/blob/fe0c4e2f/jena-tdb/testing/Assembler/tdb-graph-embed.ttl
----------------------------------------------------------------------
diff --git a/jena-tdb/testing/Assembler/tdb-graph-embed.ttl b/jena-tdb/testing/Assembler/tdb-graph-embed.ttl
index 50f3a59..96f3d2d 100644
--- a/jena-tdb/testing/Assembler/tdb-graph-embed.ttl
+++ b/jena-tdb/testing/Assembler/tdb-graph-embed.ttl
@@ -18,10 +18,6 @@
 @prefix rdfs:	    <http://www.w3.org/2000/01/rdf-schema#> .
 @prefix ja:      <http://jena.hpl.hp.com/2005/11/Assembler#> .
 
-[] ja:loadClass "org.apache.jena.tdb.TDB" .
-## tdb:DatasetTDB  rdfs:subClassOf  ja:RDFDataset .
-tdb:GraphTDB    rdfs:subClassOf  ja:Model .
-
 <#dataset> rdf:type      ja:RDFDataset ;
     ja:defaultGraph <#graph> ;
     . 

http://git-wip-us.apache.org/repos/asf/jena/blob/fe0c4e2f/jena-tdb/testing/Assembler/tdb-graph-ref-dataset.ttl
----------------------------------------------------------------------
diff --git a/jena-tdb/testing/Assembler/tdb-graph-ref-dataset.ttl b/jena-tdb/testing/Assembler/tdb-graph-ref-dataset.ttl
index 4d9add9..1aac9d3 100644
--- a/jena-tdb/testing/Assembler/tdb-graph-ref-dataset.ttl
+++ b/jena-tdb/testing/Assembler/tdb-graph-ref-dataset.ttl
@@ -17,8 +17,6 @@
 @prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
 @prefix ja:      <http://jena.hpl.hp.com/2005/11/Assembler#> .
 
-[] ja:loadClass "org.apache.jena.tdb.TDB" .
-
 <#dataset> rdf:type      ja:RDFDataset ;
     ja:defaultGraph <#graph> ;
     . 

http://git-wip-us.apache.org/repos/asf/jena/blob/fe0c4e2f/jena-tdb/testing/Assembler/tdb-graph.ttl
----------------------------------------------------------------------
diff --git a/jena-tdb/testing/Assembler/tdb-graph.ttl b/jena-tdb/testing/Assembler/tdb-graph.ttl
index 4282411..4797616 100644
--- a/jena-tdb/testing/Assembler/tdb-graph.ttl
+++ b/jena-tdb/testing/Assembler/tdb-graph.ttl
@@ -17,8 +17,6 @@
 @prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
 @prefix ja:      <http://jena.hpl.hp.com/2005/11/Assembler#> .
 
-[] ja:loadClass "org.apache.jena.tdb.TDB" .
-
 <#dataset> rdf:type      ja:RDFDataset ;
     ja:defaultGraph <#graph> ;
     . 

http://git-wip-us.apache.org/repos/asf/jena/blob/fe0c4e2f/jena-tdb/testing/Assembler/tdb-named-graph-1.ttl
----------------------------------------------------------------------
diff --git a/jena-tdb/testing/Assembler/tdb-named-graph-1.ttl b/jena-tdb/testing/Assembler/tdb-named-graph-1.ttl
index 4996794..39b0bd6 100644
--- a/jena-tdb/testing/Assembler/tdb-named-graph-1.ttl
+++ b/jena-tdb/testing/Assembler/tdb-named-graph-1.ttl
@@ -17,8 +17,6 @@
 @prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
 @prefix ja:      <http://jena.hpl.hp.com/2005/11/Assembler#> .
 
-[] ja:loadClass "org.apache.jena.tdb.TDB" .
-
 <#dataset> rdf:type      ja:RDFDataset ;
     ja:defaultGraph <#graph> ;
     . 

http://git-wip-us.apache.org/repos/asf/jena/blob/fe0c4e2f/jena-tdb/testing/Assembler/tdb-named-graph-2.ttl
----------------------------------------------------------------------
diff --git a/jena-tdb/testing/Assembler/tdb-named-graph-2.ttl b/jena-tdb/testing/Assembler/tdb-named-graph-2.ttl
index 4996794..39b0bd6 100644
--- a/jena-tdb/testing/Assembler/tdb-named-graph-2.ttl
+++ b/jena-tdb/testing/Assembler/tdb-named-graph-2.ttl
@@ -17,8 +17,6 @@
 @prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
 @prefix ja:      <http://jena.hpl.hp.com/2005/11/Assembler#> .
 
-[] ja:loadClass "org.apache.jena.tdb.TDB" .
-
 <#dataset> rdf:type      ja:RDFDataset ;
     ja:defaultGraph <#graph> ;
     .