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: Partial work around: passing value of single FROM clause as default graph
Date Tue, 03 Dec 2013 16:21:11 GMT
Updated Branches:
  refs/heads/master 1eba0c634 -> ec828771d


CLEREZZA-846: Partial work around: passing value of single FROM clause as default graph

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

Branch: refs/heads/master
Commit: ec828771d41e8155df11e712ff6a94d07cd74a77
Parents: 1eba0c6
Author: retobg <reto@apache.org>
Authored: Tue Dec 3 17:20:50 2013 +0100
Committer: retobg <reto@apache.org>
Committed: Tue Dec 3 17:20:50 2013 +0100

----------------------------------------------------------------------
 rdf.core/nbactions.xml                                   | 11 +++++++++++
 .../org/apache/clerezza/rdf/core/access/TcManager.java   |  4 ++++
 2 files changed, 15 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/clerezza/blob/ec828771/rdf.core/nbactions.xml
----------------------------------------------------------------------
diff --git a/rdf.core/nbactions.xml b/rdf.core/nbactions.xml
new file mode 100644
index 0000000..49e8307
--- /dev/null
+++ b/rdf.core/nbactions.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<actions>
+    <action>
+        <actionName>CUSTOM-deploy to localhost:8080</actionName>
+        <displayName>deploy to localhost:8080</displayName>
+        <goals>
+            <goal>install</goal>
+            <goal>org.apache.sling:maven-sling-plugin:install</goal>
+        </goals>
+    </action>
+</actions>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/ec828771/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 7ff32c9..1ffa95f 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,6 +363,10 @@ 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);
 	        }
     	}


Mime
View raw message