I cannot find a method read(InputStream stream, String Lang) on Model (from which OntModel inherits its "read" methods). Are you by chance using read(InputStream in, String base), which is a very different semantic?
--- A. Soroka The University of Virginia Library > On Mar 31, 2017, at 2: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.
