You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2012/01/06 17:17:42 UTC

svn commit: r1228246 - in /incubator/jena/Scratch/AFS/Jena-Dev/trunk/src/dev: Jena184_RDFJSONWriter.java Run.java

Author: andy
Date: Fri Jan  6 16:17:41 2012
New Revision: 1228246

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

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

Modified: incubator/jena/Scratch/AFS/Jena-Dev/trunk/src/dev/Jena184_RDFJSONWriter.java
URL: http://svn.apache.org/viewvc/incubator/jena/Scratch/AFS/Jena-Dev/trunk/src/dev/Jena184_RDFJSONWriter.java?rev=1228246&r1=1228245&r2=1228246&view=diff
==============================================================================
--- incubator/jena/Scratch/AFS/Jena-Dev/trunk/src/dev/Jena184_RDFJSONWriter.java (original)
+++ incubator/jena/Scratch/AFS/Jena-Dev/trunk/src/dev/Jena184_RDFJSONWriter.java Fri Jan  6 16:17:41 2012
@@ -46,6 +46,7 @@ public class Jena184_RDFJSONWriter exten
     public static void main(String[] argv) throws Exception
     {
         Graph g = SSE.parseGraph("(base <http://example/> (graph (<s> <p> 1)(<s> <p> 2)))") ;
+        //Graph g = SSE.parseGraph("(base <http://example/> (graph (<s1> <p1> 1)(<s2> <p2> 2)))") ;
         RDFJSONWriter.write(System.out, g) ;
         ByteArrayOutputStream bout = new ByteArrayOutputStream() ;
         RDFJSONWriter.write(bout, g) ;
@@ -58,8 +59,8 @@ public class Jena184_RDFJSONWriter exten
         
         // ... parse as JSON
         // This does not work.  
-//        System.out.println("Parse as JSON") ;
-//        JSON.parse(new ByteArrayInputStream(bout.toByteArray())) ;
+        System.out.println("Parse as JSON") ;
+        JSON.parse(new ByteArrayInputStream(bout.toByteArray())) ;
         
         String $ = StrUtils.strjoinNL(
             "{ 'http://example/s' : {" , 
@@ -70,7 +71,7 @@ public class Jena184_RDFJSONWriter exten
             "        'value' : '2'" ,
             "        'datatype' : 'http://www.w3.org/2001/XMLSchema#integer'" ,
             "      }" ,
-            //",",
+            ",",
             "      {" ,
             "        'type' : 'literal'" ,
             "        'value' : '1'" ,
@@ -79,10 +80,12 @@ public class Jena184_RDFJSONWriter exten
             
             
             "   ]",
-            "}") ;
+            "  }",
+            "  }"
+            ) ;
         System.out.println($) ;
         RiotReader.createParserRdfJson(new TokenizerJSON(PeekReader.make(new StringReader($))),
-                                       new SinkCounting<Triple>());
+                                       new SinkCounting<Triple>()).parse();
         System.out.println("Done") ;
     }
     

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=1228246&r1=1228245&r2=1228246&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 Fri Jan  6 16:17:41 2012
@@ -37,6 +37,7 @@ import com.hp.hpl.jena.rdf.model.RDFRead
 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.mgt.Explain.InfoLevel ;
 import com.hp.hpl.jena.sparql.util.Timer ;
 import com.hp.hpl.jena.tdb.DatasetGraphTxn ;
 import com.hp.hpl.jena.tdb.StoreConnection ;
@@ -53,6 +54,12 @@ public class Run extends RunBase
     
     public static void main(String[] argv) throws Exception
     {
+        ARQ.setExecutionLogging(InfoLevel.ALL) ;
+        tdb.tdbquery.main("--set=arq:logExec=ALL",
+                          "--loc=DB",
+                          "--file=Q.rq");
+        exit(0) ;
+        
         timeConvertingStrings() ;
         exit(0) ;
         prefixesAndTDB() ;