jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r1211452 - /incubator/jena/Scratch/AFS/Jena-Dev/trunk/src/dev/Run.java
Date Wed, 07 Dec 2011 14:30:54 GMT
Author: andy
Date: Wed Dec  7 14:30:53 2011
New Revision: 1211452

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

Modified:
    incubator/jena/Scratch/AFS/Jena-Dev/trunk/src/dev/Run.java

Modified: incubator/jena/Scratch/AFS/Jena-Dev/trunk/src/dev/Run.java
URL: http://svn.apache.org/viewvc/incubator/jena/Scratch/AFS/Jena-Dev/trunk/src/dev/Run.java?rev=1211452&r1=1211451&r2=1211452&view=diff
==============================================================================
--- incubator/jena/Scratch/AFS/Jena-Dev/trunk/src/dev/Run.java (original)
+++ incubator/jena/Scratch/AFS/Jena-Dev/trunk/src/dev/Run.java Wed Dec  7 14:30:53 2011
@@ -22,22 +22,29 @@ import java.io.FileInputStream ;
 import java.io.InputStream ;
 
 import org.junit.Test ;
-import org.openjena.atlas.iterator.Iter ;
 import org.openjena.atlas.lib.FileOps ;
 import org.openjena.atlas.lib.Lib ;
 import org.openjena.atlas.logging.Log ;
 import arq.update ;
 
-import com.hp.hpl.jena.query.* ;
-import com.hp.hpl.jena.sparql.core.Quad ;
+import com.hp.hpl.jena.query.Dataset ;
+import com.hp.hpl.jena.query.Query ;
+import com.hp.hpl.jena.query.QueryCancelledException ;
+import com.hp.hpl.jena.query.QueryException ;
+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.query.QuerySolution ;
+import com.hp.hpl.jena.query.ReadWrite ;
+import com.hp.hpl.jena.query.ResultSet ;
 import com.hp.hpl.jena.sparql.function.FunctionRegistry ;
 import com.hp.hpl.jena.sparql.function.library.wait ;
 import com.hp.hpl.jena.sparql.lang.SyntaxVarScope ;
-import com.hp.hpl.jena.sparql.sse.SSE ;
-import com.hp.hpl.jena.tdb.* ;
+import com.hp.hpl.jena.tdb.DatasetGraphTxn ;
+import com.hp.hpl.jena.tdb.StoreConnection ;
+import com.hp.hpl.jena.tdb.TDBLoader ;
 import com.hp.hpl.jena.tdb.store.DatasetGraphTDB ;
 import com.hp.hpl.jena.tdb.sys.TDBMaker ;
-import com.hp.hpl.jena.util.FileManager ;
 
 public class Run extends RunBase
 {
@@ -45,72 +52,10 @@ public class Run extends RunBase
     
     public static void main(String[] argv) throws Exception
     {
-        // w_rCwxRCw_
-        Quad quad1 = SSE.parseQuad("(_ <s> <p> 1)") ;
-        Quad quad2 = SSE.parseQuad("(_ <s> <p> 2)") ;
-        Quad quad3 = SSE.parseQuad("(_ <s> <p> 3)") ;
-        
-        String DIR = "DB" ;
-        FileOps.clearDirectory(DIR) ;
-        
-        StoreConnection sConn = StoreConnection.make(DIR) ;
-        DatasetGraphTxn txnW1 = sConn.begin(ReadWrite.WRITE) ;
-        txnW1.add(quad1) ;
-        
-        DatasetGraphTxn txnR1 = sConn.begin(ReadWrite.READ) ;
-        txnW1.commit() ; System.out.print("C") ;
-        
-        
-        Iter.consume(txnR1.find()) ;        // Before / after?
-        
-        txnW1.end() ;
-        
-        DatasetGraphTxn txnW2 = sConn.begin(ReadWrite.WRITE) ;
-        txnW2.add(quad2) ;
-
-        txnR1.end() ; System.out.print("R") ;
-        txnW2.commit() ;  System.out.print("C") ;
-        
-        DatasetGraphTxn txnW3 = sConn.begin(ReadWrite.WRITE) ;
-        txnW3.add(quad3) ;
-        txnW3.commit() ; System.out.print("C") ;
-
-        System.out.println(sConn.getBaseDataset()) ;
-        exit(0) ;
-        
-        
-        
-        
-        
-        if ( true )
-        {
-            // And TDBFactory.create
-            //Dataset ds = TDBFactoryTxn.createDataset(Location.mem()) ;
-            Dataset ds = TDBFactoryTxn.assembleDataset("tdb.ttl") ;
-            ds.begin(ReadWrite.WRITE) ;
-            FileManager.get().readModel(ds.getDefaultModel(), "D.nt") ;
-            ds.commit() ;
-            //ds.close() ;
-
-            ds.begin(ReadWrite.READ) ;
-            SSE.write(ds.asDatasetGraph()) ;
-            ds.close() ;
-
-            exit(0) ;
-        }
-        
-        DatasetGraphTransaction dsg = TDBFactoryTxn.createDatasetGraph() ;
-        dsg.begin(ReadWrite.WRITE) ;
-        dsg.add(SSE.parseQuad("(<g> <s> <p> <o>)")) ;
-        dsg.commit() ;
-        
-        dsg.begin(ReadWrite.READ) ;
-        SSE.write(dsg) ;
-        dsg.close() ;
-        //System.out.println(dsg.isInTransaction()) ;
-        
-        exit(0) ;
         
+        // The ExprVarList order changes in (group) 
+        arq.qparse.main("--print=op", "SELECT (sum(?y) AS ?x) {?s ?p ?z } GROUP BY ?s HAVING
(avg(?z) > 0) ORDER BY count(*)") ;
+        System.exit(0) ;
         
         
         



Mime
View raw message