jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r1426285 - in /jena/trunk/jena-arq: src-examples/arq/examples/riot/ src/main/java/org/apache/jena/riot/ src/main/java/org/apache/jena/riot/lang/ src/main/java/org/apache/jena/riot/system/ src/main/java/org/apache/jena/riot/web/ src/main/jav...
Date Thu, 27 Dec 2012 18:33:44 GMT
Author: andy
Date: Thu Dec 27 18:33:43 2012
New Revision: 1426285

URL: http://svn.apache.org/viewvc?rev=1426285&view=rev
Log:
Rename RDFParserOutput as SinkRDF.

Added:
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/PrintingSinkRDF.java
      - copied, changed from r1425325, 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/system/SinkRDF.java
      - copied, changed from r1422690, jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/RDFParserOutput.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/system/SinkRDFBase.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/system/SinkRDFWrapper.java
Removed:
    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/lang/RDFParserOutput.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/system/SinkExtendTriplesToQuads.java
Modified:
    jena/trunk/jena-arq/src-examples/arq/examples/riot/ExRIOT_2.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/RDFDataMgr.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/ReaderRIOT.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/RiotReader.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/LangBase.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/LangNTuple.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/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/LangTurtleBase.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/RDFParserOutputCounting.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/RDFParserOutputLib.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/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/riotcmd/CmdLangParse.java
    jena/trunk/jena-arq/src/main/java/riotcmd/infer.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/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/out/TestOutputRDFJSON.java

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=1426285&r1=1426284&r2=1426285&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 Thu Dec 27 18:33:43 2012
@@ -26,12 +26,8 @@ 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.apache.jena.riot.system.* ;
 
 /** Example of using RIOT directly.
  * 
@@ -50,7 +46,7 @@ public class ExRIOT_2
         RIOT.init() ;
 
         // ---- Parse to a Sink.
-        RDFParserOutput noWhere = RDFParserOutputLib.sinkNull() ;
+        SinkRDF noWhere = RDFParserOutputLib.sinkNull() ;
 
         // RIOT controls the conversion from bytes to java chars.
         InputStream in = new FileInputStream("data.trig") ;

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=1426285&r1=1426284&r2=1426285&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 Thu Dec 27 18:33:43 2012
@@ -32,7 +32,7 @@ import java.util.Set ;
 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.apache.jena.riot.system.SinkRDF ;
 
 import com.hp.hpl.jena.sparql.util.Context ;
 //import org.apache.jena.atlas.lib.Sink ;
@@ -168,7 +168,7 @@ public class ParserRegistry
         {
             return new ReaderRIOT() {
                 @Override
-                public void read(InputStream in, String baseURI, ContentType ct, RDFParserOutput output, Context context)
+                public void read(InputStream in, String baseURI, ContentType ct, SinkRDF output, Context context)
                 {
                     LangRIOT parser = RiotReader.createParser(in, lang, baseURI, output) ;
                     parser.parse() ;

Modified: jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/RDFDataMgr.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/RDFDataMgr.java?rev=1426285&r1=1426284&r2=1426285&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/RDFDataMgr.java (original)
+++ jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/RDFDataMgr.java Thu Dec 27 18:33:43 2012
@@ -29,10 +29,10 @@ import org.apache.jena.atlas.web.Content
 import org.apache.jena.atlas.web.TypedInputStream ;
 import org.apache.jena.riot.lang.LangRDFXML ;
 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.stream.StreamManager ;
 import org.apache.jena.riot.system.ErrorHandlerFactory ;
+import org.apache.jena.riot.system.SinkRDF ;
 import org.apache.jena.riot.tokens.Tokenizer ;
 import org.apache.jena.riot.tokens.TokenizerFactory ;
 import org.slf4j.Logger ;
@@ -198,7 +198,7 @@ public class RDFDataMgr
      */
     public static void read(Graph graph, String uri, String base, Lang hintLang, Context context)
     {
-        RDFParserOutput dest = RDFParserOutputLib.graph(graph) ;
+        SinkRDF dest = RDFParserOutputLib.graph(graph) ;
         read(dest, uri, base, hintLang, context) ;
     }
 
@@ -245,7 +245,7 @@ public class RDFDataMgr
      */
     public static void read(Graph graph, InputStream in, String base, Lang lang)
     {
-        RDFParserOutput dest = RDFParserOutputLib.graph(graph) ;
+        SinkRDF dest = RDFParserOutputLib.graph(graph) ;
         process(dest, base, new TypedInputStream(in), lang, null) ;
     }
 
@@ -276,7 +276,7 @@ public class RDFDataMgr
     @Deprecated
     public static void read(Graph graph, Reader in, String base, Lang lang)
     {
-        RDFParserOutput dest = RDFParserOutputLib.graph(graph) ;
+        SinkRDF dest = RDFParserOutputLib.graph(graph) ;
         processTriples(dest, base, in, lang, null) ;
     }
 
@@ -289,7 +289,7 @@ public class RDFDataMgr
     public static void read(Model model, StringReader in, String base, Lang lang)
     {
         Graph g = model.getGraph() ;
-        RDFParserOutput dest = RDFParserOutputLib.graph(g) ;
+        SinkRDF dest = RDFParserOutputLib.graph(g) ;
         processTriples(dest, base, in, lang, null) ;
     }
 
@@ -301,7 +301,7 @@ public class RDFDataMgr
      */
     public static void read(Graph graph, StringReader in, String base, Lang lang)
     {
-        RDFParserOutput dest = RDFParserOutputLib.graph(graph) ;
+        SinkRDF dest = RDFParserOutputLib.graph(graph) ;
         processTriples(dest, base, in, lang, null) ;
     }
     
@@ -497,7 +497,7 @@ public class RDFDataMgr
 
     public static void read(DatasetGraph dataset, String uri, String base, Lang hintLang, Context context)
     {
-        RDFParserOutput sink = RDFParserOutputLib.dataset(dataset) ;
+        SinkRDF sink = RDFParserOutputLib.dataset(dataset) ;
         read(sink, uri, base, hintLang, context) ;
     }
 
@@ -540,7 +540,7 @@ public class RDFDataMgr
      */
     public static void read(DatasetGraph dataset, InputStream in, String base, Lang lang)
     {
-        RDFParserOutput dest = RDFParserOutputLib.dataset(dataset) ;
+        SinkRDF dest = RDFParserOutputLib.dataset(dataset) ;
         process(dest, base, new TypedInputStream(in), lang, null) ;
     }
     
@@ -571,7 +571,7 @@ public class RDFDataMgr
     @Deprecated
     public static void read(DatasetGraph dataset, Reader in, String base, Lang lang)
     {
-        RDFParserOutput dest = RDFParserOutputLib.dataset(dataset) ;
+        SinkRDF dest = RDFParserOutputLib.dataset(dataset) ;
         process(dest, base, in, lang, null) ;
     }
 
@@ -598,7 +598,7 @@ public class RDFDataMgr
      */
     public static void read(DatasetGraph dataset, StringReader in, String base, Lang lang)
     {
-        RDFParserOutput dest = RDFParserOutputLib.dataset(dataset) ;
+        SinkRDF dest = RDFParserOutputLib.dataset(dataset) ;
         process(dest, base, in, lang, null) ;
     }
 
@@ -608,7 +608,7 @@ public class RDFDataMgr
      * @param hintLang  Hint for the syntax
      * @param context   Content object to control reading process.
      */
-    public static void read(RDFParserOutput sink, String uri, Lang hintLang, Context context)
+    public static void read(SinkRDF sink, String uri, Lang hintLang, Context context)
     {
         read(sink, uri, uri, hintLang, context) ;
     }
@@ -620,7 +620,7 @@ public class RDFDataMgr
      * @param hintLang  Hint for the syntax
      * @param context   Content object to control reading process.
      */
-    public static void read(RDFParserOutput sink, String uri, String base, Lang hintLang, Context context)
+    public static void read(SinkRDF sink, String uri, String base, Lang hintLang, Context context)
     {
         TypedInputStream in = open(uri, context) ;
         if ( in == null )
@@ -679,7 +679,7 @@ public class RDFDataMgr
     // We could have had two step design - ReaderFactory-ReaderInstance
     // no - put the bruden on complicated readers, not everyone. 
     
-    private static void process(RDFParserOutput destination, String baseUri, TypedInputStream in, Lang hintLang, Context context)
+    private static void process(SinkRDF destination, String baseUri, TypedInputStream in, Lang hintLang, Context context)
     {
         ContentType ct = determineCT(baseUri, in.getContentType(), hintLang ) ;
         if ( ct == null )
@@ -704,7 +704,7 @@ public class RDFDataMgr
     
     // java.io.Readers are NOT preferred.
     @SuppressWarnings("deprecation")
-    private static void processTriples(RDFParserOutput output, String base, Reader in, Lang lang, Context context)
+    private static void processTriples(SinkRDF output, String base, Reader in, Lang lang, Context context)
     {
         // Not as good as from an InputStream - RDF/XML not supported 
         //****
@@ -729,7 +729,7 @@ public class RDFDataMgr
     }
     
     // java.io.Readers are NOT preferred.
-    private static void process(RDFParserOutput dest, String base, Reader in, Lang hintLang, Context context)
+    private static void process(SinkRDF dest, String base, Reader in, Lang hintLang, Context context)
     {
         Tokenizer tokenizer = TokenizerFactory.makeTokenizer(in) ;
         LangRIOT parser = RiotReader.createParser(tokenizer, hintLang, base, dest) ;

Modified: jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/ReaderRIOT.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/ReaderRIOT.java?rev=1426285&r1=1426284&r2=1426285&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/ReaderRIOT.java (original)
+++ jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/ReaderRIOT.java Thu Dec 27 18:33:43 2012
@@ -21,7 +21,7 @@ package org.apache.jena.riot;
 import java.io.InputStream ;
 
 import org.apache.jena.atlas.web.ContentType ;
-import org.apache.jena.riot.lang.RDFParserOutput ;
+import org.apache.jena.riot.system.SinkRDF ;
 
 import com.hp.hpl.jena.sparql.util.Context ;
 
@@ -32,5 +32,5 @@ import com.hp.hpl.jena.sparql.util.Conte
 
 public interface ReaderRIOT
 {
-    public void read(InputStream in, String baseURI, ContentType ct, RDFParserOutput output, Context context) ;
+    public void read(InputStream in, String baseURI, ContentType ct, SinkRDF output, Context context) ;
 }

Modified: jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/ReaderRIOTBase.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/ReaderRIOTBase.java?rev=1426285&r1=1426284&r2=1426285&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/ReaderRIOTBase.java (original)
+++ jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/ReaderRIOTBase.java Thu Dec 27 18:33:43 2012
@@ -21,19 +21,19 @@ package org.apache.jena.riot;
 import java.io.InputStream ;
 
 import org.apache.jena.atlas.web.ContentType ;
-import org.apache.jena.riot.lang.RDFParserOutput ;
+import org.apache.jena.riot.system.SinkRDF ;
 
 import com.hp.hpl.jena.sparql.util.Context ;
 
 public abstract class ReaderRIOTBase implements ReaderRIOT
 {
     @Override
-    public void read(InputStream in, String baseURI, ContentType ct, RDFParserOutput output, Context context)
+    public void read(InputStream in, String baseURI, ContentType ct, SinkRDF output, Context context)
     {
         Lang lang = RDFLanguages.contentTypeToLang(ct) ;
         read(in, baseURI,lang, output, context) ;
     }
 
-    public abstract void read(InputStream in, String baseURI, Lang lang, RDFParserOutput output, Context context) ;
+    public abstract void read(InputStream in, String baseURI, Lang lang, SinkRDF output, Context context) ;
 }
 

Modified: jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/RiotReader.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/RiotReader.java?rev=1426285&r1=1426284&r2=1426285&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/RiotReader.java (original)
+++ jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/RiotReader.java Thu Dec 27 18:33:43 2012
@@ -33,6 +33,7 @@ import org.apache.jena.riot.lang.* ;
 import org.apache.jena.riot.system.ErrorHandlerFactory ;
 import org.apache.jena.riot.system.IRIResolver ;
 import org.apache.jena.riot.system.RiotLib ;
+import org.apache.jena.riot.system.SinkRDF ;
 import org.apache.jena.riot.tokens.Tokenizer ;
 import org.apache.jena.riot.tokens.TokenizerFactory ;
 import org.openjena.riot.RiotQuadParsePuller ;
@@ -53,17 +54,28 @@ public class RiotReader
      * @param filename 
      * @param dest  Where to send the triples from the parser.
      */
-    public static void parse(String filename, RDFParserOutput dest)
+    public static void parse(String filename, SinkRDF dest)
     { parse(filename, null, null, dest) ; }
 
     /** Parse a file, sending output to a RDFParserOutput sink.
      * Must be in a triples syntax.
      * @param filename 
      * @param lang      Language, or null for "guess from URL" (e.g. file extension)
+     * @param dest      Where to send the triples from the parser.
+     */  
+    public static void parse(String filename, Lang lang, SinkRDF dest)
+    {
+        parse(filename, lang, null, dest) ;
+    }
+
+    /** Parse a file, sending output to a RDFParserOutput sink.
+     * Must be in a triples syntax.
+     * @param filename 
+     * @param lang      Language, or null for "guess from URL" (e.g. file extension)
      * @param baseIRI   Base IRI, or null for based on input filename
      * @param dest      Where to send the triples from the parser.
      */  
-    public static void parse(String filename, Lang lang, String baseIRI, RDFParserOutput dest)
+    public static void parse(String filename, Lang lang, String baseIRI, SinkRDF dest)
     {
         if ( lang == null )
             lang = filenameToLang(filename, NTriples) ;
@@ -77,10 +89,20 @@ public class RiotReader
     /** Parse an InputStream, using RDFParserOutput as the destination for the parser output.
      * @param in        Source for bytes to parse.
      * @param lang      Language.
+     * @param dest      Where to send the triples from the parser.
+     */  
+    public static void parse(InputStream in, Lang lang, SinkRDF dest)
+    {
+        parse(in, lang, null, dest) ;
+    }
+
+    /** Parse an InputStream, using RDFParserOutput as the destination for the parser output.
+     * @param in        Source for bytes to parse.
+     * @param lang      Language.
      * @param baseIRI   Base IRI. 
      * @param dest      Where to send the triples from the parser.
      */  
-    public static void parse(InputStream in, Lang lang, String baseIRI, RDFParserOutput dest)
+    public static void parse(InputStream in, Lang lang, String baseIRI, SinkRDF dest)
     {
         LangRIOT parser = RiotReader.createParser(in, lang, baseIRI, dest) ;
         parser.parse() ;
@@ -89,7 +111,7 @@ public class RiotReader
     // -------- Parsers
     
     /** Create a parser */  
-    public static LangRIOT createParser(InputStream input, Lang lang, String baseIRI, RDFParserOutput dest)
+    public static LangRIOT createParser(InputStream input, Lang lang, String baseIRI, SinkRDF dest)
     {
         if ( lang == RDFXML )
         {
@@ -104,7 +126,7 @@ public class RiotReader
     }
 
     /** Create a parser */  
-    public static LangRIOT createParser(Tokenizer tokenizer, Lang lang, String baseIRI, RDFParserOutput dest)
+    public static LangRIOT createParser(Tokenizer tokenizer, Lang lang, String baseIRI, SinkRDF dest)
     {
         if ( RDFLanguages.sameLang(RDFXML, lang) )
             throw new RiotException("Not possible - can't parse RDF/XML from a RIOT token stream") ;
@@ -128,7 +150,7 @@ public class RiotReader
      * Must be in a triples syntax.
      * @param filename 
      * @param sink  Where to send the triples from the parser.
-     * @see         RiotReader#parse(String,RDFParserOutput)
+     * @see         RiotReader#parse(String,SinkRDF)
      */  
     public static void parseTriples(String filename, Sink<Triple> sink)
     { parseTriples(filename, null, null, sink) ; }
@@ -143,7 +165,7 @@ public class RiotReader
      */  
     public static void parseTriples(String filename, Lang lang, String baseIRI, Sink<Triple> sink)
     {
-        RDFParserOutput dest = RDFParserOutputLib.sinkTriples(sink) ;
+        SinkRDF dest = RDFParserOutputLib.sinkTriples(sink) ;
         parse(filename, lang, baseIRI, dest) ;
     }
 
@@ -156,7 +178,7 @@ public class RiotReader
      */  
     public static void parseTriples(InputStream in, Lang lang, String baseIRI, Sink<Triple> sink)
     {
-        RDFParserOutput dest = RDFParserOutputLib.sinkTriples(sink) ;
+        SinkRDF dest = RDFParserOutputLib.sinkTriples(sink) ;
         parse(in, lang, baseIRI, dest) ;
     }
     
@@ -179,7 +201,7 @@ public class RiotReader
      */
     public static void parseQuads(String filename, Lang lang, String baseIRI, Sink<Quad> sink)
     {
-        RDFParserOutput dest = RDFParserOutputLib.sinkQuads(sink) ;
+        SinkRDF dest = RDFParserOutputLib.sinkQuads(sink) ;
         parse(filename, lang, baseIRI, dest) ;
     }
 
@@ -192,7 +214,7 @@ public class RiotReader
      */
     public static void parseQuads(InputStream in, Lang lang, String baseIRI, Sink<Quad> sink)
     {
-        RDFParserOutput dest = RDFParserOutputLib.sinkQuads(sink) ;
+        SinkRDF dest = RDFParserOutputLib.sinkQuads(sink) ;
         parse(in, lang, baseIRI, dest) ;
     }
 
@@ -231,21 +253,21 @@ public class RiotReader
     }
     
     /** Create a parser for Turtle, with default behaviour */
-    public static LangTurtle createParserTurtle(InputStream input, String baseIRI, RDFParserOutput dest)
+    public static LangTurtle createParserTurtle(InputStream input, String baseIRI, SinkRDF dest)
     {
         Tokenizer tokenizer = TokenizerFactory.makeTokenizerUTF8(input) ;
         return createParserTurtle(tokenizer, baseIRI, dest) ;
     }
     
     /** Create a parser for Turtle, with default behaviour */
-    public static LangTurtle createParserTurtle(Tokenizer tokenizer, String baseIRI, RDFParserOutput dest)
+    public static LangTurtle createParserTurtle(Tokenizer tokenizer, String baseIRI, SinkRDF dest)
     {
         LangTurtle parser = new LangTurtle(tokenizer, RiotLib.profile(RDFLanguages.Turtle, baseIRI), dest) ;
         return parser ;
     }
 
     /** Create a parser for RDF/XML */
-    public static LangRDFXML createParserRDFXML(InputStream input, String baseIRI, RDFParserOutput dest)
+    public static LangRDFXML createParserRDFXML(InputStream input, String baseIRI, SinkRDF dest)
     {
         if ( baseIRI == null )
             baseIRI = chooseBaseIRI() ;
@@ -254,55 +276,55 @@ public class RiotReader
     }
 
     /** Create parsers for RDF/JSON */
-    public static LangRDFJSON createParserRdfJson(Tokenizer tokenizer, RDFParserOutput dest)
+    public static LangRDFJSON createParserRdfJson(Tokenizer tokenizer, SinkRDF dest)
     {
     	LangRDFJSON parser = new LangRDFJSON(tokenizer, RiotLib.profile(RDFLanguages.RDFJSON, null), dest) ;
     	return parser;
     }
 
-    public static LangRDFJSON createParserRdfJson(InputStream input, RDFParserOutput dest)
+    public static LangRDFJSON createParserRdfJson(InputStream input, SinkRDF dest)
     {
     	TokenizerJSON tokenizer = new TokenizerJSON(PeekReader.makeUTF8(input)) ;
     	return createParserRdfJson(tokenizer, dest) ;
     }
     
     /** Create a parser for TriG, with default behaviour */
-    public static LangTriG createParserTriG(InputStream input, String baseIRI, RDFParserOutput dest)
+    public static LangTriG createParserTriG(InputStream input, String baseIRI, SinkRDF dest)
     {
         Tokenizer tokenizer = TokenizerFactory.makeTokenizerUTF8(input) ;
         return createParserTriG(tokenizer, baseIRI, dest) ;
     }
     
     /** Create a parser for TriG, with default behaviour */
-    public static LangTriG createParserTriG(Tokenizer tokenizer, String baseIRI, RDFParserOutput dest)
+    public static LangTriG createParserTriG(Tokenizer tokenizer, String baseIRI, SinkRDF dest)
     {
         LangTriG parser = new LangTriG(tokenizer, RiotLib.profile(RDFLanguages.TriG, baseIRI), dest) ;
         return parser ;
     }
 
     /** Create a parser for N-Triples, with default behaviour */
-    public static LangNTriples createParserNTriples(InputStream input, RDFParserOutput dest)
+    public static LangNTriples createParserNTriples(InputStream input, SinkRDF dest)
     {
         Tokenizer tokenizer = TokenizerFactory.makeTokenizerASCII(input) ;
         return createParserNTriples(tokenizer, dest) ;
     }
     
     /** Create a parser for N-Triples, with default behaviour */
-    public static LangNTriples createParserNTriples(Tokenizer tokenizer, RDFParserOutput dest)
+    public static LangNTriples createParserNTriples(Tokenizer tokenizer, SinkRDF dest)
     {
         LangNTriples parser = new LangNTriples(tokenizer, RiotLib.profile(RDFLanguages.NTriples, null), dest) ;
         return parser ;
     }
     
     /** Create a parser for NQuads, with default behaviour */
-    public static LangNQuads createParserNQuads(InputStream input, RDFParserOutput dest)
+    public static LangNQuads createParserNQuads(InputStream input, SinkRDF dest)
     {
         Tokenizer tokenizer = TokenizerFactory.makeTokenizerASCII(input) ;
         return createParserNQuads(tokenizer, dest) ;
     }
     
     /** Create a parser for NQuads, with default behaviour */
-    public static LangNQuads createParserNQuads(Tokenizer tokenizer, RDFParserOutput dest)
+    public static LangNQuads createParserNQuads(Tokenizer tokenizer, SinkRDF dest)
     {
         LangNQuads parser = new LangNQuads(tokenizer, RiotLib.profile(RDFLanguages.NQuads, null), dest) ;
         return parser ;

Modified: jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/LangBase.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/LangBase.java?rev=1426285&r1=1426284&r2=1426285&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/LangBase.java (original)
+++ jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/LangBase.java Thu Dec 27 18:33:43 2012
@@ -19,14 +19,15 @@
 package org.apache.jena.riot.lang;
 
 import org.apache.jena.riot.system.ParserProfile ;
+import org.apache.jena.riot.system.SinkRDF ;
 import org.apache.jena.riot.tokens.Tokenizer ;
 
 
 public abstract class LangBase extends LangEngine implements LangRIOT
 {
-    protected final RDFParserOutput dest ; 
+    protected final SinkRDF dest ; 
 
-    protected LangBase(Tokenizer tokens, ParserProfile profile, RDFParserOutput dest)
+    protected LangBase(Tokenizer tokens, ParserProfile profile, SinkRDF dest)
     {
         super(tokens, profile) ;
         this.dest = dest ;
@@ -35,6 +36,7 @@ public abstract class LangBase extends L
     @Override
     public void parse()
     {
+        dest.base(profile.getPrologue().getBaseURI()) ;
         dest.start() ;
         try { 
             runParser() ;

Modified: jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/LangNQuads.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/LangNQuads.java?rev=1426285&r1=1426284&r2=1426285&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/LangNQuads.java (original)
+++ jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/LangNQuads.java Thu Dec 27 18:33:43 2012
@@ -20,6 +20,7 @@ package org.apache.jena.riot.lang;
 import org.apache.jena.riot.Lang ;
 import org.apache.jena.riot.RDFLanguages ;
 import org.apache.jena.riot.system.ParserProfile ;
+import org.apache.jena.riot.system.SinkRDF ;
 import org.apache.jena.riot.tokens.Token ;
 import org.apache.jena.riot.tokens.TokenType ;
 import org.apache.jena.riot.tokens.Tokenizer ;
@@ -36,7 +37,7 @@ public class LangNQuads extends LangNTup
     // Null for no graph.
     private Node currentGraph = null ;
     
-    public LangNQuads(Tokenizer tokens, ParserProfile profile, RDFParserOutput dest)
+    public LangNQuads(Tokenizer tokens, ParserProfile profile, SinkRDF dest)
     {
         super(tokens, profile, dest) ;
     }

Modified: jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/LangNTriples.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/LangNTriples.java?rev=1426285&r1=1426284&r2=1426285&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/LangNTriples.java (original)
+++ jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/LangNTriples.java Thu Dec 27 18:33:43 2012
@@ -21,6 +21,7 @@ package org.apache.jena.riot.lang;
 import org.apache.jena.riot.Lang ;
 import org.apache.jena.riot.RDFLanguages ;
 import org.apache.jena.riot.system.ParserProfile ;
+import org.apache.jena.riot.system.SinkRDF ;
 import org.apache.jena.riot.tokens.Token ;
 import org.apache.jena.riot.tokens.TokenType ;
 import org.apache.jena.riot.tokens.Tokenizer ;
@@ -36,7 +37,7 @@ public final class LangNTriples extends 
     
     public LangNTriples(Tokenizer tokens,
                         ParserProfile profile,
-                        RDFParserOutput dest)
+                        SinkRDF dest)
     {
         super(tokens, profile, dest) ;
     }

Modified: jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/LangNTuple.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/LangNTuple.java?rev=1426285&r1=1426284&r2=1426285&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/LangNTuple.java (original)
+++ jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/LangNTuple.java Thu Dec 27 18:33:43 2012
@@ -23,6 +23,7 @@ import static org.apache.jena.riot.token
 import java.util.Iterator ;
 
 import org.apache.jena.riot.system.ParserProfile ;
+import org.apache.jena.riot.system.SinkRDF ;
 import org.apache.jena.riot.tokens.Token ;
 import org.apache.jena.riot.tokens.TokenType ;
 import org.apache.jena.riot.tokens.Tokenizer ;
@@ -55,7 +56,7 @@ public abstract class LangNTuple<X> exte
     
     protected LangNTuple(Tokenizer tokens,
                          ParserProfile profile,
-                         RDFParserOutput dest)
+                         SinkRDF dest)
     { 
         super(tokens, profile, dest) ;
     }

Modified: jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/LangRDFJSON.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/LangRDFJSON.java?rev=1426285&r1=1426284&r2=1426285&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/LangRDFJSON.java (original)
+++ jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/LangRDFJSON.java Thu Dec 27 18:33:43 2012
@@ -22,6 +22,7 @@ import org.apache.jena.atlas.json.io.par
 import org.apache.jena.riot.Lang ;
 import org.apache.jena.riot.RDFLanguages ;
 import org.apache.jena.riot.system.ParserProfile ;
+import org.apache.jena.riot.system.SinkRDF ;
 import org.apache.jena.riot.tokens.Token ;
 import org.apache.jena.riot.tokens.TokenType ;
 import org.apache.jena.riot.tokens.Tokenizer ;
@@ -36,7 +37,7 @@ import com.hp.hpl.jena.graph.Triple ;
 public class LangRDFJSON extends LangBase
 {
 
-	public LangRDFJSON(Tokenizer tokenizer, ParserProfile profile, RDFParserOutput dest)
+	public LangRDFJSON(Tokenizer tokenizer, ParserProfile profile, SinkRDF dest)
 	{
 		super(tokenizer, profile, dest) ;
 		if (!(tokenizer instanceof TokenizerJSON))

Modified: jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/LangRDFXML.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/LangRDFXML.java?rev=1426285&r1=1426284&r2=1426285&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/LangRDFXML.java (original)
+++ jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/LangRDFXML.java Thu Dec 27 18:33:43 2012
@@ -32,6 +32,7 @@ import org.apache.jena.riot.checker.Chec
 import org.apache.jena.riot.system.ErrorHandler ;
 import org.apache.jena.riot.system.ParserProfile ;
 import org.apache.jena.riot.system.RiotLib ;
+import org.apache.jena.riot.system.SinkRDF ;
 import org.xml.sax.SAXException ;
 import org.xml.sax.SAXParseException ;
 
@@ -54,7 +55,7 @@ public class LangRDFXML implements LangR
     private Reader reader = null ;
     private String xmlBase ;
     private String filename ;
-    private RDFParserOutput sink ;
+    private SinkRDF sink ;
     private ParserProfile profile ;             // Warning - we don't use all of this.
     
     @Override
@@ -67,24 +68,24 @@ public class LangRDFXML implements LangR
     public void setProfile(ParserProfile profile)
     { this.profile = profile ; }
 
-    public static LangRDFXML create(InputStream in, String xmlBase, String filename, ErrorHandler errorHandler, RDFParserOutput sink)
+    public static LangRDFXML create(InputStream in, String xmlBase, String filename, ErrorHandler errorHandler, SinkRDF sink)
     {
         return new LangRDFXML(in, xmlBase, filename, errorHandler, sink) ;
     }
     
     @Deprecated
-    public static LangRDFXML create(Reader reader, String xmlBase, String filename, ErrorHandler errorHandler, RDFParserOutput sink)
+    public static LangRDFXML create(Reader reader, String xmlBase, String filename, ErrorHandler errorHandler, SinkRDF sink)
     {
         return new LangRDFXML(reader, xmlBase, filename, errorHandler, sink) ;
     }
     
 
-    public static LangRDFXML create(String xmlBase, String filename, ErrorHandler errorHandler, RDFParserOutput sink)
+    public static LangRDFXML create(String xmlBase, String filename, ErrorHandler errorHandler, SinkRDF sink)
     {
         return create(IO.openFile(filename), xmlBase, filename, errorHandler, sink) ;
     }
     
-    private LangRDFXML(Reader reader, String xmlBase, String filename, ErrorHandler errorHandler, RDFParserOutput sink)
+    private LangRDFXML(Reader reader, String xmlBase, String filename, ErrorHandler errorHandler, SinkRDF sink)
     {
         this.reader = reader ;
         this.xmlBase = xmlBase ;
@@ -93,7 +94,7 @@ public class LangRDFXML implements LangR
         this.profile = RiotLib.profile(getLang(), xmlBase, errorHandler) ;
     }
     
-    private LangRDFXML(InputStream in, String xmlBase, String filename, ErrorHandler errorHandler, RDFParserOutput sink)
+    private LangRDFXML(InputStream in, String xmlBase, String filename, ErrorHandler errorHandler, SinkRDF sink)
     {
         this.input = in ;
         this.xmlBase = xmlBase ;
@@ -151,11 +152,11 @@ public class LangRDFXML implements LangR
     
     private static class HandlerSink extends ARPSaxErrorHandler implements StatementHandler, NamespaceHandler
     {
-        private RDFParserOutput output ;
+        private SinkRDF output ;
         private ErrorHandler errHandler ;
         private CheckerLiterals checker ;
 
-        HandlerSink(RDFParserOutput output, ErrorHandler errHandler)
+        HandlerSink(SinkRDF output, ErrorHandler errHandler)
         {
             super(new ErrorHandlerBridge(errHandler)) ;
             this.output = output ;

Modified: jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/LangTriG.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/LangTriG.java?rev=1426285&r1=1426284&r2=1426285&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/LangTriG.java (original)
+++ jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/LangTriG.java Thu Dec 27 18:33:43 2012
@@ -23,6 +23,7 @@ import static org.apache.jena.riot.token
 import org.apache.jena.riot.Lang ;
 import org.apache.jena.riot.RDFLanguages ;
 import org.apache.jena.riot.system.ParserProfile ;
+import org.apache.jena.riot.system.SinkRDF ;
 import org.apache.jena.riot.tokens.Token ;
 import org.apache.jena.riot.tokens.TokenType ;
 import org.apache.jena.riot.tokens.Tokenizer ;
@@ -50,7 +51,7 @@ public class LangTriG extends LangTurtle
           (i.e. raw inline nquads except with preifx names.
         
      */
-    public LangTriG(Tokenizer tokens, ParserProfile profile, RDFParserOutput dest) 
+    public LangTriG(Tokenizer tokens, ParserProfile profile, SinkRDF dest) 
     {
         super(tokens, profile, dest) ;
     }

Modified: jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/LangTurtle.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/LangTurtle.java?rev=1426285&r1=1426284&r2=1426285&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/LangTurtle.java (original)
+++ jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/LangTurtle.java Thu Dec 27 18:33:43 2012
@@ -22,6 +22,7 @@ import static org.apache.jena.riot.token
 import org.apache.jena.riot.Lang ;
 import org.apache.jena.riot.RDFLanguages ;
 import org.apache.jena.riot.system.ParserProfile ;
+import org.apache.jena.riot.system.SinkRDF ;
 import org.apache.jena.riot.tokens.Tokenizer ;
 
 import com.hp.hpl.jena.graph.Node ;
@@ -31,7 +32,7 @@ public class LangTurtle extends LangTurt
 {
     public LangTurtle(Tokenizer tokens, 
                       ParserProfile profile, 
-                      RDFParserOutput dest) 
+                      SinkRDF dest) 
     {
         super(tokens, profile, dest) ;
         setCurrentGraph(null) ;

Modified: jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/LangTurtleBase.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/LangTurtleBase.java?rev=1426285&r1=1426284&r2=1426285&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/LangTurtleBase.java (original)
+++ jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/LangTurtleBase.java Thu Dec 27 18:33:43 2012
@@ -34,6 +34,7 @@ import static org.apache.jena.riot.token
 import static org.apache.jena.riot.tokens.TokenType.SEMICOLON ;
 import org.apache.jena.iri.IRI ;
 import org.apache.jena.riot.system.ParserProfile ;
+import org.apache.jena.riot.system.SinkRDF ;
 import org.apache.jena.riot.tokens.Token ;
 import org.apache.jena.riot.tokens.TokenType ;
 import org.apache.jena.riot.tokens.Tokenizer ;
@@ -82,7 +83,7 @@ public abstract class LangTurtleBase<X> 
 //     */
 //    public PrefixMap getPrefixMap()        { return prologue.getPrefixMap() ; }
     
-    protected LangTurtleBase(Tokenizer tokens, ParserProfile profile, RDFParserOutput dest)
+    protected LangTurtleBase(Tokenizer tokens, ParserProfile profile, SinkRDF dest)
     { 
         super(tokens, profile, dest) ;
     }

Copied: jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/PrintingSinkRDF.java (from r1425325, jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/PrintingSink.java)
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/PrintingSinkRDF.java?p2=jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/PrintingSinkRDF.java&p1=jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/PrintingSink.java&r1=1425325&r2=1426285&rev=1426285&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/PrintingSink.java (original)
+++ jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/PrintingSinkRDF.java Thu Dec 27 18:33:43 2012
@@ -18,28 +18,57 @@
 
 package org.apache.jena.riot.lang;
 
-import org.apache.jena.atlas.lib.Sink ;
+import org.apache.jena.atlas.lib.Tuple ;
 import org.apache.jena.riot.out.NodeFmtLib ;
+import org.apache.jena.riot.system.SinkRDF ;
 import org.slf4j.Logger ;
 
+import com.hp.hpl.jena.graph.Node ;
 import com.hp.hpl.jena.graph.Triple ;
+import com.hp.hpl.jena.sparql.core.Quad ;
 
-public class PrintingSink implements Sink<Triple>
+public class PrintingSinkRDF implements SinkRDF
 {
     private Logger log ;
 
-    public PrintingSink(Logger log) { this.log = log ; }
+    public PrintingSinkRDF(boolean x , Logger log) { this.log = log ; }
 
     @Override
-    public void send(Triple triple)
+    public void start()
+    {}
+
+    @Override
+    public void triple(Triple triple)
     {
         String string = NodeFmtLib.str(triple) ;
         log.info(string) ;
     }
 
     @Override
-    public void flush() { }
-    
+    public void quad(Quad quad)
+    {
+        String string = NodeFmtLib.str(quad) ;
+        log.info(string) ;
+    }
+
+    @Override
+    public void tuple(Tuple<Node> tuple)
+    {}
+
     @Override
-    public void close() { }
+    public void base(String base)
+    {
+        log.info("BASE -- "+base) ;
+    }
+
+    @Override
+    public void prefix(String prefix, String iri)
+    {
+        log.info("Prefix ("+prefix+","+iri+")")  ;
+    }
+
+    @Override
+    public void finish()
+    {}
+
 }

Modified: jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/RDFParserOutputCounting.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/RDFParserOutputCounting.java?rev=1426285&r1=1426284&r2=1426285&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/RDFParserOutputCounting.java (original)
+++ jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/RDFParserOutputCounting.java Thu Dec 27 18:33:43 2012
@@ -18,7 +18,9 @@
 
 package org.apache.jena.riot.lang;
 
-public interface RDFParserOutputCounting extends RDFParserOutput
+import org.apache.jena.riot.system.SinkRDF ;
+
+public interface RDFParserOutputCounting extends SinkRDF
 {
     /** Count of triples, quads or tuples */
     public long count() ;

Modified: jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/RDFParserOutputLib.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/RDFParserOutputLib.java?rev=1426285&r1=1426284&r2=1426285&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/RDFParserOutputLib.java (original)
+++ jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/RDFParserOutputLib.java Thu Dec 27 18:33:43 2012
@@ -20,6 +20,7 @@ package org.apache.jena.riot.lang;
 
 import org.apache.jena.atlas.lib.Sink ;
 import org.apache.jena.atlas.lib.Tuple ;
+import org.apache.jena.riot.system.SinkRDF ;
 
 import com.hp.hpl.jena.graph.Graph ;
 import com.hp.hpl.jena.graph.Node ;
@@ -31,11 +32,11 @@ import com.hp.hpl.jena.sparql.core.Quad 
 public class RDFParserOutputLib
 {
     /** Send everything to nowhere ... efficiently */
-    public static RDFParserOutput sinkNull()                       { return new ParserOutputSink() ; }
+    public static SinkRDF sinkNull()                       { return new ParserOutputSink() ; }
 
-    public static RDFParserOutput graph(Graph graph)               { return new ParserOutputGraph(graph) ; }
+    public static SinkRDF graph(Graph graph)               { return new ParserOutputGraph(graph) ; }
     
-    public static RDFParserOutput dataset(DatasetGraph dataset)    { return new ParserOutputDataset(dataset) ; }
+    public static SinkRDF dataset(DatasetGraph dataset)    { return new ParserOutputDataset(dataset) ; }
 
     
     /** 
@@ -43,31 +44,31 @@ public class RDFParserOutputLib
      * Unfortunately, Java needs different names for the triples and 
      * quads versions because of type erasure.  
      */
-    public static RDFParserOutput sinkTriples(Sink<Triple> sink)   { return new ParserOutputSinkTriples(sink) ; }
+    public static SinkRDF sinkTriples(Sink<Triple> sink)   { return new ParserOutputSinkTriples(sink) ; }
 
     /** 
      * Output to a sink; prefix and base handled only within the parser.
      * Unfortunately, Java needs different names for the triples and 
      * quads versions because of type erasure.  
      */
-    public static RDFParserOutput sinkQuads(Sink<Quad> sink)       { return new ParserOutputSinkQuads(sink) ; }
+    public static SinkRDF sinkQuads(Sink<Quad> sink)       { return new ParserOutputSinkQuads(sink) ; }
     
     /** Convert any triples seen to a quads, adding a graph node of {@link Quad#tripleInQuad} */
-    public static RDFParserOutput extendTriplesToQuads(RDFParserOutput base)
+    public static SinkRDF extendTriplesToQuads(SinkRDF base)
     { return extendTriplesToQuads(Quad.tripleInQuad, base) ; }
     
     /** Convert any triples seen to a quads, adding the specified graph node */
-    public static RDFParserOutput extendTriplesToQuads(Node graphNode, RDFParserOutput base)
+    public static SinkRDF extendTriplesToQuads(Node graphNode, SinkRDF base)
     { return new ParserOutputSinkTriplesToQuads(graphNode, base) ; }
     
     public static RDFParserOutputCounting count()
     { return new ParserOutputCountingBase(sinkNull()) ; }
 
-    public static RDFParserOutputCounting count(RDFParserOutput other)
+    public static RDFParserOutputCounting count(SinkRDF other)
     { return new ParserOutputCountingBase(other) ; }
 
     
-    private static class ParserOutputSink implements RDFParserOutput
+    private static class ParserOutputSink implements SinkRDF
     {
         public ParserOutputSink ()                      {}
         @Override public void start()                   {}
@@ -79,10 +80,10 @@ public class RDFParserOutputLib
         @Override public void finish()                  {}
     }
 
-    private static class ParserOutputWrapper implements RDFParserOutput
+    private static class ParserOutputWrapper implements SinkRDF
     {
-        protected final RDFParserOutput other ;
-        public ParserOutputWrapper (RDFParserOutput base)  { this.other = base ;}
+        protected final SinkRDF other ;
+        public ParserOutputWrapper (SinkRDF base)  { this.other = base ;}
         @Override public void start()                   { other.start() ; }
         @Override public void triple(Triple triple)     { other.triple(triple) ; }
         @Override public void quad(Quad quad)           { other.quad(quad); } 
@@ -95,7 +96,7 @@ public class RDFParserOutputLib
     private static class ParserOutputSinkTriplesToQuads extends ParserOutputWrapper
     {
         private final Node gn ;
-        ParserOutputSinkTriplesToQuads(Node gn, RDFParserOutput base)
+        ParserOutputSinkTriplesToQuads(Node gn, SinkRDF base)
         { super(base) ; this.gn = gn ; }
         
         @Override public void triple(Triple triple)
@@ -182,7 +183,7 @@ public class RDFParserOutputLib
         }
     }
 
-    private  static class ParserOutputCountingBase extends ParserOutputWrapper implements RDFParserOutput, RDFParserOutputCounting
+    private  static class ParserOutputCountingBase extends ParserOutputWrapper implements SinkRDF, RDFParserOutputCounting
     {
         private long countTriples = 0 ;
         private long countQuads = 0 ;
@@ -190,7 +191,7 @@ public class RDFParserOutputLib
         private long countBase = 0 ;
         private long countPrefixes = 0 ;
         
-        public ParserOutputCountingBase (RDFParserOutput other)     { super(other) ; }
+        public ParserOutputCountingBase (SinkRDF other)     { super(other) ; }
 
         @Override
         public void triple(Triple triple)

Copied: jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/system/SinkRDF.java (from r1422690, jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/RDFParserOutput.java)
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/system/SinkRDF.java?p2=jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/system/SinkRDF.java&p1=jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/RDFParserOutput.java&r1=1422690&r2=1426285&rev=1426285&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/RDFParserOutput.java (original)
+++ jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/system/SinkRDF.java Thu Dec 27 18:33:43 2012
@@ -16,25 +16,25 @@
  * limitations under the License.
  */
 
-package org.apache.jena.riot.lang;
+package org.apache.jena.riot.system;
 
 import org.apache.jena.atlas.lib.Tuple ;
-import org.apache.jena.riot.system.ParserProfile ;
 
 import com.hp.hpl.jena.graph.Node ;
 import com.hp.hpl.jena.graph.Triple ;
 import com.hp.hpl.jena.sparql.core.Quad ;
 
-/** The interface for the output of RIOT parsers.
- * The parser event model is that items are emitted for signficant events.
- * The events are start/finish, emittingtriples/quads/tuples as necessary, prefixes and base directives.
- * Tuples are generalized triples or quads.  a triple language will call triple(),
- * quad language quad() in preference.    
+/** The interface for the output of RDF, such as the RIOT parsers.
+ *  The parser event model is that items are emitted for signficant events.
+ *  The events are start/finish, emitting triples/quads/tuples as necessary, prefixes and base directives.
+ *  Tuples are generalized triples or quads.  A triple language will call triple(),
+ *  quad language quad() in preference.    
  * 
  * @see ParserProfile for the lower level machinary for creation of nodes triples and quads. 
  */
-public interface RDFParserOutput
+public interface SinkRDF
 {
+    // Java does not allow us to say "extends Sink<Triple>, Sink<Quad> because of type erasure
     /** Start parsing */
     public void start() ;
     
@@ -57,4 +57,3 @@ public interface RDFParserOutput
     public void finish() ;
 
 }
-

Added: jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/system/SinkRDFBase.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/system/SinkRDFBase.java?rev=1426285&view=auto
==============================================================================
--- jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/system/SinkRDFBase.java (added)
+++ jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/system/SinkRDFBase.java Thu Dec 27 18:33:43 2012
@@ -0,0 +1,56 @@
+/**
+ * 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 org.apache.jena.riot.system;
+
+import org.apache.jena.atlas.lib.Tuple ;
+
+import com.hp.hpl.jena.graph.Node ;
+import com.hp.hpl.jena.graph.Triple ;
+import com.hp.hpl.jena.sparql.core.Quad ;
+
+public class SinkRDFBase implements SinkRDF
+{
+    @Override
+    public void start()
+    {}
+
+    @Override
+    public void triple(Triple triple)
+    {}
+
+    @Override
+    public void quad(Quad quad)
+    {}
+
+    @Override
+    public void tuple(Tuple<Node> tuple)
+    {}
+
+    @Override
+    public void base(String base)
+    {}
+
+    @Override
+    public void prefix(String prefix, String iri)
+    {}
+
+    @Override
+    public void finish()
+    {}
+}

Added: jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/system/SinkRDFWrapper.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/system/SinkRDFWrapper.java?rev=1426285&view=auto
==============================================================================
--- jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/system/SinkRDFWrapper.java (added)
+++ jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/system/SinkRDFWrapper.java Thu Dec 27 18:33:43 2012
@@ -0,0 +1,58 @@
+/**
+ * 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 org.apache.jena.riot.system;
+
+import org.apache.jena.atlas.lib.Tuple ;
+
+import com.hp.hpl.jena.graph.Node ;
+import com.hp.hpl.jena.graph.Triple ;
+import com.hp.hpl.jena.sparql.core.Quad ;
+
+/** The interface for the output of RDF, such as the RIOT parsers.
+ *  The parser event model is that items are emitted for signficant events.
+ *  The events are start/finish, emitting triples/quads/tuples as necessary, prefixes and base directives.
+ *  Tuples are generalized triples or quads.  A triple language will call triple(),
+ *  quad language quad() in preference.    
+ * 
+ * @see ParserProfile for the lower level machinary for creation of nodes triples and quads. 
+ */
+public interface SinkRDFWrapper
+{
+    /** Start parsing */
+    public void start() ;
+    
+    /** Triple emitted */
+    public void triple(Triple triple) ;
+
+    /** Quad emitted */
+    public void quad(Quad quad) ;
+
+    /** Generalized emitted */
+    public void tuple(Tuple<Node> tuple) ;
+
+    /** base declaration seen */
+    public void base(String base) ;
+
+    /** prefix declaration seen */
+    public void prefix(String prefix, String iri) ;
+
+    /** Finish parsing */
+    public void finish() ;
+
+}

Modified: jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/web/HttpResponseLib.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/web/HttpResponseLib.java?rev=1426285&r1=1426284&r2=1426285&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/web/HttpResponseLib.java (original)
+++ jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/web/HttpResponseLib.java Thu Dec 27 18:33:43 2012
@@ -30,8 +30,8 @@ import org.apache.jena.atlas.web.MediaTy
 import org.apache.jena.riot.RiotReader ;
 import org.apache.jena.riot.WebContent ;
 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.SinkRDF ;
 
 import com.hp.hpl.jena.graph.Graph ;
 import com.hp.hpl.jena.query.ResultSet ;
@@ -57,7 +57,7 @@ public class HttpResponseLib
                 HttpEntity entity = response.getEntity() ;
                 MediaType mt = MediaType.create(response.getFirstHeader(HttpNames.hContentType).getValue()) ;
                 mt.getCharset() ;
-                RDFParserOutput dest = RDFParserOutputLib.graph(g) ; 
+                SinkRDF dest = RDFParserOutputLib.graph(g) ; 
                 InputStream in = entity.getContent() ;
                 LangRIOT parser = createParser(in, baseIRI, dest) ;
                 parser.parse() ;
@@ -69,7 +69,7 @@ public class HttpResponseLib
         @Override
         public Graph get() { return graph ; }
         
-        abstract protected LangRIOT createParser(InputStream in, String baseIRI, RDFParserOutput dest) ;
+        abstract protected LangRIOT createParser(InputStream in, String baseIRI, SinkRDF dest) ;
     }
 
     public static HttpResponseHandler httpDumpResponse = new HttpResponseHandler()
@@ -105,7 +105,7 @@ public class HttpResponseLib
     public static HttpCaptureResponse<Graph> graphReaderTurtle = new AbstractGraphReader()
     {
         @Override
-        protected LangRIOT createParser(InputStream in, String baseIRI, RDFParserOutput dest)
+        protected LangRIOT createParser(InputStream in, String baseIRI, SinkRDF dest)
         {
             return RiotReader.createParserTurtle(in, baseIRI, dest) ;
         }
@@ -113,7 +113,7 @@ public class HttpResponseLib
     public static HttpCaptureResponse<Graph> graphReaderNTriples = new AbstractGraphReader()
     {
         @Override
-        protected LangRIOT createParser(InputStream in, String baseIRI, RDFParserOutput dest)
+        protected LangRIOT createParser(InputStream in, String baseIRI, SinkRDF dest)
         {
             return RiotReader.createParserNTriples(in, dest) ;
         }
@@ -121,7 +121,7 @@ public class HttpResponseLib
     public static HttpCaptureResponse<Graph> graphReaderRDFXML = new AbstractGraphReader()
     {
         @Override
-        protected LangRIOT createParser(InputStream in, String baseIRI, RDFParserOutput dest)
+        protected LangRIOT createParser(InputStream in, String baseIRI, SinkRDF dest)
         {
             return RiotReader.createParserRDFXML(in, baseIRI, dest) ;
         }

Modified: jena/trunk/jena-arq/src/main/java/org/openjena/riot/RiotQuadParsePuller.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/org/openjena/riot/RiotQuadParsePuller.java?rev=1426285&r1=1426284&r2=1426285&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/org/openjena/riot/RiotQuadParsePuller.java (original)
+++ jena/trunk/jena-arq/src/main/java/org/openjena/riot/RiotQuadParsePuller.java Thu Dec 27 18:33:43 2012
@@ -24,8 +24,8 @@ import org.apache.jena.atlas.lib.Sink ;
 import org.apache.jena.riot.Lang ;
 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.SinkRDF ;
 
 import com.hp.hpl.jena.sparql.core.Quad ;
 
@@ -44,7 +44,7 @@ public class RiotQuadParsePuller extends
     @Override
     protected LangRIOT createParser(Sink<Quad> sink)
     {
-        RDFParserOutput dest = RDFParserOutputLib.sinkQuads(sink) ;
+        SinkRDF dest = RDFParserOutputLib.sinkQuads(sink) ;
         return RiotReader.createParser(in, lang, baseIRI, dest) ;
     }
 }

Modified: jena/trunk/jena-arq/src/main/java/org/openjena/riot/RiotReader.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/org/openjena/riot/RiotReader.java?rev=1426285&r1=1426284&r2=1426285&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/org/openjena/riot/RiotReader.java (original)
+++ jena/trunk/jena-arq/src/main/java/org/openjena/riot/RiotReader.java Thu Dec 27 18:33:43 2012
@@ -36,6 +36,7 @@ import org.apache.jena.riot.lang.* ;
 import org.apache.jena.riot.system.ErrorHandlerFactory ;
 import org.apache.jena.riot.system.IRIResolver ;
 import org.apache.jena.riot.system.RiotLib ;
+import org.apache.jena.riot.system.SinkRDF ;
 import org.apache.jena.riot.tokens.Tokenizer ;
 import org.apache.jena.riot.tokens.TokenizerFactory ;
 
@@ -71,7 +72,7 @@ public class RiotReader
      */
     public static void parseTriples(String filename, Lang lang, String baseIRI, Sink<Triple> sink)
     {
-        RDFParserOutput dest = RDFParserOutputLib.sinkTriples(sink) ;
+        SinkRDF dest = RDFParserOutputLib.sinkTriples(sink) ;
         parseTriples(filename, lang, baseIRI, dest) ;
     }
 
@@ -84,7 +85,7 @@ public class RiotReader
      */  
     public static void parseTriples(InputStream in, Lang lang, String baseIRI, Sink<Triple> sink)
     {
-        RDFParserOutput dest = RDFParserOutputLib.sinkTriples(sink) ;
+        SinkRDF dest = RDFParserOutputLib.sinkTriples(sink) ;
         parseTriples(in, lang, baseIRI, dest) ;
     }
     
@@ -107,7 +108,7 @@ public class RiotReader
      */
     public static void parseQuads(String filename, Lang lang, String baseIRI, Sink<Quad> sink)
     {
-        RDFParserOutput dest = RDFParserOutputLib.sinkQuads(sink) ;
+        SinkRDF dest = RDFParserOutputLib.sinkQuads(sink) ;
         parseQuads(filename, lang, baseIRI, dest) ;
     }
 
@@ -120,7 +121,7 @@ public class RiotReader
      */
     public static void parseQuads(InputStream in, Lang lang, String baseIRI, Sink<Quad> sink)
     {
-        RDFParserOutput dest = RDFParserOutputLib.sinkQuads(sink) ;
+        SinkRDF dest = RDFParserOutputLib.sinkQuads(sink) ;
         parseQuads(in, lang, baseIRI, dest) ;
     }
 
@@ -129,7 +130,7 @@ public class RiotReader
      * @param filename 
      * @param dest  Where to send the triples from the parser.
      */
-    public static void parseTriples(String filename, RDFParserOutput dest)
+    public static void parseTriples(String filename, SinkRDF dest)
     { parseTriples(filename, null, null, dest) ; }
     
     /** Parse a file, sending triples to a sink.
@@ -139,7 +140,7 @@ public class RiotReader
      * @param baseIRI   Base IRI, or null for based on input filename
      * @param dest      Where to send the triples from the parser.
      */  
-    public static void parseTriples(String filename, Lang lang, String baseIRI, RDFParserOutput dest)
+    public static void parseTriples(String filename, Lang lang, String baseIRI, SinkRDF dest)
     {
         org.apache.jena.riot.RiotReader.parse(filename, lang, baseIRI, dest) ;
     }
@@ -150,7 +151,7 @@ public class RiotReader
      * @param baseIRI   Base IRI. 
      * @param dest      Where to send the triples from the parser.
      */  
-    public static void parseTriples(InputStream in, Lang lang, String baseIRI, RDFParserOutput dest)
+    public static void parseTriples(InputStream in, Lang lang, String baseIRI, SinkRDF dest)
     {
         org.apache.jena.riot.RiotReader.parse(in, lang, baseIRI, dest) ;
     }
@@ -161,7 +162,7 @@ public class RiotReader
      * @param filename
      * @param dest  Where to send the quads from the parser.
      */
-    public static void parseQuads(String filename, RDFParserOutput dest)
+    public static void parseQuads(String filename, SinkRDF dest)
     { parseQuads(filename, null, null, dest) ; }
     
     /** Parse a file, sending quads to a sink.
@@ -170,7 +171,7 @@ public class RiotReader
      * @param baseIRI   Base IRI, or null for base on input filename
      * @param dest      Where to send the quads from the parser.
      */
-    public static void parseQuads(String filename, Lang lang, String baseIRI, RDFParserOutput dest)
+    public static void parseQuads(String filename, Lang lang, String baseIRI, SinkRDF dest)
     {
         org.apache.jena.riot.RiotReader.parse(filename, lang, baseIRI, dest) ;
     }
@@ -181,7 +182,7 @@ public class RiotReader
      * @param baseIRI   Base IRI. 
      * @param dest      Where to send the quads from the parser.
      */
-    public static void parseQuads(InputStream in, Lang lang, String baseIRI, RDFParserOutput dest)
+    public static void parseQuads(InputStream in, Lang lang, String baseIRI, SinkRDF dest)
     {
         org.apache.jena.riot.RiotReader.parse(in, lang, baseIRI, dest) ;
     }
@@ -189,13 +190,13 @@ public class RiotReader
     // -------- Parsers
     
     /** Create a parser for a triples language */  
-    public static LangRIOT createParserTriples(InputStream input, Lang lang, String baseIRI, RDFParserOutput dest)
+    public static LangRIOT createParserTriples(InputStream input, Lang lang, String baseIRI, SinkRDF dest)
     {
         return org.apache.jena.riot.RiotReader.createParser(input, lang, baseIRI, dest) ;
     }
     
     /** Create a parser for a triples language */  
-    public static LangRIOT createParserTriples(Tokenizer tokenizer, Lang lang, String baseIRI, RDFParserOutput dest)
+    public static LangRIOT createParserTriples(Tokenizer tokenizer, Lang lang, String baseIRI, SinkRDF dest)
     {
         return org.apache.jena.riot.RiotReader.createParser(tokenizer, lang, baseIRI, dest) ;
     }
@@ -218,14 +219,14 @@ public class RiotReader
     }
     
     /** Create a parser for a quads (or triples) language */  
-    public static LangRIOT createParserQuads(InputStream input, Lang lang, String baseIRI, RDFParserOutput dest)
+    public static LangRIOT createParserQuads(InputStream input, Lang lang, String baseIRI, SinkRDF dest)
     {
         Tokenizer tokenizer = TokenizerFactory.makeTokenizerUTF8(input) ;
         return createParserQuads(tokenizer, lang, baseIRI, dest) ;
     }
     
     /** Create a parser for a quads language */  
-    public static LangRIOT createParserQuads(Tokenizer tokenizer, Lang lang, String baseIRI, RDFParserOutput dest)
+    public static LangRIOT createParserQuads(Tokenizer tokenizer, Lang lang, String baseIRI, SinkRDF dest)
     {
         if ( RDFLanguages.sameLang(NQuads, lang) )
             return createParserNQuads(tokenizer, dest) ;
@@ -255,21 +256,21 @@ public class RiotReader
     }
     
     /** Create a parser for Turtle, with default behaviour */
-    public static LangTurtle createParserTurtle(InputStream input, String baseIRI, RDFParserOutput dest)
+    public static LangTurtle createParserTurtle(InputStream input, String baseIRI, SinkRDF dest)
     {
         Tokenizer tokenizer = TokenizerFactory.makeTokenizerUTF8(input) ;
         return createParserTurtle(tokenizer, baseIRI, dest) ;
     }
     
     /** Create a parser for Turtle, with default behaviour */
-    public static LangTurtle createParserTurtle(Tokenizer tokenizer, String baseIRI, RDFParserOutput dest)
+    public static LangTurtle createParserTurtle(Tokenizer tokenizer, String baseIRI, SinkRDF dest)
     {
         LangTurtle parser = new LangTurtle(tokenizer, RiotLib.profile(RDFLanguages.Turtle, baseIRI), dest) ;
         return parser ;
     }
 
     /** Create a parser for RDF/XML */
-    public static LangRDFXML createParserRDFXML(InputStream input, String baseIRI, RDFParserOutput dest)
+    public static LangRDFXML createParserRDFXML(InputStream input, String baseIRI, SinkRDF dest)
     {
         if ( baseIRI == null )
             baseIRI = chooseBaseIRI() ;
@@ -278,27 +279,27 @@ public class RiotReader
     }
 
     /** Create parsers for RDF/JSON */
-    public static LangRDFJSON createParserRdfJson(Tokenizer tokenizer, RDFParserOutput dest)
+    public static LangRDFJSON createParserRdfJson(Tokenizer tokenizer, SinkRDF dest)
     {
     	LangRDFJSON parser = new LangRDFJSON(tokenizer, RiotLib.profile(RDFLanguages.RDFJSON, null), dest) ;
     	return parser;
     }
 
-    public static LangRDFJSON createParserRdfJson(InputStream input, RDFParserOutput dest)
+    public static LangRDFJSON createParserRdfJson(InputStream input, SinkRDF dest)
     {
     	TokenizerJSON tokenizer = new TokenizerJSON(PeekReader.makeUTF8(input)) ;
     	return createParserRdfJson(tokenizer, dest) ;
     }
     
     /** Create a parser for TriG, with default behaviour */
-    public static LangTriG createParserTriG(InputStream input, String baseIRI, RDFParserOutput dest)
+    public static LangTriG createParserTriG(InputStream input, String baseIRI, SinkRDF dest)
     {
         Tokenizer tokenizer = TokenizerFactory.makeTokenizerUTF8(input) ;
         return createParserTriG(tokenizer, baseIRI, dest) ;
     }
     
     /** Create a parser for TriG, with default behaviour */
-    public static LangTriG createParserTriG(Tokenizer tokenizer, String baseIRI, RDFParserOutput dest)
+    public static LangTriG createParserTriG(Tokenizer tokenizer, String baseIRI, SinkRDF dest)
     {
         if ( baseIRI == null )
             baseIRI = chooseBaseIRI() ;
@@ -307,28 +308,28 @@ public class RiotReader
     }
 
     /** Create a parser for N-Triples, with default behaviour */
-    public static LangNTriples createParserNTriples(InputStream input, RDFParserOutput dest)
+    public static LangNTriples createParserNTriples(InputStream input, SinkRDF dest)
     {
         Tokenizer tokenizer = TokenizerFactory.makeTokenizerASCII(input) ;
         return createParserNTriples(tokenizer, dest) ;
     }
     
     /** Create a parser for N-Triples, with default behaviour */
-    public static LangNTriples createParserNTriples(Tokenizer tokenizer, RDFParserOutput dest)
+    public static LangNTriples createParserNTriples(Tokenizer tokenizer, SinkRDF dest)
     {
         LangNTriples parser = new LangNTriples(tokenizer, RiotLib.profile(RDFLanguages.NTriples, null), dest) ;
         return parser ;
     }
     
     /** Create a parser for NQuads, with default behaviour */
-    public static LangNQuads createParserNQuads(InputStream input, RDFParserOutput dest)
+    public static LangNQuads createParserNQuads(InputStream input, SinkRDF dest)
     {
         Tokenizer tokenizer = TokenizerFactory.makeTokenizerASCII(input) ;
         return createParserNQuads(tokenizer, dest) ;
     }
     
     /** Create a parser for NQuads, with default behaviour */
-    public static LangNQuads createParserNQuads(Tokenizer tokenizer, RDFParserOutput dest)
+    public static LangNQuads createParserNQuads(Tokenizer tokenizer, SinkRDF dest)
     {
         LangNQuads parser = new LangNQuads(tokenizer, RiotLib.profile(RDFLanguages.NQuads, null), dest) ;
         return parser ;

Modified: jena/trunk/jena-arq/src/main/java/org/openjena/riot/RiotTripleParsePuller.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/org/openjena/riot/RiotTripleParsePuller.java?rev=1426285&r1=1426284&r2=1426285&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/org/openjena/riot/RiotTripleParsePuller.java (original)
+++ jena/trunk/jena-arq/src/main/java/org/openjena/riot/RiotTripleParsePuller.java Thu Dec 27 18:33:43 2012
@@ -24,8 +24,8 @@ import org.apache.jena.atlas.lib.Sink ;
 import org.apache.jena.riot.Lang ;
 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.SinkRDF ;
 
 import com.hp.hpl.jena.graph.Triple ;
 
@@ -44,7 +44,7 @@ public class RiotTripleParsePuller exten
     @Override
     protected LangRIOT createParser(Sink<Triple> sink)
     {
-        RDFParserOutput dest = RDFParserOutputLib.sinkTriples(sink) ;
+        SinkRDF dest = RDFParserOutputLib.sinkTriples(sink) ;
         return RiotReader.createParser(in, lang, baseIRI, dest) ;
     }
 }

Modified: jena/trunk/jena-arq/src/main/java/riotcmd/CmdLangParse.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/riotcmd/CmdLangParse.java?rev=1426285&r1=1426284&r2=1426285&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/riotcmd/CmdLangParse.java (original)
+++ jena/trunk/jena-arq/src/main/java/riotcmd/CmdLangParse.java Thu Dec 27 18:33:43 2012
@@ -34,17 +34,13 @@ import org.apache.jena.atlas.lib.StrUtil
 import org.apache.jena.riot.* ;
 import org.apache.jena.riot.lang.LabelToNode ;
 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.out.NodeToLabel ;
 import org.apache.jena.riot.out.SinkQuadOutput ;
 import org.apache.jena.riot.out.SinkTripleOutput ;
 import org.apache.jena.riot.process.inf.InfFactory ;
 import org.apache.jena.riot.process.inf.InferenceSetupRDFS ;
-import org.apache.jena.riot.system.ErrorHandler ;
-import org.apache.jena.riot.system.ErrorHandlerFactory ;
-import org.apache.jena.riot.system.RiotLib ;
-import org.apache.jena.riot.system.SyntaxLabels ;
+import org.apache.jena.riot.system.* ;
 import org.apache.jena.riot.tokens.Tokenizer ;
 import org.apache.jena.riot.tokens.TokenizerFactory ;
 import org.apache.log4j.PropertyConfigurator ;
@@ -295,7 +291,7 @@ public abstract class CmdLangParse exten
                 s = InfFactory.infTriples(s, setup) ;
             
             SinkCounting<Triple> sink2 = new SinkCounting<Triple>(s) ;
-            RDFParserOutput dest = RDFParserOutputLib.sinkTriples(sink2) ;
+            SinkRDF dest = RDFParserOutputLib.sinkTriples(sink2) ;
             parser = RiotReader.createParser(in, lang, baseURI, dest) ;
             
             sink = sink2 ;
@@ -309,7 +305,7 @@ public abstract class CmdLangParse exten
                 s = InfFactory.infQuads(s, setup) ;
             
             SinkCounting<Quad> sink2 = new SinkCounting<Quad>(s) ;
-            RDFParserOutput dest = RDFParserOutputLib.sinkQuads(sink2) ;
+            SinkRDF dest = RDFParserOutputLib.sinkQuads(sink2) ;
             parser = RiotReader.createParser(in, lang, baseURI, dest) ;
             sink = sink2 ;
         }

Modified: jena/trunk/jena-arq/src/main/java/riotcmd/infer.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/riotcmd/infer.java?rev=1426285&r1=1426284&r2=1426285&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/riotcmd/infer.java (original)
+++ jena/trunk/jena-arq/src/main/java/riotcmd/infer.java Thu Dec 27 18:33:43 2012
@@ -28,10 +28,10 @@ import org.apache.jena.riot.Lang ;
 import org.apache.jena.riot.RDFLanguages ;
 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.out.SinkQuadOutput ;
 import org.apache.jena.riot.process.inf.InfFactory ;
+import org.apache.jena.riot.system.SinkRDF ;
 import arq.cmd.CmdException ;
 import arq.cmdline.ArgDecl ;
 import arq.cmdline.CmdGeneral ;
@@ -146,7 +146,7 @@ public class infer extends CmdGeneral
     {
         Lang lang = filename.equals("-") ? RDFLanguages.NQuads : RDFLanguages.filenameToLang(filename, RDFLanguages.NQuads) ;
         String baseURI = IRILib.filenameToIRI(filename) ;
-        RDFParserOutput sink = RDFParserOutputLib.sinkQuads(qsink) ;
+        SinkRDF sink = RDFParserOutputLib.sinkQuads(qsink) ;
         
         if ( RDFLanguages.isTriples(lang) )
         {

Modified: jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/lang/TestLangNQuads.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/lang/TestLangNQuads.java?rev=1426285&r1=1426284&r2=1426285&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/lang/TestLangNQuads.java (original)
+++ jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/lang/TestLangNQuads.java Thu Dec 27 18:33:43 2012
@@ -21,9 +21,9 @@ package org.apache.jena.riot.lang;
 import org.apache.jena.riot.RiotReader ;
 import org.apache.jena.riot.ErrorHandlerTestLib.ExFatal ;
 import org.apache.jena.riot.lang.LangRIOT ;
-import org.apache.jena.riot.lang.RDFParserOutput ;
 import org.apache.jena.riot.lang.RDFParserOutputCounting ;
 import org.apache.jena.riot.lang.RDFParserOutputLib ;
+import org.apache.jena.riot.system.SinkRDF ;
 import org.apache.jena.riot.tokens.Tokenizer ;
 import org.junit.Test ;
 
@@ -83,13 +83,13 @@ public class TestLangNQuads extends Test
     private DatasetGraph parseToDataset(String string)
     {
         DatasetGraph dsg = DatasetLib.createDatasetGraphMem() ;
-        RDFParserOutput dest = RDFParserOutputLib.dataset(dsg) ;
+        SinkRDF dest = RDFParserOutputLib.dataset(dsg) ;
         parse(dest, string) ;
         return dsg ;
     }
 
     @Override
-    protected LangRIOT createParser(Tokenizer tokenizer, RDFParserOutput sink)
+    protected LangRIOT createParser(Tokenizer tokenizer, SinkRDF sink)
     {
         return RiotReader.createParserNQuads(tokenizer, sink) ;
     }

Modified: jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/lang/TestLangNTriples.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/lang/TestLangNTriples.java?rev=1426285&r1=1426284&r2=1426285&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/lang/TestLangNTriples.java (original)
+++ jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/lang/TestLangNTriples.java Thu Dec 27 18:33:43 2012
@@ -27,6 +27,7 @@ import org.apache.jena.riot.RiotExceptio
 import org.apache.jena.riot.RiotReader ;
 import org.apache.jena.riot.ErrorHandlerTestLib.ErrorHandlerEx ;
 import org.apache.jena.riot.ErrorHandlerTestLib.ExFatal ;
+import org.apache.jena.riot.system.SinkRDF ;
 import org.apache.jena.riot.tokens.Tokenizer ;
 import org.junit.Test ;
 
@@ -101,7 +102,7 @@ public class TestLangNTriples extends Te
     }
 
     @Override
-    protected LangRIOT createParser(Tokenizer tokenizer, RDFParserOutput sink)
+    protected LangRIOT createParser(Tokenizer tokenizer, SinkRDF sink)
     {
         return RiotReader.createParserNTriples(tokenizer, sink) ;
     } 

Modified: jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/lang/TestLangNTuples.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/lang/TestLangNTuples.java?rev=1426285&r1=1426284&r2=1426285&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/lang/TestLangNTuples.java (original)
+++ jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/lang/TestLangNTuples.java Thu Dec 27 18:33:43 2012
@@ -29,10 +29,10 @@ import org.apache.jena.riot.ErrorHandler
 import org.apache.jena.riot.ErrorHandlerTestLib.ExFatal ;
 import org.apache.jena.riot.ErrorHandlerTestLib.ExWarning ;
 import org.apache.jena.riot.lang.LangRIOT ;
-import org.apache.jena.riot.lang.RDFParserOutput ;
 import org.apache.jena.riot.lang.RDFParserOutputCounting ;
 import org.apache.jena.riot.lang.RDFParserOutputLib ;
 import org.apache.jena.riot.system.RiotLib ;
+import org.apache.jena.riot.system.SinkRDF ;
 import org.apache.jena.riot.tokens.Tokenizer ;
 import org.apache.jena.riot.tokens.TokenizerFactory ;
 import org.junit.Test ;
@@ -167,7 +167,7 @@ abstract public class TestLangNTuples ex
         return tokenizer ;
     }
     
-    protected void parse(RDFParserOutput sink, String... strings ) 
+    protected void parse(SinkRDF sink, String... strings ) 
     {
         String string = StrUtils.strjoin("\n", strings) ;
         Tokenizer tokenizer = tokenizer(string) ;
@@ -176,7 +176,7 @@ abstract public class TestLangNTuples ex
         parser.parse() ;
     }
     
-    protected abstract LangRIOT createParser(Tokenizer tokenizer, RDFParserOutput sink) ;
+    protected abstract LangRIOT createParser(Tokenizer tokenizer, SinkRDF sink) ;
 
     final protected void parseCheck(String... strings)
     {

Modified: jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/lang/TestLangTrig.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/lang/TestLangTrig.java?rev=1426285&r1=1426284&r2=1426285&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/lang/TestLangTrig.java (original)
+++ jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/lang/TestLangTrig.java Thu Dec 27 18:33:43 2012
@@ -24,8 +24,8 @@ import org.apache.jena.riot.RiotReader ;
 import org.apache.jena.riot.ErrorHandlerTestLib.ErrorHandlerEx ;
 import org.apache.jena.riot.ErrorHandlerTestLib.ExWarning ;
 import org.apache.jena.riot.lang.LangTriG ;
-import org.apache.jena.riot.lang.RDFParserOutput ;
 import org.apache.jena.riot.lang.RDFParserOutputLib ;
+import org.apache.jena.riot.system.SinkRDF ;
 import org.apache.jena.riot.tokens.Tokenizer ;
 import org.apache.jena.riot.tokens.TokenizerFactory ;
 import org.junit.Test ;
@@ -88,7 +88,7 @@ public class TestLangTrig extends BaseTe
     {
         String string = StrUtils.strjoin("\n", strings) ;
         DatasetGraph dsg = DatasetLib.createDatasetGraphMem() ;
-        RDFParserOutput sink = RDFParserOutputLib.dataset(dsg) ;
+        SinkRDF sink = RDFParserOutputLib.dataset(dsg) ;
         Tokenizer tokenizer = TokenizerFactory.makeTokenizerString(string) ;
         LangTriG parser = RiotReader.createParserTriG(tokenizer, "http://base/", sink) ;
         parser.getProfile().setHandler(new ErrorHandlerEx()) ;

Modified: jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/lang/TestLangTurtle.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/lang/TestLangTurtle.java?rev=1426285&r1=1426284&r2=1426285&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/lang/TestLangTurtle.java (original)
+++ jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/lang/TestLangTurtle.java Thu Dec 27 18:33:43 2012
@@ -32,6 +32,7 @@ import org.apache.jena.riot.ErrorHandler
 import org.apache.jena.riot.ErrorHandlerTestLib.ExWarning ;
 import org.apache.jena.riot.* ;
 import org.apache.jena.riot.system.ErrorHandler ;
+import org.apache.jena.riot.system.SinkRDF ;
 import org.apache.jena.riot.tokens.Tokenizer ;
 import org.apache.jena.riot.tokens.TokenizerFactory ;
 import org.junit.AfterClass ;
@@ -106,7 +107,7 @@ public class TestLangTurtle extends Base
         Tokenizer tokenizer = TokenizerFactory.makeTokenizer(reader) ;
         
         Graph graph = GraphFactory.createDefaultGraph() ;
-        RDFParserOutput sink = RDFParserOutputLib.graph(graph) ;
+        SinkRDF sink = RDFParserOutputLib.graph(graph) ;
         LangTurtle parser = RiotReader.createParserTurtle(tokenizer, "http://base/", sink) ;
         parser.getProfile().setHandler(new ErrorHandlerEx()) ;
         parser.parse() ; 

Modified: jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/lang/TestParserFactory.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/lang/TestParserFactory.java?rev=1426285&r1=1426284&r2=1426285&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/lang/TestParserFactory.java (original)
+++ jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/lang/TestParserFactory.java Thu Dec 27 18:33:43 2012
@@ -26,7 +26,7 @@ import org.apache.jena.atlas.lib.Pair ;
 import org.apache.jena.atlas.lib.Tuple ;
 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.system.SinkRDF ;
 import org.apache.jena.riot.tokens.Tokenizer ;
 import org.apache.jena.riot.tokens.TokenizerFactory ;
 import org.junit.Test ;
@@ -39,7 +39,7 @@ import com.hp.hpl.jena.sparql.sse.SSE ;
 /** System-level testing of the parsers - testing the parser plumbing, not the language details */
 public class TestParserFactory extends BaseTest
 {
-    static class CatchParserOutput implements RDFParserOutput
+    static class CatchParserOutput implements SinkRDF
     {
         List<Triple>      triples     = new ArrayList<Triple>() ;
         List<Quad>        quads       = new ArrayList<Quad>() ;

Modified: jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/lang/TestTurtleTerms.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/lang/TestTurtleTerms.java?rev=1426285&r1=1426284&r2=1426285&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/lang/TestTurtleTerms.java (original)
+++ jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/lang/TestTurtleTerms.java Thu Dec 27 18:33:43 2012
@@ -21,9 +21,9 @@ package org.apache.jena.riot.lang;
 import org.apache.jena.atlas.junit.BaseTest ;
 import org.apache.jena.riot.RiotReader ;
 import org.apache.jena.riot.lang.LangTurtle ;
-import org.apache.jena.riot.lang.RDFParserOutput ;
 import org.apache.jena.riot.lang.RDFParserOutputLib ;
 import org.apache.jena.riot.system.PrefixMap ;
+import org.apache.jena.riot.system.SinkRDF ;
 import org.apache.jena.riot.tokens.Tokenizer ;
 import org.apache.jena.riot.tokens.TokenizerFactory ;
 import org.junit.Test ;
@@ -244,7 +244,7 @@ public class TestTurtleTerms extends Bas
 	    // Need to access the prefix mapping.
 	    
 	    Tokenizer tokenizer = TokenizerFactory.makeTokenizerString(testString) ;
-	    RDFParserOutput sink = RDFParserOutputLib.sinkNull() ;
+	    SinkRDF sink = RDFParserOutputLib.sinkNull() ;
 	    LangTurtle parser = RiotReader.createParserTurtle(tokenizer, "http://base/", sink) ;
 	    PrefixMap prefixMap = parser.getProfile().getPrologue().getPrefixMap() ;
 

Modified: jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/out/TestOutputRDFJSON.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/out/TestOutputRDFJSON.java?rev=1426285&r1=1426284&r2=1426285&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/out/TestOutputRDFJSON.java (original)
+++ jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/out/TestOutputRDFJSON.java Thu Dec 27 18:33:43 2012
@@ -27,9 +27,9 @@ import org.apache.jena.atlas.junit.BaseT
 import org.apache.jena.atlas.lib.StrUtils ;
 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.out.RDFJSONWriter ;
+import org.apache.jena.riot.system.SinkRDF ;
 import org.junit.Test ;
 
 import com.hp.hpl.jena.graph.Graph ;
@@ -170,7 +170,7 @@ public class TestOutputRDFJSON extends B
     {
         ByteArrayInputStream bin = new ByteArrayInputStream(bout.toByteArray()) ;
         Graph graph = GraphFactory.createGraphMem() ;
-        RDFParserOutput dest = RDFParserOutputLib.graph(graph) ; 
+        SinkRDF dest = RDFParserOutputLib.graph(graph) ; 
         LangRIOT parser = RiotReader.createParserRdfJson(bin, dest) ;
         parser.parse() ;
         return graph ;



Mime
View raw message