clerezza-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject git commit: CLEREZZA-846: Fixed SparqlEngine and removed work-around
Date Thu, 05 Dec 2013 20:55:38 GMT
Updated Branches:
  refs/heads/master aec88f543 -> b4cf77a2f


CLEREZZA-846: Fixed SparqlEngine and removed work-around

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

Branch: refs/heads/master
Commit: b4cf77a2f21ecee5fd19ff0567f82f9c1679afaf
Parents: aec88f5
Author: retobg <reto@apache.org>
Authored: Thu Dec 5 21:42:39 2013 +0100
Committer: retobg <reto@apache.org>
Committed: Thu Dec 5 21:42:39 2013 +0100

----------------------------------------------------------------------
 .../java/org/apache/clerezza/rdf/core/access/TcManager.java    | 4 ----
 .../org/apache/clerezza/rdf/jena/sparql/JenaSparqlEngine.java  | 6 +++++-
 2 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/clerezza/blob/b4cf77a2/rdf.core/src/main/java/org/apache/clerezza/rdf/core/access/TcManager.java
----------------------------------------------------------------------
diff --git a/rdf.core/src/main/java/org/apache/clerezza/rdf/core/access/TcManager.java b/rdf.core/src/main/java/org/apache/clerezza/rdf/core/access/TcManager.java
index 1ffa95f..7ff32c9 100644
--- a/rdf.core/src/main/java/org/apache/clerezza/rdf/core/access/TcManager.java
+++ b/rdf.core/src/main/java/org/apache/clerezza/rdf/core/access/TcManager.java
@@ -363,10 +363,6 @@ public class TcManager extends TcProviderMultiplexer {
 	        SparqlPreParser sparqlPreParser = new SparqlPreParser(this);
 	        final Set<UriRef> referencedGraphs = sparqlPreParser.getReferredGraphs(query,
defaultGraphName);
 	        if ((referencedGraphs != null)) {
-                    //this is a partial work-around for CLEREZZA-847, allowing support for
queries with exactly 1 from clause
-                    if (referencedGraphs.size() == 1) {
-                        defaultGraphName = referencedGraphs.iterator().next();
-                    }
 	            singleTargetTcProvider = getSingleTargetTcProvider(referencedGraphs);
 	        }
     	}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/b4cf77a2/rdf.jena.sparql/src/main/java/org/apache/clerezza/rdf/jena/sparql/JenaSparqlEngine.java
----------------------------------------------------------------------
diff --git a/rdf.jena.sparql/src/main/java/org/apache/clerezza/rdf/jena/sparql/JenaSparqlEngine.java
b/rdf.jena.sparql/src/main/java/org/apache/clerezza/rdf/jena/sparql/JenaSparqlEngine.java
index f7f39d0..183c11f 100644
--- a/rdf.jena.sparql/src/main/java/org/apache/clerezza/rdf/jena/sparql/JenaSparqlEngine.java
+++ b/rdf.jena.sparql/src/main/java/org/apache/clerezza/rdf/jena/sparql/JenaSparqlEngine.java
@@ -34,7 +34,9 @@ import com.hp.hpl.jena.query.QueryExecException;
 import com.hp.hpl.jena.query.QueryExecution;
 import com.hp.hpl.jena.query.QueryExecutionFactory;
 import com.hp.hpl.jena.query.QueryFactory;
+import com.hp.hpl.jena.sparql.core.DatasetDescription;
 import com.hp.hpl.jena.sparql.core.DatasetGraph;
+import com.hp.hpl.jena.sparql.core.DynamicDatasets;
 import com.hp.hpl.jena.update.GraphStore;
 import com.hp.hpl.jena.update.GraphStoreFactory;
 import com.hp.hpl.jena.update.UpdateAction;
@@ -79,7 +81,9 @@ public class JenaSparqlEngine implements QueryEngine {
                             if (jenaQuery.isUnknownType()) {
                                 return null;
                             }
-                            return QueryExecutionFactory.create(jenaQuery, dataset);
+                            DatasetDescription dd = DatasetDescription.create(jenaQuery);
+                            Dataset dynaDataset = DynamicDatasets.dynamicDataset(dd, dataset,
false);
+                            return QueryExecutionFactory.create(jenaQuery, dynaDataset);
                         } catch (QueryException ex) {
                             return null;
                         }


Mime
View raw message