jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r1180984 - in /incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena: query/ResultSetFactory.java sparql/resultset/JSONInput.java sparql/resultset/JSONResultsReader.java
Date Mon, 10 Oct 2011 14:12:11 GMT
Author: andy
Date: Mon Oct 10 14:12:11 2011
New Revision: 1180984

URL: http://svn.apache.org/viewvc?rev=1180984&view=rev
Log:
Rename JSONResultReader to JSONInput so in the same style as parsers for other formats.

Added:
    incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/sparql/resultset/JSONInput.java
  (contents, props changed)
      - copied, changed from r1180981, incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/sparql/resultset/JSONResultsReader.java
Removed:
    incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/sparql/resultset/JSONResultsReader.java
Modified:
    incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/query/ResultSetFactory.java

Modified: incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/query/ResultSetFactory.java
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/query/ResultSetFactory.java?rev=1180984&r1=1180983&r2=1180984&view=diff
==============================================================================
--- incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/query/ResultSetFactory.java
(original)
+++ incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/query/ResultSetFactory.java
Mon Oct 10 14:12:11 2011
@@ -92,7 +92,7 @@ public class ResultSetFactory
         }
         
         if ( format.equals(ResultsFormat.FMT_RS_JSON) )
-            return JSONResultsReader.fromJSON(input) ;
+            return JSONInput.fromJSON(input) ;
         
         if ( format.equals(ResultsFormat.FMT_RS_TSV) )
             return TSVInput.fromTSV(input) ;
@@ -214,7 +214,7 @@ public class ResultSetFactory
             SPARQLResult x = null ;
             
             if ( format.equals(ResultsFormat.FMT_RS_JSON) )
-                x = JSONResultsReader.make(in, GraphFactory.makeDefaultModel()) ;
+                x = JSONInput.make(in, GraphFactory.makeDefaultModel()) ;
             else
                 x = XMLInput.make(in, GraphFactory.makeDefaultModel()) ;
                     
@@ -276,7 +276,7 @@ public class ResultSetFactory
             SPARQLResult x = null ;
             
             if ( format.equals(ResultsFormat.FMT_RS_JSON) )
-                return JSONResultsReader.make(in, GraphFactory.makeDefaultModel()) ;
+                return JSONInput.make(in, GraphFactory.makeDefaultModel()) ;
             else if ( format.equals(ResultsFormat.FMT_RS_XML) )
                 return XMLInput.make(in, GraphFactory.makeDefaultModel()) ;
             else if ( format.equals(ResultsFormat.FMT_RS_TSV) )
@@ -341,7 +341,7 @@ public class ResultSetFactory
      */  
     public static ResultSet fromJSON(InputStream in)
     {
-        return JSONResultsReader.fromJSON(in) ;
+        return JSONInput.fromJSON(in) ;
     }
     
     /** Read from an input stream which is the format of the SPARQL result set format in
TSV.

Copied: incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/sparql/resultset/JSONInput.java
(from r1180981, incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/sparql/resultset/JSONResultsReader.java)
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/sparql/resultset/JSONInput.java?p2=incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/sparql/resultset/JSONInput.java&p1=incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/sparql/resultset/JSONResultsReader.java&r1=1180981&r2=1180984&rev=1180984&view=diff
==============================================================================
--- incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/sparql/resultset/JSONResultsReader.java
(original)
+++ incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/sparql/resultset/JSONInput.java
Mon Oct 10 14:12:11 2011
@@ -44,14 +44,14 @@ import com.hp.hpl.jena.sparql.resultset.
 import com.hp.hpl.jena.sparql.resultset.SPARQLResult ;
 import com.hp.hpl.jena.sparql.util.graph.GraphFactory ;
 
-public class JSONResultsReader extends SPARQLResult
+public class JSONInput extends SPARQLResult
 {
     static public void main(String... args) throws Exception
     {
         String FILE = "../ARQ/testing/ResultSet/output.srj" ;
         //String FILE = "../ARQ/testing/ARQ/Ask/ask-2.srj" ;
         InputStream in = new FileInputStream(FILE) ;
-        SPARQLResult r = new JSONResultsReader().process(in, null) ;
+        SPARQLResult r = new JSONInput().process(in, null) ;
         if ( r.isBoolean() )
             System.out.println("ASK: "+r.getBooleanResult()) ;
         if ( r.isResultSet() )
@@ -60,24 +60,24 @@ public class JSONResultsReader extends S
     
     public static ResultSet fromJSON(InputStream input)
     {
-        SPARQLResult r = new JSONResultsReader().process(input, null) ;
+        SPARQLResult r = new JSONInput().process(input, null) ;
         return r.getResultSet() ; 
     }
     
     public static SPARQLResult make(InputStream input, Model model)
     {
-        return new JSONResultsReader().process(input, model) ;
+        return new JSONInput().process(input, model) ;
     }
 
-    public JSONResultsReader() {}
+    public JSONInput() {}
     
-    public JSONResultsReader(InputStream in)
+    public JSONInput(InputStream in)
     {
         this(in, null) ;
     }
 
     // See also XMLInputSAX for design structure.
-    public JSONResultsReader(InputStream in, Model model)
+    public JSONInput(InputStream in, Model model)
     {
         if ( model == null )
             model = GraphFactory.makeJenaDefaultModel() ;

Propchange: incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/sparql/resultset/JSONInput.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain



Mime
View raw message