NCEAS / oboe

OBOE: Extensible Observation Ontology
30 stars 5 forks source link

ParseException in Jena #24

Open rac021 opened 3 years ago

rac021 commented 3 years ago

Hi,

When I try to load the oboe-core ontology from this Url : http://ecoinformatics.org/oboe/oboe.1.2/oboe-core.owl, Jena parser gives me the following Error :

fr.inria.edelweiss.kgtool.load.Load - fr.com.hp.hpl.jena.rdf.arp.ParseException {E301}
 White spaces are required between publicId and systemId.

It seems that there is a leading white space in front of the first tag

I did the test with the raw content from the https://raw.githubusercontent.com/NCEAS/oboe/master/oboe-core.owl url and this works fine, it's also Ok for the oboe-core 1.0 ( http://ecoinformatics.org/oboe/oboe.1.2/oboe-core.owl )

Can this be fixed ?

Thank's

jvendetti commented 3 years ago

I see that a link to this issue was posted on the BioPortal support list.

I entered that URL (http://ecoinformatics.org/oboe/oboe.1.2/oboe-core.owl) in a browser with the developer console open. The Network Monitor tab shows that it doesn't actually point to an OWL file. The HTTP status response code is "303 See Other":

The HyperText Transfer Protocol (HTTP) 303 See Other redirect status response code indicates that the redirects don't link to the newly uploaded resources, but to another page (such as a confirmation page or an upload progress page).

It ends up resolving to an ontology summary page for OBOE in the BioPortal application (https://bioportal.bioontology.org/ontologies/OBOE). It's not clear if this is what the ontology maintainers intended?

I also noticed that the BioPortal application is configured to check that URL nightly for new versions. This won't work, as BioPortal requires a URL that points directly to the ontology source file. I'll follow up on the BioPortal support list, copying the person that's listed as the ontology contact.

jvendetti commented 3 years ago

OK - it looks like I should retract what I previously said. I read the comments here: https://github.com/NCEAS/oboe/issues/22#issuecomment-540282581, and it appears that the URL is configured to return OWL:

Clients requesting http://ecoinformatics.org/oboe/oboe.1.2/oboe-core.owl or related 1.2 terms/properties with an Accept header of text/html (i.e., web browsers) are now redirected to BioPortal. All others get the OWL as text/plain.

I checked BioPortal's nightly pull logs, and it looks like the software is able to successfully check that URL for new versions.

Is there a particular reason that a link to this issue was posted on our support list today?

jvendetti commented 3 years ago

I wrote some test code to load this ontology using the OWL API (version 4.5.17), which is what BioPortal uses internally. I wasn't able to reproduce the error reported above with Jena.

OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
IRI ontologyIRI = IRI.create("http://ecoinformatics.org/oboe/oboe.1.2/oboe-core.owl");
OWLOntology ontology = manager.loadOntology(ontologyIRI);
System.out.println("Axiom count: " + ontology.getAxiomCount());

Axiom count: 337