On 31/03/17 23:53, Martynas Jusevičius wrote:
Some of the code (at least OntDocumentManager) is still using
FileManager I believe.
It does go through to RIOT -
org.apache.jena.riot.lang.LangRDFXML.parse
is on the stacktrace.
But "http://example.com/ExampleOntology.owl" is an HTML page generated
by example.com for the 404.
If http://example.com/ExampleOntology.owl is in the document manage
cache, the code may be confused and using ".owl" as the syntax indicator
(that gets to RDF/XML).
Or it may be processing the HTML 404 error page and "Content-Type:
text/html" is taken as definitive.
Andy
The proper way IMO is to have a location-mapping and read ontology
(namespace) URI, not physical file URIs, and let LocationMapper take
care of the rest.
https://jena.apache.org/documentation/notes/file-manager.html
On Fri, Mar 31, 2017 at 8:38 PM, Donald Smith <[email protected]> wrote:
RDFDataMgr does fine while loading a given RDF file, but what I'm trying to do
is to use OntModel to read an ontology from local disk which would intern fetch
the imported ontologies. For any imported ontology that is fetched via HTTP
that is returned as RDF/XML works fine. For any imported ontology that is of
any other type, such as turtle, it fails.
Does OntModel.read(InputStream stream, String Lang) not use RDFDataMgr itself
to load imported ontologies?
-----Original Message-----
From: Dave Reynolds [mailto:[email protected]]
Sent: Thursday, March 30, 2017 2:57 AM
To: [email protected]
Subject: Re: Ontology Imports
On 29/03/17 20:54, Donald Smith wrote:
Given I have an ontology that imports one or more other ontologies, when I read
that ontology:
model.read("http://example.com/ExampleOntology.owl", "TURTLE");
That should be "Turtle" or, better, RDFLanguages.strLangTurtle or better still
use RDFDataMgr and let it work out the language.
Dave
--------------------------------------------------- Confidentiality Notice:
This electronic mail transmission is confidential, may be privileged and should
be read or retained only by the intended recipient. If you have received this
transmission in error, please immediately notify the sender and delete it from
your system.