clerezza-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject [1/2] git commit: CLEREZZA-847: no loner using deprecated method for Sparql queries
Date Tue, 03 Dec 2013 12:38:51 GMT
Updated Branches:
  refs/heads/master f55db14b6 -> 1eba0c634


CLEREZZA-847: no loner using deprecated method for Sparql queries

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

Branch: refs/heads/master
Commit: dde22749c3f1de933558ada654f57972db15aae8
Parents: 53ce09d
Author: retobg <reto@apache.org>
Authored: Tue Dec 3 13:34:31 2013 +0100
Committer: retobg <reto@apache.org>
Committed: Tue Dec 3 13:34:31 2013 +0100

----------------------------------------------------------------------
 rdf.web/rdf.web.core/nbactions.xml                  | 11 +++++++++++
 .../clerezza/rdf/web/core/SparqlEndpoint.java       | 16 ++++++++--------
 2 files changed, 19 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/clerezza/blob/dde22749/rdf.web/rdf.web.core/nbactions.xml
----------------------------------------------------------------------
diff --git a/rdf.web/rdf.web.core/nbactions.xml b/rdf.web/rdf.web.core/nbactions.xml
new file mode 100644
index 0000000..49e8307
--- /dev/null
+++ b/rdf.web/rdf.web.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/dde22749/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/SparqlEndpoint.java
----------------------------------------------------------------------
diff --git a/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/SparqlEndpoint.java
b/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/SparqlEndpoint.java
index 4a91b85..59f6e46 100644
--- a/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/SparqlEndpoint.java
+++ b/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/SparqlEndpoint.java
@@ -101,13 +101,10 @@ public class SparqlEndpoint {
 
     private final Logger logger = LoggerFactory.getLogger(getClass());
     
-    private static final String CONTENT_GRAPH_FILTER =
-            "(name="+ Constants.CONTENT_GRAPH_URI_STRING +")";
     
     @Reference
     TcManager tcManager;
-    @Reference(target = CONTENT_GRAPH_FILTER)
-    MGraph contentGraph;
+
     @Reference
     private RenderletManager renderletManager;
 
@@ -173,17 +170,20 @@ public class SparqlEndpoint {
         } else {
             applyServerSide = false;
         }
-        TripleCollection defaultGraph = null;
+        //TripleCollection defaultGraph = null;
         Object result = null;
         try {
             if (defaultGraphUri == null
                     || defaultGraphUri.getUnicodeString().equals("")) {
-                defaultGraph = contentGraph;
+                defaultGraphUri = new UriRef(Constants.CONTENT_GRAPH_URI_STRING);
+                //defaultGraph = contentGraph;
             } else {
-                defaultGraph = tcManager.getTriples(defaultGraphUri);
+                //defaultGraph = tcManager.getTriples(defaultGraphUri);
             }
+            //this is now only used to get the variable names
+            //TODO use ResultSet.getResultVars instead
             Query query = QueryParser.getInstance().parse(queryString);
-            result = tcManager.executeSparqlQuery(query, defaultGraph);
+            result = tcManager.executeSparqlQuery(queryString, defaultGraphUri);
             if (result instanceof Graph) {
                 return (Graph) result;
             } else if ((result instanceof ResultSet)


Mime
View raw message