jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [1/8] git commit: JENA-793 : Clear prefixes on PUT; ensure prefixes overwrite when added.
Date Wed, 01 Oct 2014 10:12:37 GMT
Repository: jena
Updated Branches:
  refs/heads/master 942ae23bb -> 2f611d40e


JENA-793 : Clear prefixes on PUT; ensure prefixes overwrite when added.

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

Branch: refs/heads/master
Commit: e54db9e7f241a12c1f769528c4e51d45e3ee8969
Parents: 942ae23
Author: Andy Seaborne <andy@apache.org>
Authored: Tue Sep 30 22:54:52 2014 +0100
Committer: Andy Seaborne <andy@apache.org>
Committed: Tue Sep 30 22:54:52 2014 +0100

----------------------------------------------------------------------
 jena-fuseki/src-dev/dev/RunFuseki.java                          | 2 +-
 jena-fuseki/src/main/java/org/apache/jena/fuseki/FusekiLib.java | 2 +-
 .../java/org/apache/jena/fuseki/servlets/SPARQL_REST_RW.java    | 5 +++++
 3 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/e54db9e7/jena-fuseki/src-dev/dev/RunFuseki.java
----------------------------------------------------------------------
diff --git a/jena-fuseki/src-dev/dev/RunFuseki.java b/jena-fuseki/src-dev/dev/RunFuseki.java
index 89b77ab..74f678c 100644
--- a/jena-fuseki/src-dev/dev/RunFuseki.java
+++ b/jena-fuseki/src-dev/dev/RunFuseki.java
@@ -61,7 +61,7 @@ public class RunFuseki
         
         FusekiCmd.main(
                      //  "-v",
-                     "--mem", "/ds"
+                     "--mem", "--update", "/ds"
                      //"--update", "--loc="+tmpdir+"DB", "--set=tdb:unionDefaultGraph=true",
"/ds"
                      //"--update", "--mem", "/ds"
 

http://git-wip-us.apache.org/repos/asf/jena/blob/e54db9e7/jena-fuseki/src/main/java/org/apache/jena/fuseki/FusekiLib.java
----------------------------------------------------------------------
diff --git a/jena-fuseki/src/main/java/org/apache/jena/fuseki/FusekiLib.java b/jena-fuseki/src/main/java/org/apache/jena/fuseki/FusekiLib.java
index 8201573..5324793 100644
--- a/jena-fuseki/src/main/java/org/apache/jena/fuseki/FusekiLib.java
+++ b/jena-fuseki/src/main/java/org/apache/jena/fuseki/FusekiLib.java
@@ -143,6 +143,6 @@ public class FusekiLib {
 
         PrefixMapping pmapSrc = data.getPrefixMapping() ;
         PrefixMapping pmapDest = dsg.getDefaultGraph().getPrefixMapping() ;
-        pmapDest.withDefaultMappings(pmapSrc) ;
+        pmapDest.setNsPrefixes(pmapSrc) ;
     }
 }

http://git-wip-us.apache.org/repos/asf/jena/blob/e54db9e7/jena-fuseki/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_REST_RW.java
----------------------------------------------------------------------
diff --git a/jena-fuseki/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_REST_RW.java
b/jena-fuseki/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_REST_RW.java
index a5df86f..32a65e6 100644
--- a/jena-fuseki/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_REST_RW.java
+++ b/jena-fuseki/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_REST_RW.java
@@ -22,6 +22,8 @@ import static java.lang.String.format ;
 
 import java.io.IOException ;
 import java.io.InputStream ;
+import java.util.Map ;
+import java.util.Map.Entry ;
 
 import org.apache.jena.atlas.io.IO ;
 import org.apache.jena.atlas.web.ContentType ;
@@ -222,5 +224,8 @@ public class SPARQL_REST_RW extends SPARQL_REST_R
     protected static void clearGraph(Target target) {
         Graph g = target.graph() ;
         g.clear() ;
+        Map<String, String> pm = g.getPrefixMapping().getNsPrefixMap() ;
+        for ( Entry<String, String> e : pm.entrySet() ) 
+            g.getPrefixMapping().removeNsPrefix(e.getKey()) ;
     }
 }


Mime
View raw message