jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r1371728 - in /jena/Scratch/AFS/Dev/trunk/src/main/java/projects: atlas/SimpleMapOfMap.java riot_sse/LangSSE.java riot_sse/PROCESS.java riot_sse/TestSSE_Basic.java riot_sse/TestSSE_Builder.java riot_sse/TestSSE_Forms.java
Date Fri, 10 Aug 2012 14:52:33 GMT
Author: andy
Date: Fri Aug 10 14:52:32 2012
New Revision: 1371728

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

Added:
    jena/Scratch/AFS/Dev/trunk/src/main/java/projects/riot_sse/PROCESS.java
Modified:
    jena/Scratch/AFS/Dev/trunk/src/main/java/projects/atlas/SimpleMapOfMap.java
    jena/Scratch/AFS/Dev/trunk/src/main/java/projects/riot_sse/LangSSE.java
    jena/Scratch/AFS/Dev/trunk/src/main/java/projects/riot_sse/TestSSE_Basic.java
    jena/Scratch/AFS/Dev/trunk/src/main/java/projects/riot_sse/TestSSE_Builder.java
    jena/Scratch/AFS/Dev/trunk/src/main/java/projects/riot_sse/TestSSE_Forms.java

Modified: jena/Scratch/AFS/Dev/trunk/src/main/java/projects/atlas/SimpleMapOfMap.java
URL: http://svn.apache.org/viewvc/jena/Scratch/AFS/Dev/trunk/src/main/java/projects/atlas/SimpleMapOfMap.java?rev=1371728&r1=1371727&r2=1371728&view=diff
==============================================================================
--- jena/Scratch/AFS/Dev/trunk/src/main/java/projects/atlas/SimpleMapOfMap.java (original)
+++ jena/Scratch/AFS/Dev/trunk/src/main/java/projects/atlas/SimpleMapOfMap.java Fri Aug 10
14:52:32 2012
@@ -51,7 +51,7 @@ public class SimpleMapOfMap<K,V> impleme
     @Override
     public boolean isEmpty()            { return map.isEmpty() ; }
 
-    Transform<Entry<K,V>, Pair<K,V>> transform = new Transform<Entry<K,V>,
Pair<K,V>>() {
+    private Transform<Entry<K,V>, Pair<K,V>> transform = new Transform<Entry<K,V>,
Pair<K,V>>() {
         @Override
         public Pair<K, V> convert(Entry<K, V> item)
         {

Modified: jena/Scratch/AFS/Dev/trunk/src/main/java/projects/riot_sse/LangSSE.java
URL: http://svn.apache.org/viewvc/jena/Scratch/AFS/Dev/trunk/src/main/java/projects/riot_sse/LangSSE.java?rev=1371728&r1=1371727&r2=1371728&view=diff
==============================================================================
--- jena/Scratch/AFS/Dev/trunk/src/main/java/projects/riot_sse/LangSSE.java (original)
+++ jena/Scratch/AFS/Dev/trunk/src/main/java/projects/riot_sse/LangSSE.java Fri Aug 10 14:52:32
2012
@@ -225,6 +225,15 @@ public class LangSSE extends LangBase<Ob
             return ;
         }
         
+        if ( lookingAt(TokenType.DIRECTIVE) )
+        {
+            // What parse as directives (@word) are symbols.
+            Token t = nextToken() ;
+            String x = "@"+t.getImage() ;
+            handler.emitSymbol((int)t.getLine(), (int)t.getColumn(), x) ; 
+            return ;
+        }
+        
         Token token  = nextToken() ;
         
         exception(token, "Unexpected: %s", token) ;

Added: jena/Scratch/AFS/Dev/trunk/src/main/java/projects/riot_sse/PROCESS.java
URL: http://svn.apache.org/viewvc/jena/Scratch/AFS/Dev/trunk/src/main/java/projects/riot_sse/PROCESS.java?rev=1371728&view=auto
==============================================================================
--- jena/Scratch/AFS/Dev/trunk/src/main/java/projects/riot_sse/PROCESS.java (added)
+++ jena/Scratch/AFS/Dev/trunk/src/main/java/projects/riot_sse/PROCESS.java Fri Aug 10 14:52:32
2012
@@ -0,0 +1,30 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package projects.riot_sse;
+
+public class PROCESS
+{
+    // What to do about '^'? TestSSE_Basic.testSymbol_5,6,7()   
+    
+    //   Need a quoting system for symbols.
+    //   ^odd symbol^ other chars: || ``
+    // Current ^ is unused (only occurs in literals dataypes)
+    // @en is a symbol.
+}
+

Modified: jena/Scratch/AFS/Dev/trunk/src/main/java/projects/riot_sse/TestSSE_Basic.java
URL: http://svn.apache.org/viewvc/jena/Scratch/AFS/Dev/trunk/src/main/java/projects/riot_sse/TestSSE_Basic.java?rev=1371728&r1=1371727&r2=1371728&view=diff
==============================================================================
--- jena/Scratch/AFS/Dev/trunk/src/main/java/projects/riot_sse/TestSSE_Basic.java (original)
+++ jena/Scratch/AFS/Dev/trunk/src/main/java/projects/riot_sse/TestSSE_Basic.java Fri Aug
10 14:52:32 2012
@@ -50,18 +50,9 @@ public class TestSSE_Basic extends BaseT
     static Item int2i = Item.createNode(int2) ;
     static Item int3i = Item.createNode(int3) ;
     
-//    public static TestSuite suite()
-//    {
-//        TestSuite ts = new TestSuite(TestSSE_Basic.class) ;
-//        ts.setName("SSE Basic") ;
-//        return ts ;
-//    }
-
     static public @BeforeClass  void beforeClass() { ErrorHandlerFactory.setTestLogging(false)
; }  
     static public @AfterClass   void afterClass()  { ErrorHandlerFactory.setTestLogging(true)
; }
-    
-    
-    
+   
     // ---- Parsing : not check for the correct outcome
     @Test public void testParseTerm_01() { parse("'xyz'") ; }
     @Test public void testParseTerm_02() { parse("'xyz'@en") ; }
@@ -74,7 +65,7 @@ public class TestSSE_Basic extends BaseT
     @Test(expected=RiotException.class)
     public void testParseSymbol_02() { parse("'a") ; }
     // TODO Parser needs fixing
-    //@Test public void testParseSymbol_03() { parse("@a") ; }
+    @Test public void testParseSymbol_03() { parse("@a") ; }
     @Test(expected=RiotException.class)
     public void testParseSymbol_04() { parse("a@") ; }
     
@@ -175,11 +166,12 @@ public class TestSSE_Basic extends BaseT
     
     @Test public void testSymbol_3()    { testSymbol("-") ; }
     
-    // XXX Parser broken
-//    @Test public void testSymbol_3()    { testSymbol("^^") ; }
-//    @Test public void testSymbol_4()    { testSymbol("^^<foo>") ; }
-//    @Test public void testSymbol_5()    { testSymbol("@") ; }
-//    @Test public void testSymbol_6()    { testSymbol("@en") ; }
+    // Tokenizer does not support these.
+//    @Test public void testSymbol_5()    { testSymbol("^") ; }
+//    @Test public void testSymbol_6()    { testSymbol("^^") ; }
+//    @Test public void testSymbol_7()    { testSymbol("^^<foo>") ; }
+    @Test public void testSymbol_8()    { testSymbol("@") ; }
+    @Test public void testSymbol_9()    { testSymbol("@en") ; }
     
     // --- nil
     
@@ -281,9 +273,6 @@ public class TestSSE_Basic extends BaseT
         Item z = Item.find(x.getList(), "KEYKEY") ;
         assertNull(z) ;
     }
-    
-    
-    
      
     // ---- Workers ----
     

Modified: jena/Scratch/AFS/Dev/trunk/src/main/java/projects/riot_sse/TestSSE_Builder.java
URL: http://svn.apache.org/viewvc/jena/Scratch/AFS/Dev/trunk/src/main/java/projects/riot_sse/TestSSE_Builder.java?rev=1371728&r1=1371727&r2=1371728&view=diff
==============================================================================
--- jena/Scratch/AFS/Dev/trunk/src/main/java/projects/riot_sse/TestSSE_Builder.java (original)
+++ jena/Scratch/AFS/Dev/trunk/src/main/java/projects/riot_sse/TestSSE_Builder.java Fri Aug
10 14:52:32 2012
@@ -32,13 +32,6 @@ import com.hp.hpl.jena.sparql.sse.builde
 
 public class TestSSE_Builder extends BaseTest
 {
-//    public static TestSuite suite()
-//    {
-//        TestSuite ts = new TestSuite(TestSSE_Builder.class) ;
-//        ts.setName("SSE Op") ;
-//        return ts ;
-//    }
-    
     @Test public void test_01() { SSE.parseTriple("[triple ?s ?p ?o]") ; }
     @Test public void test_02() { SSE.parseTriple("[?s ?p ?o]") ; }
     @Test public void test_03() { SSE.parseTriple("[?s ?p ?o]") ; }

Modified: jena/Scratch/AFS/Dev/trunk/src/main/java/projects/riot_sse/TestSSE_Forms.java
URL: http://svn.apache.org/viewvc/jena/Scratch/AFS/Dev/trunk/src/main/java/projects/riot_sse/TestSSE_Forms.java?rev=1371728&r1=1371727&r2=1371728&view=diff
==============================================================================
--- jena/Scratch/AFS/Dev/trunk/src/main/java/projects/riot_sse/TestSSE_Forms.java (original)
+++ jena/Scratch/AFS/Dev/trunk/src/main/java/projects/riot_sse/TestSSE_Forms.java Fri Aug
10 14:52:32 2012
@@ -35,17 +35,6 @@ public class TestSSE_Forms extends BaseT
         pmap.setNsPrefix("xsd", XSD.getURI()) ;
         pmap.setNsPrefix("ex", "http://example/") ;
     }
-//    public static TestSuite suite()
-//    {
-//        TestSuite ts = new TestSuite(TestSSE_Forms.class) ;
-//        ts.setName("SSE Resolve") ;
-//        
-//        SSE.getDefaultPrefixMapRead().removeNsPrefix("") ;
-//        SSE.getDefaultPrefixMapRead().removeNsPrefix("ex") ;
-////        SSE.setDefaultPrefixMapRead(null) ;
-////        SSE.setDefaultPrefixMapWrite(null) ;
-//        return ts ;
-//    }
 
     // ---- Assume ParseHandlerResolver from here on
     



Mime
View raw message