On 8/28/2013 19:43, Andy Seaborne wrote:
On 27/08/13 02:01, Holger Knublauch wrote:
I was too quick: with the latest SVN snapshot, the following test now
fails:

         Model owlrl = ModelFactory.createDefaultModel();
         owlrl.read("http://topbraid.org/spin/owlrl";);

I believe it should work, because that file is stored in RDF/XML, plus
Model.read(url) should use RDF/XML.

Holger,

Please can we have a complete set of examples?
(And a description of "fails".)

Sorry, I hoped the above would be sufficient, but I agree I should have clarified that "fails" means that it claims to be unable to determine the content type. But I see you have fixed the underlying issue and our tests now run green. Many thanks for that.



There was logic bug which I've just fixed. A set of tests have gone in as well : TestSynatxDetermination.

But let's look at the bigger picture. There is something going on here - it's to do with RDF 1.1.

Model.read(url) can not assume RDF/XML regardless anymore.

Come RDF 1.1 there is no one unique RDF serialization; previously, there was RDF/XML. I expect Turtle to overtake RDF/XML.

Yes this is great, and I believe everyone looks forward to getting rid of RDF/XML. However, as stated in my earlier emails, I believe this change of behavior needs to be clarified in the documentation, which (at Model.read(url) still states that RDF/XML will be used, while RIOT uses this language as a hint only.


Jena does not know what "owlrl" might be. In fact, earlier in this thread, you have an example where you store what was RDF/XML as TTL (my question on this is still outstanding).

Ok, let me try to rephrase our scenario. We have an ontology editor. Users edit local copies of RDF models that later may get uploaded to a web site, e.g. in RDF/XML format. Inside the ontology editor, no files are downloaded from the web. One of those files may represent the named graph http://example.org/graph.rdf and other files may point to this graph via owl:imports (which means that we cannot simply use another identifier at edit time). Our system maintains a mapping from graph URIs to local files so that it can resolve those owl:imports. When loaded, we use Model.read(InputStream, String, String) where the InputStream is manually opened from the local files. The 3rd (language) argument is being derived from the file name (e.g. graph.ttl) which is independent from the graph URI.


The server is returning "text/plain" [*] and the URL has no file extension. You have been relying on Jena's local behaviour which reflected the old world and has been increasing dubious for sometime. Many Turtle files are serves as text/plain; to some people, text/plain is N-triples. Current behaviour may change - whatever reduces support costs.

The best fix for you is to fix content negotiation at the server.

Yeah this would be good for sure. I believe the server is some standard externally hosted web server, and I believe some people may continue to simply upload their RDF/XML files (with no file ending) because that's easiest to do, even if not 100% clean.

Thanks
Holger

Reply via email to