Open hlapp opened 7 years ago
I don't understand that. The root element has an xml:base defined on line 20, doesn't it?
Looks like it's still broken - as is, the ontology cannot be used by any OWL tooling. Let me know if you need help - or if you would like it removed from the OBO Library list of active ontologies (it's causing us problems right now).
I expect the problem is that the ontology imports http://www.w3.org/ns/prov#
But this isn't an OWL ontology, it's a webpage
But this isn't an OWL ontology, it's a webpage
It's both. It's content negotiated. With the correct content type, it returns an OWL ontology:
$ curl -sH "Accept: application/rdf+xml" -L http://www.w3.org/ns/prov
Do we know how the owlapi behaves here? On Mon, Apr 24, 2017 at 20:02 Hilmar Lapp notifications@github.com wrote:
But this isn't an OWL ontology, it's a webpage
It's both. It's content negotiated. With the correct content type, it returns an OWL ontology:
$ curl -sH "Accept: application/rdf+xml" -L http://www.w3.org/ns/prov
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/miapa/miapa/issues/25#issuecomment-296880849, or mute the thread https://github.com/notifications/unsubscribe-auth/AADGOT-jSMTZEi1Qv75O4a-W-wNRUMoMks5rzWIpgaJpZM4Kt4Jl .
Do we know how the owlapi behaves here?
It should work fine. For example, you can load PROV from the URL. That said, it does produce the same errors:
Level: INFO
Time: 1493128365595
Message: ------------------------------- Loading Ontology -------------------------------
Level: INFO
Time: 1493128365595
Message: Loading ontology from http://www.w3.org/ns/prov#
Level: INFO
Time: 1493128365773
Message: Notice: root element does not have an xml:base. Relative IRIs will be resolved against http://www.w3.org/ns/prov#
Level: INFO
Time: 1493128365780
Message: Imported ontology document http://www.w3.org/ns/prov-o# was not resolved to any documents defined in the ontology catalog.
Level: ERROR
Time: 1493128366039
Message: Illegal redeclarations of entities: reuse of entity http://www.w3.org/ns/prov#wasRevisionOf in punning not allowed [Declaration(ObjectProperty(<http://www.w3.org/ns/prov#wasRevisionOf>)), Declaration(AnnotationProperty(<http://www.w3.org/ns/prov#wasRevisionOf>))]
Level: ERROR
Time: 1493128366042
Message: Illegal redeclarations of entities: reuse of entity http://www.w3.org/ns/prov#specializationOf in punning not allowed [Declaration(ObjectProperty(<http://www.w3.org/ns/prov#specializationOf>)), Declaration(AnnotationProperty(<http://www.w3.org/ns/prov#specializationOf>))]
Level: INFO
Time: 1493128366044
Message: Finished loading imported ontology at http://www.w3.org/ns/prov-o#
Level: INFO
Time: 1493128366046
Message: Imported ontology document http://www.w3.org/ns/prov-o-inverses# was not resolved to any documents defined in the ontology catalog.
Level: INFO
Time: 1493128366122
Message: Notice: root element does not have an xml:base. Relative IRIs will be resolved against http://www.w3.org/ns/prov-o-inverses#
Level: ERROR
Time: 1493128366136
Message: Illegal redeclarations of entities: reuse of entity http://www.w3.org/ns/prov#wasRevisionOf in punning not allowed [Declaration(ObjectProperty(<http://www.w3.org/ns/prov#wasRevisionOf>)), Declaration(AnnotationProperty(<http://www.w3.org/ns/prov#wasRevisionOf>))]
Level: ERROR
Time: 1493128366137
Message: Illegal redeclarations of entities: reuse of entity http://www.w3.org/ns/prov#specializationOf in punning not allowed [Declaration(ObjectProperty(<http://www.w3.org/ns/prov#specializationOf>)), Declaration(AnnotationProperty(<http://www.w3.org/ns/prov#specializationOf>))]
Level: INFO
Time: 1493128366137
Message: Finished loading imported ontology at http://www.w3.org/ns/prov-o-inverses#
Level: INFO
Time: 1493128366138
Message: Imported ontology document http://www.w3.org/ns/prov-aq# was not resolved to any documents defined in the ontology catalog.
Level: INFO
Time: 1493128366207
Message: Notice: root element does not have an xml:base. Relative IRIs will be resolved against http://www.w3.org/ns/prov-aq#
Level: ERROR
Time: 1493128366208
Message: OWLOntologyManagerImpl.checkForOntologyIDChange() existing:Ontology(OntologyID(OntologyIRI(<http://www.w3.org/ns/prov#>) VersionIRI(<null>))) [Axioms: 0 Logical Axioms: 0] First 20 axioms: {}
Level: ERROR
Time: 1493128366209
Message: OWLOntologyManagerImpl.checkForOntologyIDChange() new:Ontology(OntologyID(Anonymous-8)) [Axioms: 7 Logical Axioms: 0] First 20 axioms: {Declaration(ObjectProperty(owl:topObjectProperty)) Declaration(AnnotationProperty(rdfs:isDefinedBy)) Declaration(AnnotationProperty(rdfs:label)) Declaration(Class(owl:Thing)) Declaration(AnnotationProperty(rdfs:seeAlso)) Declaration(AnnotationProperty(rdfs:comment)) Declaration(AnnotationProperty(owl:versionInfo)) }
Level: INFO
Time: 1493128366210
Message: Failed to load imported ontology at http://www.w3.org/ns/prov-aq#
Level: INFO
Time: 1493128366211
Message: Imported ontology document http://www.w3.org/ns/prov-dc# was not resolved to any documents defined in the ontology catalog.
Level: INFO
Time: 1493128366279
Message: Notice: root element does not have an xml:base. Relative IRIs will be resolved against http://www.w3.org/ns/prov-dc#
Level: ERROR
Time: 1493128366284
Message: Illegal redeclarations of entities: reuse of entity http://www.w3.org/ns/prov#wasRevisionOf in punning not allowed [Declaration(ObjectProperty(<http://www.w3.org/ns/prov#wasRevisionOf>)), Declaration(AnnotationProperty(<http://www.w3.org/ns/prov#wasRevisionOf>))]
Level: ERROR
Time: 1493128366285
Message: Illegal redeclarations of entities: reuse of entity http://www.w3.org/ns/prov#specializationOf in punning not allowed [Declaration(ObjectProperty(<http://www.w3.org/ns/prov#specializationOf>)), Declaration(AnnotationProperty(<http://www.w3.org/ns/prov#specializationOf>))]
Level: INFO
Time: 1493128366285
Message: Finished loading imported ontology at http://www.w3.org/ns/prov-dc#
Level: INFO
Time: 1493128366286
Message: Imported ontology document http://www.w3.org/ns/prov-dictionary# was not resolved to any documents defined in the ontology catalog.
Level: INFO
Time: 1493128366392
Message: Finished loading imported ontology at http://www.w3.org/ns/prov-dictionary#
Level: INFO
Time: 1493128366393
Message: Imported ontology document http://www.w3.org/ns/prov-links# was not resolved to any documents defined in the ontology catalog.
Level: INFO
Time: 1493128366465
Message: Notice: root element does not have an xml:base. Relative IRIs will be resolved against http://www.w3.org/ns/prov-links#
Level: ERROR
Time: 1493128366469
Message: Illegal redeclarations of entities: reuse of entity http://www.w3.org/ns/prov#wasRevisionOf in punning not allowed [Declaration(ObjectProperty(<http://www.w3.org/ns/prov#wasRevisionOf>)), Declaration(AnnotationProperty(<http://www.w3.org/ns/prov#wasRevisionOf>))]
Level: ERROR
Time: 1493128366469
Message: Illegal redeclarations of entities: reuse of entity http://www.w3.org/ns/prov#specializationOf in punning not allowed [Declaration(ObjectProperty(<http://www.w3.org/ns/prov#specializationOf>)), Declaration(AnnotationProperty(<http://www.w3.org/ns/prov#specializationOf>))]
Level: INFO
Time: 1493128366469
Message: Finished loading imported ontology at http://www.w3.org/ns/prov-links#
Level: ERROR
Time: 1493128366528
Message: Illegal redeclarations of entities: reuse of entity http://www.w3.org/ns/prov#wasRevisionOf in punning not allowed [Declaration(ObjectProperty(<http://www.w3.org/ns/prov#wasRevisionOf>)), Declaration(AnnotationProperty(<http://www.w3.org/ns/prov#wasRevisionOf>))]
Level: ERROR
Time: 1493128366528
Message: Illegal redeclarations of entities: reuse of entity http://www.w3.org/ns/prov#specializationOf in punning not allowed [Declaration(ObjectProperty(<http://www.w3.org/ns/prov#specializationOf>)), Declaration(AnnotationProperty(<http://www.w3.org/ns/prov#specializationOf>))]
Level: INFO
Time: 1493128366529
Message: Finished loading http://www.w3.org/ns/prov#
Level: INFO
Time: 1493128366561
Message: Loading for ontology and imports closure successfully completed in 965 ms
BTW the errors also occur if loading the PROV ontology only and directly (using http://www.w3.org/ns/prov-o as URI):
Level: INFO
Time: 1493128788653
Message: OWL API Version: 4.2.6.20160910-2108
Level: INFO
Time: 1493128788686
Message: Loading default configuration parameters for class org.semanticweb.elk.reasoner.config.ReasonerConfiguration
Level: INFO
Time: 1493128788707
Message: ------------------------------- Loading Ontology -------------------------------
Level: INFO
Time: 1493128788707
Message: Loading ontology from http://www.w3.org/ns/prov-o
Level: ERROR
Time: 1493128790566
Message: Illegal redeclarations of entities: reuse of entity http://www.w3.org/ns/prov#wasRevisionOf in punning not allowed [Declaration(ObjectProperty(<http://www.w3.org/ns/prov#wasRevisionOf>)), Declaration(AnnotationProperty(<http://www.w3.org/ns/prov#wasRevisionOf>))]
Level: ERROR
Time: 1493128790569
Message: Illegal redeclarations of entities: reuse of entity http://www.w3.org/ns/prov#specializationOf in punning not allowed [Declaration(ObjectProperty(<http://www.w3.org/ns/prov#specializationOf>)), Declaration(AnnotationProperty(<http://www.w3.org/ns/prov#specializationOf>))]
Level: INFO
Time: 1493128790571
Message: Finished loading http://www.w3.org/ns/prov-o
Level: INFO
Time: 1493128790591
Message: Loading for ontology and imports closure successfully completed in 1884 ms
FWIW these errors are not fatal in any way in Protégé. It's possible to run a reasoner after loading, for example, without further errors.
@stain and/or @paolociccarese do you have any insights here what the problem with PROV-O might be? Perhaps there's a discussion group or forum where this has come up already but I can't find any. Is there an issue tracker that would be applicable?
@hlapp well,we started the PROV-O ontology with Protege.. so who to blame? :) I think it has to do with OWL profiles - I'll have a look.
Note that importing http://www.w3.org/ns/prov# is wider than just http://www.w3.org/ns/prov-o as the former includes things like inverses and PROV-AQ extensions.
I can reproduce with Protege 5.2.0 with both http://www.w3.org/ns/prov-o.ttl and http://www.w3.org/ns/prov-o.rdf
OWL API Version: 4.2.8.20170104-2310
Loading default configuration parameters for class org.semanticweb.elk.reasoner.config.ReasonerConfiguration
------------------------------- Loading Ontology -------------------------------
Loading ontology from http://www.w3.org/ns/prov-o
Illegal redeclarations of entities: reuse of entity http://www.w3.org/ns/prov#wasRevisionOf in punning not allowed [Declaration(ObjectProperty(<http://www.w3.org/ns/prov#wasRevisionOf>)), Declaration(AnnotationProperty(<http://www.w3.org/ns/prov#wasRevisionOf>))]
Illegal redeclarations of entities: reuse of entity http://www.w3.org/ns/prov#specializationOf in punning not allowed [Declaration(ObjectProperty(<http://www.w3.org/ns/prov#specializationOf>)), Declaration(AnnotationProperty(<http://www.w3.org/ns/prov#specializationOf>))]
The problem seems to be that the PROV ontology uses two of its own object properties as annotation properties to describe the ontology itself. From http://www.w3.org/ns/prov-o.ttl
<http://www.w3.org/ns/prov-o#>
a owl:Ontology ;
rdfs:label "W3C PROVenance Interchange Ontology (PROV-O)"@en ;
# ..
rdfs:seeAlso <http://www.w3.org/TR/prov-o/>, <http://www.w3.org/ns/prov> ;
owl:versionIRI <http://www.w3.org/ns/prov-o-20130430> ;
:specializationOf <http://www.w3.org/ns/prov-o> ;
:wasRevisionOf <http://www.w3.org/ns/prov-o-20130312> .
:specializationOf
a owl:AnnotationProperty, owl:ObjectProperty .
# ..
:wasRevisionOf
a owl:AnnotationProperty, owl:ObjectProperty .
# ..
This similar mini-ontology causes the same problem: https://gist.github.com/stain/bab50aa1722929c0bc8bb14b9736b874
I could also reproduce it with my OWL profilechecker after updating it for OWLAPI 5.1.0.
The PROV ontology RDF/XML file was originally saved with OWLAPI 3.1.0 which didn't complain about this - I see however the warning with OWLAPI 3.4.2 and later.
The error message seems to come during loading and does (necessarily) not mean the ontology is invalid according to the profile:
stain@biggiebuntu:~$ profilechecker https://gist.githubusercontent.com/stain/bab50aa1722929c0bc8bb14b9736b874/raw/b7b212b0e27e6d0b4e2fa0f3ff9d3fabc79fdb99/punnedAnnotation.ttl Full
[main] ERROR uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl - Illegal redeclarations of entities: reuse of entity http://example.com/annotatedOntology#property1 in punning not allowed [Declaration(AnnotationProperty(<http://example.com/annotatedOntology#property1>)), Declaration(ObjectProperty(<http://example.com/annotatedOntology#property1>))]
Cannot pun between properties: <http://example.com/annotatedOntology#property1> [ObjectPropertyAssertion(<http://example.com/annotatedOntology#property1> <http://example.com/annotatedOntology#> <http://example.com/other>) in OntologyID(OntologyIRI(<http://example.com/annotatedOntology#>) VersionIRI(<http://example.com/annotatedOntology/0.1.0>))]
However if I don't use the annotation property on the ontology it loads without warning, and the same if I don't declare it explicitly as an AnnotationProperty.
As this error is only output to the logger during loading I am not sure how it is causing any problems for miapa (beyond causing worry) - but I'll check with the owlapi gang.
I do get a serious error from OWLAPI 5.1 from importing http://www.w3.org/ns/prov# (aka http://www.w3.org/ns/prov.ttl) as it imports http://www.w3.org/ns/prov-o# (aka http://www.w3.org/ns/prov-o.ttl -- however both declare <http://www.w3.org/ns/prov#>
as ontology, which OWLAPI 5 is not very happy about.
I will flag this with the rest of the PROV folks.
(BTW - I don't have problems opening either of them in Protege 5.2.0 - and even https://raw.githubusercontent.com/miapa/miapa/master/ontology/miapa.owl opens fine -- that uses OWLAPI 4)
When loading the miapa.owl ontology into Protégé, the following error occurs (once).