You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
circular property ( like rdfs:isDefinedBy or dcterms:isVersionOf ) in .ttl causes owl:imports to overwrite OntologyIRI #1080
changed the title [-]circular rdfs:isDefinedBy in .ttl causes owl:imports to overwrite OntologyIRI[/-][+]circular property ( like rdfs:isDefinedBy or dcterms:isVersionOf ) in .ttl causes owl:imports to overwrite OntologyIRI[/+]on Dec 2, 2022
I encountered this error as well. After debugging the owl api it seems this happens because the OWLRDFConsumer ignores any IRI that is used for annotation
The in the code I mentioned above in OWLRDFConsumer, do not remove it from candidateIRIS if the IRI is used as subject for imports:
TripleHandler
publicvoidhandleTriple(IRIs, IRIp, IRIo) {
consume(s, p, o);
// add a second parameter to indicate the IRI is a possible ontology IRI // since its the subjectconsumer.addOntology(s,true);
consumer.addOntology(o,false);
}
OWLRDFConsumer
protectedvoidaddOntology(IRIiri,boolsubjectIRI) {
if (ontologyIRIs.isEmpty()) {
firstOntologyIRI = iri;
}
ontologyIRIs.add(iri);
if (subjectIRI) {
importsubjectIRI.add(iri)
}
}
Activity
SimonBin commentedon Dec 2, 2022
same issue with for
[-]circular rdfs:isDefinedBy in .ttl causes owl:imports to overwrite OntologyIRI[/-][+]circular property ( like rdfs:isDefinedBy or dcterms:isVersionOf ) in .ttl causes owl:imports to overwrite OntologyIRI[/+]vChavezB commentedon Nov 25, 2023
I encountered this error as well. After debugging the owl api it seems this happens because the
OWLRDFConsumerignores any IRI that is used for annotationowlapi/parsers/src/main/java/org/semanticweb/owlapi/rdf/rdfxml/parser/OWLRDFConsumer.java
Lines 1467 to 1473 in b683b03
vChavezB commentedon Nov 25, 2023
I think this could be solved if the IRI used as subject for the predicate
owl:importsis taken into account as possible IRI.owlapi/parsers/src/main/java/org/semanticweb/owlapi/rdf/rdfxml/parser/TripleHandlers.java
Lines 1545 to 1550 in b683b03
The in the code I mentioned above in
OWLRDFConsumer, do not remove it fromcandidateIRISif the IRI is used as subject for imports:TripleHandler
OWLRDFConsumer
Disclaimer: I am not familiar with java syntax. Take this suggestion just as an idea but feel free to improve it :)
Fixed ontology iri parsing when annotation imports same iri
Fixed ontology iri parsing when annotation imports same iri
Fixed ontology iri parsing when annotation imports same iri
Add unit tests for bug owlcs#1080: self-referencing annotation + imports
Fix OWL API ontology-IRI detection and reviewer findings
Add tag-driven release pipeline with immutable, checksummed assets