jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r1391901 - in /jena/Experimental/riot-reader/src/test/java/org: ./ apache/ apache/jena/ apache/jena/riot/ apache/jena/riot/fm2/
Date Sat, 29 Sep 2012 22:07:12 GMT
Author: andy
Date: Sat Sep 29 22:07:11 2012
New Revision: 1391901

URL: http://svn.apache.org/viewvc?rev=1391901&view=rev
Log:
Repackage as org.apache.jena.riot.
Package for stream handling.
Split out adapters to old world.

Added:
    jena/Experimental/riot-reader/src/test/java/org/
    jena/Experimental/riot-reader/src/test/java/org/apache/
    jena/Experimental/riot-reader/src/test/java/org/apache/jena/
    jena/Experimental/riot-reader/src/test/java/org/apache/jena/riot/
    jena/Experimental/riot-reader/src/test/java/org/apache/jena/riot/TC_ReaderRIOT.java
      - copied, changed from r1374379, jena/Experimental/riot-reader/src/test/java/riot_reader/TC_ReaderRIOT.java
    jena/Experimental/riot-reader/src/test/java/org/apache/jena/riot/TS_ReaderRIOT.java
      - copied, changed from r1374379, jena/Experimental/riot-reader/src/test/java/riot_reader/TS_ReaderRIOT.java
    jena/Experimental/riot-reader/src/test/java/org/apache/jena/riot/TestJenaReaderRIOT.java
      - copied, changed from r1374379, jena/Experimental/riot-reader/src/test/java/riot_reader/TestJenaReaderRIOT.java
    jena/Experimental/riot-reader/src/test/java/org/apache/jena/riot/TestLangRIOT.java
      - copied, changed from r1374379, jena/Experimental/riot-reader/src/test/java/riot_reader/TestLangRIOT.java
    jena/Experimental/riot-reader/src/test/java/org/apache/jena/riot/TestReadDataset.java
      - copied, changed from r1374379, jena/Experimental/riot-reader/src/test/java/riot_reader/TestReadDataset.java
    jena/Experimental/riot-reader/src/test/java/org/apache/jena/riot/TestStreamManager.java
      - copied, changed from r1380379, jena/Experimental/riot-reader/src/test/java/riot_reader/TestFileManagerRIOT.java
    jena/Experimental/riot-reader/src/test/java/org/apache/jena/riot/fm2/
      - copied from r1374379, jena/Experimental/riot-reader/src/test/java/riot_reader/fm2/
Modified:
    jena/Experimental/riot-reader/src/test/java/org/apache/jena/riot/fm2/TS_IO2.java
    jena/Experimental/riot-reader/src/test/java/org/apache/jena/riot/fm2/TestFileManager.java
    jena/Experimental/riot-reader/src/test/java/org/apache/jena/riot/fm2/TestLocationMapper.java
    jena/Experimental/riot-reader/src/test/java/org/apache/jena/riot/fm2/TestLocators.java
    jena/Experimental/riot-reader/src/test/java/org/apache/jena/riot/fm2/TestStreamManager.java

Copied: jena/Experimental/riot-reader/src/test/java/org/apache/jena/riot/TC_ReaderRIOT.java
(from r1374379, jena/Experimental/riot-reader/src/test/java/riot_reader/TC_ReaderRIOT.java)
URL: http://svn.apache.org/viewvc/jena/Experimental/riot-reader/src/test/java/org/apache/jena/riot/TC_ReaderRIOT.java?p2=jena/Experimental/riot-reader/src/test/java/org/apache/jena/riot/TC_ReaderRIOT.java&p1=jena/Experimental/riot-reader/src/test/java/riot_reader/TC_ReaderRIOT.java&r1=1374379&r2=1391901&rev=1391901&view=diff
==============================================================================
--- jena/Experimental/riot-reader/src/test/java/riot_reader/TC_ReaderRIOT.java (original)
+++ jena/Experimental/riot-reader/src/test/java/org/apache/jena/riot/TC_ReaderRIOT.java Sat
Sep 29 22:07:11 2012
@@ -16,12 +16,12 @@
  * limitations under the License.
  */
 
-package riot_reader;
+package org.apache.jena.riot;
 
+import org.apache.jena.riot.fm2.TS_IO2 ;
 import org.junit.runner.RunWith ;
 import org.junit.runners.Suite ;
 import org.junit.runners.Suite.SuiteClasses ;
-import riot_reader.fm2.TS_IO2 ;
 
 @RunWith(Suite.class)
 @SuiteClasses(

Copied: jena/Experimental/riot-reader/src/test/java/org/apache/jena/riot/TS_ReaderRIOT.java
(from r1374379, jena/Experimental/riot-reader/src/test/java/riot_reader/TS_ReaderRIOT.java)
URL: http://svn.apache.org/viewvc/jena/Experimental/riot-reader/src/test/java/org/apache/jena/riot/TS_ReaderRIOT.java?p2=jena/Experimental/riot-reader/src/test/java/org/apache/jena/riot/TS_ReaderRIOT.java&p1=jena/Experimental/riot-reader/src/test/java/riot_reader/TS_ReaderRIOT.java&r1=1374379&r2=1391901&rev=1391901&view=diff
==============================================================================
--- jena/Experimental/riot-reader/src/test/java/riot_reader/TS_ReaderRIOT.java (original)
+++ jena/Experimental/riot-reader/src/test/java/org/apache/jena/riot/TS_ReaderRIOT.java Sat
Sep 29 22:07:11 2012
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-package riot_reader;
+package org.apache.jena.riot;
 
 import org.junit.runner.RunWith ;
 import org.junit.runners.Suite ;
@@ -26,7 +26,7 @@ import org.junit.runners.Suite.SuiteClas
 @SuiteClasses(
 { 
     TestLangRIOT.class
-    , TestFileManagerRIOT.class 
+    , TestStreamManager.class 
     , TestJenaReaderRIOT.class
     , TestReadDataset.class
 })

Copied: jena/Experimental/riot-reader/src/test/java/org/apache/jena/riot/TestJenaReaderRIOT.java
(from r1374379, jena/Experimental/riot-reader/src/test/java/riot_reader/TestJenaReaderRIOT.java)
URL: http://svn.apache.org/viewvc/jena/Experimental/riot-reader/src/test/java/org/apache/jena/riot/TestJenaReaderRIOT.java?p2=jena/Experimental/riot-reader/src/test/java/org/apache/jena/riot/TestJenaReaderRIOT.java&p1=jena/Experimental/riot-reader/src/test/java/riot_reader/TestJenaReaderRIOT.java&r1=1374379&r2=1391901&rev=1391901&view=diff
==============================================================================
--- jena/Experimental/riot-reader/src/test/java/riot_reader/TestJenaReaderRIOT.java (original)
+++ jena/Experimental/riot-reader/src/test/java/org/apache/jena/riot/TestJenaReaderRIOT.java
Sat Sep 29 22:07:11 2012
@@ -16,12 +16,16 @@
  * limitations under the License.
  */
 
-package riot_reader;
+package org.apache.jena.riot;
 
 import java.io.FileInputStream ;
 import java.io.IOException ;
 import java.io.StringReader ;
 
+import org.apache.jena.riot.Langs ;
+import org.apache.jena.riot.RDFReaderFactoryRIOT ;
+import org.apache.jena.riot.TypedInputStream2 ;
+import org.apache.jena.riot.WebReader2 ;
 import org.junit.AfterClass ;
 import org.junit.BeforeClass ;
 import org.junit.Test ;

Copied: jena/Experimental/riot-reader/src/test/java/org/apache/jena/riot/TestLangRIOT.java
(from r1374379, jena/Experimental/riot-reader/src/test/java/riot_reader/TestLangRIOT.java)
URL: http://svn.apache.org/viewvc/jena/Experimental/riot-reader/src/test/java/org/apache/jena/riot/TestLangRIOT.java?p2=jena/Experimental/riot-reader/src/test/java/org/apache/jena/riot/TestLangRIOT.java&p1=jena/Experimental/riot-reader/src/test/java/riot_reader/TestLangRIOT.java&r1=1374379&r2=1391901&rev=1391901&view=diff
==============================================================================
--- jena/Experimental/riot-reader/src/test/java/riot_reader/TestLangRIOT.java (original)
+++ jena/Experimental/riot-reader/src/test/java/org/apache/jena/riot/TestLangRIOT.java Sat
Sep 29 22:07:11 2012
@@ -16,8 +16,10 @@
  * limitations under the License.
  */
 
-package riot_reader;
+package org.apache.jena.riot;
 
+import org.apache.jena.riot.Lang2 ;
+import org.apache.jena.riot.Langs ;
 import org.junit.Test ;
 import org.openjena.atlas.junit.BaseTest ;
 

Copied: jena/Experimental/riot-reader/src/test/java/org/apache/jena/riot/TestReadDataset.java
(from r1374379, jena/Experimental/riot-reader/src/test/java/riot_reader/TestReadDataset.java)
URL: http://svn.apache.org/viewvc/jena/Experimental/riot-reader/src/test/java/org/apache/jena/riot/TestReadDataset.java?p2=jena/Experimental/riot-reader/src/test/java/org/apache/jena/riot/TestReadDataset.java&p1=jena/Experimental/riot-reader/src/test/java/riot_reader/TestReadDataset.java&r1=1374379&r2=1391901&rev=1391901&view=diff
==============================================================================
--- jena/Experimental/riot-reader/src/test/java/riot_reader/TestReadDataset.java (original)
+++ jena/Experimental/riot-reader/src/test/java/org/apache/jena/riot/TestReadDataset.java
Sat Sep 29 22:07:11 2012
@@ -16,11 +16,14 @@
  * limitations under the License.
  */
 
-package riot_reader;
+package org.apache.jena.riot;
 
 import java.io.FileInputStream ;
 import java.io.IOException ;
 
+import org.apache.jena.riot.Lang2 ;
+import org.apache.jena.riot.Langs ;
+import org.apache.jena.riot.WebReader2 ;
 import org.junit.AfterClass ;
 import org.junit.BeforeClass ;
 import org.junit.Test ;

Copied: jena/Experimental/riot-reader/src/test/java/org/apache/jena/riot/TestStreamManager.java
(from r1380379, jena/Experimental/riot-reader/src/test/java/riot_reader/TestFileManagerRIOT.java)
URL: http://svn.apache.org/viewvc/jena/Experimental/riot-reader/src/test/java/org/apache/jena/riot/TestStreamManager.java?p2=jena/Experimental/riot-reader/src/test/java/org/apache/jena/riot/TestStreamManager.java&p1=jena/Experimental/riot-reader/src/test/java/riot_reader/TestFileManagerRIOT.java&r1=1380379&r2=1391901&rev=1391901&view=diff
==============================================================================
--- jena/Experimental/riot-reader/src/test/java/riot_reader/TestFileManagerRIOT.java (original)
+++ jena/Experimental/riot-reader/src/test/java/org/apache/jena/riot/TestStreamManager.java
Sat Sep 29 22:07:11 2012
@@ -16,50 +16,53 @@
  * limitations under the License.
  */
 
-package riot_reader;
+package org.apache.jena.riot;
 
 import java.io.File ;
 
+import org.apache.jena.riot.stream.LocatorFile2 ;
+import org.apache.jena.riot.stream.LocatorURL2 ;
+import org.apache.jena.riot.stream.StreamManager ;
 import org.junit.AfterClass ;
 import org.junit.BeforeClass ;
 import org.junit.Test ;
 import org.openjena.atlas.junit.BaseTest ;
 import org.openjena.riot.RiotNotFoundException ;
-import riot_reader.fm2.FileManager2 ;
-import riot_reader.fm2.LocatorFile2 ;
-import riot_reader.fm2.LocatorURL2 ;
-import riot_reader.fm2.StreamManager ;
 
 import com.hp.hpl.jena.rdf.model.Model ;
 import com.hp.hpl.jena.rdf.model.ModelFactory ;
 import com.hp.hpl.jena.sparql.util.Context ;
 
-public class TestFileManagerRIOT extends BaseTest
+public class TestStreamManager extends BaseTest
 {
     private static final String directory = "testing/RIOT/FileManager" ;
     private static final String absDirectory = new File("testing/RIOT/FileManager").getAbsolutePath()
;
 
     private static Context context = new Context() ;
-    private static FileManager2 fileMgr ;
-    private static FileManager2 fileMgrStd ;
     
-    private static StreamManager streamMgr = new StreamManager() ;
+    private static StreamManager streamMgr ;
+    private static StreamManager streamMgrStd ;
+    private static Object streamManagerContextValue ;
     
     @BeforeClass static public void beforeClass()
     { 
-        fileMgrStd = FileManager2.get() ;
-        StreamManager streamMgr = new StreamManager() ;
+        streamMgrStd = StreamManager.get() ;
+        streamMgr = new StreamManager() ;
         streamMgr.addLocator(new LocatorFile2()) ;
         streamMgr.addLocator(new LocatorFile2(directory)) ;
         streamMgr.addLocator(new LocatorURL2()) ;
-        fileMgr = new FileManager2(streamMgr) ;
-        context.put(WebReader2.fileManagerSymbol, streamMgr) ;
+        
+        streamManagerContextValue = context.get(WebReader2.streamManagerSymbol) ;
+        context.put(WebReader2.streamManagerSymbol, streamMgr) ;
     }
     
     @AfterClass static public void afterClass()
     { 
-        FileManager2.setGlobalFileManager(fileMgrStd) ;
-        context.remove(WebReader2.fileManagerSymbol) ;
+        StreamManager.setGlobal(streamMgrStd) ;
+        if ( streamManagerContextValue == null )
+            context.remove(WebReader2.streamManagerSymbol) ;
+        else
+            context.put(WebReader2.streamManagerSymbol, streamManagerContextValue) ;
     }
     
     @Test public void fm_open_01() { open(directory+"/D.ttl", context) ; }
@@ -100,11 +103,11 @@ public class TestFileManagerRIOT extends
     
     private static void read(String dataName)
     {
-        FileManager2.setGlobalFileManager(fileMgr) ;
+        StreamManager.setGlobal(streamMgr) ;
         Model m = ModelFactory.createDefaultModel() ;
         WebReader2.read(m, dataName) ;
         assertTrue(m.size() != 0 ) ;
-        FileManager2.setGlobalFileManager(fileMgrStd) ;
+        StreamManager.setGlobal(streamMgrStd) ;
     }
 }
 

Modified: jena/Experimental/riot-reader/src/test/java/org/apache/jena/riot/fm2/TS_IO2.java
URL: http://svn.apache.org/viewvc/jena/Experimental/riot-reader/src/test/java/org/apache/jena/riot/fm2/TS_IO2.java?rev=1391901&r1=1374379&r2=1391901&view=diff
==============================================================================
--- jena/Experimental/riot-reader/src/test/java/org/apache/jena/riot/fm2/TS_IO2.java (original)
+++ jena/Experimental/riot-reader/src/test/java/org/apache/jena/riot/fm2/TS_IO2.java Sat Sep
29 22:07:11 2012
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-package riot_reader.fm2;
+package org.apache.jena.riot.fm2;
 
 
 import org.junit.runner.RunWith ;

Modified: jena/Experimental/riot-reader/src/test/java/org/apache/jena/riot/fm2/TestFileManager.java
URL: http://svn.apache.org/viewvc/jena/Experimental/riot-reader/src/test/java/org/apache/jena/riot/fm2/TestFileManager.java?rev=1391901&r1=1374379&r2=1391901&view=diff
==============================================================================
--- jena/Experimental/riot-reader/src/test/java/org/apache/jena/riot/fm2/TestFileManager.java
(original)
+++ jena/Experimental/riot-reader/src/test/java/org/apache/jena/riot/fm2/TestFileManager.java
Sat Sep 29 22:07:11 2012
@@ -16,15 +16,15 @@
  * limitations under the License.
  */
 
-package riot_reader.fm2;
+package org.apache.jena.riot.fm2;
 
 import java.io.InputStream ;
 
 import junit.framework.TestCase ;
 import junit.framework.TestSuite ;
+import org.apache.jena.riot.fm2.TestLocationMapper ;
 import org.slf4j.Logger ;
 import org.slf4j.LoggerFactory ;
-import riot_reader.fm2.TestLocationMapper ;
 
 import com.hp.hpl.jena.rdf.model.Model ;
 import com.hp.hpl.jena.shared.NotFoundException ;

Modified: jena/Experimental/riot-reader/src/test/java/org/apache/jena/riot/fm2/TestLocationMapper.java
URL: http://svn.apache.org/viewvc/jena/Experimental/riot-reader/src/test/java/org/apache/jena/riot/fm2/TestLocationMapper.java?rev=1391901&r1=1374379&r2=1391901&view=diff
==============================================================================
--- jena/Experimental/riot-reader/src/test/java/org/apache/jena/riot/fm2/TestLocationMapper.java
(original)
+++ jena/Experimental/riot-reader/src/test/java/org/apache/jena/riot/fm2/TestLocationMapper.java
Sat Sep 29 22:07:11 2012
@@ -16,15 +16,15 @@
  * limitations under the License.
  */
 
-package riot_reader.fm2;
+package org.apache.jena.riot.fm2;
 
 import java.util.Iterator ;
 
 import junit.framework.TestCase ;
 import junit.framework.TestSuite ;
+import org.apache.jena.riot.fm2.TestFileManager ;
 import org.slf4j.Logger ;
 import org.slf4j.LoggerFactory ;
-import riot_reader.fm2.TestFileManager ;
 
 import com.hp.hpl.jena.rdf.model.Model ;
 import com.hp.hpl.jena.util.FileManager ;

Modified: jena/Experimental/riot-reader/src/test/java/org/apache/jena/riot/fm2/TestLocators.java
URL: http://svn.apache.org/viewvc/jena/Experimental/riot-reader/src/test/java/org/apache/jena/riot/fm2/TestLocators.java?rev=1391901&r1=1374379&r2=1391901&view=diff
==============================================================================
--- jena/Experimental/riot-reader/src/test/java/org/apache/jena/riot/fm2/TestLocators.java
(original)
+++ jena/Experimental/riot-reader/src/test/java/org/apache/jena/riot/fm2/TestLocators.java
Sat Sep 29 22:07:11 2012
@@ -16,14 +16,15 @@
  * limitations under the License.
  */
 
-package riot_reader.fm2;
+package org.apache.jena.riot.fm2;
 
 import java.io.File ;
 
+import org.apache.jena.riot.TypedInputStream2 ;
+import org.apache.jena.riot.stream.LocatorFile2 ;
 import org.junit.Test ;
 import org.openjena.atlas.junit.BaseTest ;
 import org.openjena.riot.WebContent ;
-import riot_reader.TypedInputStream2 ;
 
 public class TestLocators extends BaseTest 
 {

Modified: jena/Experimental/riot-reader/src/test/java/org/apache/jena/riot/fm2/TestStreamManager.java
URL: http://svn.apache.org/viewvc/jena/Experimental/riot-reader/src/test/java/org/apache/jena/riot/fm2/TestStreamManager.java?rev=1391901&r1=1374379&r2=1391901&view=diff
==============================================================================
--- jena/Experimental/riot-reader/src/test/java/org/apache/jena/riot/fm2/TestStreamManager.java
(original)
+++ jena/Experimental/riot-reader/src/test/java/org/apache/jena/riot/fm2/TestStreamManager.java
Sat Sep 29 22:07:11 2012
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-package riot_reader.fm2;
+package org.apache.jena.riot.fm2;
 
 import org.junit.Test ;
 import org.openjena.atlas.junit.BaseTest ;



Mime
View raw message