jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r1425325 [1/4] - in /jena/trunk/jena-arq: ./ src-examples/arq/examples/riot/ src-examples/arq/examples/update/ src/main/java/arq/ src/main/java/arq/cmdline/ src/main/java/com/hp/hpl/jena/query/ src/main/java/com/hp/hpl/jena/sparql/engine/bi...
Date Sat, 22 Dec 2012 17:52:29 GMT
Author: andy
Date: Sat Dec 22 17:52:26 2012
New Revision: 1425325

URL: http://svn.apache.org/viewvc?rev=1425325&view=rev
Log:
Migrate from org.openjena.riot to org.apache.jena.riot
Merge old RIOT classes with new web reader versions, calling from old to new.
Leave compatibility classes in org.openjena.riot, which are calls to
new code, and RIOT exceptions which are supercasses of the preferred
org.apache.jena.riot ones.

Added:
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/Lang.java
      - copied, changed from r1423018, jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/Lang2.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/RDFDataMgr.java
      - copied, changed from r1423683, jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/WebReader2.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/RIOT.java
      - copied, changed from r1422690, jena/trunk/jena-arq/src/main/java/org/openjena/riot/RIOT.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/RiotException.java
      - copied, changed from r1422690, jena/trunk/jena-arq/src/main/java/org/openjena/riot/RiotException.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/RiotNotFoundException.java
      - copied, changed from r1422690, jena/trunk/jena-arq/src/main/java/org/openjena/riot/RiotNotFoundException.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/RiotParseException.java
      - copied, changed from r1422690, jena/trunk/jena-arq/src/main/java/org/openjena/riot/RiotParseException.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/RiotReader.java
      - copied, changed from r1422690, jena/trunk/jena-arq/src/main/java/org/openjena/riot/RiotReader.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/RiotWriter.java
      - copied, changed from r1422690, jena/trunk/jena-arq/src/main/java/org/openjena/riot/RiotWriter.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/SysRIOT.java
      - copied, changed from r1422690, jena/trunk/jena-arq/src/main/java/org/openjena/riot/SysRIOT.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/WebContent.java
      - copied, changed from r1422690, jena/trunk/jena-arq/src/main/java/org/openjena/riot/WebContent.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/out/
      - copied from r1422690, jena/trunk/jena-arq/src/main/java/org/openjena/riot/out/
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/system/ErrorHandler.java
      - copied, changed from r1422690, jena/trunk/jena-arq/src/main/java/org/openjena/riot/ErrorHandler.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/system/ErrorHandlerFactory.java
      - copied, changed from r1422690, jena/trunk/jena-arq/src/main/java/org/openjena/riot/ErrorHandlerFactory.java
    jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/TestReadData.java
      - copied, changed from r1424610, jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/TestReadDataset.java
    jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/out/
      - copied from r1422691, jena/trunk/jena-arq/src/test/java/org/openjena/riot/out/
    jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/out/TS_Out.java
      - copied, changed from r1424610, jena/trunk/jena-arq/src/test/java/org/openjena/riot/out/TS_Out.java
Removed:
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/Lang2.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/WebReader2.java
    jena/trunk/jena-arq/src/main/java/org/openjena/riot/ErrorHandler.java
    jena/trunk/jena-arq/src/main/java/org/openjena/riot/ErrorHandlerFactory.java
    jena/trunk/jena-arq/src/main/java/org/openjena/riot/RiotLoader.java
    jena/trunk/jena-arq/src/main/java/org/openjena/riot/WebContent.java
    jena/trunk/jena-arq/src/main/java/org/openjena/riot/out/
    jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/TestReadDataset.java
    jena/trunk/jena-arq/src/test/java/org/openjena/riot/out/TS_Out.java
    jena/trunk/jena-arq/src/test/java/org/openjena/riot/out/TestNodeFmt.java
    jena/trunk/jena-arq/src/test/java/org/openjena/riot/out/TestNodeFmtLib.java
    jena/trunk/jena-arq/src/test/java/org/openjena/riot/out/TestOutput.java
    jena/trunk/jena-arq/src/test/java/org/openjena/riot/out/TestOutputNTriples.java
    jena/trunk/jena-arq/src/test/java/org/openjena/riot/out/TestOutputRDFJSON.java
Modified:
    jena/trunk/jena-arq/pom.xml
    jena/trunk/jena-arq/src-examples/arq/examples/riot/ExRIOT_1.java
    jena/trunk/jena-arq/src-examples/arq/examples/riot/ExRIOT_2.java
    jena/trunk/jena-arq/src-examples/arq/examples/riot/ExRIOT_3.java
    jena/trunk/jena-arq/src-examples/arq/examples/update/UpdateExecuteOperations.java
    jena/trunk/jena-arq/src-examples/arq/examples/update/UpdateProgrammatic.java
    jena/trunk/jena-arq/src-examples/arq/examples/update/UpdateReadFromFile.java
    jena/trunk/jena-arq/src/main/java/arq/cmdline/ModDatasetGeneral.java
    jena/trunk/jena-arq/src/main/java/arq/cmdline/ModLangParse.java
    jena/trunk/jena-arq/src/main/java/arq/update.java
    jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/query/ARQ.java
    jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/binding/BindingInputStream.java
    jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/binding/BindingOutputStream.java
    jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/http/HttpQuery.java
    jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/http/QueryEngineHTTP.java
    jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/http/Service.java
    jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UpdateProcessRemote.java
    jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/request/UpdateDataWriter.java
    jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/request/UpdateWriter.java
    jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/resultset/ResultsFormat.java
    jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/resultset/TSVInput.java
    jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/resultset/TSVInputIterator.java
    jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/resultset/TSVOutput.java
    jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/util/NodeFactory.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/atlas/logging/Log.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/IO_Jena.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/LangBuilder.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/ParserRegistry.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/RDFLanguages.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/RDFReaderFactoryRIOT.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/RDFReaderRIOT.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/ReaderRIOTBase.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/ReaderRIOTFactory.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/adapters/AdapterLib.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/checker/CheckerBlankNodes.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/checker/CheckerIRI.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/checker/CheckerLiterals.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/checker/CheckerVar.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/LabelToNode.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/LangEngine.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/LangNQuads.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/LangNTriples.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/LangRDFJSON.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/LangRDFXML.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/LangRIOT.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/LangTriG.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/LangTurtle.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/PrintingSink.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/out/EscapeStr.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/out/NQuadsWriter.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/out/NTriplesWriter.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/out/NodeFmtLib.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/out/NodeFormatter.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/out/NodeFormatterBase.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/out/NodeFormatterNT.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/out/NodeFormatterTTL.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/out/NodeToLabel.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/out/OutputLangUtils.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/out/OutputPolicy.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/out/OutputProfile.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/out/RDFJSONWriter.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/out/SinkEntityOutput.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/out/SinkQuadBracedOutput.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/out/SinkQuadOutput.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/out/SinkTripleOutput.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/out/TurtleValidate.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/stream/StreamManager.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/system/Checker.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/system/IRIResolver.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/system/JenaWriterNTriples2.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/system/JenaWriterRdfJson.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/system/ParserProfile.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/system/ParserProfileBase.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/system/ParserProfileChecker.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/system/RiotLib.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/system/SyntaxLabels.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/tokens/Token.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/tokens/TokenizerText.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/web/HttpOp.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/web/HttpResponseLib.java
    jena/trunk/jena-arq/src/main/java/org/openjena/riot/Lang.java
    jena/trunk/jena-arq/src/main/java/org/openjena/riot/RIOT.java
    jena/trunk/jena-arq/src/main/java/org/openjena/riot/RiotException.java
    jena/trunk/jena-arq/src/main/java/org/openjena/riot/RiotNotFoundException.java
    jena/trunk/jena-arq/src/main/java/org/openjena/riot/RiotParseException.java
    jena/trunk/jena-arq/src/main/java/org/openjena/riot/RiotParsePuller.java
    jena/trunk/jena-arq/src/main/java/org/openjena/riot/RiotQuadParsePuller.java
    jena/trunk/jena-arq/src/main/java/org/openjena/riot/RiotReader.java
    jena/trunk/jena-arq/src/main/java/org/openjena/riot/RiotTripleParsePuller.java
    jena/trunk/jena-arq/src/main/java/org/openjena/riot/RiotWriter.java
    jena/trunk/jena-arq/src/main/java/org/openjena/riot/SerializationFactoryFinder.java
    jena/trunk/jena-arq/src/main/java/org/openjena/riot/SysRIOT.java
    jena/trunk/jena-arq/src/main/java/org/openjena/riot/WebReader.java
    jena/trunk/jena-arq/src/main/java/riotcmd/CmdLangParse.java
    jena/trunk/jena-arq/src/main/java/riotcmd/infer.java
    jena/trunk/jena-arq/src/main/java/riotcmd/nquads.java
    jena/trunk/jena-arq/src/main/java/riotcmd/ntriples.java
    jena/trunk/jena-arq/src/main/java/riotcmd/riot.java
    jena/trunk/jena-arq/src/main/java/riotcmd/trig.java
    jena/trunk/jena-arq/src/main/java/riotcmd/turtle.java
    jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/engine/binding/TestBindingStreams.java
    jena/trunk/jena-arq/src/test/java/org/apache/jena/atlas/junit/BaseTest.java
    jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/ErrorHandlerTestLib.java
    jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/TC_Riot.java
    jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/TS_LangSuite.java
    jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/TS_ReaderRIOT.java
    jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/TestJenaReaderRIOT.java
    jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/TestLangRIOT.java
    jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/lang/TestIRI.java
    jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/lang/TestLang.java
    jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/lang/TestLangNQuads.java
    jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/lang/TestLangNTriples.java
    jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/lang/TestLangNTuples.java
    jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/lang/TestLangRdfJson.java
    jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/lang/TestLangTrig.java
    jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/lang/TestLangTurtle.java
    jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/lang/TestParserFactory.java
    jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/lang/TestTurtleTerms.java
    jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/langsuite/FactoryTestRiot.java
    jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/langsuite/LangTestCase.java
    jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/langsuite/UnitTestBadEval.java
    jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/langsuite/UnitTestBadSyntax.java
    jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/langsuite/UnitTestEval.java
    jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/langsuite/UnitTestSyntax.java
    jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/out/TestNodeFmt.java
    jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/out/TestNodeFmtLib.java
    jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/out/TestOutput.java
    jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/out/TestOutputNTriples.java
    jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/out/TestOutputRDFJSON.java
    jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/stream/TestLocators.java
    jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/stream/TestStreamManager.java
    jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/tokens/TestTokenizer.java
    jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/web/TestWebContent.java
    jena/trunk/jena-arq/src/test/java/riotcmd/rdflangtest.java

Modified: jena/trunk/jena-arq/pom.xml
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/pom.xml?rev=1425325&r1=1425324&r2=1425325&view=diff
==============================================================================
--- jena/trunk/jena-arq/pom.xml (original)
+++ jena/trunk/jena-arq/pom.xml Sat Dec 22 17:52:26 2012
@@ -205,7 +205,7 @@
             </group>
             <group>
               <title>RIOT</title>
-              <packages>org.openjena.riot</packages>
+              <packages>org.apache.jena.riot</packages>
             </group>
           </groups>
           <bottom>Licenced under the Apache License, Version 2.0</bottom>

Modified: jena/trunk/jena-arq/src-examples/arq/examples/riot/ExRIOT_1.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src-examples/arq/examples/riot/ExRIOT_1.java?rev=1425325&r1=1425324&r2=1425325&view=diff
==============================================================================
--- jena/trunk/jena-arq/src-examples/arq/examples/riot/ExRIOT_1.java (original)
+++ jena/trunk/jena-arq/src-examples/arq/examples/riot/ExRIOT_1.java Sat Dec 22 17:52:26 2012
@@ -18,7 +18,7 @@
 
 package arq.examples.riot;
 
-import org.openjena.riot.SysRIOT ;
+import org.apache.jena.riot.IO_Jena ;
 
 import com.hp.hpl.jena.rdf.model.Model ;
 import com.hp.hpl.jena.util.FileManager ;
@@ -32,7 +32,7 @@ public class ExRIOT_1
         // Ensure RIOT loaded.
         // This is only needed to be sure - touching any ARQ code will load RIOT.
         // This operation can be called several times.
-        SysRIOT.wireIntoJena() ;
+        IO_Jena.wireIntoJena() ;
 
         Model m = null ;
         
@@ -43,10 +43,10 @@ public class ExRIOT_1
         FileManager.get().readModel(m, "D2.ttl") ;
         
         // Or use Model.read
-        m.read("file:D3.nt", "TTL") ;
+        m.read("D3.nt", "TTL") ;
         
         // Go back to using the old Jena readers.  
-        SysRIOT.resetJenaReaders() ;
+        IO_Jena.resetJenaReaders() ;
         m = FileManager.get().loadModel("D.nt") ;
     }
 }

Modified: jena/trunk/jena-arq/src-examples/arq/examples/riot/ExRIOT_2.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src-examples/arq/examples/riot/ExRIOT_2.java?rev=1425325&r1=1425324&r2=1425325&view=diff
==============================================================================
--- jena/trunk/jena-arq/src-examples/arq/examples/riot/ExRIOT_2.java (original)
+++ jena/trunk/jena-arq/src-examples/arq/examples/riot/ExRIOT_2.java Sat Dec 22 17:52:26 2012
@@ -22,12 +22,16 @@ import java.io.FileInputStream ;
 import java.io.FileNotFoundException ;
 import java.io.InputStream ;
 
+import org.apache.jena.riot.RDFLanguages ;
+import org.apache.jena.riot.RIOT ;
+import org.apache.jena.riot.RiotReader ;
 import org.apache.jena.riot.lang.LangRIOT ;
 import org.apache.jena.riot.lang.RDFParserOutput ;
 import org.apache.jena.riot.lang.RDFParserOutputLib ;
+import org.apache.jena.riot.system.ErrorHandler ;
+import org.apache.jena.riot.system.ErrorHandlerFactory ;
 import org.apache.jena.riot.system.ParserProfile ;
 import org.apache.jena.riot.system.RiotLib ;
-import org.openjena.riot.* ;
 
 /** Example of using RIOT directly.
  */
@@ -36,7 +40,7 @@ public class ExRIOT_2
     public static void main(String...argv) throws FileNotFoundException
     {
         // Ensure RIOT loaded.
-        SysRIOT.wireIntoJena() ;
+        RIOT.init() ;
 
         RDFParserOutput noWhere = RDFParserOutputLib.sinkNull() ;
 
@@ -44,13 +48,13 @@ public class ExRIOT_2
         // RIOT controls the conversion from bytes to java chars.
         InputStream in = new FileInputStream("data.trig") ;
         
-        RiotReader.parseQuads(in, Lang.TRIG, "http://example/base", noWhere) ;
+        RiotReader.parseQuads(in, RDFLanguages.TriG, "http://example/base", noWhere) ;
         
         // --- Or create a parser and do the parsing as separate steps.
         String baseURI = "http://example/base" ;
             
         in = new FileInputStream("data.trig") ;
-        LangRIOT parser = RiotReader.createParserQuads(in, Lang.TRIG, "http://example/base", noWhere) ;
+        LangRIOT parser = RiotReader.createParserQuads(in, RDFLanguages.TriG, "http://example/base", noWhere) ;
         
         // Parser to first error or warning.
         ErrorHandler errHandler = ErrorHandlerFactory.errorHandlerStrict ;

Modified: jena/trunk/jena-arq/src-examples/arq/examples/riot/ExRIOT_3.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src-examples/arq/examples/riot/ExRIOT_3.java?rev=1425325&r1=1425324&r2=1425325&view=diff
==============================================================================
--- jena/trunk/jena-arq/src-examples/arq/examples/riot/ExRIOT_3.java (original)
+++ jena/trunk/jena-arq/src-examples/arq/examples/riot/ExRIOT_3.java Sat Dec 22 17:52:26 2012
@@ -18,15 +18,13 @@
 
 package arq.examples.riot;
 
-import org.openjena.riot.RiotLoader ;
-import org.openjena.riot.SysRIOT ;
+import org.apache.jena.riot.RDFDataMgr ;
+import org.apache.jena.riot.RIOT ;
 
 import com.hp.hpl.jena.query.Dataset ;
 import com.hp.hpl.jena.query.DatasetFactory ;
-import com.hp.hpl.jena.sparql.core.DatasetGraph ;
 
-/** Example of using RIOT : reading dada into datasets.
- */
+/** Example of using RIOT : reading dada into datasets. */
 public class ExRIOT_3
 {
     public static void main(String...argv)
@@ -34,19 +32,19 @@ public class ExRIOT_3
         // Ensure RIOT loaded.
         // This is only needed to be sure - touching any ARQ code will load RIOT.
         // This operation can be called several times.
-        SysRIOT.wireIntoJena() ;
-        DatasetGraph dsg = null ;
+        RIOT.init() ;
+        Dataset ds = null ;
         
         // Read a TriG file into quad storage in-memory.
-        dsg = RiotLoader.load("data.trig") ;
+        ds = RDFDataMgr.loadDataset("data.trig") ;
         
         // read some (more) data into a dataset graph.
-        RiotLoader.read("data2.trig", dsg) ;
+        RDFDataMgr.read(ds, "data2.trig") ;
         
         // Create a dataset,
-        Dataset ds = DatasetFactory.createMem() ;
+        Dataset ds2 = DatasetFactory.createMem() ;
         // read in data.
-        RiotLoader.read("data2.trig", ds.asDatasetGraph()) ;
+        RDFDataMgr.read(ds2, "data2.trig") ;
 
     }
 }

Modified: jena/trunk/jena-arq/src-examples/arq/examples/update/UpdateExecuteOperations.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src-examples/arq/examples/update/UpdateExecuteOperations.java?rev=1425325&r1=1425324&r2=1425325&view=diff
==============================================================================
--- jena/trunk/jena-arq/src-examples/arq/examples/update/UpdateExecuteOperations.java (original)
+++ jena/trunk/jena-arq/src-examples/arq/examples/update/UpdateExecuteOperations.java Sat Dec 22 17:52:26 2012
@@ -19,7 +19,7 @@
 package arq.examples.update;
 
 import org.apache.jena.atlas.lib.StrUtils ;
-import org.openjena.riot.RiotWriter ;
+import org.apache.jena.riot.RiotWriter ;
 
 import com.hp.hpl.jena.sparql.sse.SSE ;
 import com.hp.hpl.jena.update.GraphStore ;

Modified: jena/trunk/jena-arq/src-examples/arq/examples/update/UpdateProgrammatic.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src-examples/arq/examples/update/UpdateProgrammatic.java?rev=1425325&r1=1425324&r2=1425325&view=diff
==============================================================================
--- jena/trunk/jena-arq/src-examples/arq/examples/update/UpdateProgrammatic.java (original)
+++ jena/trunk/jena-arq/src-examples/arq/examples/update/UpdateProgrammatic.java Sat Dec 22 17:52:26 2012
@@ -18,7 +18,7 @@
 
 package arq.examples.update;
 
-import org.openjena.riot.RiotWriter ;
+import org.apache.jena.riot.RiotWriter ;
 
 import com.hp.hpl.jena.sparql.modify.request.Target ;
 import com.hp.hpl.jena.sparql.modify.request.UpdateCreate ;

Modified: jena/trunk/jena-arq/src-examples/arq/examples/update/UpdateReadFromFile.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src-examples/arq/examples/update/UpdateReadFromFile.java?rev=1425325&r1=1425324&r2=1425325&view=diff
==============================================================================
--- jena/trunk/jena-arq/src-examples/arq/examples/update/UpdateReadFromFile.java (original)
+++ jena/trunk/jena-arq/src-examples/arq/examples/update/UpdateReadFromFile.java Sat Dec 22 17:52:26 2012
@@ -18,7 +18,7 @@
 
 package arq.examples.update;
 
-import org.openjena.riot.RiotWriter ;
+import org.apache.jena.riot.RiotWriter ;
 
 import com.hp.hpl.jena.sparql.sse.SSE ;
 import com.hp.hpl.jena.update.GraphStore ;

Modified: jena/trunk/jena-arq/src/main/java/arq/cmdline/ModDatasetGeneral.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/arq/cmdline/ModDatasetGeneral.java?rev=1425325&r1=1425324&r2=1425325&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/arq/cmdline/ModDatasetGeneral.java (original)
+++ jena/trunk/jena-arq/src/main/java/arq/cmdline/ModDatasetGeneral.java Sat Dec 22 17:52:26 2012
@@ -21,9 +21,9 @@ package arq.cmdline;
 import java.util.ArrayList ;
 import java.util.List ;
 
-import org.openjena.riot.Lang ;
-import org.openjena.riot.RiotLoader ;
-
+import org.apache.jena.riot.Lang ;
+import org.apache.jena.riot.RDFLanguages ;
+import org.apache.jena.riot.RDFDataMgr ;
 import arq.cmd.CmdException ;
 
 import com.hp.hpl.jena.query.Dataset ;
@@ -113,20 +113,19 @@ public class ModDatasetGeneral extends M
                 
                 for ( String fn : graphURLs )
                 {
-                    if ( Lang.guess(fn).isQuads() )
+                    Lang lang = RDFLanguages.filenameToLang(fn) ; 
+                    
+                    if ( RDFLanguages.isQuads(lang) )
                         quads.add(fn) ;
                     else
                         triples.add(fn) ;
                 }
                 
                 for ( String fn : quads )
-                    RiotLoader.read(fn, ds.asDatasetGraph()) ;
-                
+                    RDFDataMgr.read(ds.asDatasetGraph(), fn) ;
                 dataset = 
                     DatasetUtils.addInGraphs(ds, triples, namedGraphURLs, fileManager, null) ;
             }
-                
-                
         } 
         catch (LabelExistsException ex)
         { throw new CmdException(ex.getMessage()) ; }

Modified: jena/trunk/jena-arq/src/main/java/arq/cmdline/ModLangParse.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/arq/cmdline/ModLangParse.java?rev=1425325&r1=1425324&r2=1425325&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/arq/cmdline/ModLangParse.java (original)
+++ jena/trunk/jena-arq/src/main/java/arq/cmdline/ModLangParse.java Sat Dec 22 17:52:26 2012
@@ -19,8 +19,8 @@
 package arq.cmdline;
 
 import org.apache.jena.iri.IRI ;
+import org.apache.jena.riot.RiotException ;
 import org.apache.jena.riot.system.IRIResolver ;
-import org.openjena.riot.RiotException ;
 import arq.cmd.CmdException ;
 
 import com.hp.hpl.jena.rdf.model.Model ;

Modified: jena/trunk/jena-arq/src/main/java/arq/update.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/arq/update.java?rev=1425325&r1=1425324&r2=1425325&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/arq/update.java (original)
+++ jena/trunk/jena-arq/src/main/java/arq/update.java Sat Dec 22 17:52:26 2012
@@ -21,7 +21,7 @@ package arq;
 import java.util.Iterator ;
 import java.util.List ;
 
-import org.openjena.riot.out.NQuadsWriter ;
+import org.apache.jena.riot.out.NQuadsWriter ;
 import arq.cmd.CmdException ;
 import arq.cmdline.ArgDecl ;
 import arq.cmdline.CmdUpdate ;

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/query/ARQ.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/query/ARQ.java?rev=1425325&r1=1425324&r2=1425325&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/query/ARQ.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/query/ARQ.java Sat Dec 22 17:52:26 2012
@@ -18,7 +18,7 @@
 
 package com.hp.hpl.jena.query;
 
-import org.openjena.riot.RIOT ;
+import org.apache.jena.riot.RIOT ;
 import org.slf4j.Logger ;
 import org.slf4j.LoggerFactory ;
 

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/binding/BindingInputStream.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/binding/BindingInputStream.java?rev=1425325&r1=1425324&r2=1425325&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/binding/BindingInputStream.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/binding/BindingInputStream.java Sat Dec 22 17:52:26 2012
@@ -28,9 +28,6 @@ import java.util.Collections ;
 import java.util.Iterator ;
 import java.util.List ;
 
-import org.openjena.riot.ErrorHandler ;
-import org.openjena.riot.ErrorHandlerFactory ;
-import org.openjena.riot.out.NodeFmtLib ;
 
 import com.hp.hpl.jena.graph.Node ;
 
@@ -39,6 +36,7 @@ import org.apache.jena.atlas.lib.Closeab
 import org.apache.jena.iri.IRI ;
 import org.apache.jena.riot.lang.LabelToNode ;
 import org.apache.jena.riot.lang.LangEngine ;
+import org.apache.jena.riot.out.NodeFmtLib ;
 import org.apache.jena.riot.system.* ;
 import org.apache.jena.riot.tokens.Token ;
 import org.apache.jena.riot.tokens.TokenType ;

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/binding/BindingOutputStream.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/binding/BindingOutputStream.java?rev=1425325&r1=1425324&r2=1425325&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/binding/BindingOutputStream.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/binding/BindingOutputStream.java Sat Dec 22 17:52:26 2012
@@ -22,9 +22,6 @@ import java.io.* ;
 import java.util.List ;
 import java.util.Map ;
 
-import org.openjena.riot.RiotException ;
-import org.openjena.riot.out.NodeFormatter ;
-import org.openjena.riot.out.NodeFormatterTTL ;
 
 import com.hp.hpl.jena.graph.Node ;
 
@@ -32,6 +29,9 @@ import org.apache.jena.atlas.io.IO ;
 import org.apache.jena.atlas.iterator.Iter ;
 import org.apache.jena.atlas.lib.Sink ;
 import org.apache.jena.iri.IRI ;
+import org.apache.jena.riot.RiotException ;
+import org.apache.jena.riot.out.NodeFormatter ;
+import org.apache.jena.riot.out.NodeFormatterTTL ;
 import org.apache.jena.riot.system.PrefixMap ;
 
 import com.hp.hpl.jena.sparql.core.Var ;

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/http/HttpQuery.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/http/HttpQuery.java?rev=1425325&r1=1425324&r2=1425325&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/http/HttpQuery.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/http/HttpQuery.java Sat Dec 22 17:52:26 2012
@@ -33,7 +33,7 @@ import java.util.zip.GZIPInputStream ;
 
 import org.apache.commons.codec.binary.Base64 ;
 import org.apache.jena.atlas.lib.StrUtils ;
-import org.openjena.riot.WebContent ;
+import org.apache.jena.riot.WebContent ;
 import org.slf4j.Logger ;
 import org.slf4j.LoggerFactory ;
 

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/http/QueryEngineHTTP.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/http/QueryEngineHTTP.java?rev=1425325&r1=1425324&r2=1425325&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/http/QueryEngineHTTP.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/http/QueryEngineHTTP.java Sat Dec 22 17:52:26 2012
@@ -27,28 +27,21 @@ import java.util.Map ;
 import java.util.concurrent.TimeUnit ;
 
 import org.apache.jena.atlas.io.IO ;
-import org.openjena.riot.Lang ;
-import org.openjena.riot.RiotReader ;
-import org.openjena.riot.WebContent ;
+import org.apache.jena.riot.Lang ;
+import org.apache.jena.riot.RDFLanguages ;
+import org.apache.jena.riot.RiotReader ;
+import org.apache.jena.riot.WebContent ;
 import org.slf4j.Logger ;
 import org.slf4j.LoggerFactory ;
 
 import com.hp.hpl.jena.graph.Triple ;
-import com.hp.hpl.jena.query.ARQ ;
-import com.hp.hpl.jena.query.Dataset ;
-import com.hp.hpl.jena.query.Query ;
-import com.hp.hpl.jena.query.QueryException ;
-import com.hp.hpl.jena.query.QueryExecException ;
-import com.hp.hpl.jena.query.QueryExecution ;
-import com.hp.hpl.jena.query.QuerySolution ;
-import com.hp.hpl.jena.query.ResultSet ;
-import com.hp.hpl.jena.query.ResultSetFactory ;
+import com.hp.hpl.jena.query.* ;
 import com.hp.hpl.jena.rdf.model.Model ;
 import com.hp.hpl.jena.sparql.ARQException ;
 import com.hp.hpl.jena.sparql.graph.GraphFactory ;
 import com.hp.hpl.jena.sparql.resultset.CSVInput ;
 import com.hp.hpl.jena.sparql.resultset.JSONInput ;
-import com.hp.hpl.jena.sparql.resultset.TSVInput;
+import com.hp.hpl.jena.sparql.resultset.TSVInput ;
 import com.hp.hpl.jena.sparql.resultset.XMLInput ;
 import com.hp.hpl.jena.sparql.util.Context ;
 import com.hp.hpl.jena.util.FileManager ;
@@ -281,8 +274,8 @@ public class QueryEngineHTTP implements 
         
         //Try to select language appropriately here based on the model content type
         Lang lang = WebContent.contentTypeToLang(actualContentType);
-        if (!lang.isTriples()) 
-            throw new QueryException("Endpoint returned Content Type: " + actualContentType + " which is not a valid RDF Graph syntax");
+        if (! RDFLanguages.isTriples(lang)) 
+           throw new QueryException("Endpoint returned Content Type: " + actualContentType + " which is not a valid RDF Graph syntax");
         model.read(in, null, lang.getName()) ;
         this.close() ; 
         return model ;
@@ -306,7 +299,8 @@ public class QueryEngineHTTP implements 
         
         //Try to select language appropriately here based on the model content type
         Lang lang = WebContent.contentTypeToLang(actualContentType);
-        if (!lang.isTriples()) throw new QueryException("Endpoint returned Content Type: " + actualContentType + " which is not a valid RDF Graph syntax");
+        if (! RDFLanguages.isTriples(lang)) 
+            throw new QueryException("Endpoint returned Content Type: " + actualContentType + " which is not a valid RDF Graph syntax");
         
         return RiotReader.createIteratorTriples(in, lang, null);
     }
@@ -328,7 +322,9 @@ public class QueryEngineHTTP implements 
             {
             	actualContentType = askContentType;
             }
-        	
+            Lang lang = WebContent.contentTypeToLang(actualContentType);
+            if (! RDFLanguages.isTriples(lang)) 
+
             //Parse the result appropriately depending on the selected content type
             if (actualContentType.equals(WebContent.contentTypeResultsXML))
                 return XMLInput.booleanFromXML(in) ;
@@ -528,11 +524,12 @@ public class QueryEngineHTTP implements 
      */
     public void setModelContentType(String contentType)
     {
-    	//Check that this is a valid setting
-    	Lang lang = WebContent.contentTypeToLang(contentType);
-    	if (lang == null) throw new IllegalArgumentException("Given Content Type '" + contentType + "' is not supported by RIOT");
-    	if (!lang.isTriples()) throw new IllegalArgumentException("Given Content Type '" + contentType + " is not a RDF Graph format");
-    	
-    	modelContentType = contentType;
+        // Check that this is a valid setting
+        Lang lang = WebContent.contentTypeToLang(contentType) ;
+        if (lang == null) 
+            throw new IllegalArgumentException("Given Content Type '" + contentType + "' is not supported by RIOT") ;
+        if (!RDFLanguages.isTriples(lang)) 
+            throw new IllegalArgumentException("Given Content Type '" + contentType + " is not a RDF Graph format") ;
+        modelContentType = contentType ;
     }
 }

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/http/Service.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/http/Service.java?rev=1425325&r1=1425324&r2=1425325&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/http/Service.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/http/Service.java Sat Dec 22 17:52:26 2012
@@ -22,7 +22,7 @@ import java.io.InputStream ;
 import java.util.Map ;
 
 import org.apache.jena.atlas.io.IO ;
-import org.openjena.riot.WebContent ;
+import org.apache.jena.riot.WebContent ;
 
 import com.hp.hpl.jena.query.Query ;
 import com.hp.hpl.jena.query.QueryExecException ;

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UpdateProcessRemote.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UpdateProcessRemote.java?rev=1425325&r1=1425324&r2=1425325&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UpdateProcessRemote.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UpdateProcessRemote.java Sat Dec 22 17:52:26 2012
@@ -18,8 +18,8 @@
 
 package com.hp.hpl.jena.sparql.modify;
 
+import org.apache.jena.riot.WebContent ;
 import org.apache.jena.riot.web.HttpOp ;
-import org.openjena.riot.WebContent ;
 
 import com.hp.hpl.jena.query.QuerySolution ;
 import com.hp.hpl.jena.sparql.ARQException ;

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/request/UpdateDataWriter.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/request/UpdateDataWriter.java?rev=1425325&r1=1425324&r2=1425325&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/request/UpdateDataWriter.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/request/UpdateDataWriter.java Sat Dec 22 17:52:26 2012
@@ -19,7 +19,7 @@
 package com.hp.hpl.jena.sparql.modify.request;
 
 import org.apache.jena.atlas.io.IndentedWriter ;
-import org.openjena.riot.out.SinkQuadBracedOutput;
+import org.apache.jena.riot.out.SinkQuadBracedOutput ;
 
 import com.hp.hpl.jena.sparql.serializer.SerializationContext;
 

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/request/UpdateWriter.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/request/UpdateWriter.java?rev=1425325&r1=1425324&r2=1425325&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/request/UpdateWriter.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/request/UpdateWriter.java Sat Dec 22 17:52:26 2012
@@ -24,7 +24,7 @@ import java.util.List;
 import org.apache.jena.atlas.io.IndentedWriter ;
 import org.apache.jena.atlas.iterator.Iter ;
 import org.apache.jena.atlas.lib.Closeable ;
-import org.openjena.riot.out.SinkQuadBracedOutput;
+import org.apache.jena.riot.out.SinkQuadBracedOutput ;
 
 import com.hp.hpl.jena.graph.Node;
 import com.hp.hpl.jena.graph.Triple;

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/resultset/ResultsFormat.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/resultset/ResultsFormat.java?rev=1425325&r1=1425324&r2=1425325&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/resultset/ResultsFormat.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/resultset/ResultsFormat.java Sat Dec 22 17:52:26 2012
@@ -18,7 +18,7 @@
 
 package com.hp.hpl.jena.sparql.resultset;
 
-import static org.openjena.riot.WebContent.* ;
+import static org.apache.jena.riot.WebContent.* ;
 
 import com.hp.hpl.jena.sparql.util.Symbol ;
 import com.hp.hpl.jena.sparql.util.TranslationTable ;

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/resultset/TSVInput.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/resultset/TSVInput.java?rev=1425325&r1=1425324&r2=1425325&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/resultset/TSVInput.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/resultset/TSVInput.java Sat Dec 22 17:52:26 2012
@@ -26,7 +26,7 @@ import java.util.List ;
 import java.util.regex.Pattern ;
 
 import org.apache.jena.atlas.io.IO ;
-import org.openjena.riot.RiotException ;
+import org.apache.jena.riot.RiotException ;
 
 import com.hp.hpl.jena.graph.Node ;
 import com.hp.hpl.jena.query.ResultSet ;

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/resultset/TSVInputIterator.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/resultset/TSVInputIterator.java?rev=1425325&r1=1425324&r2=1425325&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/resultset/TSVInputIterator.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/resultset/TSVInputIterator.java Sat Dec 22 17:52:26 2012
@@ -27,7 +27,7 @@ import java.util.NoSuchElementException 
 
 import org.apache.jena.atlas.io.IO ;
 import org.apache.jena.atlas.io.IndentedWriter ;
-import org.openjena.riot.RiotException ;
+import org.apache.jena.riot.RiotException ;
 
 import com.hp.hpl.jena.graph.Node ;
 import com.hp.hpl.jena.sparql.core.Var ;

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/resultset/TSVOutput.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/resultset/TSVOutput.java?rev=1425325&r1=1425324&r2=1425325&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/resultset/TSVOutput.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/resultset/TSVOutput.java Sat Dec 22 17:52:26 2012
@@ -26,7 +26,8 @@ import java.util.ArrayList ;
 import java.util.List ;
 
 import org.apache.jena.atlas.lib.StrUtils ;
-import org.openjena.riot.out.NodeFormatterTTL;
+import org.apache.jena.riot.out.NodeFormatterTTL ;
+
 import com.hp.hpl.jena.graph.Node ;
 import com.hp.hpl.jena.query.ResultSet ;
 import com.hp.hpl.jena.sparql.ARQException ;

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/util/NodeFactory.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/util/NodeFactory.java?rev=1425325&r1=1425324&r2=1425325&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/util/NodeFactory.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/util/NodeFactory.java Sat Dec 22 17:52:26 2012
@@ -18,11 +18,11 @@
 
 package com.hp.hpl.jena.sparql.util;
 
+import org.apache.jena.riot.RiotException ;
 import org.apache.jena.riot.system.PrefixMap ;
 import org.apache.jena.riot.tokens.Token ;
 import org.apache.jena.riot.tokens.Tokenizer ;
 import org.apache.jena.riot.tokens.TokenizerFactory ;
-import org.openjena.riot.RiotException ;
 
 import com.hp.hpl.jena.datatypes.RDFDatatype ;
 import com.hp.hpl.jena.datatypes.TypeMapper ;

Modified: jena/trunk/jena-arq/src/main/java/org/apache/jena/atlas/logging/Log.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/org/apache/jena/atlas/logging/Log.java?rev=1425325&r1=1425324&r2=1425325&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/org/apache/jena/atlas/logging/Log.java (original)
+++ jena/trunk/jena-arq/src/main/java/org/apache/jena/atlas/logging/Log.java Sat Dec 22 17:52:26 2012
@@ -27,9 +27,9 @@ import java.util.Properties ;
 
 import org.apache.jena.atlas.AtlasException ;
 import org.apache.jena.atlas.lib.StrUtils ;
+import org.apache.jena.riot.SysRIOT ;
 import org.apache.log4j.PropertyConfigurator ;
 import org.apache.log4j.xml.DOMConfigurator ;
-import org.openjena.riot.SysRIOT ;
 import org.slf4j.Logger ;
 import org.slf4j.LoggerFactory ;
 

Modified: jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/IO_Jena.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/IO_Jena.java?rev=1425325&r1=1425324&r2=1425325&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/IO_Jena.java (original)
+++ jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/IO_Jena.java Sat Dec 22 17:52:26 2012
@@ -20,14 +20,8 @@ package org.apache.jena.riot;
 
 import org.apache.jena.atlas.web.ContentType ;
 import org.apache.jena.atlas.web.TypedInputStream ;
-import org.apache.jena.riot.WebReader2.RDFReaderRIOT_NT ;
-import org.apache.jena.riot.WebReader2.RDFReaderRIOT_RDFJSON ;
-import org.apache.jena.riot.WebReader2.RDFReaderRIOT_RDFXML ;
-import org.apache.jena.riot.WebReader2.RDFReaderRIOT_TTL ;
 import org.apache.jena.riot.stream.StreamManager ;
 import org.apache.jena.riot.system.JenaWriterRdfJson ;
-import org.openjena.riot.RiotNotFoundException ;
-import org.openjena.riot.WebContent ;
 import org.slf4j.Logger ;
 import org.slf4j.LoggerFactory ;
 
@@ -76,14 +70,15 @@ public class IO_Jena
       RDFWriterFImpl.setBaseWriterClassName("RDF/JSON", writerRdfJson) ;
     }
     
-//    // Yukky hack to integrate into current jena-core where the structure of model.read assumes
-//    // the language is determined before the reading process starts.
-//    
-//    static class RDFReaderRIOT_RDFXML extends RDFReaderRIOT   { public RDFReaderRIOT_RDFXML() { super("RDF/XML") ; } }
-//    static class RDFReaderRIOT_TTL extends RDFReaderRIOT      { public RDFReaderRIOT_TTL() { super("TTL") ; } }
-//    static class RDFReaderRIOT_NT extends RDFReaderRIOT       { public RDFReaderRIOT_NT() { super("N-TRIPLE") ; } }
-//    static class RDFReaderRIOT_RDFJSON extends RDFReaderRIOT  { public RDFReaderRIOT_RDFJSON() { super("RDF/JSON") ; } }
-
+    // Yukky hack to integrate into current jena-core where the structure of model.read assumes
+    // the language is determined before the reading process starts.
+    // Temporary - eventually, replace all model.read calls with the correct call to RIOT
+    // and then the common RDFReaderRIOT can be used.
+    public static class RDFReaderRIOT_RDFXML extends RDFReaderRIOT   { public RDFReaderRIOT_RDFXML() { super("RDF/XML") ; } }
+    public static class RDFReaderRIOT_TTL extends RDFReaderRIOT      { public RDFReaderRIOT_TTL() { super("TTL") ; } }
+    public static class RDFReaderRIOT_NT extends RDFReaderRIOT       { public RDFReaderRIOT_NT() { super("N-TRIPLE") ; } }
+    public static class RDFReaderRIOT_RDFJSON extends RDFReaderRIOT  { public RDFReaderRIOT_RDFJSON() { super("RDF/JSON") ; } }
+    
     static String jenaNTriplesReader = "com.hp.hpl.jena.rdf.model.impl.NTripleReader" ; 
     static String jenaTurtleReader = "com.hp.hpl.jena.n3.turtle.TurtleReader" ; 
     static String jenaN3Reader = jenaTurtleReader ; 
@@ -145,7 +140,7 @@ public class IO_Jena
         return in ;
     }
     
-    protected static ContentType determineCT(String target, String ctStr, Lang2 hintLang)
+    protected static ContentType determineCT(String target, String ctStr, Lang hintLang)
     {
         if ( ctStr != null )
             ctStr = WebContent.contentTypeCanonical(ctStr) ;

Copied: jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/Lang.java (from r1423018, jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/Lang2.java)
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/Lang.java?p2=jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/Lang.java&p1=jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/Lang2.java&r1=1423018&r2=1425325&rev=1425325&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/Lang2.java (original)
+++ jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/Lang.java Sat Dec 22 17:52:26 2012
@@ -28,17 +28,37 @@ import org.apache.jena.atlas.web.Content
  *  A language has a name, some alternative names,
  *  a content type,  some alternative content types,
  *  and a list of associated file extensions.
- *  Names content types and file extensions must be unique to one language. 
+ *  Names, content types and file extensions must be unique to one language. 
  */
-public class Lang2 
+public class Lang 
 {
-    private final String label ;
-    private final ContentType contentType ;     // Primary content type.
+    //  public static final Lang RDFXML = RDFLanguages.RDFXML ; 
+    //  public static final Lang NTRIPLES = RDFLanguages.NTriples ; 
+    //  public static final Lang N3 = RDFLanguages.N3 ; 
+    //  public static final Lang TURTLE = RDFLanguages.Turtle ; 
+    //  public static final Lang RDFJSON = RDFLanguages.RDFJSON ; 
+    //  public static final Lang NQUADS = RDFLanguages.NQuads ; 
+    //  public static final Lang TRIG = RDFLanguages.TriG ; 
+
+    // To avoid an initialization circularity, these are set by RDFLaguages.
+    // Using the RDFLanguages constants is preferred style.
+
+    public static Lang RDFXML ; 
+    public static Lang NTRIPLES ; 
+    public static Lang N3 ; 
+    public static Lang TURTLE ; 
+    public static Lang RDFJSON ; 
+    public static Lang NQUADS ; 
+    public static Lang TRIG ; 
+
+    private final String label ;                    // Primary name
+    private final ContentType contentType ;         // Primary content type.
     private final List<String> altLabels ;
     private final List<String> altContentTypes ;
     private final List<String> fileExtensions ;
 
-    protected Lang2(String langlabel, String mainContentType, List<String> altLangLabels, List<String> otherContentTypes, List<String> fileExt)
+    // NOT public.  This is to force use of the RDFLanguages which makes languges symbols and so == works
+    protected Lang(String langlabel, String mainContentType, List<String> altLangLabels, List<String> otherContentTypes, List<String> fileExt)
     {
         if ( langlabel == null )
             throw new IllegalArgumentException("Null not allowed for language name") ;
@@ -56,6 +76,8 @@ public class Lang2 
         altContentTypes = Collections.unmodifiableList(_altContentTypes) ;
         
         List<String> _altLabels = copy(altLangLabels) ;
+        if ( ! _altLabels.contains(label) )
+            _altLabels.add(label) ;
         altLabels = Collections.unmodifiableList(_altLabels) ;
         
         List<String> _fileExtensions = copy(fileExt) ;
@@ -77,10 +99,10 @@ public class Lang2 
     {
         if ( this == other ) return true ;
         if ( other == null ) return false ;
-        if ( ! ( other instanceof Lang2 ) )
+        if ( ! ( other instanceof Lang ) )
             return false ;
 
-        Lang2 otherLang = (Lang2)other ;
+        Lang otherLang = (Lang)other ;
         // Just label should be enough.
         return 
             this.label == otherLang.label &&
@@ -112,5 +134,51 @@ public class Lang2 
 
         return x ;
     }
+    
+    // ----
+    /** Translate a name into a Lang
+     * Throws RiotException if the name is not recognized.
+     * @deprecated Use {@link RDFLanguages#nameToLang(String)}
+     */
+    @Deprecated 
+    public static Lang get(String name)
+    {
+        Lang lang =  RDFLanguages.nameToLang(name) ;
+        if ( lang == null )
+            throw new RiotException("No such language: "+name) ;
+        return lang ;
+    }
+    
+    /** Translate a name into a Lang, return the default if no match found.
+     * @deprecated Use {@link RDFLanguages#nameToLang(String)}
+     */
+    @Deprecated 
+    public static Lang get(String name, Lang dftLang)
+    {
+        Lang lang =  RDFLanguages.nameToLang(name) ;
+        if ( lang == null )
+            return dftLang ;
+        return lang ;
+    }
+
+    /** Guess the language, based on filename, or URL, extenstion.
+     * Returns default if there isn't a guess available
+     * @deprecated Use {@link RDFLanguages#filenameToLang(String,Lang)}
+     */
+    @Deprecated 
+    public static Lang guess(String resourceIRI, Lang dftLang)
+    {
+        return RDFLanguages.filenameToLang(resourceIRI, dftLang) ;
+    }
+    
+    /** Guess the language, based on filename, or URL, extenstion.
+     * Returns null if there isn't a guess available
+     * @deprecated Use {@link RDFLanguages#filenameToLang(String)}
+     */
+    @Deprecated
+    public static Lang guess(String resourceIRI)
+    {
+        return RDFLanguages.filenameToLang(resourceIRI) ;
+    }
 }
 

Modified: jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/LangBuilder.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/LangBuilder.java?rev=1425325&r1=1425324&r2=1425325&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/LangBuilder.java (original)
+++ jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/LangBuilder.java Sat Dec 22 17:52:26 2012
@@ -21,7 +21,7 @@ package org.apache.jena.riot;
 import java.util.ArrayList ;
 import java.util.List ;
 
-import org.openjena.riot.RiotException ;
+
 
 /** Builder for RDF langauges (Syntaxes).
  * 
@@ -91,14 +91,14 @@ public class LangBuilder {
                 dst.add(str) ;
     }
     
-    /** Construct the {@link Lang2} */
-    public Lang2 build()
+    /** Construct the {@link Lang} */
+    public Lang build()
     {
         if ( lang == null )
             error("No language name") ;
         if ( officialContentType == null )
             error("No content types") ;
-        return new Lang2(lang, officialContentType, altNames, contentTypes, fileExtensions) ;
+        return new Lang(lang, officialContentType, altNames, contentTypes, fileExtensions) ;
     }
 
     private void error(String message)

Modified: jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/ParserRegistry.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/ParserRegistry.java?rev=1425325&r1=1425324&r2=1425325&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/ParserRegistry.java (original)
+++ jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/ParserRegistry.java Sat Dec 22 17:52:26 2012
@@ -32,8 +32,6 @@ import org.apache.jena.atlas.lib.DS ;
 import org.apache.jena.atlas.web.ContentType ;
 import org.apache.jena.riot.lang.LangRIOT ;
 import org.apache.jena.riot.lang.RDFParserOutput ;
-import org.openjena.riot.Lang ;
-import org.openjena.riot.RiotReader ;
 
 import com.hp.hpl.jena.sparql.util.Context ;
 //import org.apache.jena.atlas.lib.Sink ;
@@ -47,12 +45,12 @@ import com.hp.hpl.jena.sparql.util.Conte
 public class ParserRegistry
 {
     /** Map Jena I/O names to language */
-    private static Map<String, Lang2> mapJenaNameToLang                 = DS.map() ;
+    private static Map<String, Lang> mapJenaNameToLang                 = DS.map() ;
 
     /** map language to a triples parser */ 
-    private static Map<Lang2, ReaderRIOTFactory> langToTriples  = DS.map() ;
+    private static Map<Lang, ReaderRIOTFactory> langToTriples  = DS.map() ;
     /** map language to a quads parser */ 
-    private static Map<Lang2, ReaderRIOTFactory> langToQuads      = DS.map() ;
+    private static Map<Lang, ReaderRIOTFactory> langToQuads      = DS.map() ;
 
     /** Triples : Generic parser factory. */
     private static ReaderRIOTFactory pfTriples = new ReaderRIOTFactoryTriple() ;
@@ -108,29 +106,29 @@ public class ParserRegistry
     }
 
     /** Register a Jena IO name */
-    private static void registerShortNameForLang(String name, Lang2 lang)
+    private static void registerShortNameForLang(String name, Lang lang)
     {
         mapJenaNameToLang.put(RDFLanguages.canonicalKey(name), lang) ;
     }
 
     /** Register a language that parses to produces triples.
-     * To create a {@link Lang2} object use {@link LangBuilder}.
+     * To create a {@link Lang} object use {@link LangBuilder}.
      */
-    public static void registerLangTriples(Lang2 lang, ReaderRIOTFactory factory)
+    public static void registerLangTriples(Lang lang, ReaderRIOTFactory factory)
     {
         RDFLanguages.register(lang) ;
         langToTriples.put(lang, factory) ;
     }
         
     /** Register a language that parses to produces quads */
-    public static void registerLangQuads(Lang2 lang, ReaderRIOTFactory factory)
+    public static void registerLangQuads(Lang lang, ReaderRIOTFactory factory)
     {
         RDFLanguages.register(lang) ;
         langToQuads.put(lang, factory) ;
     }
     
     /** Remove registration */
-    public static void removeRegistration(Lang2 lang)
+    public static void removeRegistration(Lang lang)
     {
         RDFLanguages.unregister(lang) ;
         langToTriples.remove(lang) ;
@@ -138,36 +136,35 @@ public class ParserRegistry
     }
     
     /** Return the triples parser factory for the language, or null if not registered */
-    public static ReaderRIOTFactory getFactoryTriples(Lang2 language)
+    public static ReaderRIOTFactory getFactoryTriples(Lang language)
     {
         return langToTriples.get(language) ;
     }
     
     /** Return the quads parser factory for the language, or null if not registered */
-    public static ReaderRIOTFactory getFactoryQuads(Lang2 language)
+    public static ReaderRIOTFactory getFactoryQuads(Lang language)
     {
         return langToQuads.get(language) ;
     }
     
     /** return true if the language is registered with the triples parser factories */
-    public static boolean isTriples(Lang2 lang) { return langToTriples.containsKey(lang) ; }
+    public static boolean isTriples(Lang lang) { return langToTriples.containsKey(lang) ; }
     
     /** return true if the language is registered with the quads parser factories */
-    public static boolean isQuads(Lang2 lang)   { return langToQuads.containsKey(lang) ; }
+    public static boolean isQuads(Lang lang)   { return langToQuads.containsKey(lang) ; }
 
     // Parser factories
     
     private static class ReaderRIOTFactoryTriple implements ReaderRIOTFactory
     {
         @Override
-        public ReaderRIOT create(final Lang2 language)
+        public ReaderRIOT create(final Lang lang)
         {
             return new ReaderRIOT() {
                 // Needs sorting out
                 @Override
                 public void read(InputStream in, String baseURI, ContentType ct, RDFParserOutput output, Context context)
                 {
-                    Lang lang = RDFLanguages.convert(language) ;
                     LangRIOT parser = RiotReader.createParserTriples(in, lang, baseURI, output) ;
                     parser.parse() ;
                 }
@@ -177,14 +174,13 @@ public class ParserRegistry
 
     private static class ReaderRIOTFactoryQuads implements ReaderRIOTFactory {
         @Override
-        public ReaderRIOT create(final Lang2 language)
+        public ReaderRIOT create(final Lang lang)
         {
             return new ReaderRIOT() {
                 // Needs sorting out
                 @Override
                 public void read(InputStream in, String baseURI, ContentType ct, RDFParserOutput output, Context context)
                 {
-                    Lang lang = RDFLanguages.convert(language) ;
                     LangRIOT parser = RiotReader.createParserQuads(in, lang, baseURI, output) ;
                     parser.parse() ;
                 }



Mime
View raw message