jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject jena git commit: JENA-1316: Make AdapterFileManager behave like direct use of RDFDtaMgr
Date Sun, 09 Apr 2017 18:39:15 GMT
Repository: jena
Updated Branches:
  refs/heads/master f95300130 -> f1dd9342f


JENA-1316: Make AdapterFileManager behave like direct use of RDFDtaMgr


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

Branch: refs/heads/master
Commit: f1dd9342f14728bf413584cc90185095e34262c9
Parents: f953001
Author: Andy Seaborne <andy@apache.org>
Authored: Sun Apr 9 19:34:47 2017 +0100
Committer: Andy Seaborne <andy@apache.org>
Committed: Sun Apr 9 19:34:47 2017 +0100

----------------------------------------------------------------------
 .../java/org/apache/jena/riot/adapters/AdapterFileManager.java | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/f1dd9342/jena-arq/src/main/java/org/apache/jena/riot/adapters/AdapterFileManager.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/adapters/AdapterFileManager.java
b/jena-arq/src/main/java/org/apache/jena/riot/adapters/AdapterFileManager.java
index bdc3d44..d011328 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/adapters/AdapterFileManager.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/adapters/AdapterFileManager.java
@@ -24,6 +24,7 @@ import java.util.Iterator ;
 import org.apache.jena.atlas.web.TypedInputStream ;
 import org.apache.jena.rdf.model.Model ;
 import org.apache.jena.riot.Lang ;
+import org.apache.jena.riot.RDFDataMgr ;
 import org.apache.jena.riot.RDFLanguages ;
 import org.apache.jena.riot.SysRIOT ;
 import org.apache.jena.riot.system.stream.* ;
@@ -276,7 +277,7 @@ public class AdapterFileManager extends org.apache.jena.util.FileManager
             log.debug("Map: " + filenameOrURI + " => " + mappedURI) ;
 
         Lang lang = 
-            (syntax != null) 
+            (syntax != null)
             ? RDFLanguages.nameToLang(syntax)
             : RDFLanguages.resourceNameToLang(mappedURI, Lang.RDFXML) ;
 
@@ -285,8 +286,9 @@ public class AdapterFileManager extends org.apache.jena.util.FileManager
         if ( baseURI == null )
             baseURI = SysRIOT.chooseBaseIRI(filenameOrURI) ;
         try(TypedInputStream in = streamManager.openNoMapOrNull(mappedURI)) {
+            Lang lang2 = RDFDataMgr.determineLang(mappedURI, in.getContentType(), lang);
             // May be overridden by model implementation.
-            model.read(in, baseURI, lang.getName()) ;
+            model.read(in, baseURI, lang2.getName()) ;
         }
         return model ;
     }


Mime
View raw message