On 13/03/18 18:44, Lewis John McGibbney wrote:
This is correct.
Do you suggest I augment the classpath?
On 2018/03/07 17:01:43, Andy Seaborne <a...@apache.org> wrote:
On 07/03/18 10:59, Andy Seaborne wrote:
Lewis - which version? Do yo have all the apache-jena-libs jars on the
classpath?Â RIOT rewirers Jena model reading.
It looks like you only have jena-core of some version on the classpath.
Also, there was an issue around redirect and remapping but it's fixed.
Â Â Â Â Andy
On 07/03/18 08:57, Dave Reynolds wrote:
I can't tell from the trace whether you are mapping the import URLs to
local files or are loading directly from the URL. If loading from
local files then you really need suffixes on those. I'll assume you
are loading from the URL ...
OntModels use a somewhat older stack of tools (FileManager) which
guesses the language based on the suffix, with a default of RDF/XML,
and then relies on content negotiation to deliver the guessed format.
Since your resources don't support conneg and don't support RDF/XML
(the official default) that's not going to work.
One option might be to create a subclass of FileManager which
overrides readModelWorker to either load the data via the newer
RDFDataMgr which has more sophisticated conneg support, or to change
the default syntax to Turtle. Then install that FileManager in the
OntDocumentManager you use for your loading.
On 07/03/18 04:28, lewis john mcgibbney wrote:
Over on the SWEET ontology suite  we recently changed out canonical
serialization to TTL. Additionally however, we removed all file suffixes
from the resources themselves, therefore although the following resource
 is serialized as TTL, you would never know unless you looked at
peeked into the server response.
I am experiencing issues when I attempt to load the SWEET 'master' file
, which essentially produces a graph by importing every file
ontology suite. The code I use to do this is as follows.
((OntModel) m).read(url, null, lang); //Where lang is the string
"TURTLE" depending on previous logic.
The stack trace I get is as follows 
As you can see it loads the sweetAll file correctly but chokes on the
imported resource http://sweetontology.net/realmSoil, which is also a
serialization but with no file suffix. The stack trace indicates that an
attempt is being made to parse the resource as RDF/XML... which in this
case is incorrect.
Any hints on how to override/define this behaviour?
Another related question, the large stack trace I receive from the above
parsing activity seems to also indicate that the OntModel.read logic
randomly processes imports when processing a resource such as . Is
Thanks for any hits folks, I appreciate it.