jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r1156685 - /incubator/jena/Jena2/ARQ/trunk/src-dev/dev/RunARQ.java
Date Thu, 11 Aug 2011 17:20:28 GMT
Author: andy
Date: Thu Aug 11 17:20:28 2011
New Revision: 1156685

URL: http://svn.apache.org/viewvc?rev=1156685&view=rev
Log: (empty)

Modified:
    incubator/jena/Jena2/ARQ/trunk/src-dev/dev/RunARQ.java

Modified: incubator/jena/Jena2/ARQ/trunk/src-dev/dev/RunARQ.java
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/ARQ/trunk/src-dev/dev/RunARQ.java?rev=1156685&r1=1156684&r2=1156685&view=diff
==============================================================================
--- incubator/jena/Jena2/ARQ/trunk/src-dev/dev/RunARQ.java (original)
+++ incubator/jena/Jena2/ARQ/trunk/src-dev/dev/RunARQ.java Thu Aug 11 17:20:28 2011
@@ -50,6 +50,7 @@ import com.hp.hpl.jena.query.ResultSet ;
 import com.hp.hpl.jena.query.ResultSetFormatter ;
 import com.hp.hpl.jena.rdf.model.AnonId ;
 import com.hp.hpl.jena.rdf.model.Model ;
+import com.hp.hpl.jena.rdf.model.ModelFactory ;
 import com.hp.hpl.jena.shared.PrefixMapping ;
 import com.hp.hpl.jena.sparql.ARQConstants ;
 import com.hp.hpl.jena.sparql.ARQException ;
@@ -118,8 +119,26 @@ public class RunARQ
 
     // count(filter)
     
+    @SuppressWarnings("deprecation")
     public static void main(String[] argv) throws Exception
     {
+        FunctionRegistry.get().put("http://example/ns#wait", wait.class) ;
+
+        QueryExecutionBase.cancelAllowDrain = true ;
+        Query q = QueryFactory.create("PREFIX ex: <http://example/ns#> SELECT * { FILTER
ex:wait(100) }") ;
+        QueryExecution qExec = QueryExecutionFactory.create(q, ModelFactory.createDefaultModel())
;
+        
+        try {
+            ResultSet rs = qExec.execSelect() ;
+            System.out.println(rs.hasNext()) ;
+            qExec.abort();
+            System.out.println(rs.hasNext()) ;
+            rs.nextSolution();
+            System.out.println(rs.hasNext()) ;
+        } finally { qExec.close() ; }
+        
+        exit(0) ;
+        
         InputStream in = new FileInputStream("data") ;
         BindingInputStream bin = new BindingInputStream(in) ;
         



Mime
View raw message