jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [10/17] jena git commit: Change LangRDFXML into a ReaderRIOT.
Date Tue, 11 Apr 2017 10:05:37 GMT
Change LangRDFXML into a ReaderRIOT.

Adopt the "ReaderRIOT.Factory" pattern for RDF/NULL and TriX.


Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/bc74a338
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/bc74a338
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/bc74a338

Branch: refs/heads/master
Commit: bc74a3388fff08e61b9779b664a0d8ae3a7c4e6c
Parents: 845d73a
Author: Andy Seaborne <andy@apache.org>
Authored: Fri Apr 7 21:31:25 2017 +0100
Committer: Andy Seaborne <andy@apache.org>
Committed: Sat Apr 8 21:37:51 2017 +0100

----------------------------------------------------------------------
 .../org/apache/jena/riot/RDFParserRegistry.java |  40 ++-
 .../org/apache/jena/riot/lang/LangRDFJSON.java  |   1 -
 .../org/apache/jena/riot/lang/LangRDFXML.java   | 250 ------------------
 .../apache/jena/riot/lang/ReaderRDFNULL.java    |  20 +-
 .../org/apache/jena/riot/lang/ReaderRDFXML.java |  75 ------
 .../apache/jena/riot/lang/ReaderRIOTRDFXML.java | 254 +++++++++++++++++++
 .../org/apache/jena/riot/lang/ReaderTriX.java   |   9 +
 .../org/apache/jena/riot/lang/RiotParsers.java  | 191 --------------
 .../main/java/arq/cmdline/ModLangOutput.java    |   1 +
 .../src/main/java/org/apache/jena/tdb/TDB.java  |   4 +-
 10 files changed, 303 insertions(+), 542 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/bc74a338/jena-arq/src/main/java/org/apache/jena/riot/RDFParserRegistry.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/RDFParserRegistry.java b/jena-arq/src/main/java/org/apache/jena/riot/RDFParserRegistry.java
index 53becb3..f623643 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/RDFParserRegistry.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/RDFParserRegistry.java
@@ -18,7 +18,18 @@
 
 package org.apache.jena.riot;
 
-import static org.apache.jena.riot.RDFLanguages.*;
+import static org.apache.jena.riot.RDFLanguages.CSV;
+import static org.apache.jena.riot.RDFLanguages.JSONLD;
+import static org.apache.jena.riot.RDFLanguages.N3;
+import static org.apache.jena.riot.RDFLanguages.NQUADS;
+import static org.apache.jena.riot.RDFLanguages.NTRIPLES;
+import static org.apache.jena.riot.RDFLanguages.RDFJSON;
+import static org.apache.jena.riot.RDFLanguages.RDFNULL;
+import static org.apache.jena.riot.RDFLanguages.RDFXML;
+import static org.apache.jena.riot.RDFLanguages.THRIFT;
+import static org.apache.jena.riot.RDFLanguages.TRIG;
+import static org.apache.jena.riot.RDFLanguages.TRIX;
+import static org.apache.jena.riot.RDFLanguages.TURTLE;
 
 import java.io.InputStream ;
 import java.io.Reader ;
@@ -57,12 +68,14 @@ public class RDFParserRegistry
     /** Known quads languages */
     private static Set<Lang> langQuads    = new HashSet<>() ;
 
-    /** Generic parser factory. */
+    /** General parser factory for parsers implementned by "Lang" */
     private static ReaderRIOTFactory parserFactory          = new ReaderRIOTFactoryImpl()
;
+    
+    private static ReaderRIOTFactory parserFactoryRDFXML    = new ReaderRIOTRDFXML.Factory();

     private static ReaderRIOTFactory parserFactoryJsonLD    = new ReaderRIOTFactoryJSONLD()
;
     private static ReaderRIOTFactory parserFactoryThrift    = new ReaderRIOTFactoryThrift()
;
-    private static ReaderRIOTFactory parserFactoryTriX      = new ReaderRIOTFactoryTriX()
;
-    private static ReaderRIOTFactory parserFactoryRDFNULL   = new ReaderRIOTFactoryRDFNULL()
;
+    private static ReaderRIOTFactory parserFactoryTriX      = new ReaderTriX.ReaderRIOTFactoryTriX()
;
+    private static ReaderRIOTFactory parserFactoryRDFNULL   = new ReaderRDFNULL.Factory()
;
     private static ReaderRIOTFactory parserFactoryCSV       = new ReaderRIOTCSV.Factory()
;
         
     private static boolean initialized = false ;
@@ -80,12 +93,12 @@ public class RDFParserRegistry
         // Make sure the constants are initialized.
         RDFLanguages.init() ;
         
-        registerLangTriples(RDFXML,     parserFactory) ;
         registerLangTriples(NTRIPLES,   parserFactory) ;
         registerLangTriples(N3,         parserFactory) ;
         registerLangTriples(TURTLE,     parserFactory) ;
-        registerLangTriples(JSONLD,     parserFactoryJsonLD) ;
         registerLangTriples(RDFJSON,    parserFactory) ;
+        registerLangTriples(RDFXML,     parserFactoryRDFXML) ;
+        registerLangTriples(JSONLD,     parserFactoryJsonLD) ;
         registerLangTriples(CSV,        parserFactoryCSV) ;
         registerLangTriples(THRIFT,     parserFactoryThrift) ;
         registerLangTriples(TRIX,       parserFactoryTriX) ;
@@ -232,21 +245,6 @@ public class RDFParserRegistry
 
         @Override
         public void setParserProfile(ParserProfile profile) {}
-        
-    }
-
-    private static class ReaderRIOTFactoryTriX implements ReaderRIOTFactory {
-        @Override
-        public ReaderRIOT create(Lang language, ParserProfile profile) {
-            return new ReaderTriX(profile, profile.getErrorHandler());
-        }
-    }
-
-    private static class ReaderRIOTFactoryRDFNULL implements ReaderRIOTFactory {
-        @Override
-        public ReaderRIOT create(Lang language, ParserProfile profile) {
-            return new ReaderRDFNULL();
-        }
     }
 }
 

http://git-wip-us.apache.org/repos/asf/jena/blob/bc74a338/jena-arq/src/main/java/org/apache/jena/riot/lang/LangRDFJSON.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/lang/LangRDFJSON.java b/jena-arq/src/main/java/org/apache/jena/riot/lang/LangRDFJSON.java
index cdf0cdc..ceaf94f 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/lang/LangRDFJSON.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/lang/LangRDFJSON.java
@@ -37,7 +37,6 @@ import org.apache.jena.riot.tokens.Tokenizer ;
  */
 public class LangRDFJSON extends LangBase
 {
-
 	public LangRDFJSON(Tokenizer tokenizer, ParserProfile profile, StreamRDF dest)
 	{
 		super(tokenizer, profile, dest) ;

http://git-wip-us.apache.org/repos/asf/jena/blob/bc74a338/jena-arq/src/main/java/org/apache/jena/riot/lang/LangRDFXML.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/lang/LangRDFXML.java b/jena-arq/src/main/java/org/apache/jena/riot/lang/LangRDFXML.java
deleted file mode 100644
index ad70dd5..0000000
--- a/jena-arq/src/main/java/org/apache/jena/riot/lang/LangRDFXML.java
+++ /dev/null
@@ -1,250 +0,0 @@
-/*
- * 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.lang;
-
-import java.io.IOException ;
-import java.io.InputStream ;
-import java.io.Reader ;
-
-import org.apache.jena.atlas.io.IO ;
-import org.apache.jena.atlas.lib.Pair ;
-import org.apache.jena.datatypes.RDFDatatype ;
-import org.apache.jena.datatypes.TypeMapper ;
-import org.apache.jena.graph.Node ;
-import org.apache.jena.graph.NodeFactory ;
-import org.apache.jena.graph.Triple ;
-import org.apache.jena.rdf.model.RDFErrorHandler ;
-import org.apache.jena.rdfxml.xmlinput.* ;
-import org.apache.jena.rdfxml.xmlinput.impl.ARPSaxErrorHandler ;
-import org.apache.jena.riot.Lang ;
-import org.apache.jena.riot.RDFLanguages ;
-import org.apache.jena.riot.checker.CheckerLiterals ;
-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.StreamRDF ;
-import org.xml.sax.SAXException ;
-import org.xml.sax.SAXParseException ;
-
-/** RDF/XML.
- *
- * @see <a href="http://www.w3.org/TR/rdf-syntax-grammar/">http://www.w3.org/TR/rdf-syntax-grammar/</a>
- */
-public class LangRDFXML implements LangRIOT
-{
-    // This is not a full member of the RIOT suite because it needs to work
-    // with Xerces and already carries out it's own error handling and output
-    
-    private ARP arp = new ARP() ;
-    
-    private InputStream input = null ;
-    private Reader reader = null ;
-    private String xmlBase ;
-    private String filename ;
-    private StreamRDF sink ;
-    private ParserProfile profile ;             // Warning - we don't use all of this.
-    
-    @Override
-    public ParserProfile getProfile()
-    {
-        return profile ;
-    }
-
-    @Override
-    public void setProfile(ParserProfile profile)
-    { this.profile = profile ; }
-
-    public static LangRDFXML create(InputStream in, String xmlBase, String filename, ErrorHandler
errorHandler, StreamRDF sink) {
-        return new LangRDFXML(in, xmlBase, filename, errorHandler, sink) ;
-    }
-
-    public static LangRDFXML create(Reader reader, String xmlBase, String filename, ErrorHandler
errorHandler, StreamRDF sink) {
-        return new LangRDFXML(reader, xmlBase, filename, errorHandler, sink) ;
-    }    
-
-    public static LangRDFXML create(String xmlBase, String filename, ErrorHandler errorHandler,
StreamRDF sink) {
-        return create(IO.openFile(filename), xmlBase, filename, errorHandler, sink) ;
-    }
-
-    private LangRDFXML(Reader reader, String xmlBase, String filename, ErrorHandler errorHandler,
StreamRDF sink) {
-        this.reader = reader ;
-        this.xmlBase = xmlBase ;
-        this.filename = filename ;
-        this.sink = sink ;
-        this.profile = RiotLib.profile(getLang(), xmlBase, errorHandler) ;
-    }
-    
-    private LangRDFXML(InputStream in, String xmlBase, String filename, ErrorHandler errorHandler,
StreamRDF sink) {
-        this.input = in ;
-        this.xmlBase = xmlBase ;
-        this.filename = filename ;
-        this.sink = sink ;
-        this.profile = RiotLib.profile(getLang(), xmlBase, errorHandler) ;
-    }
-    
-    @Override
-    public Lang getLang()   { return RDFLanguages.RDFXML ; }
-
-    public static boolean RiotUniformCompatibility = false ;
-    // Warnings in ARP that should be errors to be compatible with
-    // non-XML-based languages.  e.g. language tags should be
-    // syntactically valid.
-    private static int[] additionalErrors = new int[] {
-        ARPErrorNumbers.WARN_MALFORMED_XMLLANG
-        //, ARPErrorNumbers.WARN_STRING_NOT_NORMAL_FORM_C
-    } ;
-    
-    @Override
-    public void parse() {
-        // Hacked out of ARP because of all the "private" methods
-        sink.start() ;
-        HandlerSink rslt = new HandlerSink(sink, getProfile().getHandler()) ;
-        arp.getHandlers().setStatementHandler(rslt) ;
-        arp.getHandlers().setErrorHandler(rslt) ;
-        arp.getHandlers().setNamespaceHandler(rslt) ;
-
-        if ( RiotUniformCompatibility ) {
-            ARPOptions options = arp.getOptions() ;
-            // Convert some warnings to errors for compatible behaviour for all parsers.
-            for ( int code : additionalErrors )
-                options.setErrorMode(code, ARPErrorNumbers.EM_FATAL) ;
-            arp.setOptionsWith(options) ;
-        }
-
-        try {
-            if ( reader != null )
-                arp.load(reader, xmlBase) ;
-            else
-                arp.load(input, xmlBase) ;
-        }
-        catch (IOException e) {
-            getProfile().getHandler().error(filename + ": " + ParseException.formatMessage(e),
-1, -1) ;
-        }
-        catch (SAXParseException e) {
-            // already reported.
-        }
-        catch (SAXException sax) {
-            getProfile().getHandler().error(filename + ": " + ParseException.formatMessage(sax),
-1, -1) ;
-        }
-        sink.finish() ;
-    }
-    
-    private static class HandlerSink extends ARPSaxErrorHandler implements StatementHandler,
NamespaceHandler {
-        private StreamRDF       output ;
-        private ErrorHandler    errHandler ;
-        private CheckerLiterals checker ;
-
-        HandlerSink(StreamRDF output, ErrorHandler errHandler) {
-            super(new ErrorHandlerBridge(errHandler)) ;
-            this.output = output ;
-            this.errHandler = errHandler ;
-            this.checker = new CheckerLiterals(errHandler) ;
-        }
-        
-        @Override
-        public void statement(AResource subj, AResource pred, AResource obj)
-        { output.triple(convert(subj, pred, obj)); }
-
-        @Override
-        public void statement(AResource subj, AResource pred, ALiteral lit)
-        { output.triple(convert(subj, pred, lit)) ; }
-
-        // From JenaReader
-        private static Node convert(ALiteral lit) {
-            String dtURI = lit.getDatatypeURI();
-            if (dtURI == null)
-                return NodeFactory.createLiteral(lit.toString(), lit.getLang());
-
-            if (lit.isWellFormedXML()) {
-                return NodeFactory.createLiteral(lit.toString(), null, true);
-            }
-
-            RDFDatatype dt = TypeMapper.getInstance().getSafeTypeByName(dtURI);
-            return NodeFactory.createLiteral(lit.toString(), dt);
-
-        }
-
-        private static Node convert(AResource r) {
-            if (!r.isAnonymous())
-                return NodeFactory.createURI(r.getURI());
-
-            // String id = r.getAnonymousID();
-            Node rr = (Node) r.getUserData();
-            if (rr == null) {
-                rr = NodeFactory.createBlankNode();
-                r.setUserData(rr);
-            }
-            return rr;
-
-        }
-
-        private Triple convert(AResource s, AResource p, AResource o) {
-            return Triple.create(convert(s), convert(p), convert(o)) ;
-        }
-
-        private Triple convert(AResource s, AResource p, ALiteral o) {
-            Node object = convert(o) ;
-            checker.check(object, -1, -1) ;
-            return Triple.create(convert(s), convert(p), object) ;
-        }
-
-        @Override
-        public void startPrefixMapping(String prefix, String uri) {
-            output.prefix(prefix, uri) ;
-        }
-
-        @Override
-        public void endPrefixMapping(String prefix) {}
-    }
-
-    private static class ErrorHandlerBridge implements RDFErrorHandler {
-        private ErrorHandler errorHandler ;
-
-        ErrorHandlerBridge(ErrorHandler hander) {
-            this.errorHandler = hander ;
-        }
-
-        @Override
-        public void warning(Exception e) {
-            Pair<Integer, Integer> p = getLineCol(e) ;
-            errorHandler.warning(e.getMessage(), p.getLeft(), p.getRight()) ;
-        }
-
-        @Override
-        public void error(Exception e) {
-            Pair<Integer, Integer> p = getLineCol(e) ;
-            errorHandler.error(e.getMessage(), p.getLeft(), p.getRight()) ;
-        }
-
-        @Override
-        public void fatalError(Exception e) {
-            Pair<Integer, Integer> p = getLineCol(e) ;
-            errorHandler.fatal(e.getMessage(), p.getLeft(), p.getRight()) ;
-        }
-
-        private static Pair<Integer, Integer> getLineCol(Exception e) {
-            if ( e instanceof SAXParseException ) {
-                SAXParseException esax = (SAXParseException)e ;
-                return Pair.create(esax.getLineNumber(), esax.getColumnNumber()) ;
-            } else {
-                return Pair.create(-1, -1) ;
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/bc74a338/jena-arq/src/main/java/org/apache/jena/riot/lang/ReaderRDFNULL.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/lang/ReaderRDFNULL.java b/jena-arq/src/main/java/org/apache/jena/riot/lang/ReaderRDFNULL.java
index 29a44af..aae53e1 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/lang/ReaderRDFNULL.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/lang/ReaderRDFNULL.java
@@ -20,19 +20,35 @@ package org.apache.jena.riot.lang;
 import java.io.InputStream ;
 import java.io.Reader ;
 
+import org.apache.jena.atlas.io.IO;
 import org.apache.jena.atlas.web.ContentType ;
+import org.apache.jena.riot.Lang;
 import org.apache.jena.riot.ReaderRIOT ;
+import org.apache.jena.riot.ReaderRIOTFactory;
 import org.apache.jena.riot.system.ParserProfile ;
 import org.apache.jena.riot.system.StreamRDF ;
 import org.apache.jena.sparql.util.Context ;
 
 public class ReaderRDFNULL implements ReaderRIOT {
+
+    public static class Factory implements ReaderRIOTFactory {
+        @Override
+        public ReaderRIOT create(Lang language, ParserProfile profile) {
+            return new ReaderRDFNULL();
+        }
+    }
+    
     public ReaderRDFNULL() {}
+    
     @Override
-    public void read(InputStream in, String baseURI, ContentType ct, StreamRDF output, Context
context) {}
+    public void read(InputStream in, String baseURI, ContentType ct, StreamRDF output, Context
context) {
+        IO.close(in);
+    }
 
     @Override
-    public void read(Reader reader, String baseURI, ContentType ct, StreamRDF output, Context
context) {}
+    public void read(Reader reader, String baseURI, ContentType ct, StreamRDF output, Context
context) {
+        IO.close(reader);
+    }
 
     @Override
     public ParserProfile getParserProfile() {

http://git-wip-us.apache.org/repos/asf/jena/blob/bc74a338/jena-arq/src/main/java/org/apache/jena/riot/lang/ReaderRDFXML.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/lang/ReaderRDFXML.java b/jena-arq/src/main/java/org/apache/jena/riot/lang/ReaderRDFXML.java
deleted file mode 100644
index a69c8a4..0000000
--- a/jena-arq/src/main/java/org/apache/jena/riot/lang/ReaderRDFXML.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * 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.lang;
-
-import java.io.InputStream ;
-import java.io.Reader ;
-
-import org.apache.jena.atlas.web.ContentType ;
-import org.apache.jena.riot.ReaderRIOT ;
-import org.apache.jena.riot.SysRIOT;
-import org.apache.jena.riot.system.*;
-import org.apache.jena.sparql.util.Context ;
-
-public class ReaderRDFXML implements ReaderRIOT {
-    private /*final*/ ErrorHandler errorHandler;
-    private /*final*/ MakerRDF maker;
-    
-    public ReaderRDFXML(MakerRDF maker, ErrorHandler errorHandler) {
-        this.maker = maker;
-        this.errorHandler = errorHandler;
-    }
-
-    @Override
-    public void read(InputStream in, String baseURI, ContentType ct, StreamRDF output, Context
context) {
-        baseURI = baseURI_RDFXML(baseURI) ;
-        LangRDFXML parser = LangRDFXML.create(in, baseURI, baseURI, ErrorHandlerFactory.getDefaultErrorHandler(),
output) ;
-        parser.parse();
-    }
-        
-    @Override
-    public void read(Reader reader, String baseURI, ContentType ct, StreamRDF output, Context
context) {
-        baseURI = baseURI_RDFXML(baseURI) ;
-        LangRDFXML parser = LangRDFXML.create(reader, baseURI, baseURI, ErrorHandlerFactory.getDefaultErrorHandler(),
output) ;
-        parser.parse();
-    }
-    
-    @Override
-    public ParserProfile getParserProfile() {
-        if ( maker instanceof ParserProfile )
-            return (ParserProfile)maker;
-        throw new UnsupportedOperationException() ;
-    }
-
-    @Override
-    public void setParserProfile(ParserProfile profile) {
-        maker = profile ;
-    }
-    
-    /** Sort out the base URI for RDF/XML parsing. */
-    private static String baseURI_RDFXML(String baseIRI) {
-        // LangRIOT derived from LangEngine do this in ParserProfile 
-        if ( baseIRI == null )
-            return SysRIOT.chooseBaseIRI() ;
-        else
-            // This normalizes the URI.
-            return SysRIOT.chooseBaseIRI(baseIRI) ;
-    }
-}
-

http://git-wip-us.apache.org/repos/asf/jena/blob/bc74a338/jena-arq/src/main/java/org/apache/jena/riot/lang/ReaderRIOTRDFXML.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/lang/ReaderRIOTRDFXML.java b/jena-arq/src/main/java/org/apache/jena/riot/lang/ReaderRIOTRDFXML.java
new file mode 100644
index 0000000..726f006
--- /dev/null
+++ b/jena-arq/src/main/java/org/apache/jena/riot/lang/ReaderRIOTRDFXML.java
@@ -0,0 +1,254 @@
+/*
+ * 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.lang;
+
+import java.io.IOException ;
+import java.io.InputStream ;
+import java.io.Reader ;
+
+import org.apache.jena.atlas.lib.Pair ;
+import org.apache.jena.atlas.web.ContentType;
+import org.apache.jena.datatypes.RDFDatatype ;
+import org.apache.jena.datatypes.TypeMapper ;
+import org.apache.jena.graph.Node ;
+import org.apache.jena.graph.NodeFactory ;
+import org.apache.jena.graph.Triple ;
+import org.apache.jena.rdf.model.RDFErrorHandler ;
+import org.apache.jena.rdfxml.xmlinput.* ;
+import org.apache.jena.rdfxml.xmlinput.impl.ARPSaxErrorHandler ;
+import org.apache.jena.riot.Lang;
+import org.apache.jena.riot.ReaderRIOT;
+import org.apache.jena.riot.ReaderRIOTFactory;
+import org.apache.jena.riot.SysRIOT;
+import org.apache.jena.riot.checker.CheckerLiterals ;
+import org.apache.jena.riot.system.ErrorHandler ;
+import org.apache.jena.riot.system.ParserProfile ;
+import org.apache.jena.riot.system.StreamRDF ;
+import org.apache.jena.sparql.util.Context;
+import org.xml.sax.SAXException ;
+import org.xml.sax.SAXParseException ;
+
+/** RDF/XML.
+ *
+ * @see <a href="http://www.w3.org/TR/rdf-syntax-grammar/">http://www.w3.org/TR/rdf-syntax-grammar/</a>
+ */
+public class ReaderRIOTRDFXML  implements ReaderRIOT
+{
+    public static class Factory implements ReaderRIOTFactory {
+        @Override
+        public ReaderRIOT create(Lang language, ParserProfile parserProfile) {
+            return new ReaderRIOTRDFXML(parserProfile.getErrorHandler()) ;
+        }
+    }
+    
+    private ARP arp = new ARP() ;
+    
+    private InputStream input = null ;
+    private Reader reader = null ;
+    private String xmlBase ;
+    private String filename ;
+    private StreamRDF sink ;
+    private ErrorHandler errorHandler; 
+    
+    @Override
+    public ParserProfile getParserProfile() {
+        return null ;
+    }
+
+    @Override
+    public void setParserProfile(ParserProfile profile)
+    { this.errorHandler = profile.getErrorHandler() ; }
+
+    public ReaderRIOTRDFXML(ErrorHandler errorHandler) {
+        this.errorHandler = errorHandler; 
+    }
+    
+    @Override
+    public void read(InputStream in, String baseURI, ContentType ct, StreamRDF output, Context
context) {
+        this.input = in ;
+        this.xmlBase = baseURI_RDFXML(baseURI) ;
+        this.filename = baseURI ;
+        this.sink = output ;
+        parse();
+    }
+
+    @Override
+    public void read(Reader reader, String baseURI, ContentType ct, StreamRDF output, Context
context) {
+        this.reader = reader ;
+        this.xmlBase = baseURI_RDFXML(baseURI) ;
+        this.filename = baseURI ;
+        this.sink = output ;
+        parse();
+    }
+
+    public static boolean RiotUniformCompatibility = false ;
+    // Warnings in ARP that should be errors to be compatible with
+    // non-XML-based languages.  e.g. language tags should be
+    // syntactically valid.
+    private static int[] additionalErrors = new int[] {
+        ARPErrorNumbers.WARN_MALFORMED_XMLLANG
+        //, ARPErrorNumbers.WARN_STRING_NOT_NORMAL_FORM_C
+    } ;
+    
+    public void parse() {
+        // Hacked out of ARP because of all the "private" methods
+        sink.start() ;
+        HandlerSink rslt = new HandlerSink(sink, errorHandler) ;
+        arp.getHandlers().setStatementHandler(rslt) ;
+        arp.getHandlers().setErrorHandler(rslt) ;
+        arp.getHandlers().setNamespaceHandler(rslt) ;
+
+        if ( RiotUniformCompatibility ) {
+            ARPOptions options = arp.getOptions() ;
+            // Convert some warnings to errors for compatible behaviour for all parsers.
+            for ( int code : additionalErrors )
+                options.setErrorMode(code, ARPErrorNumbers.EM_FATAL) ;
+            arp.setOptionsWith(options) ;
+        }
+
+        try {
+            if ( reader != null )
+                arp.load(reader, xmlBase) ;
+            else
+                arp.load(input, xmlBase) ;
+        }
+        catch (IOException e) {
+            errorHandler.error(filename + ": " + ParseException.formatMessage(e), -1, -1)
;
+        }
+        catch (SAXParseException e) {
+            // already reported.
+        }
+        catch (SAXException sax) {
+            errorHandler.error(filename + ": " + ParseException.formatMessage(sax), -1, -1)
;
+        }
+        sink.finish() ;
+    }
+    
+    /** Sort out the base URI for RDF/XML parsing. */
+    private static String baseURI_RDFXML(String baseIRI) {
+        if ( baseIRI == null )
+            return SysRIOT.chooseBaseIRI() ;
+        else
+            // This normalizes the URI.
+            return SysRIOT.chooseBaseIRI(baseIRI) ;
+    }
+    
+    private static class HandlerSink extends ARPSaxErrorHandler implements StatementHandler,
NamespaceHandler {
+        private StreamRDF       output ;
+        private ErrorHandler    errHandler ;
+        private CheckerLiterals checker ;
+
+        HandlerSink(StreamRDF output, ErrorHandler errHandler) {
+            super(new ErrorHandlerBridge(errHandler)) ;
+            this.output = output ;
+            this.errHandler = errHandler ;
+            this.checker = new CheckerLiterals(errHandler) ;
+        }
+        
+        @Override
+        public void statement(AResource subj, AResource pred, AResource obj)
+        { output.triple(convert(subj, pred, obj)); }
+
+        @Override
+        public void statement(AResource subj, AResource pred, ALiteral lit)
+        { output.triple(convert(subj, pred, lit)) ; }
+
+        // From JenaReader
+        private static Node convert(ALiteral lit) {
+            String dtURI = lit.getDatatypeURI();
+            if (dtURI == null)
+                return NodeFactory.createLiteral(lit.toString(), lit.getLang());
+
+            if (lit.isWellFormedXML()) {
+                return NodeFactory.createLiteral(lit.toString(), null, true);
+            }
+
+            RDFDatatype dt = TypeMapper.getInstance().getSafeTypeByName(dtURI);
+            return NodeFactory.createLiteral(lit.toString(), dt);
+
+        }
+
+        private static Node convert(AResource r) {
+            if (!r.isAnonymous())
+                return NodeFactory.createURI(r.getURI());
+
+            // String id = r.getAnonymousID();
+            Node rr = (Node) r.getUserData();
+            if (rr == null) {
+                rr = NodeFactory.createBlankNode();
+                r.setUserData(rr);
+            }
+            return rr;
+
+        }
+
+        private Triple convert(AResource s, AResource p, AResource o) {
+            return Triple.create(convert(s), convert(p), convert(o)) ;
+        }
+
+        private Triple convert(AResource s, AResource p, ALiteral o) {
+            Node object = convert(o) ;
+            checker.check(object, -1, -1) ;
+            return Triple.create(convert(s), convert(p), object) ;
+        }
+
+        @Override
+        public void startPrefixMapping(String prefix, String uri) {
+            output.prefix(prefix, uri) ;
+        }
+
+        @Override
+        public void endPrefixMapping(String prefix) {}
+    }
+
+    private static class ErrorHandlerBridge implements RDFErrorHandler {
+        private ErrorHandler errorHandler ;
+
+        ErrorHandlerBridge(ErrorHandler hander) {
+            this.errorHandler = hander ;
+        }
+
+        @Override
+        public void warning(Exception e) {
+            Pair<Integer, Integer> p = getLineCol(e) ;
+            errorHandler.warning(e.getMessage(), p.getLeft(), p.getRight()) ;
+        }
+
+        @Override
+        public void error(Exception e) {
+            Pair<Integer, Integer> p = getLineCol(e) ;
+            errorHandler.error(e.getMessage(), p.getLeft(), p.getRight()) ;
+        }
+
+        @Override
+        public void fatalError(Exception e) {
+            Pair<Integer, Integer> p = getLineCol(e) ;
+            errorHandler.fatal(e.getMessage(), p.getLeft(), p.getRight()) ;
+        }
+
+        private static Pair<Integer, Integer> getLineCol(Exception e) {
+            if ( e instanceof SAXParseException ) {
+                SAXParseException esax = (SAXParseException)e ;
+                return Pair.create(esax.getLineNumber(), esax.getColumnNumber()) ;
+            } else {
+                return Pair.create(-1, -1) ;
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/bc74a338/jena-arq/src/main/java/org/apache/jena/riot/lang/ReaderTriX.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/lang/ReaderTriX.java b/jena-arq/src/main/java/org/apache/jena/riot/lang/ReaderTriX.java
index 4c475f3..b693070 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/lang/ReaderTriX.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/lang/ReaderTriX.java
@@ -39,7 +39,9 @@ import org.apache.jena.datatypes.xsd.XSDDatatype ;
 import org.apache.jena.graph.Node ;
 import org.apache.jena.graph.NodeFactory ;
 import org.apache.jena.graph.Triple ;
+import org.apache.jena.riot.Lang;
 import org.apache.jena.riot.ReaderRIOT ;
+import org.apache.jena.riot.ReaderRIOTFactory;
 import org.apache.jena.riot.RiotException ;
 import org.apache.jena.riot.system.ErrorHandler ;
 import org.apache.jena.riot.system.MakerRDF ;
@@ -59,7 +61,14 @@ import org.apache.jena.vocabulary.RDF ;
  * @see StreamWriterTriX
  */
 public class ReaderTriX implements ReaderRIOT {
+    public static class ReaderRIOTFactoryTriX implements ReaderRIOTFactory {
+        @Override
+        public ReaderRIOT create(Lang language, ParserProfile profile) {
+            return new ReaderTriX(profile, profile.getErrorHandler());
+        }
+    }
 
+    
     // DTD for TrIX : The schema is a much longer.
 /*
 <!-- TriX: RDF Triples in XML -->

http://git-wip-us.apache.org/repos/asf/jena/blob/bc74a338/jena-arq/src/main/java/org/apache/jena/riot/lang/RiotParsers.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/lang/RiotParsers.java b/jena-arq/src/main/java/org/apache/jena/riot/lang/RiotParsers.java
index b3b278a..04311a5 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/lang/RiotParsers.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/lang/RiotParsers.java
@@ -22,7 +22,6 @@ import static org.apache.jena.riot.RDFLanguages.N3 ;
 import static org.apache.jena.riot.RDFLanguages.NQUADS ;
 import static org.apache.jena.riot.RDFLanguages.NTRIPLES ;
 import static org.apache.jena.riot.RDFLanguages.RDFJSON ;
-import static org.apache.jena.riot.RDFLanguages.RDFXML ;
 import static org.apache.jena.riot.RDFLanguages.TRIG ;
 import static org.apache.jena.riot.RDFLanguages.TURTLE ;
 
@@ -35,7 +34,6 @@ import org.apache.jena.atlas.json.io.parser.TokenizerJSON ;
 import org.apache.jena.graph.Triple;
 import org.apache.jena.riot.Lang;
 import org.apache.jena.riot.RDFLanguages;
-import org.apache.jena.riot.SysRIOT;
 import org.apache.jena.riot.system.*;
 import org.apache.jena.riot.tokens.Tokenizer ;
 import org.apache.jena.riot.tokens.TokenizerFactory ;
@@ -60,8 +58,6 @@ public class RiotParsers {
       
       /** InputStream input */
       public static LangRIOT createParser(InputStream input, Lang lang, String baseIRI, StreamRDF
dest, MakerRDF maker) {
-          if ( lang == RDFXML )
-              return createParserRDFXML(input, baseIRI, dest) ;
           if ( RDFLanguages.sameLang(RDFJSON, lang) ) {
               Tokenizer tokenizer = new TokenizerJSON(PeekReader.makeUTF8(input));
               return createParserRdfJson(tokenizer, dest, maker);
@@ -81,8 +77,6 @@ public class RiotParsers {
       
       /** Reader input */
       public static LangRIOT createParser(Reader input, Lang lang, String baseIRI, StreamRDF
dest, MakerRDF maker) {
-          if ( lang == RDFXML )
-              return createParserRDFXML(input, baseIRI, dest) ;
           if ( RDFLanguages.sameLang(RDFJSON, lang) ) {
               Tokenizer tokenizer = new TokenizerJSON(PeekReader.make(input));
               return createParserRdfJson(tokenizer, dest, maker);
@@ -170,190 +164,5 @@ public class RiotParsers {
           Tokenizer tokenizer = TokenizerFactory.makeTokenizerUTF8(input) ;
           return createParserNQuads(tokenizer, null,  maker) ;
       }
-
-      private static LangRDFXML createParserRDFXML(InputStream input, String baseIRI, StreamRDF
dest) {
-          baseIRI = baseURI_RDFXML(baseIRI) ;
-          LangRDFXML parser = LangRDFXML.create(input, baseIRI, baseIRI, ErrorHandlerFactory.getDefaultErrorHandler(),
dest) ;
-          return parser ;
-      }
-
-      private static LangRDFXML createParserRDFXML(Reader input, String baseIRI, StreamRDF
dest) {
-          baseIRI = baseURI_RDFXML(baseIRI) ;
-          LangRDFXML parser = LangRDFXML.create(input, baseIRI, baseIRI, ErrorHandlerFactory.getDefaultErrorHandler(),
dest) ;
-          return parser ;
-      }
-
-      /** Sort out the base URI for RDF/XML parsing. */
-      private static String baseURI_RDFXML(String baseIRI) {
-          // LangRIOT derived from LangEngine do this in ParserProfile 
-          if ( baseIRI == null )
-              return SysRIOT.chooseBaseIRI() ;
-          else
-              // This normalizes the URI.
-              return SysRIOT.chooseBaseIRI(baseIRI) ;
-      }
-    
-//    /** Create a parser engine.
-//     * Use {@link RDFDataMgr#createReader(Lang)}
-//     * @Deprecated Do not use - to be removed.
-//     */
-//    public static LangRIOT createParser(InputStream input, Lang lang, String baseIRI, StreamRDF
dest) {
-//        return createLangRIOT(input, lang, baseIRI, dest);
-//    }
-//    
-//    /** Create a parser engine.
-//     * Use {@link RDFDataMgr#createReader(Lang)}
-//     *  <b>Not part of the public API.</b>
-//     */
-//    public static LangRIOT createLangRIOT(InputStream input, Lang lang, String baseIRI,
StreamRDF dest) {
-//        if ( lang == RDFXML )
-//            return createParserRDFXML(input, baseIRI, dest) ;
-//        if ( lang == CSV )
-//            return new LangCSV (input, baseIRI, baseIRI, ErrorHandlerFactory.getDefaultErrorHandler(),
 dest);
-//            
-//        Tokenizer tokenizer = ( lang == RDFJSON ) ?
-//            new TokenizerJSON(PeekReader.makeUTF8(input)) :
-//                TokenizerFactory.makeTokenizerUTF8(input) ;
-//        return createParser(tokenizer, lang, baseIRI, dest) ;
-//    }
-//
-//    /** Create a parser engine
-//    *  @Deprecated Do not use - to be removed.
-//    */
-//    public static LangRIOT createParser(Reader input, Lang lang, String baseIRI, StreamRDF
dest) {
-//        return createLangRIOT(input, lang, baseIRI, dest);
-//    }
-//        
-//    /** Create a parser engine
-//     *  <b>Not part of the public API.</b>
-//     */
-//    public static LangRIOT createLangRIOT(Reader input, Lang lang, String baseIRI, StreamRDF
dest) {
-//        if ( lang == RDFXML )
-//            return createParserRDFXML(input, baseIRI, dest) ;
-//        if ( lang == CSV)
-//            return new LangCSV (input, baseIRI, baseIRI, ErrorHandlerFactory.getDefaultErrorHandler(),
 dest);
-//        
-//        @SuppressWarnings("deprecation")
-//        Tokenizer tokenizer = ( lang == RDFJSON ) ?
-//            new TokenizerJSON(PeekReader.make(input)) :
-//                TokenizerFactory.makeTokenizer(input) ;
-//        return createParser(tokenizer, lang, baseIRI, dest) ;
-//    }
-//
-//    /** Create an iterator for parsing N-Triples. */
-//    public static Iterator<Triple> createIteratorNTriples(InputStream input, StreamRDF
dest) {
-//        // LangNTriples supports iterator use.
-//        return createParserNTriples(input, dest) ;
-//    }
-//
-//    /** Create an iterator for parsing N-Quads. */
-//    public static Iterator<Quad> createIteratorNQuads(InputStream input, StreamRDF
dest) {
-//        // LangNQuads supports iterator use.
-//        return createParserNQuads(input, dest) ;
-//    }
-//
-//    private static LangRDFXML createParserRDFXML(InputStream input, String baseIRI, StreamRDF
dest) {
-//        baseIRI = baseURI_RDFXML(baseIRI) ;
-//        LangRDFXML parser = LangRDFXML.create(input, baseIRI, baseIRI, ErrorHandlerFactory.getDefaultErrorHandler(),
dest) ;
-//        return parser ;
-//    }
-//
-//    private static LangRDFXML createParserRDFXML(Reader input, String baseIRI, StreamRDF
dest) {
-//        baseIRI = baseURI_RDFXML(baseIRI) ;
-//        LangRDFXML parser = LangRDFXML.create(input, baseIRI, baseIRI, ErrorHandlerFactory.getDefaultErrorHandler(),
dest) ;
-//        return parser ;
-//    }
-//
-////    /*package*/ static LangTurtle createParserTurtle(InputStream input, String baseIRI,
StreamRDF dest) {
-////        Tokenizer tokenizer = TokenizerFactory.makeTokenizerUTF8(input) ;
-////        return createParserTurtle(tokenizer, baseIRI, dest) ;
-////    }
-//
-////    /*package*/ static LangRDFJSON createParserRdfJson(InputStream input, StreamRDF dest)
{
-////        TokenizerJSON tokenizer = new TokenizerJSON(PeekReader.makeUTF8(input)) ;
-////        return createParserRdfJson(tokenizer, dest) ;
-////    }
-////
-////    /*package*/ static LangTriG createParserTriG(InputStream input, String baseIRI, StreamRDF
dest) {
-////        Tokenizer tokenizer = TokenizerFactory.makeTokenizerUTF8(input) ;
-////        return createParserTriG(tokenizer, baseIRI, dest) ;
-////    }
-////
-//    private static LangNTriples createParserNTriples(InputStream input, StreamRDF dest)
{
-//        return createParserNTriples(input, CharSpace.UTF8, dest);
-//    }
-//
-//    private static  LangNTriples createParserNTriples(InputStream input, CharSpace charSpace,
StreamRDF dest) {
-//        Tokenizer tokenizer = charSpace == CharSpace.ASCII
-//            ? TokenizerFactory.makeTokenizerASCII(input) : TokenizerFactory.makeTokenizerUTF8(input);
-//        return createParserNTriples(tokenizer, dest) ;
-//    }
-//
-//    private static LangNQuads createParserNQuads(InputStream input, StreamRDF dest) {
-//        return createParserNQuads(input, CharSpace.UTF8, dest) ;
-//    }
-//
-//    private static LangNQuads createParserNQuads(InputStream input, CharSpace charSpace,
StreamRDF dest) {
-//        Tokenizer tokenizer = charSpace == CharSpace.ASCII ? TokenizerFactory.makeTokenizerASCII(input)
: TokenizerFactory.makeTokenizerUTF8(input) ;
-//        return createParserNQuads(tokenizer, dest) ;
-//    }
-//
-//    private static LangRIOT createParser(Tokenizer tokenizer, Lang lang, String baseIRI,
StreamRDF dest) {
-//        if ( RDFLanguages.sameLang(RDFXML, lang) )
-//            throw new RiotException("Not possible - can't parse RDF/XML from a RIOT token
stream") ;
-//        if ( RDFLanguages.sameLang(TURTLE, lang) || RDFLanguages.sameLang(N3,  lang) )

-//                return createParserTurtle(tokenizer, baseIRI, dest) ;
-//        if ( RDFLanguages.sameLang(NTRIPLES, lang) )
-//                return createParserNTriples(tokenizer, dest) ;
-//        if ( RDFLanguages.sameLang(RDFJSON, lang) )
-//            // But it must be a JSON tokenizer ...
-//            return createParserRdfJson(tokenizer, dest) ;
-//        
-//        if ( RDFLanguages.sameLang(NQUADS, lang) )
-//            return createParserNQuads(tokenizer, dest) ;
-//        if ( RDFLanguages.sameLang(TRIG, lang) )
-//            return createParserTriG(tokenizer, baseIRI, dest) ;
-//        return null ;
-//    }
-//
-//    /*package*/ static LangNTriples createParserNTriples(Tokenizer tokenizer, StreamRDF
dest) {
-//        /* XXX */ ParserProfile profile = RiotLib.profile(RDFLanguages.NTRIPLES, null)
;
-//        LangNTriples parser = new LangNTriples(tokenizer, profile, dest) ;
-//        return parser ;
-//    }
-//
-//    /*package*/ static LangNQuads createParserNQuads(Tokenizer tokenizer, StreamRDF dest)
{
-//        /* XXX */ ParserProfile profile = RiotLib.profile(RDFLanguages.NQUADS, null) ;
-//        LangNQuads parser = new LangNQuads(tokenizer, profile, dest) ;
-//        return parser ;
-//    }
-//
-//    /*package*/ static LangTurtle createParserTurtle(Tokenizer tokenizer, String baseIRI,
StreamRDF dest) {
-//        /* XXX */ ParserProfile profile = RiotLib.profile(RDFLanguages.TURTLE, baseIRI)
;
-//        LangTurtle parser = new LangTurtle(tokenizer, profile, dest) ;
-//        return parser ;
-//    }
-//
-//    /*package*/ static LangTriG createParserTriG(Tokenizer tokenizer, String baseIRI, StreamRDF
dest) {
-//        /* XXX */ ParserProfile profile = RiotLib.profile(RDFLanguages.TRIG, baseIRI);
-//        LangTriG parser = new LangTriG(tokenizer, profile, dest) ;
-//        return parser ;
-//    }
-//
-//    /*package*/ static LangRDFJSON createParserRdfJson(Tokenizer tokenizer, StreamRDF dest)
{
-//        /* XXX */ ParserProfile profile = RiotLib.profile(RDFLanguages.RDFJSON, null);
-//        LangRDFJSON parser = new LangRDFJSON(tokenizer, profile, dest) ;
-//    	return parser;
-//    }
-//
-//    /** Sort out the base URI for RDF/XML parsing. */
-//    private static String baseURI_RDFXML(String baseIRI) {
-//        // LangRIOT derived from LangEngine do this in ParserProfile 
-//        if ( baseIRI == null )
-//            return SysRIOT.chooseBaseIRI() ;
-//        else
-//            // This normalizes the URI.
-//            return SysRIOT.chooseBaseIRI(baseIRI) ;
-//    }
 }
 

http://git-wip-us.apache.org/repos/asf/jena/blob/bc74a338/jena-cmds/src/main/java/arq/cmdline/ModLangOutput.java
----------------------------------------------------------------------
diff --git a/jena-cmds/src/main/java/arq/cmdline/ModLangOutput.java b/jena-cmds/src/main/java/arq/cmdline/ModLangOutput.java
index ecc82ca..00dd303 100644
--- a/jena-cmds/src/main/java/arq/cmdline/ModLangOutput.java
+++ b/jena-cmds/src/main/java/arq/cmdline/ModLangOutput.java
@@ -34,6 +34,7 @@ import org.apache.jena.riot.RDFLanguages ;
 import org.apache.jena.riot.RDFWriterRegistry ;
 import org.apache.jena.riot.system.StreamRDFWriter ;
 
+@SuppressWarnings("deprecation")
 public class ModLangOutput extends ModBase
 {
     protected ArgDecl argOutput       = new ArgDecl(ArgDecl.HasValue, "out", "output") ;

http://git-wip-us.apache.org/repos/asf/jena/blob/bc74a338/jena-tdb/src/main/java/org/apache/jena/tdb/TDB.java
----------------------------------------------------------------------
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/TDB.java b/jena-tdb/src/main/java/org/apache/jena/tdb/TDB.java
index 03d189f..f31668f 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/TDB.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/TDB.java
@@ -30,7 +30,7 @@ import org.apache.jena.query.ARQ ;
 import org.apache.jena.query.Dataset ;
 import org.apache.jena.rdf.model.Model ;
 import org.apache.jena.reasoner.InfGraph ;
-import org.apache.jena.riot.lang.LangRDFXML ;
+import org.apache.jena.riot.lang.ReaderRIOTRDFXML;
 import org.apache.jena.sparql.SystemARQ ;
 import org.apache.jena.sparql.core.DatasetGraph ;
 import org.apache.jena.sparql.engine.main.StageBuilder ;
@@ -244,7 +244,7 @@ public class TDB {
             }
             initialized = true ;
             JenaSystem.logLifecycle("TDB.init - start") ;
-            LangRDFXML.RiotUniformCompatibility = true ;
+            ReaderRIOTRDFXML.RiotUniformCompatibility = true ;
             EnvTDB.processGlobalSystemProperties() ;
 
             MappingRegistry.addPrefixMapping(SystemTDB.tdbSymbolPrefix, SystemTDB.symbolNamespace)
;


Mime
View raw message