if (log.isDebugEnabled()) log.debug("FileManager.readModel() URI: {} Base URI: {}", mappedURI, filenameOrURI);
return super.readModel(model, mappedURI, filenameOrURI, null); // let FileManager handle
}
TypedStream in = openNoMapOrNull(filenameOrURI);
if (in != null)
{
if (log.isDebugEnabled()) log.debug("Opened filename or URI {} with TypedStream {}", filenameOrURI, in);
Lang lang = RDFLanguages.contentTypeToLang(in.getMimeType());
if (lang != null) // do not read if MimeType/syntax are not known
{
String syntax = lang.getName();
if (log.isDebugEnabled()) log.debug("URI {} syntax is {}, reading it", filenameOrURI, syntax);
model.read(in.getInput(), filenameOrURI, syntax) ;
try { in.getInput().close(); } catch (IOException ex) {}
}
else
if (log.isDebugEnabled()) log.debug("Syntax for URI {} unknown, ignoring", filenameOrURI);
}
else