afs commented on code in PR #3184:
URL: https://github.com/apache/jena/pull/3184#discussion_r2253966976


##########
jena-examples/src/main/java/arq/examples/ExampleDBpediaViaRemoteDataset.java:
##########
@@ -0,0 +1,43 @@
+package arq.examples;
+
+import java.util.concurrent.TimeUnit;
+
+import org.apache.jena.rdflink.RDFLinkHTTP;
+import org.apache.jena.rdflink.dataset.DatasetGraphOverRDFLink;
+import org.apache.jena.sparql.algebra.Table;
+import org.apache.jena.sparql.core.DatasetGraph;
+import org.apache.jena.sparql.engine.dispatch.SparqlDispatcherRegistry;
+import org.apache.jena.sparql.exec.QueryExec;
+import org.apache.jena.sparql.exec.RowSetOps;
+
+/**
+ * An example that sends a query to the DBpedia endpoint via the {@link 
DatasetGraphOverRDFLink} abstraction.
+ * Technically, the query is passed through Jena's default {@link 
SparqlDispatcherRegistry}.
+ */
+public class ExampleDBpediaViaRemoteDataset {
+    public static void main(String... argv) {
+        // The query string is sent to the DBpedia endpoint as is (without 
parsing).
+        // By default, Jena would fail to parse it because of the undeclared 
prefixes.

Review Comment:
   But it is possible ....
   ```java
    QueryExecHTTPBuilder qExecB = (QueryExecHTTPBuilder)link.newQuery();
    QueryExec qExec = qExecB.queryString(queryString).build();
   ```
   Only the HTTP variants have the `queryString` option.
   
   That could be exposed, defaulting to `query(String)` for non-HTTP.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscr...@jena.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscr...@jena.apache.org
For additional commands, e-mail: pr-h...@jena.apache.org

Reply via email to