You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Donald Smith <Do...@argodata.com> on 2017/04/02 15:24:36 UTC

Re: [!!Mass Mail]Re: Ontology Imports

Thanks for helping. Let me get an example in place that demonstrates what I'm seeing.

> On Apr 2, 2017, at 10:15 AM, Andy Seaborne <an...@apache.org> wrote:
>
>
>
>> 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 <Do...@argodata.com> 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:dave.e.reynolds@gmail.com]
>>> Sent: Thursday, March 30, 2017 2:57 AM
>>> To: users@jena.apache.org
>>> 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.
--------------------------------------------------- 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.