jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r1154125 - in /incubator/jena/Jena2/ARQ/trunk: src-test/com/hp/hpl/jena/sparql/ src-test/com/hp/hpl/jena/sparql/engine/binding/ src/com/hp/hpl/jena/sparql/engine/binding/
Date Fri, 05 Aug 2011 08:36:09 GMT
Author: andy
Date: Fri Aug  5 08:36:09 2011
New Revision: 1154125

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

Added:
    incubator/jena/Jena2/ARQ/trunk/src-test/com/hp/hpl/jena/sparql/engine/binding/TestBindingStreams.java
  (contents, props changed)
      - copied, changed from r1153986, incubator/jena/Jena2/ARQ/trunk/src-test/com/hp/hpl/jena/sparql/core/bio/TestBindingStreams.java
    incubator/jena/Jena2/ARQ/trunk/src/com/hp/hpl/jena/sparql/engine/binding/BindingInputStream.java
  (contents, props changed)
      - copied, changed from r1153986, incubator/jena/Jena2/ARQ/trunk/src/com/hp/hpl/jena/sparql/core/bio/BindingInputStream.java
    incubator/jena/Jena2/ARQ/trunk/src/com/hp/hpl/jena/sparql/engine/binding/BindingOutputStream.java
  (contents, props changed)
      - copied, changed from r1153986, incubator/jena/Jena2/ARQ/trunk/src/com/hp/hpl/jena/sparql/core/bio/BindingOutputStream.java
Modified:
    incubator/jena/Jena2/ARQ/trunk/src-test/com/hp/hpl/jena/sparql/ARQTestSuite.java

Modified: incubator/jena/Jena2/ARQ/trunk/src-test/com/hp/hpl/jena/sparql/ARQTestSuite.java
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/ARQ/trunk/src-test/com/hp/hpl/jena/sparql/ARQTestSuite.java?rev=1154125&r1=1154124&r2=1154125&view=diff
==============================================================================
--- incubator/jena/Jena2/ARQ/trunk/src-test/com/hp/hpl/jena/sparql/ARQTestSuite.java (original)
+++ incubator/jena/Jena2/ARQ/trunk/src-test/com/hp/hpl/jena/sparql/ARQTestSuite.java Fri Aug
 5 08:36:09 2011
@@ -15,7 +15,7 @@ import org.openjena.riot.TC_Riot ;
 import com.hp.hpl.jena.query.ARQ ;
 import com.hp.hpl.jena.sparql.algebra.TC_Algebra ;
 import com.hp.hpl.jena.sparql.api.TS_API ;
-import com.hp.hpl.jena.sparql.core.bio.TestBindingStreams ;
+import com.hp.hpl.jena.sparql.engine.binding.TestBindingStreams ;
 import com.hp.hpl.jena.sparql.engine.main.QueryEngineMain ;
 import com.hp.hpl.jena.sparql.engine.ref.QueryEngineRef ;
 import com.hp.hpl.jena.sparql.expr.E_Function ;

Copied: incubator/jena/Jena2/ARQ/trunk/src-test/com/hp/hpl/jena/sparql/engine/binding/TestBindingStreams.java
(from r1153986, incubator/jena/Jena2/ARQ/trunk/src-test/com/hp/hpl/jena/sparql/core/bio/TestBindingStreams.java)
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/ARQ/trunk/src-test/com/hp/hpl/jena/sparql/engine/binding/TestBindingStreams.java?p2=incubator/jena/Jena2/ARQ/trunk/src-test/com/hp/hpl/jena/sparql/engine/binding/TestBindingStreams.java&p1=incubator/jena/Jena2/ARQ/trunk/src-test/com/hp/hpl/jena/sparql/core/bio/TestBindingStreams.java&r1=1153986&r2=1154125&rev=1154125&view=diff
==============================================================================
--- incubator/jena/Jena2/ARQ/trunk/src-test/com/hp/hpl/jena/sparql/core/bio/TestBindingStreams.java
(original)
+++ incubator/jena/Jena2/ARQ/trunk/src-test/com/hp/hpl/jena/sparql/engine/binding/TestBindingStreams.java
Fri Aug  5 08:36:09 2011
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-package com.hp.hpl.jena.sparql.core.bio;
+package com.hp.hpl.jena.sparql.engine.binding;
 
 import junit.framework.JUnit4TestAdapter ;
 import org.junit.AfterClass ;
@@ -29,6 +29,7 @@ import org.openjena.riot.tokens.Tokenize
 import org.openjena.riot.tokens.TokenizerFactory ;
 
 import com.hp.hpl.jena.sparql.engine.binding.Binding ;
+import com.hp.hpl.jena.sparql.engine.binding.BindingInputStream ;
 import com.hp.hpl.jena.sparql.resultset.ResultSetCompare ;
 import com.hp.hpl.jena.sparql.resultset.ResultSetCompare.BNodeIso ;
 import com.hp.hpl.jena.sparql.sse.Item ;
@@ -57,45 +58,24 @@ public class TestBindingStreams extends 
     static Binding b19 = build("(?a 1) (?b 9)") ;
     static Binding b02 = build("(?b 2)") ;
     static Binding b10 = build("(?a 1)") ;
+    static Binding b0  = build("") ;
     
-    @Test public void bindingStream_01()
-    {
-        test("VARS ?a ?b . 1 2 .", b12) ;
-    }
-
-    @Test public void bindingStream_02()
-    {
-        test("VARS ?a ?b . - 2 .", b02) ;
-    }
-
-    @Test public void bindingStream_03()
-    {
-        test("VARS ?a ?b . - 2 . 1 - . ", b02, b10) ;
-    }
-
-    @Test public void bindingStream_04()
-    {
-        test("VARS ?a . 1 . VARS ?b . 2 . ", b10, b02) ;
-    }
+    static Binding x10 = build("(?x <http://example/abc>)") ;
     
-    @Test(expected=RiotException.class)
-    public void bindingStream_05()
-    {
-        test("VARS ?a ?b . 99 . ") ;
-    }
-    
-    @Test(expected=RiotException.class)
-    public void bindingStream_06()
-    {
-        test("VARS ?a ?b . 99 11 22 . ") ;
-    }
+    @Test public void bindingStream_01()        { test("VARS ?a ?b . 1 2 .", b12) ; }
+    @Test public void bindingStream_02()        { test("VARS ?a ?b . - 2 .", b02) ; }
+    @Test public void bindingStream_03()        { test("VARS ?a ?b . - 2 . 1 - . ", b02,
b10) ; }
+    @Test public void bindingStream_04()        { test("VARS ?a . 1 . VARS ?b . 2 . ", b10,
b02) ; }
 
+    @Test(expected=RiotException.class)
+    public void bindingStream_05()              { test("VARS ?a ?b . 99 . ") ; }
+    @Test(expected=RiotException.class)         
+    public void bindingStream_06()              { test("VARS ?a ?b . 99 11 22 . ") ; }
     
-    @Test public void bindingStream_10()
-    {
-        test("VARS ?a ?b . 1 2 . * 9 .", b12, b19) ;
-    }
+    @Test public void bindingStream_10()        { test("VARS ?a ?b . 1 2 . * 9 .", b12, b19)
; }
+    @Test public void bindingStream_11()        { test("VARS ?a ?b ?c . 1 2 - . * 9 - .",
b12, b19) ; }
     
+    @Test public void bindingStream_20()        { test("PREFIX : <http://example/>
. VARS ?x .\n:abc  .\n- .", x10, b0) ; }
     
     static void test(String x, Binding ... bindings)
     {

Propchange: incubator/jena/Jena2/ARQ/trunk/src-test/com/hp/hpl/jena/sparql/engine/binding/TestBindingStreams.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Copied: incubator/jena/Jena2/ARQ/trunk/src/com/hp/hpl/jena/sparql/engine/binding/BindingInputStream.java
(from r1153986, incubator/jena/Jena2/ARQ/trunk/src/com/hp/hpl/jena/sparql/core/bio/BindingInputStream.java)
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/ARQ/trunk/src/com/hp/hpl/jena/sparql/engine/binding/BindingInputStream.java?p2=incubator/jena/Jena2/ARQ/trunk/src/com/hp/hpl/jena/sparql/engine/binding/BindingInputStream.java&p1=incubator/jena/Jena2/ARQ/trunk/src/com/hp/hpl/jena/sparql/core/bio/BindingInputStream.java&r1=1153986&r2=1154125&rev=1154125&view=diff
==============================================================================
--- incubator/jena/Jena2/ARQ/trunk/src/com/hp/hpl/jena/sparql/core/bio/BindingInputStream.java
(original)
+++ incubator/jena/Jena2/ARQ/trunk/src/com/hp/hpl/jena/sparql/engine/binding/BindingInputStream.java
Fri Aug  5 08:36:09 2011
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-package com.hp.hpl.jena.sparql.core.bio;
+package com.hp.hpl.jena.sparql.engine.binding;
 
 import static org.openjena.riot.tokens.TokenType.DOT ;
 import static org.openjena.riot.tokens.TokenType.IRI ;
@@ -40,15 +40,19 @@ import org.openjena.riot.tokens.Tokenize
 import com.hp.hpl.jena.graph.Node ;
 import com.hp.hpl.jena.iri.IRI ;
 import com.hp.hpl.jena.sparql.core.Var ;
-import com.hp.hpl.jena.sparql.engine.binding.Binding ;
-import com.hp.hpl.jena.sparql.engine.binding.BindingMap ;
 
-/** Parser for the RDF Tuples language */
-public class BindingInputStream 
-    //
-    extends LangBase<Binding>
-    implements Iterator<Binding> // Or Map<Var, Node>
+/** Language for reading in a steram of bindings.
+ * https://cwiki.apache.org/confluence/display/JENA/BindingIO
+ * 
+ * VARS
+ * PREFIX
+ * 
+ */
+public class BindingInputStream extends LangBase<Binding>
+    implements Iterator<Binding>
 {
+    // ?? Rework so it is not exposing all of LangBase
+
     private final IteratorTuples iter ;
     
     public BindingInputStream(InputStream in)
@@ -65,6 +69,7 @@ public class BindingInputStream 
      *  No need to pass in a buffered InputStream; the code 
      *  will do it's own buffering.
      */
+    
     private BindingInputStream(Tokenizer tokenizer, ParserProfile profile)
     {
         super(tokenizer, null, profile) ;

Propchange: incubator/jena/Jena2/ARQ/trunk/src/com/hp/hpl/jena/sparql/engine/binding/BindingInputStream.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Copied: incubator/jena/Jena2/ARQ/trunk/src/com/hp/hpl/jena/sparql/engine/binding/BindingOutputStream.java
(from r1153986, incubator/jena/Jena2/ARQ/trunk/src/com/hp/hpl/jena/sparql/core/bio/BindingOutputStream.java)
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/ARQ/trunk/src/com/hp/hpl/jena/sparql/engine/binding/BindingOutputStream.java?p2=incubator/jena/Jena2/ARQ/trunk/src/com/hp/hpl/jena/sparql/engine/binding/BindingOutputStream.java&p1=incubator/jena/Jena2/ARQ/trunk/src/com/hp/hpl/jena/sparql/core/bio/BindingOutputStream.java&r1=1153986&r2=1154125&rev=1154125&view=diff
==============================================================================
--- incubator/jena/Jena2/ARQ/trunk/src/com/hp/hpl/jena/sparql/core/bio/BindingOutputStream.java
(original)
+++ incubator/jena/Jena2/ARQ/trunk/src/com/hp/hpl/jena/sparql/engine/binding/BindingOutputStream.java
Fri Aug  5 08:36:09 2011
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-package com.hp.hpl.jena.sparql.core.bio;
+package com.hp.hpl.jena.sparql.engine.binding;
 
 import java.io.IOException ;
 import java.io.OutputStream ;
@@ -31,7 +31,6 @@ import org.openjena.riot.system.PrefixMa
 import com.hp.hpl.jena.graph.Node ;
 import com.hp.hpl.jena.iri.IRI ;
 import com.hp.hpl.jena.sparql.core.Var ;
-import com.hp.hpl.jena.sparql.engine.binding.Binding ;
 import com.hp.hpl.jena.sparql.util.FmtUtils ;
 
 /** Parser for the RDF Tuples language */

Propchange: incubator/jena/Jena2/ARQ/trunk/src/com/hp/hpl/jena/sparql/engine/binding/BindingOutputStream.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain



Mime
View raw message