jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r1367925 - /jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/util/FileManager.java
Date Wed, 01 Aug 2012 11:36:30 GMT
Author: andy
Date: Wed Aug  1 11:36:30 2012
New Revision: 1367925

URL: http://svn.apache.org/viewvc?rev=1367925&view=rev
Log:
Determine syntax from URI

Modified:
    jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/util/FileManager.java

Modified: jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/util/FileManager.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/util/FileManager.java?rev=1367925&r1=1367924&r2=1367925&view=diff
==============================================================================
--- jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/util/FileManager.java (original)
+++ jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/util/FileManager.java Wed Aug  1 11:36:30
2012
@@ -368,7 +368,7 @@ public class FileManager
     
     private Model readModelWorker(Model model, String filenameOrURI, String baseURI, String
syntax)
     {
-        // Doesn't call open() - we want to make the synatx guess based on the mapped URI.
+        // Doesn't call open() - we want to make the syntax guess based on the mapped URI.
         String mappedURI = mapURI(filenameOrURI) ;
 
         if ( log.isDebugEnabled() && ! mappedURI.equals(filenameOrURI) )
@@ -376,8 +376,9 @@ public class FileManager
 
         if ( syntax == null && baseURI == null && mappedURI.startsWith( "http:"
) )
         {
-            // No syntax, no baseURI, HTTP URL ==> use content negotiation
-            model.read(mappedURI) ;
+            syntax = FileUtils.guessLang(mappedURI) ;
+            // Content negotation in next version (FileManager2) 
+            model.read(mappedURI, syntax) ;
             return model ;
         }
         



Mime
View raw message